Sometimes armor is reduced without actually negating damage

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Sometimes armor is reduced without actually negating damage

Postby StroggVorbis » 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.
User avatar
StroggVorbis
Donut eat me pls!
 
Joined: 08 Nov 2017
Location: Germany
Discord: StroggVorbis#2466
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Sometimes armor is reduced without actually negating dam

Postby Player701 » 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.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Sometimes armor is reduced without actually negating dam

Postby Graf Zahl » 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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Sometimes armor is reduced without actually negating dam

Postby StroggVorbis » 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
User avatar
StroggVorbis
Donut eat me pls!
 
Joined: 08 Nov 2017
Location: Germany
Discord: StroggVorbis#2466
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Sometimes armor is reduced without actually negating dam

Postby Graf Zahl » 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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Sometimes armor is reduced without actually negating dam

Postby Enjay » 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:
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Sometimes armor is reduced without actually negating dam

Postby InsanityBringer » 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
User avatar
InsanityBringer
 
Joined: 05 Jul 2007
Location: opening the forbidden box
Discord: InsanityBringer#9908

Re: Sometimes armor is reduced without actually negating dam

Postby StroggVorbis » 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
User avatar
StroggVorbis
Donut eat me pls!
 
Joined: 08 Nov 2017
Location: Germany
Discord: StroggVorbis#2466
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Sometimes armor is reduced without actually negating dam

Postby StroggVorbis » Sun Nov 29, 2020 9:48 am

While this doesn't solve the problem, I suspect it's a rounding/precision error.
User avatar
StroggVorbis
Donut eat me pls!
 
Joined: 08 Nov 2017
Location: Germany
Discord: StroggVorbis#2466
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests