Resolved [v1.1.3] Penetration Perks increase enemy's armor

Users who are viewing this thread

Version number
v1.1.3
Branch
Main
Modded/unmodded
No, I didn't use any mods.

wilkins

Recruit
all the "+" penetration perks actually increase enemy's armor. Here paste codes.

for example, bow perk bodkin, bodkin's values are positive numbers (that's where the bug is):

this._bowBodkin.Initialize("{=PDM8MzCA}Bodkin", DefaultSkills.Bow, this.GetTierCost(2), this._bowNockingPoint, "{=EU3No7XM}{VALUE}% armor penetration with bows.", SkillEffect.PerkRole.Personal, 0.1f, SkillEffect.EffectIncrementType.AddFactor, "{=KfLZ8Hbw}{VALUE}% armor penetration with bows by troops in your formation.", SkillEffect.PerkRole.Captain, 0.05f, SkillEffect.EffectIncrementType.AddFactor, TroopClassFlag.None, TroopClassFlag.BowUser);


calculating method: CalculateAdjustedArmorForBlow in class SandboxStrikeMagnitudeModel,


here, result armor = base armor + base armor * sum penetration, because they are positive numbers, result armor is higher than base armor:

Code:
public float ResultNumber
        {
            get
            {
                return MathF.Clamp(this.BaseNumber + this.BaseNumber * this._sumOfFactors, this.LimitMinValue, this.LimitMaxValue);
            }
        }


so these perks actually reduce your damage.

bug perks:

TwoHanded.Vandal
OneHanded.ChinkInTheArmor
Bow.Bodkin
Crossbow.Puncture
Throwing.WeakSpot
 
I love how people just decompile Bannerlord's code and look for bugs themselves :grin:
I've done it once too, trying to find positions of towns to calculate shortest path between them.
 
Did you actually test this in-game? Last I checked these perks worked correctly.
The ResultNumber can be used as a subtractor somewhere so even if it returns a higher value it can still work correctly.

EDIT: Nevermind, I tested the Vandal perk on 1.1.3 and it seems to be bugged indeed. This probably means the other perks are bugged too.
 
Last edited:
Did you actually test this in-game? Last I checked these perks worked correctly.
The ResultNumber can be used as a subtractor somewhere so even if it returns a higher value it can still work correctly.

EDIT: Nevermind, I tested the Vandal perk on 1.1.3 and it seems to be bugged indeed. This probably means the other perks are bugged too.
Yes, some guys and I tested in-game before. https://tieba.baidu.com/p/8407201590
 
Hey, i have been informed that this issue is fixed and the fix should be applied with further pathces. Thank you for your time and sorry for the inconvenience.
 
Back
Top Bottom