Saturday, October 3, 2009

Store TP and dual-wielding

Store TP is a trait that is considered to have an all-or-nothing effect on weapon skill frequency and, therefore, damage over time. In general, there is a minimum amount of store TP required to attain 100 (or more) TP in n number of hits. In turn, it is desirable to minimize n without incurring counter-productive opportunity costs. Finally, since n is an integer, there will be discrete "tiers" of store TP, meaning there are specific ranges of store TP that correspond to each n, with the left endpoint of each "tier" as the minimum store TP to achieve an "n-hit setup."

In the case of dual-wielding, because n is generally high (well over 10), the store TP "tiers" are not as long. But what about the variability of TP return as a result of the off-hand hit and any other extra hits after the first? Doesn't that affect n?

Who cares? Even if it's not 95% of the time given 95% hit rate and depending on your double attack rate, the vast majority of the time n will be what you expect it to be. If you are aiming for a 5.0 TP/hit setup, most of the time you will require only 18 hits after a WS to reach 100 TP. Just because you might miss the off-hand hit doesn't mean you throw up your hands and dismiss the effect of the store TP or any additional quantities of store TP that might actually have a significant effect.

It is true that the number of required hits to attain 100 TP can take on three or more values depending on what the TP return of the previous WS actually is. As a consequence, even relatively small changes in store TP (for a given weapon combo and level of dual wield), will lower the average number of hits to reach 100 TP.

With that in mind, how does one illustrate the effect of changes in store TP on the rate of damage? First, let's examine the effect of changes in TP per hit on the average number of hits to reach 100 TP.

Because actual TP return from a WS is a random variable, the number of required hits to attain 100 TP, given that TP return, is also a random variable with an associated probability distribution. This was illustrated briefly in an earlier post analyzing the viability of the Tsukumo/Perdu Blade katana combination. For the case of 4.7 TP per hit, there is one probability distribution, and for the case of 4.5 TP per hit, there is another.

Given a three-hit weapon skill (like Blade: Jin), it is fairly straightforward to show how the probability distribution of the number of required hits to attain 100 TP changes with the amount of TP per hit, as shown in the following table. Since the double attack rate, hit rate, and dual wield delay reduction affect these, it is necessary to state them. I will use 15% double attack rate, 95% hit rate, and 40% dual wield delay reduction.

Probability distributions of the required number of hits to 100 TP (three-hit weapon skill)

TP/hit
24
2322
2120
19181716151413Avg.
no. hits
4.0.0933.8877.0165









23.69
4.1.0092.1534.8372








22.84
4.2.0025
.0933.8877
.0165








22.75
4.3.0002
.0092
.1534.8372







21.84
4.4

.0933
.8877
.0165







21.75
4.5

.0027
.0965
.9008






20.77
4.6

.0025
.0933
.8877
.0165






20.75
4.7


.0092
.1534
.8372






19.84
4.8


.0025
.0933
.8877
.0165





19.75
4.9


.0002
.0092
.1534
.8372





18.84
5.0



.0025
.0950
.9025





18.77
5.1



.0025
.0933
.8877
.0165




18.75
5.2




.0002
.0092
.1534
.8372




17.84
5.3




.0025
.0950
.9025




17.77
5.4




.0019
.0727
.7080
.2173



17.53
5.5





.0027
.0965
.9008



16.77
5.6





.0025
.0950
.9025



16.77
5.7





.0025
.0933
.8877
.0165


16.75
5.8





.0002
.0092
.1534
.8372


15.84
5.9






.0025
.0950
.9025

15.77
6.0







.0025
.0933
.8877
.0165

15.75
6.1






.0019
.0727
.7080
.2173

15.53
6.2







.0027
.0965
.9008

14.77
6.3







.0025
.0950
.9025

14.77
6.4







.0025
.0933
.8877
.0165
14.75
6.5







.0018
.0727
.7080
.2173
14.53

Here, I emphasized the probability of the most common outcome (required number of hits to attain 100 TP). Generally, 0.2-0.4 increases in TP per hit are "likely" to reduce by about 1 the average number of hits to 100, which will improve your rate of damage ever so slightly (being that WS damage is a low proportion of total damage). The question is how much store TP is sufficient to attain such increases.

To give an example, without any store TP the Senjuinrikio/Perdu Blade combination corresponds to 4.5 TP per hit before any store TP. The average number of hits (not average number of required hits) to 100 TP is 20.77, with 20 the most typical number of hits to 100 TP after Blade: Jin. With Rajas Ring, the TP per hit rises to 4.7 with a modest decrease in the average number of hits to 100 TP (19.84).

Of course, it is the average number of rounds to 100 TP that is needed to estimate the increase in rate of damage from increases in TP per hit from store TP. But I needed the above probability calculations to obtain a weighted average of required number of rounds because hits in excess of 100 TP do not contribute to increasing weapon skill frequency. These results are shown below, along with the average time to 100 TP (given 250 delay with 40% dual wield reduction) based on the average number of rounds to attain 100 TP.

Average time to attain 100 TP in the long run

TP per hit
Average no.
of rounds
Average no.
of hits
Average
time (s)
4.0
10.8423.69
45.17
4.1
10.45
22.84
43.55
4.2
10.4122.75
43.39
4.3
10.00
21.84
41.65
4.4
9.96
21.75
41.48
4.5
9.51
20.77
39.61
4.6
9.50
20.75
39.57
4.7
9.08
19.84
37.84
4.8
9.04
19.75
37.67
4.9
8.62
18.84
35.93
5.0
8.59
18.77
35.79
5.1
8.58
18.75
35.76
5.2
8.17
17.84
34.02
5.3
8.13
17.77
33.89
5.4
8.0217.53
33.43
5.5
7.68
16.77
31.98
5.6
7.68
16.77
31.98
5.7
7.67
16.75
31.94
5.8
7.25
15.84
30.21
5.9
7.22
15.77
30.07
6.0
7.21
15.75
30.04
6.1
7.11
15.53
29.61
6.2
6.76
14.77
28.17
6.3
6.76
14.77
28.17
6.4
6.75
14.75
28.13
6.5
6.65
14.53
27.71

To map store TP to TP per hit, I will use the example of Senjuinrikio/Perdu Blade, which has 4.5 TP/hit without store TP. Since I already specified some damage conditions in the Tsukumo post, I will use those to illustrate the relationship between increasing store TP and increasing damage per second.

In general, there are major "tiers" of rates of damage, and jumping from a lower tier to a higher up represents a decrease in the average time to 100 TP. The second lowest tier, from 5 to 8 TP, could correspond to having only Rajas Ring (or Usukane Sune-Ate) equipped. The next highest, from 9 to 15, could correspond to having both Rajas and Usukane Sune-Ate equipped.

While it is necessary to know the proportion of auto-attack to WS damage (which itself is determined by a variety of factors, some not very well understood) to determine how efficient jumping from a lower tier to a higher one is, for this specific example, equipping a Rajas Ring without any other store TP is about a 1.6% percent increase in damage per second not accounting for the other bonuses. Store TP is actually doing something, it's just tedious to quantify how much.

Of course, there aren't many store TP options for ninja, and those that are available are generally good all-around options. Perhaps someday there will be a way to reach 16 store TP without assuming high opportunity costs, such as accuracy food with store TP or other good all-round pieces of equipment comparable to Usukane Sune-Ate.

We can also see that, far from doing "nothing," Samurai Roll can provide a substantial increase to damage over time for dual-wielders, assuming the weapon skills aren't feeble. As store TP increases, obviously the ratio of auto-attack to WS damage approaches parity (albeit slowly), so it is inappropriate just to assume that auto-attack damage will always be something like 66% of your total damage in a WS-spamming situation regardless of store TP.

Notwithstanding possible factors such as time to execute a weapon skill (both human reaction time and any possible in-game delay), the good Samurai Roll totals (2, 8, 9, 10, 11) can increase damage per second up to 7-12% given the above conditions, and that is already accounting for the effect of double attack. Compare this to a warrior with a 6-hit setup. To get to 5 hits, a samurai has to be present (store TP +10) and while the increase in WS frequency is theoretically 25% without any double attack, roughly speaking the percent increase in damage per second will be less than 12% with non-trivial amounts of DA.

Friday, October 2, 2009

The two-fold effect of double attack

When you speak of damage over time, what do you actually mean? The answer may reveal whether you hold a minor, yet "fundamental" misunderstanding of damage "mechanics" in this world of OCD fuck-headed douchebaggery.

First, I hope you understand that the only valid view of damage over time accounts for weapon skills, regardless of when and how you use them (spamming them or whatever). Like, weapon skills contribute to damage, and you're doing damage over some time interval. Duh! Since when do the ideal and the actual have to coincide, anyway?

Anyway, I also hope we can all agree there are factors such as accuracy, double attack, and haste that affect the frequency of attacks (that land) and, therefore, damage per unit time (an average), while factors such as attack (rating) and strength affect the potency of damage per hit.

But as I've mentioned in passing here and there, while accuracy and double attack can affect the frequency of auto-attacks and weapon skills, it should be obvious that they also affect the average damage of weapon skills, which haste does not affect. But this fact is often elided for the sake of convenience without any apparent recognition.

For example, given 85% hit rate, 4 accuracy will increase auto-attack and weapon skill frequency by 2.35% ideally. This doesn't mean a 2.35% increase in overall damage per unit time, which again should account for the contribution from weapon skills, because that figure doesn't account for the effect of accuracy on average WS damage (per use). Therefore, it is a slight underestimate of the "true" percent change.

Does it matter? Practically, not really, mainly because it's pretty inconvenient to account for the two-fold effect of accuracy and double attack. But there are some "interesting," counterintuitive (indulging the conceit that FFXI players have any intuitions about how anything actually works) consequences that I demonstrate in the following example.

Does double attack ever "beat" haste?

Sure, a specific amount X of double attack, given some initial level of double attack, can be more efficient than a specific amount Y of haste, given some initial level of haste. Why does this comparison ever come up, anyway? I can't think of any situation where haste and double attack are in direct competition. Whatever increases your "efficiency" without incurring ridiculous opportunity costs should be good enough.

A possible explanation is that players often are deluded into thinking they have "capped" accuracy and rapid TP gain is "sexy," which both haste and double attack affect. However, on a per-point basis, haste is plainly more efficient than double attack at increasing the rate of TP gain because haste directly lowers the time between attack rounds, which is fundamentally more efficient than tacking on an occasional extra attack per attack round.

Of course, I didn't mention the effect of double attack on average weapon skill damage, which, when actually considered, is actually enough for double attack to be more efficient than haste for increasing overall damage over time (not just for TP gain) for specific situations.

How is this even possible? Fundamentally speaking, haste increases damage over time at an instantaneous rate of 100/(100 - H)2, where H is the amount of haste (as an integer percentage), so the effect of total haste is relatively slow at the beginning but eventually ramps up rapidly as the amount of haste increases. This is why haste is the "gold standard" for increasing rate of damage.

But, since the rate of increase is relatively slow at the low end, there is the only "opportunity" for double attack and accuracy to be ever so slightly more efficient than haste if all you really cared about is damage efficiency.

A counter-intuitive example

The most convenient way to compare the efficiency of two competing options in the game, whether it be pieces of equipment, two types of "buffs," etc., is to determine the percent difference in "output" (damage over time, gil over time, whatever) since we are generally interested only in the relative difference and any factors that are fixed between any two options can be factored out and don't need to be "given" as a matter of convenience.

Where damage is concerned, this requires knowledge of the functional relationship between rate of damage and the factors of interest (holding all else fixed). Unfortunately, I don't see any way to derive an exact relationship between damage over time (including the weapon skill contribution) and double attack, so it is just easier for me to give a specific example illustrating where double attack is ideally more efficient than haste.

The example I give is based on the following conditions:
  • Suppose 106 "base" damage per auto-attack hit and 159 "base" damage per weapon skill hit with average pDIF of 1 in both phases
  • Six required hits to achieve 100 TP (6-hit setup), so five hits to 100 TP given sufficient TP return from the previous weapon skill
  • A 3-hit weapon skill used instantaneously after achieving 100 TP
  • 95% hit rate. Therefore, the average number of landed hits (giving TP) per weapon skill is 3(.95) = 2.85
  • Starting from 0% double attack and 0% haste, it will be shown how damage per second varies with DA and haste, respectively
These conditions are sufficient to give an estimate of damage per second, ignoring the slight effect of having insufficient TP return from the previous WS to get to 100 TP in 5 hits thereafter, and possible variability in weapon skill damage based on TP, among other factors. But it's not the estimate of damage per second that is of interest, but how damage per second changes with either DA or haste.

After some boring spreadsheet calculations, which are boring and unnecessary to show, a plot illustrating the efficiency of double attack and haste is presented.


As expected, it takes a "while" for the effect of total haste to ramp up, but fundamentally damage per second must tend to infinity as total haste approaches 100%. In comparison, double attack is actually more efficient than haste initially because of the two-fold effect of double attack (on the rate of TP gain and the average WS damage) but the instantaneous rate of change increases very slowly. This makes sense because the increase in the average number of hits for any multi-hit weapon weapon skill is 0.020 for every point of double attack. At the same time, the time to WS is decreased.

When determining percent changes with double attack, it should now be obvious that the relative efficacy of double attack depends on the damage per hit of the weapon skill as well as the number of required hits to 100 TP. The relative efficacy of haste is independent of damage per hit or expected number of hits in a weapon skill, though.

It follows that the efficiency of double attack is blunted if TP isn't spammed. As a check on my calculations, I dropped the weapon skill component of damage per unit time (which is wrong to do) and generated a different plot illustrating auto-attack rate of damage.


This should be a familiar result. All is right in the world. Going from 0% to 25% haste results in a 33% increase in overall damage per second, as illustrated here and in the previous figure. Going from 0% to 25% double attack results in a 25% increase in auto-attack damage per second, as illustrated in the last figure alone.

If for some reason you never use a weapon skill, double attack can never be more efficient than haste at increasing the overall rate of damage, which must account for average weapon skill damage lest you look like a dipshit. But when does that actually happen if you are OCD'ing about damage to begin with?

What do I take away from this?

Double attack can proc on multi-hit weapon skills. Therefore, double attack not only affects weapon skill frequency and the rate of auto-attack damage, but also average WS damage. Don't forget average weapon skill damage matters somewhat when evaluating the effect of additional double attack. (Doing the actual calculations is another issue, though.) The same goes for accuracy, too, although I didn't provide a specific example.