-
Notifications
You must be signed in to change notification settings - Fork 176
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
Reworked Scenarios and Scenario Modifiers, Tied Civilian Units to Campaign Era #4928
Conversation
Modified the detailed briefing text for "Engage" and "Engage - Heavy" scenarios to include destroying 75% of the opposing force.
Renamed multiple scenarios to better reflect their missions and objectives. Adjusted success and failure effects, added new objectives focusing on preserving forces, and corrected weight classes for balanced gameplay.
Renamed scenario template files for consistency and clarity. Updated "contributesToBV" and "generationMethod" fields, and added new objectives to "Assassinate - Heavy Escort" and "Assassinate - Frontier" scenarios.
Removed outdated scenario templates, including "Allied Facility" and "Recon." Updated names and descriptions for existing templates to improve clarity and match current mission objectives. Improved detailed briefings for better mission guidance.
Revised scenario names for clarity and consistency, including renaming "Designated Target" to "VIP" in various XML files. Added new scenarios to contract definitions to diversify objectives. These changes aim to improve readability and maintainability of the game’s contract and scenario structure.
Revised the scenario template file to streamline and rename scenario entries. The updated entries provide clearer scenario descriptions and simplify future maintenance. This change aims to improve readability and consistency across the scenario manifest.
Updated various mission files to modify win conditions from 100% to 75% destruction or preservation thresholds. Simplified success and failure effect specifications and streamlined objective descriptions for clarity.
Removed `SearchAndRescue.xml` and updated multiple scenario modifiers to contribute to BV and unit count. Simplified briefing texts for `IntegratedAllies` and `LiaisonAir` while adjusting various configuration parameters.
@@ -1,5 +1,5 @@ | |||
<AtBScenarioModifier> | |||
<additionalBriefingText>Preserve 50% of the designated turrets.</additionalBriefingText> | |||
<additionalBriefingText>Preserve 25% of the designated turrets.</additionalBriefingText> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was to hold base defenses to a similar standard as base assaults. Previously, players were required to keep 50% of the base turrets alive, while they were required to kill 75-100% to destroy an enemy base.
<startingAltitude>5</startingAltitude> | ||
<objectiveLinkedForces> | ||
<objectiveLinkedForce>Player</objectiveLinkedForce> | ||
</objectiveLinkedForces> | ||
<syncDeploymentType>SameEdge</syncDeploymentType> | ||
<syncedForceName>Player</syncedForceName> | ||
<useArtillery>false</useArtillery> | ||
</forceDefinition> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're removing the various House Officer, Liaison, and Integrated Allies objectives and instead just having them hook into whatever the players' force objective is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll see a lot of 'This file was deleted' this is the sole instance where I deleted something, the rest were all renamed.
Adjusted various scenario modifier XML files to ensure that certain forces no longer contribute to Battle Value (BV) and unit count metrics. This change involved setting `<contributesToBV>` and `<contributesToUnitCount>` to `false` in relevant files. Additionally, modified the minimum weight class and enabled map size contributions for certain scenarios.
Standardized the casing for "OpFor" across various scenario template XML files to maintain consistency and improve readability. This change impacts multiple templates, including "Minor Engagement" and "Isolated DropShip Defense."
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ 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 ☔ View full report in Codecov by Sentry. |
Updated various scenario template XML files by renaming 'Primary OpFor' to 'OpFor' for consistency and clarity. Also made minor brief description adjustments and renamed other entities like 'Escorted DropShip' to 'DropShip' in relevant templates.
Removed unnecessary convoy escort scenarios from ExtractionRaid.xml and added 'Deep Raid' to ObjectiveRaid.xml. Introduced a new scenario template for VIP Defense. Updated various contract definitions to include new and relevant scenarios.
Removed unnecessary convoy escort scenarios from ExtractionRaid.xml and added 'Deep Raid' to ObjectiveRaid.xml. Introduced a new scenario template for VIP Defense. Updated various contract definitions to include new and relevant scenarios.
Added exception handling for the alignment check of linked forces in ScenarioObjective. This will make troubleshooting easier if I mucked up the name changes somewhere.
Commented out scenario modifiers not suitable for all eras in `modifiermanifest.xml` to prevent inconsistencies. Added explanatory comments to indicate the reasons for their deactivation.
Changed the generation method from 4 to 3 for DropShip in three scenario templates: Isolated DropShip Defense, Low-Atmosphere DropShip Escort, and Space Blockade Run. This adjustment ensures consistency in DropShip generation across various scenarios.
Updated all instances of 'Base Turrets' to 'Base Defenses' to ensure consistency across scenario modifiers and template files. This change aligns the terminology with current design standards and improves clarity for future development and maintenance.
Adjusted the forceMultiplier from 1.0 to 0.5 in both the "Convoy Escort" and "Convoy Raid" scenario templates. This change ensures that convoy forces are more balanced and less overwhelming during these missions.
Included various force roles like MEK_CARRIER, ASF_CARRIER, VEE_CARRIER, INFANTRY_CARRIER, TROOP_CARRIER, and CIVILIAN in several DropShip scenario templates. This enhances scenario flexibility and allows for more diverse unit deployment.
Duplicated MEK_CARRIER entries were added across multiple XML files in scenario templates, which may be an error. Additionally, modified forceName attributes in some scenario modifiers and expanded roleChoices to include new roles like TROOP_CARRIER and CIVILIAN.
Adjusted convoy-related scenario templates to allow and define special civilian unit types and roles. Modified scenario generation code to handle civilians and ensure correct unit selection and fallback mechanisms.
actualUnitType = UnitType.TANK; | ||
// Mixed units randomly select between Mek or ground vehicle | ||
} else { | ||
for (int x = 0; x < unitCount; x++) { |
Check warning
Code scanning / CodeQL
Constant loop condition Warning
Loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it isn't
Collection<MissionRole> roles; | ||
|
||
if (rolesByType != null) { | ||
roles = rolesByType.getOrDefault(unitTypes.get(i), new ArrayList<>()); |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
rolesByType
this
Variable
rolesByType
this
Variable
rolesByType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's literally checked the line above, silly bot
Flipping this to live. Description has been updated accordingly. |
Updated the force definitions in the XML files to include various role choices like CIVILIAN, CARGO, SUPPORT, and APC. This ensures more detailed and flexible scenario configurations for both hostile and allied facility evacuation scenarios, as well as in irregular force suppression and assault scenarios.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
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