January 18, 20197 yr While testing some concepts revolving around hostile effect reduction, I ran into this unexpected issue. Stacking multiple instances of hostile effect reduction (through RES or otherwise) is done multiplicatively. This post will prove that there is an error in the game's calculation of that statistic. I made a new character to prove that this mechanic was behaving unexpectedly. Here are the relevant stats of the character: INT is 10, which is noteworthy because I'm using Powder Burns to test (you can self inflict it, but its duration increases with INT, so I remove that factor with ant INT of 10). My RES is 25, which provides a baseline hostile effect reduction of 45%. To test, I fire a plain, non-unique Blunderbuss at an enemy and pause the game immediately after the Powder Burns debuff appears in the character sheet. For this test, expected value is 5.5 seconds, which is correct (10 sec * (1 - 0.45) = 5.5 sec). With Monk's ability Clarity of Agony, which provides 50% hostile effect reduction, we get these results: This value is not correct (10 sec * (1 - 0.45) * (1 - 0.5) = 2.75 seconds, not 3.5 seconds. This ring provides 35% hostile effect reduction when there are no allies nearby (that condition was satisfied for this test). It also provides +1 RES, which will be taken into consideration in calculation below (45% reduction from RES -> 48% reduction). The weapon fire test provided these results: The expected value is 10 sec * (1 - 0.48) * (1 - 0.5) * (1 - 0.35) = 1.69 seconds. Again the actual value is off by a significant margin. These results show that stacking hostile effect reduction (and likely other similar stacking bonuses) produces incorrectly calculated values. The only test scenario that actually worked was the one where we only tested reduction from RES. Adding any additional sources of hostile effect reduction produced unexpected values. It seems that the way multiplicative bonuses are calculated is not correct when more than one of the same bonus is present. I highly recommend that this be investigated as a bug.
January 18, 20197 yr The expected value is 10 sec * (1 - 0.48) * (1 - 0.5) * (1 - 0.35) = 1.69 seconds. Again the actual value is off by a significant margin. These results show that stacking hostile effect reduction (and likely other similar stacking bonuses) produces incorrectly calculated values.That's because they are not factored in multiplicatively, but via double inversion. The math behind this is: step_sum = [1 - 1/(1 - 0.48)] + [1 - 1/(1 - 0.5)] + [1 - 1/(1 - 0.35)] step_sum = [1 - 1/0.52] + [1 - 1/0.5] + [1 - 1/0.65] step_sum = -0.923 + -1 + -0.538 = -2.461 final_coef = 1 / (1 - step_sum) = 0.288 So if default duration was 10s, it will get reduced to 2.88s. Edited January 18, 20197 yr by MaxQuest PoE1 useful stuff: attack speed calculator, unofficial patch mod, attack speed mechanics, dot mechanics, modals exclusivity rules PoE2 useful stuff: community patch, attack speed mechanics, enemy AR and defenses
January 18, 20197 yr Author That's because they are not factored in multiplicatively, but via double inversion. The math works out, that's gotta be the reason. But it's kind of a misleading formula to use since there's no documentation anywhere (that I could find). Players will expect the multipliers to stack in a straightforward way unless mentioned otherwise. How did you find this out?
January 19, 20197 yr The math works out, that's gotta be the reason. But it's kind of a misleading formula to use since there's no documentation anywhere (that I could find). Players will expect the multipliers to stack in a straightforward way unless mentioned otherwise. How did you find this out?Yeap, while there are a few pros in current approach, it's indeed a bit confusing. As for finding out, at first I have deducted the formula, and later found the related code in the decompiled source (as Boeroer has mentioned). During beta this was used mainly for attack speed calculations. Later, damage was calculated using these as well. P.S. You can check Onyx/Math.cs and Game/AdjustedValue.cs for more info. Edited January 19, 20197 yr by MaxQuest PoE1 useful stuff: attack speed calculator, unofficial patch mod, attack speed mechanics, dot mechanics, modals exclusivity rules PoE2 useful stuff: community patch, attack speed mechanics, enemy AR and defenses
Create an account or sign in to comment