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

[FG3] Updated Aircraft Force Generation, Unit Culling, and Added ProtoMeks #5247

Merged
merged 3 commits into from
Nov 29, 2024

Conversation

IllianiCBT
Copy link
Collaborator

Adjusted the two DropShip Escort scenarios to veer less towards spamming units. This was achieved by marking the DropShips as not contributing towards BV, but then doubling the BV allowance of the OpFor.

Adjusted how aircraft forces are generated. Previously, whenever a planet-owner generated an arial force there was a 50/50 chance they would spawn Conventional Fighters. In addition, the size of Conventional Fighter forces was around 6 units (triple the standard array). When combined with the very low BV2 / GBV cost of Conventional Fighters, this meant when those forces were spawned they disproportionately flooded the OpFor. In many cases 6 Conventional Fighters were still less BV2/GBV than a single Aerospace Fighter. Now Conventional Fighter flights match the size of their Aerospace compatriots.

The chance of a Conventional Fighter force occurring is now tied to the vehicle and mixed ratios defined in Campaign Options. This made sense as, compared to Aerospace Fighters, Conventional aircraft as essentially the vehicles of the sky.

I further updated the method that determines the size of an aircraft force, drastically simplifying it and bringing it in canon for ComStar and Clan factions.

I have also added unit substitution for aircraft scenarios. This was added to ground scenarios with the launch of FG3, however due to its experimental state it was not extended to aircraft scenarios. That is no longer the case, which should primarily benefit Clan factions who have very limited access to Conventional Fighters.

Moving on from aircraft I rewrote the code used to cull forces. We've received a lot of feedback about the way we previously culled units to bring the force within budget. Frequently this resulted in the force being substantially under-budget - especially with smaller budgets.

Now, instead of culling units we instead take all the units generated and put them in a pile. We then take each unit and add it to a 'bucket' the size of which is equal to the BV budget for the scenario. We keep adding units to the bucket, skipping any units that would exceed the size of the bucket. This substantially reduces the tendency of FG3 to under-BV, while also removing FG3 similar tendency to over-BV.

Finally, Clan forces can now spawn ProtoMeks as a part of their forces on 3057 has been reached. A ProtoMek force will replace a Mek force 6% of the time. This is based on the tables on p265 of TW.

@IllianiCBT IllianiCBT added the Force Generation Anything related to Force Generation (Opfor or Friendly) label Nov 25, 2024
@IllianiCBT IllianiCBT self-assigned this Nov 25, 2024
@IllianiCBT
Copy link
Collaborator Author

IllianiCBT commented Nov 25, 2024

Closes #5241

@IllianiCBT IllianiCBT closed this Nov 25, 2024
@IllianiCBT
Copy link
Collaborator Author

Whoops, closed the wrong thing!

@IllianiCBT IllianiCBT reopened this Nov 25, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.49%. Comparing base (519101f) to head (4ce1d24).
Report is 36 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5247      +/-   ##
============================================
- Coverage     10.50%   10.49%   -0.02%     
+ Complexity     6044     6035       -9     
============================================
  Files           957      957              
  Lines        134716   134787      +71     
  Branches      19572    19600      +28     
============================================
- Hits          14149    14140       -9     
- Misses       119216   119296      +80     
  Partials       1351     1351              

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

Updated `checkForProtoMek` to return lists and modified unit type assignments to accommodate multiple units. Ensured that ProtoMek check returns five instances where necessary, improving overall scenario management.
@IllianiCBT
Copy link
Collaborator Author

Updated Clan Bidding to use the same system of rebuilding the OpFor force, rather than removing random elements.

Replaced String-based entity handling with Entity objects for more precise manipulation during the bidding process. Simplified and optimized the logic to shuffle and manage bid away forces, ensuring better maintainability and readability. Updated report generation to reflect usage of Entity properties, enhancing the clarity of battle reports.
@HammerGS HammerGS merged commit f9e40a5 into MegaMek:master Nov 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Force Generation Anything related to Force Generation (Opfor or Friendly)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants