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

Overhauled CamOps Unit Reputation Calculations and Report #4605

Merged
merged 50 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
47b4fe6
Refactored unit rating retrieval and added reputation controller
IllianiCBT Aug 10, 2024
b17b4b5
Add CommandRating and integrate with ReputationController
IllianiCBT Aug 10, 2024
7d12bb9
Update skill value retrieval method
IllianiCBT Aug 10, 2024
b5ab2a0
Handle null Person in skill and personality value methods
IllianiCBT Aug 10, 2024
b1ef6b5
Add logging for command rating calculation details
IllianiCBT Aug 10, 2024
0c46e5b
Rename variables in calculateCommanderRating method
IllianiCBT Aug 10, 2024
ec84bbe
Add retainer start date and combat record rating
IllianiCBT Aug 10, 2024
8fc1af1
Add TransportationRating calculation for Campaign
IllianiCBT Aug 10, 2024
ef4d370
Improve transportation rating calculations
IllianiCBT Aug 10, 2024
bdf26fa
Rename CamOpsRatingV2 package to CamOpsReputation
IllianiCBT Aug 10, 2024
1e77205
Merge branch 'refs/heads/master' into camOps_unitRating
IllianiCBT Aug 10, 2024
b942f9b
Add financial rating calculation
IllianiCBT Aug 10, 2024
86222b3
Add Crime Rating calculation to the Campaign
IllianiCBT Aug 10, 2024
25132b9
Reduce crime rating increment after one year
IllianiCBT Aug 10, 2024
2f1d5a7
Remove empty mission check in processUnitReputation
IllianiCBT Aug 10, 2024
42382d8
Add calculation of other modifiers for CamOps reputation
IllianiCBT Aug 10, 2024
0747596
Add total reputation calculation to ReputationController
IllianiCBT Aug 10, 2024
640dc85
Add getters and setters to ReputationController
IllianiCBT Aug 10, 2024
bf7833d
Refactor rating and transportation calculations
IllianiCBT Aug 10, 2024
3568f14
Update comment format and remove unused variable
IllianiCBT Aug 10, 2024
2a8a510
Add manual unit rating modifier to campaign
IllianiCBT Aug 10, 2024
6ecd6b9
Add detailed logging for transportation ratings
IllianiCBT Aug 11, 2024
e2513ac
Update unit reputation process for pirate factions
IllianiCBT Aug 11, 2024
fb230d1
Add detailed unit reputation description to ReputationController
IllianiCBT Aug 11, 2024
3ad5f30
Remove CampaignOpsReputation.java
IllianiCBT Aug 11, 2024
740c2cc
Update reputation calculation and related UI labels
IllianiCBT Aug 11, 2024
2286ef9
Remove AtB CamOps Division feature
IllianiCBT Aug 11, 2024
15e63b7
Add ReputationReportDialog for alternative unit rating
IllianiCBT Aug 11, 2024
a7faf16
Refactor and enhance person tech roles and support rating
IllianiCBT Aug 11, 2024
04240fd
Added internationalization support for reputation descriptions
IllianiCBT Aug 11, 2024
5f0f58e
Revised administration calculation with technician input.
IllianiCBT Aug 11, 2024
a7ddae6
Add personality influence on reputation
IllianiCBT Aug 11, 2024
f4ae1ae
Refactor unit iteration to exclude mothballed and salvaged units
IllianiCBT Aug 11, 2024
9ca2f84
Merge branch 'refs/heads/master' into camOps_unitRating
IllianiCBT Aug 11, 2024
c0f69ec
Switch logging level to debug for detailed outputs
IllianiCBT Aug 11, 2024
1e7c2fe
Fix extra line break in crime rating display
IllianiCBT Aug 11, 2024
de4b1ff
Fixed DropShip rating calculation and updated text properties
IllianiCBT Aug 11, 2024
a5cecdf
Refactored crime rating calculations and added piracy modifier
IllianiCBT Aug 11, 2024
d25483b
Refactored skill handling in calculateRegularExperience.
IllianiCBT Aug 11, 2024
e20c3f2
Merge branch 'MegaMek:master' into camOps_unitRating
IllianiCBT Aug 12, 2024
fe5afc6
Fixed mission string formatting and null check in CrimeModifier
IllianiCBT Aug 12, 2024
add52ed
Merge branch 'MegaMek:master' into camOps_unitRating
IllianiCBT Aug 12, 2024
7753585
Update crime rating method name
IllianiCBT Aug 12, 2024
2119a9c
Merge branch 'MegaMek:master' into camOps_unitRating
IllianiCBT Aug 12, 2024
dbcc43b
Removed unused setter methods.
IllianiCBT Aug 13, 2024
a81313e
Refactor Reputation Handling
IllianiCBT Aug 13, 2024
1bc0fab
Rolled back move to Java Record
IllianiCBT Aug 13, 2024
a6c17dc
Refactor reputation controller handling in Campaign
IllianiCBT Aug 13, 2024
7be8bcc
Add exception handling for TechnicianRequirements parsing
IllianiCBT Aug 13, 2024
55a2c0a
Refactored exception handling in ReputationController.
IllianiCBT Aug 13, 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
57 changes: 57 additions & 0 deletions MekHQ/resources/mekhq/resources/CamOpsReputation.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
unitReputation.text=<html><font size='7'><b>Unit Reputation: %d</b></font><br><br>

