In-depth question about mechanics of applying elemental status ailments

Hello, I have a very in-depth question about how applying elemental status aliments work, which probably can only be answered by a dev:

1. Increased XXX duration:
Let us take shock as an example. According to currently available information the duration of the shock needs to be at least 300ms. If I had 100% increased shock duration and would deal lightning damage which would normally trigger a shock of 200ms, which would be 400ms after applying the increase in duration. Would this shock be applied or not?


2. Smoothness of the duration function:
Let's again take shock as an example so we can use numbers as examples. According to currently available information the duration of the shock is 276ms * P where P is the percentage of the target's effective maximum health dealt as lightning damage.
The question is: Is this percentage rounded within the calculation or not? In other words, is the shock duration stepwise, with steps as big as 276ms * increased shock duration or is it smooth?


Before anyone replies, that this would be irrelevant - no, I've done the math and this makes the difference between whether I can shock endgame bosses with my build or not, resulting in a 90% damage increase if it works. This is a huge deal.
Explanation - quoting myself from the mechanics thread.
Unfortunately having those "steps" in the duration function would introduce a very large relative and also absolute error.
For the absolute error, considering close to 100% increased shock duration we would be talking about half-a-second "steps", which is huge for builds, that barely manage to shock, especially since those often reach over 10 attacks per second.
Regarding the relative error, when trying to trigger a shock you would require 1% of the target's effective maximum health to breach the 300ms barrier with "steps", while it would only take about 0.6% of the target's effective maximum health if the function was smooth. That's a 40% difference! One would have to almost double one's lightning damage to make up for this!
IGN: Pirteloli
Bumping this. This information is really important for me to not waste many hours and orbs. :/
IGN: Pirteloli
It's not easy to conduct in depth experiments to verify but i'm pretty sure that the answer to 1) is "no"; if you stay below threshold no shock will be applied; to make "increased shock duration" enter the battlefield you need a shock otherwise the status ailment wouldn't apply.

On the second one i'm not sure i understand what you mean exaclty, let me whip out a few examples:

Let assume a duration increase of 50%

P = 1% => no shock
P= 1.1% => 303.6 *1.5=455.4 (no rounding)
P= 1.1% => 303 * 1.5 = 454 (rounding at each step)

IS this the difference you are looking for?
"
Mrmorph wrote:
It's not easy to conduct in depth experiments to verify but i'm pretty sure that the answer to 1) is "no"; if you stay below threshold no shock will be applied; to make "increased shock duration" enter the battlefield you need a shock otherwise the status ailment wouldn't apply.


The threshold is defined in terms of time, 300ms that is. Therefore increased duration might reduce the damage required to reach the 300ms threshold. I am not looking for speculation but definite answers here - as stated in the title probably only devs can do this.


"
Mrmorph wrote:
On the second one i'm not sure i understand what you mean exaclty, let me whip out a few examples:

Let assume a duration increase of 50%

P = 1% => no shock
P= 1.1% => 303.6 *1.5=455.4 (no rounding)
P= 1.1% => 303 * 1.5 = 454 (rounding at each step)

IS this the difference you are looking for?


No, it's not. My question is about rounding at the percentage step, which would be well possible judging from a programmer's point of view.
For P = 0 to 0.9999 it would result in 0, for P = 1 to 1.99999 it would result in 1 and so on, essentially making the resulting duration be in steps of 276ms * inc duration factor. Read the text in the spoiler in my first post to see why this would be an issue.
IGN: Pirteloli
Last edited by Tom94 on Jan 11, 2014, 8:53:10 AM
"
Tom94 wrote:
Bumping this. This information is really important for me to not waste many hours and orbs. :/
IGN: Pirteloli
In order.

1. yes

2. don't think concrete information is available, though if stun and aura % rounding are any clue, the calculations are all completed first and then the final number is rounded to some significant figures. This also makes sense from a technical standpoint - if I was coding the shock function and using floating-point variables, I'd write the floor() or ceiling() once at the end instead of multiple times in the middle.
How to make a build: http://www.pathofexile.com/forum/view-thread/510084
Current guides: N/A
"
Kirielis wrote:

1. yes


Thanks a bunch! :)


"
Kirielis wrote:

2. don't think concrete information is available, though if stun and aura % rounding are any clue, the calculations are all completed first and then the final number is rounded to some significant figures. This also makes sense from a technical standpoint - if I was coding the shock function and using floating-point variables, I'd write the floor() or ceiling() once at the end instead of multiple times in the middle.


The thing is, that in the cases of aura % or stun one of the two factors must be a float variable, rendering the rvalue result of an operation a float. When calculating the percentage of effective maximum health dealt as damage, then we are operating on two values, which always are whole numbers and therefore internally might be sitting in int variables, essentially rounding the result down. This is the main reason why I am so unsure about this and why I'd be very happy about further information from GGG. This is not the first time, that we have seen a rounding issue after all *points to the crit damage reduce passives near marauder*.
IGN: Pirteloli
Last edited by Tom94 on Jan 12, 2014, 8:32:52 AM
1) Yes.
2) The percentage of life which is multiplied by 276ms is currently an integer value. However, in the current implementation nothing would be harmed by changing this, so I intend to do so for a future patch, allowing smoother ranger of durations.
"
Mark_GGG wrote:
1) Yes.
2) The percentage of life which is multiplied by 276ms is currently an integer value. However, in the current implementation nothing would be harmed by changing this, so I intend to do so for a future patch, allowing smoother ranger of durations.


Thanks for the information, looking forward to having my build work in a future patch. Adding to the wiki now. :)
IGN: Pirteloli
"
raics wrote:
So, integer usage in this case is either irrelevant or unlikely.


Seems it's more likely than I thought. As I said in mechanics thread, I've seen thieves with more strict codes of honor than programmers :)

If we understood this correctly, this effectively means that if you have no shock duration increase the threshold wouldn't be 300ms but 552ms, which means you need to do at least 2% of target health to trigger shock.
Wish the armchair developers would go back to developing armchairs.

◄[www.moddb.com/mods/balancedux]►
◄[www.moddb.com/mods/one-vision1]►

Report Forum Post

Report Account:

Report Type

Additional Info