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 Advanced StratCon Reinforcements #5273

Merged
merged 6 commits into from
Dec 3, 2024

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Dec 2, 2024

Introduction

The previous reinforcement implementation created some balancing concerns. The gameplay loop would be this: scenario spawns, player deploys a lance, the player then reinforces that scenario using Forces in Fight Stance. This is easily done by converting CVP to SP, if necessary. The player will usually out-BV Princess at this point, allowing for a much easier victory. This generates a CVP, making future scenarios easier. So long as the player can maintain CVP above 1 they can infinitely reinforce. The only limitation is the number of Forces available to them. As they are taking less casualties they end up in a victory spiral where past victories ensure future victories. There is a bit more to it than that, but that's the general gist.

Following a handful of discussions on Discord it was determined that a more advanced implementation was desirable.

Overview

  • All reinforcement attempts cost 1 SP, no matter what role the force is in.
  • All reinforcements require a reinforcement check, no matter what role the force is in. Forces in the Fight role re-roll this check using the best result.

Reinforcement Checks

  1. We start by identifying the most senior character in the Admin/Command role. This character is handling communication between the Primary Force, the would-be reinforcements, and any local allied forces. Their Administration skill is used to determine the base Target Number for the reinforcement role.
  • If the campaign has no personnel in the Admin/Command role, the check is automatically failed with no Support Points spent.
  • If the most senior character in the Admin/Command role does not have the Administration skill (somehow), the check is automatically failed however a Support Point is still spent.
  1. Next we identify any Facility Modifier. Currently a -1 is applied to the Target Number for each allied facility in the relevant Sector, while a +1 malus is applied for each enemy facility.
  2. Then we identify the Skill Modifier. This is equal to the skill level of your enemies, minus the skill level of your employer. If using CamOps Reputation and on an Independent contract, your Experience Rating is used instead of your employer's skill.
  3. If the contract's command rights are Liaison the Target Number is reduced by 1. If the contract's command rights are House or Integrated the Target number is reduced by 2.
  4. Finally, a 2d6 roll is made. If this equals or beats the Target Number the reinforcement check has been passed.
  • Forces in the Fight role make two attempts, picking the best result.
  • If the 2d6 roll is less than the Target Number or a natural, unmodified 2, then the check has been failed. The Support Point is lost and no reinforcement occurs. Otherwise the check is successful, however we now need to determine whether the enemy has intercepted the reinforcements.

Interception Check

  • Interception checks only occur if the reinforcement was successful.
  1. First we roll a d100 and compare the result to the scenario chance for the relevant track. If the roll beats the scenario chance no interception occurs.
  • Scenario chance is directly linked to enemy Morale, so the players will need to judge for themselves whether they can risk interception when reinforcing.
  1. If an interception occurs, we need to determine whether the leader of the reinforcements was able to evade the interception. The evasion target number is equal to 9 - the force leader's Tactics skill (including Skill Bonus, if present).
  • 'Force Leader' is the character marked as the leader of the reinforcing force in your TO&E
  • If the force leader does not have the Tactics skill evasion is automatically failed.
  1. If an interception occurs, but is evaded, then the reinforcements will arrive but will have been delayed. This means their arrival time is doubled or tripled (based on a d2+1 die roll).
  • Evading an interception counts as a scenario, for the purposes of Fatigue.
  1. If an interception occurs, and evasion is failed, then the reinforcements have been intercepted. A special interception scenario is spawned with the reinforcements automatically assigned to that scenario.
  • Players can choose to reinforce interception scenarios, as normal.
  • The date of the interception scenario is equal to the current date, so depending on the date of the original scenario it may be possible for the interception force to return and then assist with the original scenario.
  • The scenario can occur in any unoccupied hex in the track. Currently StratCon doesn't handle having multiple scenarios in the same hex very well, so players will just have to use their imagination.

Fixed Exploits

  • It is no longer possible to bypass reinforcement rolls by assigning multiple units as the primary force.
  • It is no longer possible to bypass the Support Point cost of reinforcement rolls by picking multiple reinforcement forces at the same time.

Other

  • It should be noted that a campaign's Admin/Transport personnel generate Support Points on a monthly basis. This was added by a prior PR, but is being mentioned here for those users unaware of that change.
  • StratCon contracts will now initialize with Support Points based on the skill of the campaign's Admin/Transport personnel.

Closes #4733

Implemented new scenarios for reinforcement interception. Enhanced the campaign to select senior command administrators efficiently and handle delayed reinforcements deployment.
# Conflicts:
#	MekHQ/src/mekhq/campaign/stratcon/StratconRulesManager.java
Removed redundant reinforcement success message and integrated interception logic for clarity. Adjusted modifiers for facility, skill, and liaison/command rights to ensure correct calculation. Enhanced the generateReinforcementInterceptionScenario method with additional details, moved scenarioCoords calculation inside, and ensured fatigue is accounted for when necessary.
@IllianiCBT IllianiCBT added the StratCon Bugs relating strictly to StratCon label Dec 2, 2024
@IllianiCBT IllianiCBT self-assigned this Dec 2, 2024
Added a call to negotiate additional support points in the StratconContractInitializer to ensure initial support points are determined. This change ensures proper initialization of support resources at the start of a contract.
@codecov-commenter
Copy link

codecov-commenter commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.46%. Comparing base (d333f62) to head (156c5f9).
Report is 28 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5273      +/-   ##
============================================
- Coverage     10.47%   10.46%   -0.02%     
+ Complexity     6049     6048       -1     
============================================
  Files           959      959              
  Lines        135202   135396     +194     
  Branches      19674    19711      +37     
============================================
  Hits          14165    14165              
- Misses       119686   119880     +194     
  Partials       1351     1351              

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

@IllianiCBT
Copy link
Collaborator Author

  • Base target number for reinforcement is now 9, down from 12.
  • Interception checks are only made if the reinforcement roll is failed, but is not a critical failure.
  • Fixed a bug with skill modifiers on Independent contracts
  • Reduced reinforcement deployment times by roughly 33% - this will vary based on the movement of the force in question, but generally this will mean that reinforcements actually arrive in time for the battle and having those reinforcements get delayed isn't as crippling. To use the examples in the documentation:
    a group of Atlases (3/5) should arrive at turn 7 (20 / 3) down from 10
    a group of jump-capable Griffins (5/8/5) should arrive on turn 3 (20 / 6, rounded down) down from 5 (Jump increases walk speed by 1 for the purpose of arrival speed - note this has not been changed since 2018)
    a group of Ostscouts (8/12/8) should arrive on turn 2 (20 / 9, rounded down) down from 3

Reduced the reinforcement arrival scale from 30 to 15 to quicken reinforcements. Revised messaging for reinforcement events, including differentiating success, command failure, and enemy interception scenarios. Corrected skill modifier calculation in reinforcement logic for improved accuracy.
Copy link
Member

@HammerGS HammerGS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Co-Pilot sees no issues.

@HammerGS HammerGS merged commit 38a4434 into MegaMek:master Dec 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
StratCon Bugs relating strictly to StratCon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFE; Admin and Reinforcements, conversation archived for @Illiani
3 participants