Skip to content
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

Multiple FG3 Improvements #5042

Merged
merged 6 commits into from
Oct 13, 2024
Merged

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Oct 13, 2024

  • Added better logging to assist in narrowing down FG3 oddities and to make it easier to verify everything is working as intended.
  • Added checks to ensure planetary and weather conditions are enabled before we declare certain unit types as unsuited for the scenario.
  • Added fallback generation, so that if we request a unit type that cannot survive in the environment it uses a fallback unit type instead. This is Infantry (Conventional or BA) -> Tank -> Mek. In this way if we try to generate infantry in an environment they cannot survive, we will attempt to spawn a tank instead, if that also can't survive we spawn a Mek. Tanks skip the infantry stage. While this may result in some unusual spawning (for example, reinforcements from a tank base might turn up as meks if the scenario is in a tornado), it will better avoid 0-unit forces. This has been written to work with the 'infantry use survival gear' changes that were made a while ago.
  • Corrected a number of scenarios so that they correctly contribute to BV and to fix formatting errors.
  • Corrected Heavy Recon Evasion's objectives
  • Fixed the 'fleet of DropShips' bug
  • Simplified bidding reporting, so that it's less cluttered
  • Fixed the Batchall dialog to trigger correctly. Now, while it may trigger while the campaign is still in transit, it will more consistently trigger. There were edge cases that could cause the dialog to never trigger.

Closes #5041 && #5005 && #5009 && #5027

Enhanced logging to provide detailed insights during force generation. Optimized force generation logic by introducing planetary and weather condition checks. Simplified code with switch expressions and added a second chance entity generation mechanism.
Fixed line breaks in briefing text for multiple scenario XML files for consistency. Updated several scenario modifiers to contribute correctly to BV and unit counts. Commented out some unused modifiers in airBattleModifiers.xml and groundBattleModifiers.xml.
Condensed descriptions in "Frontline Disruption" and modified generationMethod in "DropShip Raid." Removed redundant objectives in "Heavy Recon Evasion" and adjusted time limit settings for better gameplay balance.
Removed redundant scenario and contract details from bid away and supplement force reports to streamline the messages. Also deleted unnecessary concluding text from the batchall process. This improves readability and maintains focus on the essential information.
Moved the processNewDayATBScenarios call to an earlier point in the day transition method. This ensures new scenarios are processed before any contracts are evaluated. Additionally, removed the redundant check for being on a planet when initiating contracts.
@IllianiCBT IllianiCBT added Bug Data Hammertime Force Generation Anything related to Force Generation (Opfor or Friendly) labels Oct 13, 2024
@IllianiCBT IllianiCBT self-assigned this Oct 13, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.43%. Comparing base (3e8168d) to head (f31721b).
Report is 28 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #5042   +/-   ##
=========================================
  Coverage     10.43%   10.43%           
- Complexity     6022     6028    +6     
=========================================
  Files           952      952           
  Lines        133810   133893   +83     
  Branches      19432    19434    +2     
=========================================
+ Hits          13961    13972   +11     
- Misses       118498   118579   +81     
+ Partials       1351     1342    -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The code to adjust the BV and unit count for enemy bot forces was removed as it was redundant. This adjustment was not utilized elsewhere in the code and was unnecessary for the logic flow.
@HammerGS HammerGS merged commit d1cffdd into MegaMek:master Oct 13, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Data Hammertime Force Generation Anything related to Force Generation (Opfor or Friendly)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MekHQ NI #1641 - Tank spawns not respecting player settings
3 participants