Damage scaling

Moderator: GZDoom Developers

User avatar
Talonos
Posts: 789
Joined: Mon May 03, 2004 7:08 am
Location: At college!

Damage scaling

Post by Talonos »

Randy, in another thread wrote:Well, it goes hand-in-hand with what I'm working on: Custom state labels in decorate. So you could have a Death.Cow state in an actor and gave a missile a Cow DamageType and make the actor show its cow death when it gets struck by that missile.
So, I figure that if we are able to make our own damage types, it would make sense to be able to define how much they damage enemies.

For example, a flamethrower could work wonders against a zombieman, but flamethrower vs. Afrit wouldn't be very useful. A freeze-gun would be, though.

How about a new property, Damagescale.<Damagetype> <percent scale>

So, for Afrit:

Damagescale.fire 0.1
Damagescale.freeze 1.5

Makes him almost immune to fire, takes another half again damage from freeze weapons.

This could also be useful if you include a normal type. For example:

Damagescale.normal 0.0
Damagescale.fire 0.0
Damagescale.freeze 0.0
Damagescale.cow 3.0

Would make a monster that is immune to everything (Including weapons that have no damage type, such as the pistol) except for cows. The player can find a room full of enemies and they can laugh at him and run him off until he finds the cow cannon, which will allow him to get past them. I mean, stupid example, but it illustrates my point.

Randy? How hard would this be to put in? Any chance it can make the next version, or the version after that?
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Post by Cutmanmike »

I still can't get over cow damage...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Sounds good. But there should also be a DamageScale default setting that gets used for all damage types that don't use a specific setting. In other words: Any sub-damage type inherits the value from its parent type and the default is the parent for everything.


How hard is it to put in? The biggest part is storing the scaling values. The code for states is type specific and has to be rewritten to accept floats instead of state pointers. Aside from that: one multiplication and one zero check should be enough.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Post by Cutmanmike »

Sounds like a good deal to me. However, it would be even nicer if we could change the player's damage scales etc too using ACS or decorate. Ice (or cow if you like) armor etc would be possible then.
User avatar
David Ferstat
Posts: 1113
Joined: Wed Jul 16, 2003 8:53 am
Location: Perth, Western Australia

Post by David Ferstat »

Cutmanmike wrote:I still can't get over cow damage...
Haven't you ever heard of the bullista? :)
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London

Post by Phobus »

I'm thinking along the lines of FF:X, whereby the fire weapons/attacks actually heal the fire enemies (-Damage?) as an extra when you say all of this.

Return to “Closed Feature Suggestions [GZDoom]”