averageExperienceRating.text=<b><font size='6'>Average Experience Rating: %s</font></b>
experienceLevel.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Experience Level: </b>%s<br><br>

commandRating.text=<b><font size='6'>Command Rating: %s</font></b>
leadership.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Leadership: </b>%s
tactics.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tactics: </b>%s
strategy.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Strategy: </b>%s
negotiation.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Negotiation: </b>%s
traits.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Traits: </b>%s <i>Not Implemented</i>
personality.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Personality: </b>%s

combatRecordRating.text=<b><font size='6'>Combat Record Rating: %s</font></b>
successes.text=Successes
partialSuccesses.text=Partial Successes
failures.text=Failures
contractsBreached.text=Contracts Breached
retainerDuration.text=Retainer Duration
mission.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%s: </b>%d (+%d)

transportationRating.text=<b><font size='6'>Transportation Rating: %s</font></b>
hasJumpShipOrWarShip.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Has JumpShip or WarShip: </b>+10
smallCraft.text=Small Craft
fighters.text=Fighters
battleMechs.text=BattleMechs
vehicleSuperHeavy.text=Vehicles (Super Heavy)
vehicleHeavy.text=Vehicles (Heavy)
vehicleLight.text=Vehicles (Light)
protoMechs.text=ProtoMechs
battleArmor.text=Battle Armor
infantry.text=Infantry
transportString.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%s: </b>%d / %d Bays%s %s
asterisk.text=<br><i>* Lighter units will occupy spare bays</i><br>
noDropShip.text=No DropShip: -5
dropShipString.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DropShips: </b>%d / %d Docking Collars (%s)<br>

supportRating.text=<br><b><font size='6'>Support Rating: %d </font></b>
crewRequirements.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Partially Crewed Large Craft: -5<br>
administrationRequirements.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Administration Requirements: </b>%d / %d (%d)<br>
technicianRequirements.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Technician Requirements: %s</b><br>
battleMechsAndProtoMechs.text=BattleMechs & ProtoMechs
vehicles.text=Vehicles
fightersAndSmallCraft.text=Fighters & Small Craft
technicianString.text=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%s: </b>%d / %d<br>

financialRating.text=<b><font size='6'>Financial Rating: %s</font></b>
hasLoanOrDebt.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Has Loan or Debt: -10</b><br><br>

crimeRating.text=<br><b><font size='6'>Crime Rating: %s</font></b>
piracy.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Piracy: </b>%s
otherCrimes.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Other: </b>%s
dateOfLastCrime.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Date of Last Crime: </b>%s<br>

