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

Retirement Overhaul (Wave One) #3921

Merged
merged 25 commits into from
Apr 30, 2024

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Mar 28, 2024

Module Name Change [UI]

  • Currently the 'Retirement/Defection' system is called the 'Retirement/Defection' system.
  • Currently Defection functionality is not yet implemented. Furthermore, there is no differentiation between employees retiring and employees resigning.
  • I have changed references to 'Retirement/Defection' to 'Employee Turnover'. I have left any variable or class names intact. This is predominately a user-facing and/or comment-based change. 'Employee Turnover' better fits the currently implementation of Retirement/Defection and is a better fit for my Wave Two plans.

image

Payouts [Rebalance]

  • Currently, payouts are based on 3 months' wages.
  • Following discourse on Discord it became apparent that 3 months' wage is insufficient. Furthermore, there was a desire to have payouts linked to employee wages, rather than a fixed value.
  • Increased payout values to 24 months' wages, based on Discord discussion this was felt to be a more balanced option. Furthermore, rather than using a fixed value, the system now fetches the exact wage of the employee and determines payout based on that value.

Unit Rating Modifiers [Rebalance / Bugfix]

  • Currently, Unit Rating modifiers are uncapped and directly linked to the Unit Rating. CamOps unit rating has no minimum/maximum theoretical limit.
  • Uncapped unit rating modifiers lead to scenarios where retirement TNs are undesirably low or high. Potentially to the point of becoming impossible to pass/fail.
  • Rebalanced Unit Rating modifiers to no longer have such a large impact on TN. Unit Rating modifiers now range from + 2 to - 1, depending on unit rating. CamOps and FM:M unit rating systems now both result in the same TN adjustments. (closes Retirement checking not functioning as intended due to Campaign Operations rating system #3817)

Experience Modifier [UI]

  • Currently, the Experience modifier is applied to the retirement TN and is a combination of employee skill rating and company unit ranking.
  • Having Experience be a combination of two modifiers makes it difficult for users to understand what calculations are going into the TN.
  • Split Experience into Unit Rating and Skill Rank. Skill Rank is displayed using the employees' own skill rank (see below).

image

Shares Modifier Display [UI]

  • Currently, when using Shares, if a contracts' share percentage is above 20% a modifier is applied to the retirement TN.
  • The Shares modifier only displays once shares percentage is above 20%. As the default value for shares percentage is 20% this may lead users to not realize that the shares modifier exists.
  • So long as Shares are being used, the Shares modifier will always display during the end of contract retirement check.

Empty Condition [Refactor]

  • Currently, there is an empty conditional (lines 268-270).

image

  • The empty conditional causes IntelliJ to yell at me every time I try to push a commit. It's annoying.
  • I removed the empty conditional.

Faction Modifiers [Enhancement]

  • Currently, companies with the 'Pirate' faction have a + 1 modifier to the retirement TN.
  • Faction modifiers are limited only to the pirate faction and do not account for employee faction.
  • Now the system checks whether the company Faction is 'Pirate' and if so, applies a + 1 modifier to the retirement TN. If the company Faction is not 'Pirate', but the employee is a Pirate, then the employee has a + 1 modifier to their retirement TN. Employees with the 'Mercenary' or 'Clan' origin have a + 1 / - 2 modifier to the retirement TN respectively, regardless of company faction.

Old Age Modifiers [Enhancement]

  • Currently, employees 50 years old, or older, have a + 1 penalty to the retirement TN.
  • The + 1 modifier is static, meaning a 50 year old has the same retirement desires as a 120 year old.
  • Rebalanced and expanded age modifiers These offer a more granular range of modifiers, from + 1 to + 5. Included a condition for very young employees (20, or younger) which applies a - 1 modifier. I felt young pilots would be less likely to want to stray too far from their initial hire.

image

Bonus Modifiers (when not using Shares) [Rebalance]

  • Currently, when not using Shares, users can pay a Bonus to employees to improve the TN by -1.
  • The bonus modifier lacks impact, considering it is the only real way for a non-Shares using user to manipulate retirement checks.
  • Improved the modifier from paying bonuses from - 1 to - 2.

Copy link

codecov bot commented Mar 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 66 lines in your changes are missing coverage. Please review.

Project coverage is 10.65%. Comparing base (6c795af) to head (86919b6).
Report is 19 commits behind head on master.

❗ Current head 86919b6 differs from pull request most recent head 3ee2480. Consider uploading reports for the commit 3ee2480 to get more accurate results

Files Patch % Lines
...campaign/personnel/RetirementDefectionTracker.java 0.00% 62 Missing ⚠️
...rc/mekhq/gui/dialog/RetirementDefectionDialog.java 0.00% 3 Missing ⚠️
...ekHQ/src/mekhq/gui/model/RetirementTableModel.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3921      +/-   ##
============================================
- Coverage     10.65%   10.65%   -0.01%     
  Complexity     5528     5528              
============================================
  Files           837      836       -1     
  Lines        114294   114313      +19     
  Branches      17188    17191       +3     
============================================
  Hits          12176    12176              
- Misses       100890   100909      +19     
  Partials       1228     1228              

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

@IllianiCBT IllianiCBT self-assigned this Mar 28, 2024
@IllianiCBT IllianiCBT added AtB Personnel Personnel-related Issues labels Mar 28, 2024
@IllianiCBT IllianiCBT marked this pull request as draft March 28, 2024 05:27
@IllianiCBT IllianiCBT marked this pull request as ready for review March 28, 2024 05:27
@IllianiCBT IllianiCBT marked this pull request as draft March 28, 2024 05:44
@IllianiCBT IllianiCBT changed the title Retirement Payout and Modifier Adjustments Retirement Improvements (Wave One) Mar 28, 2024
@IllianiCBT IllianiCBT changed the title Retirement Improvements (Wave One) Retirement Overhaul (Wave One) Mar 28, 2024
@IllianiCBT IllianiCBT marked this pull request as ready for review March 29, 2024 19:06
@IllianiCBT
Copy link
Collaborator Author

This PR is now feature complete. Over the weekend I’ll write the supporting documentation, but otherwise it’s good to go.

@HammerGS
Copy link
Member

@IllianiCBT This now has Conflicts that need to be fixed before merging.

@IllianiCBT
Copy link
Collaborator Author

@IllianiCBT This now has Conflicts that need to be fixed before merging.

Fixed :)

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 66 lines in your changes are missing coverage. Please review.

Project coverage is 10.65%. Comparing base (ac01416) to head (86919b6).
Report is 431 commits behind head on master.

❗ Current head 86919b6 differs from pull request most recent head d73dc32. Consider uploading reports for the commit d73dc32 to get more accurate results

Files Patch % Lines
...campaign/personnel/RetirementDefectionTracker.java 0.00% 62 Missing ⚠️
...rc/mekhq/gui/dialog/RetirementDefectionDialog.java 0.00% 3 Missing ⚠️
...ekHQ/src/mekhq/gui/model/RetirementTableModel.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3921      +/-   ##
============================================
- Coverage     10.80%   10.65%   -0.16%     
+ Complexity     5608     5528      -80     
============================================
  Files           841      836       -5     
  Lines        114672   114313     -359     
  Branches      17235    17191      -44     
============================================
- Hits          12392    12176     -216     
+ Misses       101021   100909     -112     
+ Partials       1259     1228      -31     

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

@HammerGS HammerGS merged commit f466389 into MegaMek:master Apr 30, 2024
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retirement checking not functioning as intended due to Campaign Operations rating system
4 participants