Skip to content

Add single-soldier coin training addon#1928

Open
DevOpsOfChaos wants to merge 3 commits intoReturn-To-The-Roots:masterfrom
DevOpsOfChaos:sidequest/single-soldier-coin-training
Open

Add single-soldier coin training addon#1928
DevOpsOfChaos wants to merge 3 commits intoReturn-To-The-Roots:masterfrom
DevOpsOfChaos:sidequest/single-soldier-coin-training

Conversation

@DevOpsOfChaos
Copy link
Copy Markdown

@DevOpsOfChaos DevOpsOfChaos commented May 1, 2026

Summary

  • add an optional SINGLE_SOLDIER_COIN_TRAINING addon
  • make one gold coin promote only one eligible soldier when the addon is enabled
  • select the currently lowest-ranked promotable soldier for that single promotion
  • keep the default rank-chain coin training behavior unchanged when the addon is disabled
  • add regression coverage for both default chain training and single-soldier training

Motivation

By default, one consumed gold coin can promote a chain of eligible soldiers in a military building. This can make coin usage much more efficient when several promotable soldiers are present, but it also encourages micromanagement when players want to control coin efficiency more narrowly.

This addon provides an optional alternative where each delivered coin promotes only one eligible soldier. The selected soldier is the lowest-rank soldier that can still be promoted, matching the narrow behavior discussed in #1418.

The goal is not to replace the existing training model. It is a small optional gameplay variant for players who prefer one-coin-one-promotion behavior.

Scope / safety notes

This PR only changes how many soldiers one consumed coin can promote when the addon is enabled.

It intentionally does not change:

  • gold delivery
  • coin storage
  • military building capacity
  • training timing
  • soldier rank limits
  • mine output
  • default chain-training behavior

When the addon is disabled, the existing promotion-chain behavior remains unchanged.

Validation

  • Built Test_integration locally with Visual Studio 2022 / Debug
  • Ran Test_integration.exe --run_test=AttackSuite/CoinTrainingUpgradesRankChainByDefault --report_level=short
  • Ran Test_integration.exe --run_test=AttackSuite/SingleSoldierCoinTrainingUpgradesOnlyLowestRankSoldier --report_level=short
  • Ran Test_integration.exe --run_test=AttackSuite --report_level=short --log_level=error
  • Passed locally:
    • 23 test cases out of 190 passed
    • 167 test cases out of 190 skipped
    • 1258 assertions out of 1258 passed

Fixes #1418

@DevOpsOfChaos DevOpsOfChaos force-pushed the sidequest/single-soldier-coin-training branch from 0805fe3 to b8c1f50 Compare May 1, 2026 15:51
Comment thread libs/s25main/addons/AddonSingleSoldierCoinTraining.h Outdated
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
@DevOpsOfChaos DevOpsOfChaos force-pushed the sidequest/single-soldier-coin-training branch from 659905e to 707fef9 Compare May 3, 2026 10:24
@DevOpsOfChaos DevOpsOfChaos requested a review from Flamefire May 3, 2026 10:25
@DevOpsOfChaos
Copy link
Copy Markdown
Author

Pushed a small follow-up.

This fixes the formatting issue and moves the addon ID into my own addon namespace as 0x01100002.

No gameplay behavior change.

@Flamefire Flamefire enabled auto-merge May 3, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Addon: Make coins increase rank of only 1 soldier

2 participants