[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
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 »

NeuralStunner wrote: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.
No, it should not counteract.

You first are telling the game that all damage will be considered x0.01
Then you're telling the game that bullet damage will be multiplied by 100. Right there you're saying that the game will consider 2 types of damage separately: "normal" and "bullet". So, "normal" (all damage except "bullet") will deal x0.01. Bullet (not considered inside "normal") will deal x100
Resume: all damage, except "bullet" will deal x0.01; and "bullet" will be dealt x100
NeuralStunner wrote: This had the same result:

Code: Select all

	DamageFactor "Normal", 0.0
	DamageFactor "Bullet", 100
Exact same case
Telling the game that all damage will be ignored ("normal" 0.0)
then that bulled will be dealt x100.
All damage but "Bullet" will be ignored. "Bullet" will be dealt x100

NeuralStunner wrote:But! This works as expected:

Code: Select all

	DamageFactor "Normal", 0.0
	DamageFactor "Bullet", 1.0001
Then, you're telling the game that all damage ("all damage" = "normal" = all unespecified damage) will be ignored and that bullet will deal 0.0001 more than the regular damage it would deal regularly (not counting at all the previous "damagefactor "normal", 0.0).

If you put "normal" you're talking about all damage, then if you specify another damage, it's considered separately and overrides the damage factor applied by "normal"

So, another way to say it, both damage calculations are being done parallel, instead of being done consecutively.

Check this
Spoiler:
Last edited by DBThanatos on Sun Mar 21, 2010 4:56 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 »

I understood all that. I was testing the possibility that "Normal" was adjusting all incoming damage beforehand. I obviously found that was not the case. (Sorry for my wording implying that I was assuming that behavior.) I did find that it was something else entirely...

BTW, I've found no recent changes to DamageFactor handling in the changelog, either.
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 »

The problem here is actually that damage factors of 1.0 are not put into the damage factors list because it's the default. Obviously that's not a good idea when there's a setting for 'normal' damage in there as well.
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 »

So what do you recommend we use to fix 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 »

Graf Zahl wrote:The problem here is actually that damage factors of 1.0 are not put into the damage factors list because it's the default. Obviously that's not a good idea when there's a setting for 'normal' damage in there as well.
So, putting "damagefactor "Weakness", 1.2" should do the trick?
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 »

1.0001 should also work. To fix this I have 2 choices: Leave 1.0 entries in the damage factors table or clean the table in actor postprocessing off all unnecessary entries.
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, I tested it yesterday and it worked just great. Thanks guys.
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 »

Graf Zahl wrote:1.0001 should also work. To fix this I have 2 choices: Leave 1.0 entries in the damage factors table or clean the table in actor postprocessing off all unnecessary entries.
If you go looking around in that code, hopefully you can find out where this problem is coming from.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: [r2210+]A_DamageMaster not functioning properly

Post by randi »

Graf Zahl wrote:Leave 1.0 entries in the damage factors table
I can't see anything wrong with just doing that.
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 »

Except that it's less efficient.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: [r2210+]A_DamageMaster not functioning properly

Post by randi »

Maybe so, but not by much, and in the case of a heavily-loaded table, I suspect it may even be more efficient to have it in there than to leave it out.
Post Reply

Return to “Closed Bugs [GZDoom]”