Skip to content

Advanced Fatigue - Add per-unit recovery/load/terrain gradient factor#11290

Open
ScottyThePilot wants to merge 1 commit intoacemod:masterfrom
ScottyThePilot:master
Open

Advanced Fatigue - Add per-unit recovery/load/terrain gradient factor#11290
ScottyThePilot wants to merge 1 commit intoacemod:masterfrom
ScottyThePilot:master

Conversation

@ScottyThePilot
Copy link

When merged this pull request will:

  • Allows units' advanced fatigue recovery factor, load factor, and terrain gradient factor to be overriden by the object variables GVAR(recoveryFactor), GVAR(loadFactor), and GVAR(terrainGradientFactor), in a similar fashion to performance factor via GVAR(performanceFactor).
  • Adds sliders for the above three factors to 3den attributes, just like performance factor.

Note
The performance factor 3den tooltip uses slightly different wording compared to its description in CBA settings. I've tried to mirror this with the other factors, but the new text may need to be properly localized.

@BaerMitUmlaut
Copy link
Member

Why?

@ScottyThePilot
Copy link
Author

I would like to make a custom medicine to increase the player's carry capacity, but the only way I can see to affect the weight calculation is the load factor CBA setting. Advanced fatigue doesn't seem to factor in _unit getUnitTrait "loadCoef" at all, so it doesn't seem like that would work either.

@BaerMitUmlaut
Copy link
Member

@ScottyThePilot
Copy link
Author

The addDutyFactor function doesn't seem to let you affect the way the gear mass or terrain apply to the stamina formulas, which was the entire motivation behind this PR. I can see how an API like addDutyFactor would be better than the object variables, though. Maybe it would be better if addDutyFactor could alternatively return an array of values in the form of [dutyFactor, loadFactor, terrainFactor]?

@BaerMitUmlaut
Copy link
Member

BaerMitUmlaut commented Feb 17, 2026

Duty applies to everything. I don't see a point in just increasing terrain factor for a unit for example, but feel free to explain the use case.

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.

2 participants