PowerDrain flexibility additions: strength and mode

Moderator: GZDoom Developers

Post Reply
User avatar
SwordGrunt
Posts: 13
Joined: Thu Apr 05, 2012 7:36 pm

PowerDrain flexibility additions: strength and mode

Post by SwordGrunt »

Currently, PowerDrain is hardcoded to return half of all damage dealt as health directly to the player.

It would be very useful for any kind of scoring system to be able to "drain" something other than health, namely an inventory item; normally this is being done by A_GiveToTarget when monsters are killed, which has the downsides of not allowing compatibility between mods (as monsters whose death states do not contain the instruction will be useless for a scoring system of this type) and, particularly on larger monsters, only giving credit to the final blow even if another player has contributed more for the kill (or possibly not awarding anything whatsoever if a non-player entity deals the killing blow).

At the same time, defining the strength of the Drain powerup, even if no inventory item is specified, would still add flexibility to the default health draining functionality.

Essentially, this means two existing powerup properties would be used by the Drain powerup:


Powerup.Strength amount
The percentage of damage the powerup drains as health (or an inventory item if Powerup.Mode is used), defaulting to 50, which is the current fixed amount. This is assuming an integer value is required; a floating point would be much more appropriate for this property.

Powerup.Mode class
The item to be given by the powerup each time damage is dealt, defaulting to "Health", which simply heals the player as it does currently.
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: PowerDrain flexibility additions: strength and mode

Post by NeuralStunner »

SwordGrunt wrote:It would be very useful for any kind of scoring system to be able to "drain" something other than health, namely an inventory item;
Since the quantity given depends on the damage done, this would probably be most useful for a "receive 25% of damage dealt as mana" type of thing. Monster kills should typically be scored by their relative strength, which is going to depend heavily on the monster. (A "catch-all" system based on the monster's health has to assume the other mod isn't rife with glass cannons. There could also be issues with enemies aping Quake's zombies, which would basically become infinite points.)

What I'm saying is that while I like the idea, a system designed for scoring would also be good.
User avatar
SwordGrunt
Posts: 13
Joined: Thu Apr 05, 2012 7:36 pm

Re: PowerDrain flexibility additions: strength and mode

Post by SwordGrunt »

NeuralStunner wrote:Since the quantity given depends on the damage done, this would probably be most useful for a "receive 25% of damage dealt as mana" type of thing. Monster kills should typically be scored by their relative strength, which is going to depend heavily on the monster. (A "catch-all" system based on the monster's health has to assume the other mod isn't rife with glass cannons. There could also be issues with enemies aping Quake's zombies, which would basically become infinite points.)

What I'm saying is that while I like the idea, a system designed for scoring would also be good.
While I agree that individually setting scoring systems for monsters is likely to be much more balanced and manageable, this suggestion would offer full compatibility with any custom monsters for a scoring system which is what I'm after; even if not well balanced, that can be adjusted with CVars by the player if he desires and if the mod author supports it.

Returning 25% of damage dealt as mana is a perfect example of another more simple, yet effective application of this. I'm sure this would have use with artifacts (invbar items) as well.

Thanks for replying, I appreciate the thoughts!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PowerDrain flexibility additions: strength and mode

Post by Graf Zahl »

Strength yes, mode no.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”