Make backpack AP stance costs depend on actual weight instead of a bool checking if a backpack is equipped or not#486
Merged
kitty624 merged 2 commits intoAug 15, 2025
Conversation
A new ini value BACKPACK_WEIGHT_FACTOR is introduced to replace the hard coded 50. The value goes from 1 to 250 and its default value is 50 as before.
…ckpack The same code is also used in GetAPsCrouch as well as GetAPsProne The intent of the change is to make sure that backpacks including their content do not add an additional AP cost of +1. Now it checks if the backpack weight is > ubBackPackWeightFactorForAPPenalty (default value 50). The min exists to make sure that the AP cost does not become higher than previously. Previously the bool fBackpackCheck was used to add +1 if there is any backpack. But this also includes an empty tactical sling (backpack with 0.2 kg) and therefore makes the item much less interesting to use.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The intent of this change is to make sure that backpacks including their content do not add an additional AP cost of +1 if their weight is below a certrain threshold. The old implementation only checks if a backpack is present and ignores its weight. If it is true then a +1 via the bool
fBackpackCheckis added as an AP penalty for changing stances (stand-crouch-prone). This means that for changing stance +1 is always added to the AP cost when a backpack is equipped. No other factors are considered.This implementation allows tactical slings (backpack with 0.2 kg) including content to ignore the +1 AP penalty assuming the final weight is less than
ubBackPackWeightFactorForAPPenalty. This makes the tactical sling or light backpacks much more attractive to be used.ubBackPackWeightFactorForAPPenaltyis a new externalized valueBACKPACK_WEIGHT_FACTOR(default value 50) to allow changes to be made in the ini.Note the value
BACKPACK_WEIGHT_FACTORis also used for incurring AP penalty for moving. This value was previously hard coded to 50.