-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Units with high Campaign Operations rating only generating Relief Duty missions #3729
Comments
CO doesn't use the unit rating for mission rolls and iirc CO wasn't out yet when AtB was first written. I think it had only been out for maybe a year when AtB was added to MekHQ itself. CO 3p pg 40 |
@SuperStucco send me a discord message when you have a moment. wanted to ask a question about this and then will see if I can get it added. My discord name is same. |
I'll whip this into a PR tomorrow. I was planning on implementing the same thing. So always happy for someone else to do my work for me! :D I'll make sure you're credited. :) |
+ PR #3922: Add missing cockpit costs and weights + PR #3944: Added Nag Dialog for Pregnant Combatants + Fix #3943: Unmaintained Unit Nag Dialog Suppressed for Units set to Salvage + PR #3933: Fixes for #3729,#3817,#3753: Clamped Unit Rating Mod for CamOps (redux) + PR #3923: Hide Toughness When 0 + PR #3915: Added Dialog to Confirm New Campaign (redux) + PR #3908: Adjusted Default Tech Counts + PR #3967: Adjusted Zoom Speed on Interstellar Map Panel
The process of generating a mission type includes the unit rating value, like this:
https://github.com/MegaMek/mekhq/blob/a353f2b7f2496b9edb5f4ddce5e2d871426b8ad3/MekHQ/src/mekhq/campaign/market/ContractMarket.java#L566C39-L566C39
int roll = MathUtility.clamp(Compute.d6(2) + unitRatingMod - IUnitRating.DRAGOON_C, 2, 12);
When the old FM: Mercenaries Revised method is used for the campaign, it isn't too bad since the values top out at +5 for A/A* rated units. But under Campaign Operations the unit rating is uncapped and for long-term campaigns could easily be 8+. That number overwhelms the random 2d6 contribution in the equation, so only the top-most entry in the mission type table - Relief Duty - is returned.
This could be solved by clamping the unitRatingMod parameter to values expected in FM:Mr e.g.
int roll = MathUtility.clamp(Compute.d6(2) + MathUtility.clamp(unitRatingMod, IUnitRating.DRAGOON_F, IUnitRating.DRAGOON_ASTAR) - IUnitRating.DRAGOON_C, 2, 12);
... or something that's a little more towards the FM:MR/Campaign Operations differences, and does separate calculations. That would require an additional argument to the method to determine which process and numbers to use.
(and yes, maybe I could put in a pull request for this, but I'm not set up for coding on this project)
The text was updated successfully, but these errors were encountered: