Imp fireball damage type? (Solved)

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
User avatar
R4L
Global Moderator
Posts: 404
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Imp fireball damage type? (Solved)

Post by R4L »

Howdy!

The ZDoom wiki entry for DoomImpBall doesn't list if the actor has a specific damage type, but it does say the actor is an Explosive type. Am I to assume that there is no damage type associated with imp fireballs? Only reason I ask is to troubleshoot a problematic issue in Metroid Dreadnought (Some imp fireballs, maybe 1/10 times, does not damage the player if they have the Varia Suit.)

For the Varia Suit, it just grants a powerup that I've made:

Code: Select all

ACTOR IHateHeat : PowerProtection {

    Inventory.Amount 0
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	PowerUp.Duration 0x7FFFFFFF
	DamageFactor "Lava", 0.5
	DamageFactor "Normal", 0.5
	DamageFactor "Fire", 0
}
I thought maybe fireballs would have the "Fire" damage type but if that was the case, they wouldn't damage me at all. Any ideas?
Last edited by R4L on Wed Jun 26, 2019 11:04 am, edited 1 time in total.
User avatar
InsanityBringer
Posts: 3386
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Imp fireball damage type?

Post by InsanityBringer »

Damagetypes are not used by any default Doom object types, they all do Normal damage. With just this protection powerup enabled, even a minimum damage imp fireball should still do 1 damage, so is there any further damage reduction down the line (armor or something?)
User avatar
R4L
Global Moderator
Posts: 404
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: Imp fireball damage type?

Post by R4L »

Nope lol. Even with an armor pickup, it seems to be random when a fireball does no damage.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Imp fireball damage type?

Post by wildweasel »

R4L wrote:Nope lol. Even with an armor pickup, it seems to be random when a fireball does no damage.
Depending on damage factors on your player class and/or armor type, it's possible that the damage value is getting rounded down to nothing.
User avatar
R4L
Global Moderator
Posts: 404
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: Imp fireball damage type?

Post by R4L »

wildweasel wrote:
R4L wrote:Nope lol. Even with an armor pickup, it seems to be random when a fireball does no damage.
Depending on damage factors on your player class and/or armor type, it's possible that the damage value is getting rounded down to nothing.
Here's the damage types defined in the player class:

Code: Select all

    DamageFactor "NoDamage", 0.0
    DamageFactor "Drowning", 0.0
    DamageFactor "Slime", 1.0
    DamageFactor "Lava", 1.0
    DamageFactor "Fire", 1.0
    DamageFactor "Normal", 0.75
User avatar
R4L
Global Moderator
Posts: 404
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: Imp fireball damage type? (Solved)

Post by R4L »

I figured it out...

Not sure why, but increasing some damage values fixed it.
User avatar
InsanityBringer
Posts: 3386
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Imp fireball damage type? (Solved)

Post by InsanityBringer »

in that case, it definitely seems like all the stacked damage reductions were causing minimum damage imp fireballs (which do 3 damage, rolled 1/8 of the time) to round to 0.

If the damage is halved, this means the 3 damage fireball now only does 1 damage, since GZD always rounds "fractional" damage down. The further reduction of 25% of all Normal damage reduces it to .75 damage, which ends up rounding to 0 since a minimum damage isn't enforced.

(side note: normal Doom armor works differently, causing fractional damage to round up (and the fractional damage taken by the armor to round down), so you'll always take 1 point of damage with any level of basic armor, unless it's 100% reduction)
User avatar
R4L
Global Moderator
Posts: 404
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: Imp fireball damage type? (Solved)

Post by R4L »

InsanityBringer wrote:in that case, it definitely seems like all the stacked damage reductions were causing minimum damage imp fireballs (which do 3 damage, rolled 1/8 of the time) to round to 0.

If the damage is halved, this means the 3 damage fireball now only does 1 damage, since GZD always rounds "fractional" damage down. The further reduction of 25% of all Normal damage reduces it to .75 damage, which ends up rounding to 0 since a minimum damage isn't enforced.

(side note: normal Doom armor works differently, causing fractional damage to round up (and the fractional damage taken by the armor to round down), so you'll always take 1 point of damage with any level of basic armor, unless it's 100% reduction)
Ah, I get it now. I didn't realize GZD rounded down fractional damage like that. Good to know!
Post Reply

Return to “General”