Pierce armor increases astronomically when decreased below 0

:play_button: GAME INFORMATION

  • GAME BUILD #: Version 101.103.14579.0 (#145651)
  • GAME PLATFORM: Steam
  • OPERATING SYSTEM: Windows 11

:play_button: ISSUE EXPERIENCED

Pierce armor value increases when decreased below 0.

When armor is decreased via trigger effects, melee armor stays at 0 while pierce armor becomes 255.
When armor is decreased using a tech effect (in a data mod), melee armor becomes negative while pierce armor becomes 10000.

This is not a display bug. The armor shown is the actual value applied when calculating damage received.
(Demonstrated in the attached recording)

This behavior began from update 141935.

:play_button: FREQUENCY OF ISSUE

  • 100% of the time / matches I play (ALWAYS)

:play_button: REPRODUCTION STEPS

  1. Create a custom scenario with two triggers.
  2. One trigger decreases pierce and melee armor by 1 when an outpost is clicked
  3. Another trigger increases pierce and melee armor by 1 when another outpost is clicked.
  4. Increase the armor of a militia 5 times. The result would be 5/6 armor.
  5. Decrease the armor of a militia 10 times after that. The result is 0/1+254
  6. Increase the armor again by 10 times. The result is 0+1/1+254

:play_button: EXPECTED RESULT

At step 5, the armor should either have been 0/0, or at -5/-4, not 0/255.
At step 6, the armor should have been either 10/10 or at 5/6, not 1/255.

:play_button: IMAGE

:play_button: GAME FILES (SAVE / RECORDING)

Amor Bug Recording.aoe2record (731.8 KB)
ArmorBug.aoe2scenario (1.1 KB)

The way the armor modification is converted into data combines the armor type with the value to be changed. Due to programing limitations, the range of values that can be recorded is 0 to 255 (8 bits). When the value is outside of that range it rolls over into the next armor type modifying it instead. And because Pierce Armor is armor type 3 when you try to modify Melee Armor (type 4) below 0 it rolls over into pierce armor and modifies it instead, and when you try to modify pierce armor above 255 it rolls over into melee armor.

Is that intended behavior? I don’t know.

1 Like

I don’t think that would explain the results for a number of reasons.

First, negative armor is a thing, such as battering rams with -3 melee armor and mounted units with a negative value of armor class 39 (used for Royal Heris). Neither can be expressed with an unsigned byte.

Second, when armor is reduced via a technology (impossible as far as I know in the base game, but possible with custom techs & mods), melee armor can become negative, while only pierce armor wraps around to 10,000.

CBA 6X Armor Penalty Test.aoe2record (1.1 MB)

Finally, prior to update 141935, when pierce armor was reduced below 0 using a tech, the behavior was the same as when melee armor is reduced. (In the screenshots above, previously both melee and pierce armor would be negative, not just melee, and would not wrap around to 10,000.

Ah, I meant that as how Modify Attribute works. Technologies and other things behave differently.

1 Like