Damage Factor Failure

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
dbj87jb
Posts: 95
Joined: Tue Nov 04, 2014 8:59 am

Damage Factor Failure

Post by dbj87jb »

Made a few & use enemies that are resistant to elements (mostly fire)... I know how to set it up and up until now, it was working on several enemies...

But since using gzdoom-g2.2pre-1256-g328047e & updating GZDoom Builder with the latest updates... Fire resistance doesn't seem to work...
Example from Diabloist by Tormentor667... I know +ResistFire doesn't work so I added in "DamageFactor Fire,0" & tried "DamageFactor "Fire",0" but it's still taking damage from Fire damaging weapons that have Damage Type Fire (I HAVE checked that the weapons used deal fire damage too)...

Is anybody else having problems with damage resistance & any suggestions on what I can do?

Code: Select all

Actor Diabloist : Archvile 11607 
{
 //$Category Monsters
 //$Title Diabloist
  Obituary "%o got was set ablaze by a Diabloist."
  Health 1400
  Radius 20 
  Height 56 
  Mass 500 
  Speed 15 
  PainChance 10
  BloodColor "08 08 08"
  DamageFactor Fire,0
  Monster
  +FireResist
  +FloorClip
  +NoTarget
  +NoRadiusDmg
  +MissileMore
  +Boss
  +DontHurtSpecies
  SeeSound "Monster/diasit" 
  PainSound "Monster/diapai" 
  DeathSound "Monster/diadth" 
  ActiveSound "Monster/diaact" 
  States 
Another example with a custom made monster

Code: Select all

ACTOR Pyrobus : Fatso 11876
{
  Game Doom
  //$Category Monsters
  //$Title Pyrobus
  //$Sprite PYCUD2D8
  Health 2500
  Radius 48
  Height 64
  Mass 1000
  Speed 9
  PainChance 96
  Species Fatso 
  DamageFactor Fire,0
  Monster
  +FIRERESIST
  +FLOORCLIP
  +MISSILEMORE
  +BOSSDEATH
  +DONTHURTSPECIES
  +NORADIUSDMG
User avatar
Major Cooke
Posts: 8209
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: Damage Factor Failure

Post by Major Cooke »

Remove FIRERESIST flag and keep DamageFactor Fire, 0.

FIRERESIST overrides the custom damagetype it appears.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Damage Factor Failure

Post by Graf Zahl »

It does, indeed. +FIRERESIST is exactly the same as typing 'DamageType Fire, 0.25', and since it comes last it takes priority.
dbj87jb
Posts: 95
Joined: Tue Nov 04, 2014 8:59 am

Re: Damage Factor Failure

Post by dbj87jb »

Thank you
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: Damage Factor Failure

Post by Ed the Bat »

Graf Zahl wrote:+FIRERESIST is exactly the same as typing 'DamageType Fire, 0.25'

Code: Select all

case DEPF_FIRERESIST:
		info->SetDamageFactor(NAME_Fire, set ? 0.5 : 1.);
		break;
Wouldn't it be 'DamageType Fire, 0.5'?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Damage Factor Failure

Post by Graf Zahl »

Whatever. The logic is the same.
dbj87jb
Posts: 95
Joined: Tue Nov 04, 2014 8:59 am

Re: Damage Factor Failure

Post by dbj87jb »

Thanks for the help. Wasn't entirely sure where (which page on the forums) to ask about this, so, sorry if it's in the wrong section. But I really appreciate your help. I had all the resistances working a few months ago, but lost all the files with the recent changes after some problems wiped them out. :|

I looked up things like damage factors etc, on the wiki & saw +FireResist is now a "redundant" state to add & you needed to use Damage Factors for elemental damage... Because of that, I didn't think having both would effect the outcome (or rushed to fix everything too quickly), but removed the +FireResist & just left the damage factor for Fire.

Everything is fixed, I've made the "Diabloist " resistant to all fire damage & some of my own allies & enemies that use Flame-throwers that took damage, aren't being killed by their own fire attacks. This was a major headache for a custom Mancubus I've made that uses a flame-thrower & fire is also spawned from floor hugging explosion, being a large target, it used to easily get trapped or walk over it's own fire, & killing itself or weakening itself for you lol.
Post Reply

Return to “Closed Bugs [GZDoom]”