[r2210+]A_DamageMaster not functioning properly

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.
User avatar
Major Cooke
Posts: 8206
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:

[r2210+]A_DamageMaster not functioning properly

Post by Major Cooke »

I have used A_SpawnItemEx("Damager",0,0,0,0,0,0,0,48) (no position check, and set master) and I have the damager set up so it will deal damage when hit. The monster that spawns it has a DamageFactor "Normal", 0.0 and DamageFactor "Weakness", 1.0.

When the Damager actor is shot, it calls A_DamageMaster(5,"Weakness") but it doesn't appear to be doing anything, even if I set the spawner's health to 5, it won't hurt it.

In version 2181, it worked just fine, but now it's not working anymore. I also haven't made any changes to it since, so I'm trying out a few revisions to see if I can find which one for sure is the latest that was working properly.

The flags the master has:
MONSTER
+BOSSDEATH
+BOSS
+GHOST
+NOICEDEATH
+DONTRIP
+FULLVOLACTIVE
+FULLVOLDEATH
+DONTMORPH
+NOFEAR

The flags the "damager" has:
Monster
-COUNTKILL
+NOGRAVITY
+DONTFALL
+NOICEDEATH
+GHOST
User avatar
Major Cooke
Posts: 8206
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: [r2210+]A_DamageMaster not functioning properly

Post by Major Cooke »

It should also be noted that A_KillMaster/Children/Siblings works just fine, yet when I set A_DamageMaster/Children/Siblings with an equivelant of their health, it still doesn't do anything to them.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [r2210+]A_DamageMaster not functioning properly

Post by Graf Zahl »

Example, please!
User avatar
Major Cooke
Posts: 8206
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: [r2210+]A_DamageMaster not functioning properly

Post by Major Cooke »

Code: Select all

actor SuperZombieMan : ZombieMan
{
	health 20
	painchance 0
	MONSTER
	+FLOORCLIP
	+GHOST
	DamageFactor "Normal", 0.0
	DamageFactor "Weakness", 1.0
	states
	{
	Missile:
		POSS E 0 A_SpawnItemEx("Damager",0,0,0,0,0,0,0,48)
    	POSS E 10 A_FaceTarget
    	POSS F 8 A_CustomMissile("MiniRocket",32,0,0)
    	POSS E 8
    	Goto See
  }
}

actor Damager
{
	Monster
	Health 1000000
	PainChance 255
	-COUNTKILL
	-SOLID
    +NOGRAVITY
    +DONTFALL
	+NOICEDEATH
	+GHOST
	+NOTARGET
	States
	{
	Spawn:
		TNT1 A 70
		Stop
	Pain:
		TNT1 A 0 A_UnSetShootable
		TNT1 A 0 A_Print("Dealt 20")
		TNT1 A 50 A_DamageMaster(20,"Weakness")
		Stop
	}
}

actor MiniRocket : Rocket
{
	+FORCERADIUSDMG
	+THRUGHOST
	Damage 0
	Scale 0.45
	States
	{
	Death:
		MISL B 4 bright A_Explode(3,32,0)
		MISL C 3 bright
		MISL D 2 bright
		Stop
	}
}
I believe Ichor and DBThanatos can back me up on this. I've even tried r2232 and it still gives the same problem. However, it does seem to register the fact that it's being "hit" by the type, it's just not loosing hit points.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [r2210+]A_DamageMaster not functioning properly

Post by NeuralStunner »

Tip: Use flag constants for readability.

