MegaMek / mekhq

MekHQ is a java helper program for the MegaMek game that allows users to load a list of entities from an XML file, perform repairs and customizations, and then save the new entities to another XML file that can be loaded into MegaMek.
http://megamek.org
131 stars 168 forks source link

Reworked Scenarios and Scenario Modifiers, Tied Civilian Units to Campaign Era #4928

Open IllianiCBT opened 3 days ago

IllianiCBT commented 3 days ago

This PR is one I've been wanting to work on for a while, but haven't found the time. It goes through and rebalances scenario objectives across the board, taking a more holistic view of scenario objectives to prevent some of the weird behavior and objective bloat we've seen over the years.

I went through and rejigged the two scenario objectives that weren't tracked by mhq: Recon and Extract. Now for 'recon' you need to conduct the battle for a certain amount of time against an overwhelming enemy force. To represent the time taken to scan the battlefield or some such. For Extract, if the buildings are intact at the end of the scenario you'll get a Support Point.

I also went through and rebalanced our battery of scenario modifiers. Only one was removed (Search and Rescue, as that cannot be tracked in mhq). My goal here was to better balance the modifiers between each other.

Finally, I renamed and re-jigged the descriptions for the various scenarios types to make them feel less sterile. I also added a handful of new scenarios. It's my hope that this will make things feel fresher, even if the actual scenarios themselves haven't changed that much.


Moving away from scenarios and modifiers, and onto contract command levels.

I wanted to make playing under House, Independent, Integrated, and Liaison command levels to feel different.

House: You will deploy with an allied force roughly the same size as your force. This represents your employer assigning joint forces to ensure objectives are completed. The idea here is that your employer has employed you to supplement their forces, to achieve objectives neither you nor they could complete alone.

Integrated: You will deploy with a large allied force. This represents you being integrated into your employers' wider organization. You are a cog in their machine.

Liaison: Your employer assigns you a liaison, whose job is to monitor your activities to ensure your employers' goals are met. To ensure this happens they will deploy a forward observer to keep an eye on you in the field. That liaison will always be in a heavy or assault unit. Apparently the employers of the Inner Sphere have gotten fed up with their liaisons getting shot out of the Locusts they all seemed to love so much.

Independent: You're on your own. Good luck, Commander.


I went in and used functionality added by @SuperStucco (back in #4418) to remove the old fixed Civilian tables. Now we take advantage of unit roles to generate convoys and civilian units based on unit type and role.

I also added some fallback values to better catch units that failed to generate. Generally this will mean the unit generates as a tank (for ground scenarios), or Civilian DropShip (for DropShip scenarios). So while the unit might not be the type expected, it should better avoid instances where we generate empty forces. It can't completely remove the chance, but it should at least reduce the likelihood. As we find more holes in the system we can add additional checks and balances. This isn't meant to completely remove the issue, just to mitigate it.

Closes #1416 && #4925 && #4850 && #4877 && #4927

codecov-commenter commented 3 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 10.45%. Comparing base (90ea1b7) to head (d29b836). Report is 4 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4928 +/- ## ============================================ + Coverage 10.44% 10.45% +0.01% - Complexity 5998 6012 +14 ============================================ Files 951 951 Lines 132874 132924 +50 Branches 19329 19348 +19 ============================================ + Hits 13873 13893 +20 - Misses 117653 117687 +34 + Partials 1348 1344 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

IllianiCBT commented 2 days ago

Flipping this to live. Description has been updated accordingly.