Skip to content

Documentation: The Advancement Algorithm

Pathal edited this page Feb 12, 2015 · 4 revisions

There's a particularly odd line of code you will see in ShadowCraft from time to time. It consists of n/(n+x), usually multiplied against something else. This is actually a variation on the basic multiplication that influences haste, mastery, and more, except that it functions to reverse that process.

When you have 15% haste, your passive energy regens 15% faster. What this means is that to accomplish that same end amount of energy, you only need to regen for 1/(1+.15) of the time you would have otherwise. This is because a*1.15=b => 1=b/1.15. Of course, this can also be rewritten as a*(1.15/1)=b => a=b/(1.15/1) => a=b*(1/1.15) => a=b*(1/(1+.15)).

This is the central point behind using this equation. That you can reverse engineer the impact of advancing through "time" faster than reality. This does raise a particular problem though, since each formula needs to be tailored for each mechanic, and isn't easily put into a general purpose solution.

Restless Blades is one example of where this formula applies. Restless Blades serves to reduce the cool down on abilities based on the number of CPs consumed when Eviscerate or CT are cast. So casting 5CP eviscerates every X seconds increases the passage of time by 10/x per second.

The simplest way to convert this into a formula is to work backwards, rather than continue from that point. You start with the initial point, that 0 events will have 0 impact. This confirms the equation n/(n+0)=1. The next step is to establish what n is in respect to x. In the case of Restless Blades, a 5CP event every 10s doubles the recovery rate, which means n/(n+.1)=.5, 'n' is valued at 0.1 in this situation. This yields .1/(.1+x)=y. You can continue to test this formula with other data points, but the best 3 points to check are always 0, twice as often, and half as often as normal.

This specific mechanic is handled in ShC as so: (1/avg_rb_effect) / (offensive_finisher_rate + (1/avg_rb_effect)) which translates to n/(x+n).

Sinister Calling has this same pattern. Since you start at .5 ticks per second, and you want to double the tick rate, you would need another .5 ticks per second from SC. You end up with .5/(.5+x)=y, a very similar formula to the Restless Blades calculation, just a different 'n' value and x should, obviously, be generated to fit the problem as well.


The reason 'n' has to change is because time dilation is easier done when you base the formula around 'x'. The reality is that there are many ways to structure this formula, but when you have a rate in seconds (as Shadowcraft operates), it's easier to keep the 'n' value also in a per second rate. You can, knowing this, look back on 'n' and see why .5 is used in the example above. 0.5 is the tick rate for rupture.

Restless Blades is a little more complicated. The interval and proc significance always need to be on the same terms, which is why 'n' isn't as simple. If you have a Restless Blades proc impact of 5s, then you should be doing the calculations as .2/(.2+x)=y. As you can notice, a 5s proc every 5s gives you half the CD with .2/(.2+.2)=0.5. This is really important if you ever need to model non-5CP finisher rotations, otherwise the calculations will overestimate the potential of 4CP finishers.