Resistance property

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Resistance property

Re: Resistance property

by cypherphage » Tue Sep 18, 2012 7:30 pm

In the mean time, I whipped up a simple example to show how this can be hacked around: http://forum.zdoom.org/viewtopic.php?f=3&t=34089
Such damage items could be given by 0 damage attacks by their puff, and is affected by regular armor and could be extended to handle damage types etc. If anyone is interested in this, I can do a bit more work on this workaround.

Re: Resistance property

by FDARI » Tue Sep 18, 2012 10:03 am

To cover such diverse processings of damage, I think I would prefer a [WFDS]customizable "Damage event handler"[/WFDS]; perhaps a reference to a doomscript function that accepts damagetype and amount, returning a modified amount of damage. It would process per actor after processing existing damage modifiers on the same actor, and before damage is actually applied. (process Powerup, process Armour, process victim, apply damage)

That would handle another thing people have been requesting at times as well. All functions have access to the type of the damage, and the function on the victim actually gets to know/set the exact amount of damage that will be dealt by each individual source.

Re: Resistance property

by NeuralStunner » Mon Sep 17, 2012 12:07 pm

You can't, no, you can only adjust damage factors of unabsorbed damage. If you want per-type resistances, there'd have to be a way to change that.

Re: Resistance property

by Zippy » Mon Sep 17, 2012 6:30 am

Monsters can have armor, so would it be possible to use armor for this purpose? I don't recall offhand if you can make armor that only absorbs certain kind of damages.

Re: Resistance property

by XutaWoo » Sun Sep 16, 2012 1:46 pm

I think DamageReduction would be a more appropriate name here.

Re: Resistance property

by Amuscaria » Sun Sep 16, 2012 11:12 am

Could add a third value for the minimum damage for that particular damagetype. I.e.: Resistance Fire 15 1 (will always at least take 1 damage from fire, instead of 0). Where as Resistance Fire 15 0 (or just without the 0 by default) will take 0 damage if the damage dealt is less than the resistance value.

Re: Resistance property

by cypherphage » Sun Sep 16, 2012 4:16 am

I could definately get behind such things...
Or, if actors had some sort of state (0 duration?) that they jumped to (without interrupting their current state) each time they were hit, these things would be could be done on a mod by mod basis assuming a few extra decorate expressions were added to check such things as lastDamageRype, lastDamageAmount, etc.

Or, maybe you could use a custom inventory hack? Whenever a player/monster would get hit, you have the puff/a_radiusgive give them X damage items plus a custominventory that could run all the required computation/needed scripts. Wow, now that I think about that, I really need to find time to try this.

Re: Resistance property

by Enjay » Sun Sep 16, 2012 1:28 am

I suppose there are a few possibilities here:

The request as presented: "resistance" value is subtracted from damage dealt.
Something like what Lord Misfit wants: "resistance" value is subtracted but a specifiable value always gets through.
A threshold method: Damage doesn't get dealt unless the "resistance" value is less than the value being dealt but, if it is, the full value of the attack gets through.

Of course, I have no idea how feasible any of these are. I'm also not sure what should happen to any values that get through. Should they be subject to the usual armour calculation, for example, or should they be deemed to have bypassed armour? Should that be settable too?

Re: Resistance property

by Lord Misfit » Sat Sep 15, 2012 11:07 pm

If I recall, I think I suggested something along this line a year or so ago because I wanted to do a system with armor items that had more of an RPG feel where they constantly deducted a specfic amount of damage as opposed to a percentage. It seemed to get no'd for some reason which I forget, probably one I would consider ridiculous too. x.x

I also seemed to remember I had also asked for an option to allow 'scratch damage' to get through if the damage would normally be reduced to 0. ["Scratch Damage" is a term in RPGs that means you always take at least 1 damage no matter how high you get your defenses up from a specfic attack.]

Resistance property

by Amuscaria » Sat Sep 15, 2012 9:26 pm

I'm hoping for a features that's similar to damagefactor, but based on a set value rather than a percentage. Something like this:

Resistance damagetype (string) int (value).

Say a monster has "Resistance Fire 15". Any damage that is of type "fire" will have 15 damage subtracted from the damage. If the damage value is lower than the resistance, then 0 damage will be dealt.

Top