Page 1 of 1

How does resistence work?

Posted: Sat Feb 06, 2016 10:07 pm
by Natha
Hi,

I tested a few hours to figure out how the resistence works. The wiki entry (from 2014), that it works like:
damage - (damage * percentage) - decrease
wasnt correct. I tested ingame with changing percentage and decrease, and I couldnt yet figure out the right formula.
So, is there someone who knows the right calculation?

LG

Re: How does resistence work?

Posted: Sun Feb 07, 2016 12:06 am
by Loewchen
Taken damage is the lower of:
  • damage - (damage * percentage)
  • damage - decrease [for decrease < damage] or 1/(2 + decrease - damage) [for decrease >= damage]

Re: How does resistence work?

Posted: Sun Feb 07, 2016 8:16 am
by Natha
Loewchen wrote:Taken damage is the lower of:
  • damage - (damage * percentage)
  • damage - decrease [for decrease < damage] or 1/(2 + decrease - damage) [for decrease >= damage]
That doesnt work for me.
I tested it on a stone furnace with physical 0/60% resistence by shoot it with a basic bullet magazine (2 physical) and a piercing bullet magazine (5 physical) (pistol).
According to your formula one shot with basic magazine reduces the health by (2 - (2 * 0.6)) = 0.8. But it doesn't, the health is reduced by 0.80000305176. Where does the difference come from? Neither pistol nor magazines have other values to determine damage. Values with up to 2 decimal places were only shown if the values are .25, .5 or .75.
With the piercing magazine the health is reduced by the correct amount.

Another case with 1/43%:
Damage from a basic magazine is 0.57000732422.
According to your formula 2 - (2 * 0.43) = 1.14 is higher than 2 - 1 so the damage should be 1.
Damage from a piercing magazine is 2.2799987793, but it should be 2.85.

Re: How does resistence work?

Posted: Sun Feb 07, 2016 1:13 pm
by Loewchen
Natha wrote: That doesnt work for me.
Yea for me neither...but I have still other values :?

The simple case (decrease < damage) seems to be w/o deviation:
  • (damage - decrease)*(1-percentage) both values always applied
The other one (decrease >= damage) is about 1/100 above this:
  • 1/(2 + decrease - damage)*(1-percentage)