-
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
Added Campaign Option to Randomize New Unit Quality #4158
Conversation
- Implemented getRandomUnitQuality method to generate quality of unit based on 2d6 roll and a modifier
- Added checkbox for enabling/disabling random new unit quality - Updated related settings and tooltips in CampaignOptionsDialog.properties - Updated set and get methods in CampaignOptions.java - Adjusted the UI to accommodate the new option in CampaignOptionsPane.java
This seems to include the changes of previous PRs. Better reolve the conflict, then update so the difference is easier to see. |
# Conflicts: # MekHQ/resources/mekhq/resources/CampaignOptionsDialog.properties
Conflicts resolved |
# Conflicts: # MekHQ/src/mekhq/campaign/Campaign.java
Resolved conflicts |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4158 +/- ##
============================================
- Coverage 10.28% 10.27% -0.01%
+ Complexity 5816 5809 -7
============================================
Files 921 920 -1
Lines 125827 125726 -101
Branches 18603 18600 -3
============================================
- Hits 12944 12923 -21
+ Misses 111613 111532 -81
- Partials 1270 1271 +1 ☔ View full report in Codecov by Sentry. |
# Conflicts: # MekHQ/src/mekhq/campaign/Quartermaster.java # MekHQ/src/mekhq/campaign/mission/AtBContract.java # MekHQ/src/mekhq/campaign/storyarc/storytrigger/AddUnitStoryTrigger.java # MekHQ/src/mekhq/campaign/universe/generators/companyGenerators/AbstractCompanyGenerator.java # MekHQ/src/mekhq/gui/CampaignGUI.java # MekHQ/src/mekhq/gui/adapter/ProcurementTableMouseAdapter.java # MekHQ/src/mekhq/gui/dialog/GMToolsDialog.java # MekHQ/src/mekhq/gui/dialog/MekHQUnitSelectorDialog.java # MekHQ/src/mekhq/gui/dialog/PersonnelMarketDialog.java
Requires: #4150
This PR adds a new campaign option to have new Units generate with randomized Quality ratings. I based the chance for each rating on the AtB Mek Quality table.
This table is based on a
2d6 + modifier
roll, with results clamped within 2 and 12. Please note that Unit Quality is one of those cases where F is the best quality and A is the worst. The original AtB table appears to have unit quality incorrectly flipped around, so I factored for that.Random Company Generator is affected by these changes, but applies a +2 modifier for the campaign commanders' roll, and a +1 modifier for officer rolls.