Idea: Configurable effective armor formula from toughness and bypass
James103 opened this issue ยท 0 comments
As far as I know, I can configure the formulas for these properties:
- Damage reduction due to Protection
- Damage reduction due to Armor and Armor Toughness
- The A-value, used as an intermediate step in the default armor formula
However, in a mod pack I'm customizing, I want to rebalance a formula involving Armor Toughness in order to enable players to feel its effects even beyond 30 Armor Toughness.
The default formula reduces the effectiveness of armor bypass (Armor Shred and Armor Pierce) by 2% per point in a linear fashion, capping at 60%. I want to change it so each point of Armor Toughness multiplies the effectiveness of armor bypass by 0.98.
I could do this by replacing Math.min(toughness * 0.02F, 0.6F)
with 1 - Math.pow(0.98F, toughness)
here:
However, making code changes like that requires recompiling the mod.
As an alternative, would it be possible to add a config option to redefine the formula for effective armor given the starting Armor, Armor Shred, Armor Pierce, and Armor Toughness?