Changing a damagetype's damagefactor on the fly?
Changing a damagetype's damagefactor on the fly?
Hey there, I just stumbled upon this possible limitation, granted that I didn't miss anything.
I was looking around the Zdoom wiki and I noticed that there didn't seem to be any way of setting an actors damagefactor for a specific damagetype on the fly. The only option I could find was to change its overall damagefactor, which isn't very flexible.
A possible reason one would use this is to say, if one has a monster which gets increased resistance against a specific damagetype proportionally with the health it has missing.
Just curious, and I am posting this here to make sure before I do anything on the tracker.
I was looking around the Zdoom wiki and I noticed that there didn't seem to be any way of setting an actors damagefactor for a specific damagetype on the fly. The only option I could find was to change its overall damagefactor, which isn't very flexible.
A possible reason one would use this is to say, if one has a monster which gets increased resistance against a specific damagetype proportionally with the health it has missing.
Just curious, and I am posting this here to make sure before I do anything on the tracker.
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there
- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
RE: Changing a damagetype's damagefactor on the fly?
I don't think there is any way to do so, no.
The best solution at the moment I'd say is to create a new power up:
The best solution at the moment I'd say is to create a new power up:
Code: Select all
Actor HalfFireDamage : PowerProtection
{
DamageFactor "Fire", 0.5
Powerup.Duration 0x7FFFFFFF
}
RE: Changing a damagetype's damagefactor on the fly?
In that case it is impossible to change the damagefactor precisely as a result of a mathematical equation. I don't know how much there would be for this except for special RPG circumstances, which I suppose has its own merit.
I will post a suggestion on the tracker, then it can be decided wether or not there is enough of a use for it.
I will post a suggestion on the tracker, then it can be decided wether or not there is enough of a use for it.
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there
-
- Retired Staff / Community Team Member
- Posts: 2566
- Joined: Sat Jun 02, 2012 2:44 am
RE: Changing a damagetype's damagefactor on the fly?
Can't you just do what All Out War does, and use armor-types to adjust damageFactors?
Edit: Oh I see, monsters too? I'm not sure then.
Edit: Oh I see, monsters too? I'm not sure then.
Last edited by Catastrophe on Sun Jan 31, 2016 7:11 pm, edited 1 time in total.
- Combinebobnt
- Retired Staff / Community Team Member
- Posts: 1905
- Joined: Mon Jun 04, 2012 3:37 am
- Location: Earth
- Contact:
RE: Changing a damagetype's damagefactor on the fly?
I was looking for something like this yesterday and found nothing, wish zdoom had a deprecated +HALFDAMAGE flag or something. I don't know if vincent's powerup solution works on monsters, but it does for players.
RE: Changing a damagetype's damagefactor on the fly?
What I am trying to issue here is directly setting the property of the actor through ACS for flexibility purposes.
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there
RE: Changing a damagetype's damagefactor on the fly?
The way you do it is through powerups; damagefactor powerups do in fact work on monsters. So basically any time you set the damagefactor, you give it the powerup, and similarly take it away when he doesn't have it. It's a hack, but it's the only method that I know works.
EDIT: I'd be a bit more detailed but I'm not feeling 100% right now
EDIT: I'd be a bit more detailed but I'm not feeling 100% right now
Last edited by Untitled on Mon Feb 01, 2016 2:33 am, edited 1 time in total.
"I'm in despair! The fact someone would give me the title 'Forum Regular' has left me in despair!"
SamsaraHold http://zandronum.com/forum/showthread.php?tid=3053
Spoiler: Me in a nutshell (Open)Projects:
SamsaraHold http://zandronum.com/forum/showthread.php?tid=3053
- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
RE: Changing a damagetype's damagefactor on the fly?
They do, that's why I suggested it. :)Combinebobnt wrote: I don't know if vincent's powerup solution works on monsters, ...
RE: Changing a damagetype's damagefactor on the fly?
If you make a program that prints 100 powerup definitions with damagefactors going from 0.01 to 0.99 and 1.0, you could technically achieve that flexibility :vLollipop wrote: In that case it is impossible to change the damagefactor precisely as a result of a mathematical equation.
Edit: If it's possible to stack the powerups of the same type, then you only need an actor definition for damagefactor of 0.01
Last edited by Konda on Tue Feb 02, 2016 5:49 pm, edited 1 time in total.
Code: Select all
<Synert> fuck
<Synert> plugged in my memory stick and got a bsod
- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
RE: Changing a damagetype's damagefactor on the fly?
Don't think so... :IKonda wrote: If it's possible to stack the powerups of the same type, then you only need an actor definition for damagefactor of 0.01
DoneKonda wrote: If you make a program that prints 100 powerup definitions with damagefactors going from 0.01 to 0.99 and 1.0, you could technically achieve that flexibility :v

If you want to use something else than the standard damage type, copy the output from the above link and paste it into something like Notepad.
In Notepad press "CTRL + H" to bring up the replace menu, then in the first box type "Normal" (without the quotes) and in the second box type in the name of the damage type you want to use, then press "Replace all".
Last edited by Vincent(PDP) on Tue Feb 02, 2016 11:02 pm, edited 1 time in total.
RE: Changing a damagetype's damagefactor on the fly?
Cheers! Hax all the way.
Code: Select all
<Synert> fuck
<Synert> plugged in my memory stick and got a bsod