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

Implemented Force Generation 3, Including Clan Bidding & Batchall System #4865

Merged
merged 23 commits into from
Sep 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
01b5437
Refactor force weight calculation
IllianiCBT Sep 20, 2024
64ea5f1
Refactor AtBDynamicScenarioFactory and AtBConfiguration
IllianiCBT Sep 20, 2024
82eebef
Refactor StratConSkillGenerator skill logic
IllianiCBT Sep 20, 2024
5794832
Log and adjust BV culling in AtB mission factory
IllianiCBT Sep 20, 2024
58e4e87
Refactored AtB scenario modifier applicator
IllianiCBT Sep 20, 2024
bc00cc9
Add option for using Generic Battle Value in scenarios
IllianiCBT Sep 20, 2024
83920ca
Add option for using Generic Battle Value in scenarios
IllianiCBT Sep 20, 2024
810e406
Merge remote-tracking branch 'origin/opFor_generation3' into opFor_ge…
IllianiCBT Sep 20, 2024
f0a7360
Refactor forceBV calculation in scenario generation
IllianiCBT Sep 20, 2024
fdbe731
Add optional standard BV calculation and Clan force bid logic
IllianiCBT Sep 21, 2024
d042c38
Add verbose bidding mode for Clan forces
IllianiCBT Sep 22, 2024
5970df3
Update AtBDynamicScenarioFactory: Add Batchall initiation
IllianiCBT Sep 22, 2024
f31a9a0
Fix Batchall initiation for non-player forces
IllianiCBT Sep 22, 2024
8e23980
Update batchall conclusion text in scenario report
IllianiCBT Sep 22, 2024
47229ca
Add variation to batchallConcluded report text
IllianiCBT Sep 22, 2024
bcc4df5
Implement dynamic honor rating for Clan bot bidding
IllianiCBT Sep 22, 2024
0161edc
Refactored Batchall initiation logic
IllianiCBT Sep 23, 2024
6e19ad4
Merge branch 'refs/heads/master' into opFor_generation3
IllianiCBT Sep 23, 2024
64bfdf8
Improve logging format for force generation and culling
IllianiCBT Sep 23, 2024
df83fd5
Update enemy handling in AtBContract
IllianiCBT Sep 24, 2024
66bc4aa
Introduced the beginnings of the Fame and Infamy module with batchall…
IllianiCBT Sep 24, 2024
33eaf30
Refactored Batchall handling with detailed faction-specific logic
IllianiCBT Sep 25, 2024
84304bf
Refactor dialog handling in Batchall classes (again)
IllianiCBT Sep 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve logging format for force generation and culling
Converted string concatenations to `String.format` for generating log messages in `AtBDynamicScenarioFactory`. This change enhances readability and consistency in logging output for force generation, culling, and final force statistics.
IllianiCBT committed Sep 23, 2024
commit 64bfdf862fb5175527469bab345e666c6fcaca65
Original file line number Diff line number Diff line change
@@ -898,7 +898,7 @@ chkAdjustPaymentForStrategy.text=Adjust contract payment for deployment limits
chkAdjustPaymentForStrategy.toolTipText=<html>If the number of lances required to be deployed exceeds the current commander's strategy skill, <br>reduce the number when calculating new contracts and reduce the payment proportionally</html>.
lblAdditionalStrategyDeployment.text=Per rank of strategy:
spnAdditionalStrategyDeployment.toolTipText=The number of additional lances that can be deployed for each increase in strategy skill.
chkUseGenericBattleValue.text=Use Generic Battle Value
chkUseGenericBattleValue.text=Use Force Generation 3
chkUseGenericBattleValue.toolTipText=Bot forces are balanced used Generic Battle Value, an estimation of the average battle value for a unit of that type and weight.\
\ This ignores pilot skill, meaning contracts against Green and Elite OpFors should feel fundamentally different.\
\ Similarly, OpFors with higher or lower than average equipment (such as Clans or Pirates) will present higher or lower difficulty scenarios.
11 changes: 7 additions & 4 deletions MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java
Original file line number Diff line number Diff line change
@@ -730,7 +730,8 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac
if (campaign.getCampaignOptions().isUseGenericBattleValue()) {
balancingType = " Generic";
}
logger.info("Generated a force with " + forceBV + '/' + forceBVBudget + ' ' + balancingType + " BV");
logger.info(String.format("Generated a force with %s / %s %s BV",
forceBV, forceBVBudget, balancingType));

int adjustedBvBudget = (int) (forceBVBudget * 1.25);

@@ -746,12 +747,14 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac

forceBV -= battleValue;

logger.info("Culled " + generatedEntities.get(targetUnit).getDisplayName()
+ " (" + battleValue + balancingType + " BV)");
logger.info(String.format("Culled %s (%s %s BV)",
generatedEntities.get(targetUnit).getDisplayName(), battleValue, balancingType));

generatedEntities.remove(targetUnit);
}
logger.info("Final force " + forceBV + '/' + adjustedBvBudget + balancingType + " BV)");

logger.info(String.format("Final force %s / %s %s BV",
forceBV, adjustedBvBudget, balancingType));
}

// Units with infantry bays get conventional infantry or battle armor added