Changing a damagetype's damagefactor on the fly?

Discuss all aspects related to modding Zandronum here.
Post Reply
Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

Changing a damagetype's damagefactor on the fly?

#1

Post by Lollipop » Sun Jan 31, 2016 3:41 pm

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.
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

User avatar
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?

#2

Post by Vincent(PDP) » Sun Jan 31, 2016 5:12 pm

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:

Code: Select all

Actor HalfFireDamage : PowerProtection
{
  DamageFactor "Fire", 0.5
  Powerup.Duration 0x7FFFFFFF
}
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: Changing a damagetype's damagefactor on the fly?

#3

Post by Lollipop » Sun Jan 31, 2016 5:50 pm

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.
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

Catastrophe
Retired Staff / Community Team Member
Posts: 2566
Joined: Sat Jun 02, 2012 2:44 am

RE: Changing a damagetype's damagefactor on the fly?

#4

Post by Catastrophe » Sun Jan 31, 2016 7:08 pm

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.
Last edited by Catastrophe on Sun Jan 31, 2016 7:11 pm, edited 1 time in total.

User avatar
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?

#5

Post by Combinebobnt » Sun Jan 31, 2016 7:10 pm

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.

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: Changing a damagetype's damagefactor on the fly?

#6

Post by Lollipop » Sun Jan 31, 2016 7:15 pm

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

Untitled
Forum Regular
Posts: 519
Joined: Sat Dec 29, 2012 4:41 pm
Location: it is a mystery

RE: Changing a damagetype's damagefactor on the fly?

#7

Post by Untitled » Mon Feb 01, 2016 2:32 am

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
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!"
Spoiler: Me in a nutshell (Open)
<Untitled> this is a terrible idea
<Untitled> lets do it anyway

<Untitled> Depends
<Untitled> What kind of wad error is "Address not Mapped to Object (Signal 11)"?

<Untitled> So today I found out that stupidity is nested fractally
<Untitled> There is no lower bound
Projects:
SamsaraHold http://zandronum.com/forum/showthread.php?tid=3053

User avatar
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?

#8

Post by Vincent(PDP) » Tue Feb 02, 2016 4:38 pm

Combinebobnt wrote: I don't know if vincent's powerup solution works on monsters, ...
They do, that's why I suggested it. :)
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

Konda
Forum Regular
Posts: 487
Joined: Thu Jun 07, 2012 5:22 pm

RE: Changing a damagetype's damagefactor on the fly?

#9

Post by Konda » Tue Feb 02, 2016 5:24 pm

Lollipop wrote: In that case it is impossible to change the damagefactor precisely as a result of a mathematical equation.
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
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

User avatar
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?

#10

Post by Vincent(PDP) » Tue Feb 02, 2016 10:57 pm

Konda 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
Don't think so... :I
Konda 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
Done :razz: (for normal damage): http://ideone.com/Q2xnKb

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.
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

Konda
Forum Regular
Posts: 487
Joined: Thu Jun 07, 2012 5:22 pm

RE: Changing a damagetype's damagefactor on the fly?

#11

Post by Konda » Wed Feb 03, 2016 3:49 am

Cheers! Hax all the way.

Code: Select all

<Synert> fuck
<Synert> plugged in my memory stick and got a bsod

Post Reply