otherModifiers.text=<br><b><font size='6'>Other Modifiers: %s</font></b>
inactiveYears.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inactivity: </b>%d
customModifier.text=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Custom Modifier: </b>%s
4 changes: 2 additions & 2 deletions MekHQ/resources/mekhq/resources/CampaignGUI.properties
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ btnTransportReport.text=Transport Capacity
btnHangarOverview.text=Hangar Breakdown
btnPersonnelOverview.text=Personnel Breakdown
btnCargoCapacity.text=Cargo Capacity
btnUnitRating.text=Unit Rating Details
btnUnitRating.text=Reputation Report
panReports.title=Available Reports
panObjectives.title=Current Objectives
lblRating.text=<html><nobr><b>Unit Rating:</b></nobr></html>;
lblRating.text=<html><nobr><b>Reputation:</b></nobr></html>;
lblPersonnel.text=<html><nobr><b>Personnel:</b></nobr></html>;
lblMorale.text=<html><nobr><b>Morale:</b></nobr></html>;
lblAdministrativeCapacity.text=<html><nobr><b>Administrative Capacity:</b></nobr></html>;
Expand Down
13 changes: 8 additions & 5 deletions MekHQ/resources/mekhq/resources/CampaignOptionsDialog.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ CampaignOptionsDialog.title=Campaign Options

## General Tab
generalPanel.title=General
unitRatingMethodLabel.text=Unit Rating Method:
manualUnitRatingModifierLabel.text=Manual Unit Rating Modifier
unitRatingMethodLabel.text=Unit Reputation Method:
manualUnitRatingModifierLabel.text=Manual Reputation Modifier
lblName.text=Name:
lblDate.text=Date:
lblFaction.text=Faction:
Expand Down Expand Up @@ -434,12 +434,17 @@ lifePathsPanel.title=Life Paths
personnelRandomizationPanel.title=Personnel Randomization
chkUseDylansRandomXP.text=Use Dylan's Random XP (Unofficial)
chkUseDylansRandomXP.toolTipText=Use Dylan's optional random XP on creation of a new person (20% chance each of 0, 1, 2, 3, and randomized between 1 and 8 XP)

# Random Histories
randomHistoriesPanel.title=Random Histories
chkUseRandomPersonalities.text=Use Random Personalities
chkUseRandomPersonalities.toolTipText=<html>Personnel are generated with random personality traits, quirks and intelligence.\
<br>\
<br>Intelligence affects a characters ability to graduate from education module academies.\
<br>Intelligence affects a character's ability to graduate from education module academies.\
<br>\
<br>While traits and quirks do not currently have a mechanical effect, they will be used by the upcoming Random Events module.</html>
chkUseRandomPersonalityReputation.text=Personalities Influence Unit Reputation
chkUseRandomPersonalityReputation.toolTipText=if enabled, the personality of the campaign commander will impact the unit's Reputation.

# Family
familyPanel.title=Family (Unofficial)
Expand Down Expand Up @@ -868,8 +873,6 @@ chkUseStratCon.text=Use StratCon campaign rules
chkUseStratCon.toolTipText=An update of the AtB ruleset.
lblSkillLevel.text=Skill Level
lblSkillLevel.toolTipText=<html>This is the difficulty level for generated scenarios. <br>Values above Elite are not recommended.</html>
lblAtbCamOpsDivision.text=CamOps Unit Rating Modifier Divider
lblAtbCamOpsDivision.toolTipText=<html><body style="width:200px">Many AtB systems modify rolls based on unit rating. Due to how CamOps unit rating is calculated, this can result in receiving the maximum modifier much sooner compared to using the FM:Mr unit rating. To address this, this value divides the CamOps unit rating to determine the modifier applied to AtB's systems.</body></html>
lblScenarioMod.text=Random Scenario Modifiers
lblScenarioModMax.text=Maximum:
lblScenarioModMax.toolTipText=This is the maximum number of random scenario mods that can spawn on for a single Scenario. Excludes StratCon facility modifiers.
Expand Down
2 changes: 1 addition & 1 deletion MekHQ/resources/mekhq/resources/GUI.properties
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ PersonnelReportDialog.title=Personnel Report
TransportReportDialog.title=Transport Capacity Report

### UnitRatingReportDialog Class
UnitRatingReportDialog.title=Unit Rating Report
UnitRatingReportDialog.title=Reputation Report

#### Unspecified Dialogs
### AddOrEditPersonnelEntryDialog Class
Expand Down
Loading