Skip to content

Adjust troop calculation formulas (part 2)#3776

Open
1brucben wants to merge 1 commit intoopenfrontio:mainfrom
1brucben:attackfix42626
Open

Adjust troop calculation formulas (part 2)#3776
1brucben wants to merge 1 commit intoopenfrontio:mainfrom
1brucben:attackfix42626

Conversation

@1brucben
Copy link
Copy Markdown
Contributor

Description:

I forgot to adjust the constants appropriately. This fixes the bug from the previous adjustment. Max troop and troop growth numbers should be roughly similar to the previous version, but rebalanced to benefit larger nations (which were nerfed by the attack casualty change).

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory
  • I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced

Please put your Discord username so you can be contacted if a bug or regression is found:

1brucben

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6d2216ac-4aaf-4fac-b582-36d09cb9a637

📥 Commits

Reviewing files that changed from the base of the PR and between 3815f04 and dcccf80.

📒 Files selected for processing (1)
  • src/core/configuration/DefaultConfig.ts

Walkthrough

Configuration file adjusts troop economy scaling formulas. The maxTroops calculation modifies the exponent and coefficient values while preserving the offset. The troopIncreaseRate reduces the magnitude of a power-based term. No logic flow changes.

Changes

Cohort / File(s) Summary
Troop Economy Scaling
src/core/configuration/DefaultConfig.ts
Updated maxTroops exponent from 0.7 to 0.8 and reduced coefficient from 1000 to 170. Halved the magnitude of troopIncreaseRate by changing division from /4 to /8.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

📊 The troops now climb a steeper hill,
With gentler slopes and balanced skill,
The coefficients dance and sway,
Economy tuned for better play! ⚔️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Adjust troop calculation formulas (part 2)' directly describes the main change—adjusting numeric formulas for troop economy scaling in the configuration file.
Description check ✅ Passed The description is related to the changeset, explaining the bug fix and rebalancing rationale for the troop formula adjustments, with detailed context about the impact on larger nations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch attackfix42626

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@FloPinguin
Copy link
Copy Markdown
Contributor

Conflicts 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants