Sometimes armor is reduced without actually negating damage

Fri Nov 27, 2020 1:56 am

For example,

in Hexen, grab any armor piece and stand on a damaging floor which does 5 damage per second. Every 3 times you get hit, your armor lowers by 1 point but your health suffers 5 damage nonetheless.
Is this intentional? I only know that Half-Life stores health as floats, not sure about (GZ)Doom.

Re: Sometimes armor is reduced without actually negating dam

Fri Nov 27, 2020 11:00 am

Is this a Hexen-specific issue? The AbsorbDamage implementation for HexenArmor is quite non-trivial, I suppose it was copied as-is from vanilla Hexen. Note the following in particular:

  1. The % of damage absorbed depends on the total armor rating across all the slots.
  2. The armor rating decreases based on received damage and the maximum allowed number of armor points in each slot (aka SlotsIncrement, this is different for every player class).
As a result, it is quite possible for the armor to sustain some damage, and yet the actual number of damage points absorbed will be zero.

Re: Sometimes armor is reduced without actually negating dam

Fri Nov 27, 2020 11:06 am

Hexen's armor is the most obtuse thing I have ever seen. No other game features an armor system that's this hard to understand, both by players and developers.

Re: Sometimes armor is reduced without actually negating dam

Fri Nov 27, 2020 11:26 am

In a nutshell, Hexen's armor system is just that. SavePercent is dependant on SaveAmount. If you have 100 armor, armor reduces 100% damage. If you have 50 armor, damage is reduced by 50%. 25 armor means 25% damage absorption, and so on.
Tbh, I wish all other Doom games' armor was like that too. The better the condition of your armor, the more it protects you. So that at first Green Armor would be as effective as Blue Armor.
Of the top of my head, the only other two games I recall which have a similar armor system are Elder Scrolls Oblivion and the S.T.A.L.K.E.R. games.

The status bar or fullscreen HUD's armor display only adds insult to injury. It only displays 1/5th of the actual armor, rounded down. Use the alternative HUD to see the true value. It's not that hard to understand, once you familiarize yourself with it.

https://zdoom.org/wiki/Classes:HexenArmor

Re: Sometimes armor is reduced without actually negating dam

Fri Nov 27, 2020 11:43 am

No, it's not even close to being that simple with its 4 armor classes and the weird interdependencies. That explanation only touches the surface of some truly screwed up logic.

Re: Sometimes armor is reduced without actually negating dam

Fri Nov 27, 2020 12:08 pm

StroggVorbis wrote:In a nutshell, Hexen's armor system is just that. SavePercent is dependant on SaveAmount. If you have 100 armor, armor reduces 100% damage. If you have 50 armor, damage is reduced by 50%. 25 armor means 25% damage absorption, and so on.
Tbh, I wish all other Doom games' armor was like that too. The better the condition of your armor, the more it protects you. So that at first Green Armor would be as effective as Blue Armor.

If blue armour has 200% save, then surely it would not only save all of the damage inflicted, but add the same amount to the player's health too. :twisted:

Re: Sometimes armor is reduced without actually negating dam

Fri Nov 27, 2020 1:32 pm

Honestly, comparing to the original game, it seems the hexen armor system as implemented in GZD may not be 100% correct. If I go to map04 and hop into the lava with the falcon shield on that map, in gzdoom it seems to stabilize after a while where I'm never losing armor, but in the original DOS hexen it seems to keep on dropping. Weird.

Update: It doesn't stabilize in GZDoom, but it does seem to drain a lot slower compared to Hexen. is the lava's damage wrong? hmm

Re: Sometimes armor is reduced without actually negating dam

Fri Nov 27, 2020 4:02 pm

@Enjay, armor save would be capped at 100%, so as long as you have 100 or more armor, it'd act like a second health bar. Like in for example Grand Theft Auto, Doom 2016 & Eternal, the Shield Belt in Unreal, among others :P

Re: Sometimes armor is reduced without actually negating dam

Sun Nov 29, 2020 9:48 am

While this doesn't solve the problem, I suspect it's a rounding/precision error.