damage reduction algorithms

Finally, a place for suggestions, but please read the rules and disclaimers first.
Post Reply
Anghwyr
Posts: 42
Joined: Mon Feb 22, 2016 7:03 am

damage reduction algorithms

Post by Anghwyr » Mon Jan 22, 2018 4:20 am

The way things work now, merging the buffs of multiple classes (bards, sanc, any kind of alchemist, psionicist) on a single tank means that designing a challenging mob means buffing it so much that solo players/atypical groups have less of a chance. There have been hard-coded workarounds like lone defender and sanc not adding up fully, or with ch'taren resist and stone skin not working fully.

Damage reduction in the game usually works either by multiplication (prot evil) or by summing (resists). The weird thing with resist-based damage is that for, say, resist slash, each additional point of resistance brings more benefit. The first +20 resist reduces your damage by 20%, but if you can add +20 resist while already having +60 resist, that additional +20 resist halves your damage (Ch'taren earth scholars could get their resist for particular damage types really high up).

I was thinking how to change this around so that stacking all sorts of damage reductions doesn't bring so large benefits that it becomes unbalanced. One "simple" way to change how damage reduction works is to only use multiplication, and to group damage reduction per source of damage reduction - so innate resists is one source, AC-based and equipment based resists is another source, and each spell or song buff is its own source. By multiplying resists per source, rather than adding them all up, you get rid of the odd situation where +resists becoming more valuable per point the closer you are to 100 resist. The final step is to count the number of sources of damage reduction you have on you, and incorporate that number into the final damage reduction calculation as well. Put it in the lore in that different magics are interfering with each other and thus becoming less effective, or something like that.

Example formula is this. Say you have sanc (each point of damage gets reduced to 0.6 damage points), and you have protection evil (each point of damage gets reduced to 0.75 damage points). Right now, these two are multiplied (I believe), so that for each point of damage 0.6 * 0.75 = 0.45 damage gets through. What I would suggest is to do

Code: Select all

Math/pow [damage reductions multiplied] ^ (Math/pow [number of damage reduction sources] ^ -1/3)
In the above example, sanc + prot evil would then result in 0.53 damage getting through for each received damage point, rather than 0.45. If next to sanc and prot evil, you would also happen to be ch'taren, you have three sources of damage reduction, and with the above formula, that would result in 0.49 damage getting through for each received damage point, rather than 0.36 damage getting through. Still beneficial, but it reduces the potential for getting uber-characters for one or more particular damage types.

There is a small problem though. If you add a very weak damage reduction buff to a strong damage reduction (say 5 resist next to sanc), you might actually have a poorer overall damage reduction then without the buff. Adding 10 resist seems to at least have a netto positive effect. So maybe the formula needs some tweaking, or the code needs to do some math to not make things worse for the character than the best combination of buffs.
Last edited by Anghwyr on Mon Jan 22, 2018 3:17 pm, edited 5 times in total.
Steve the Black
Posts: 138
Joined: Thu Feb 25, 2016 9:57 pm

Post by Steve the Black » Mon Jan 22, 2018 10:56 am

I like it. The current system means designers are pretty limited on what they can do because being able to stack resistances is potentially game-breaking. It's for this reason that I think resistances on gear is rare and tends to be very small. Diminishing returns could be the answer to this.
Post Reply