Have you tried commenting out the DamageFactor "Normal"? That's the keyword used by the Protection Powerup to affect all damage - it may be that it's overriding all other DamageTypes. (I'm not saying this would be a solution, but it may help find the cause.)
User avatar
Major Cooke
Posts: 8206
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: [r2210+]A_DamageMaster not functioning properly

Post by Major Cooke »

no check position(32) + set master(16) = 48 combined.

The thing is, it's supposed to prevent all damagetypes except for anything else specified. Commenting out the damagefactor "Normal", 0.0 would only make him vulnerable to everything. I only want him vulnerable to damagetype "weakness", which is called by the child. Sadly, this doesn't seem to be working. I even had it use an A_Explode method, and zombie attacked the "damager" oddly enough to show it had been "hit" with the A_Explode, but it acts as if though he has +NODAMAGE on or something...

Graf, would an actor property of damagefactor "Normal", 0.0 enable the +NODAMAGE flag by default?
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [r2210+]A_DamageMaster not functioning properly

Post by NeuralStunner »

Actors are not supposed to enter pain states or infight from zero-damage attacks, so it looks like something is only partially registering...

Hmm, it's not working for direct attacks either. I have Imps set as 1.0x damage from the "Bullet" type, (one I specified on the bullet weapons) and 0.0x from "Normal". "Normal" damage apparently covers everything. :|

In the meantime, you can use [wiki]DamageThing[/wiki] like a codepointer in Decorate. You'd have to use a existing [wiki=Damage_types]Damage Type[/wiki], but you could pick something odd like "Massacre" (MOD 1000).
Last edited by NeuralStunner on Sun Mar 21, 2010 12:29 pm, edited 1 time in total.
User avatar
Major Cooke
Posts: 8206
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: [r2210+]A_DamageMaster not functioning properly

Post by Major Cooke »

I'll try the switching of the damagefactor placements, but the rest of the stuff... No. I don't want to have to compile an ACS script just to get it working, because it was working just fine until I updated my zdoom/gzdoom.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [r2210+]A_DamageMaster not functioning properly

Post by NeuralStunner »

No script needed. Just use it directly:

Code: Select all

TROO H 4 DamageThing (0,1000)
Nevermind swapping the lines, no luck. I tried. (See edit above.)
User avatar
Major Cooke
Posts: 8206
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: [r2210+]A_DamageMaster not functioning properly

Post by Major Cooke »

Hmm... That might work. However I'd still like this to be investigated by the developers for sure.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [r2210+]A_DamageMaster not functioning properly

Post by NeuralStunner »

More testing done. I tried the following lines:

Code: Select all

	DamageFactor "Normal", 0.01
	DamageFactor "Bullet", 100
So, setting "Bullet" damage to 100 should more or less counteract the 1% from "Normal", right? No, actually hitting the Imp with a single bullet results in an instagib.
This had the same result:

Code: Select all

	DamageFactor "Normal", 0.0
	DamageFactor "Bullet", 100
But! This works as expected:

Code: Select all

	DamageFactor "Normal", 0.0
	DamageFactor "Bullet", 1.0001
Obviously one 10,000th is an extremely minute increase, and the Health system wrks in whole numbers regardless. It seems like the engine is ignoring any DamageFactor of 1, treating it like "unspecified". So it appears the problem is with the DamageFactor property and not the DamageMaster function.
User avatar
Major Cooke
Posts: 8206
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: [r2210+]A_DamageMaster not functioning properly

Post by Major Cooke »

...OH! Thanks mate.

Anyway, Graf, could you look into this?
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: [r2210+]A_DamageMaster not functioning properly

Post by DBThanatos »

Well, this topic (especifically this post) helps a lot understanding how the damage types works for "normal" and others.
User avatar
Major Cooke
Posts: 8206
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: [r2210+]A_DamageMaster not functioning properly

Post by Major Cooke »

Yeah, but still, this was working just fine until recently... *scratches back of head*

Looking back at the actor properties, I do see we can attempt "DamageFactor 0.0", albeit when I tried to add DamageFactor "Weakness", 1.0 it seemed to have overwritten the first one...
Last edited by Major Cooke on Sun Mar 21, 2010 2:15 pm, edited 1 time in total.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [r2210+]A_DamageMaster not functioning properly

Post by NeuralStunner »

That is, how it's supposed to work. For some reason the explicit 1.0 setting doesn't seem to be overriding the 0.0 any more.
Post Reply

Return to “Closed Bugs [GZDoom]”