-
Notifications
You must be signed in to change notification settings - Fork 58
DoT HoT Simulation details
FFXIV does not send an individual player's DoT ticks that land on a target separately from other players DoT ticks. Instead, it combines the DoT ticks together into a single damage amount that lands on each target every 3 seconds. In order to provide a more accurate parse, the FFXIV_ACT_Plugin must simulate the individual tick amounts. Following is a description of how it does so. The logic is the same for both DoTs and HoTs, except the potency and crit rates are estimated independently, and heals do not have Direct Hits.
The plugin keeps track of all active DoTs on every target and their duration. FFXIV sends a network packet that indicates when a combined tick lands on a target. The plugin looks at all active DoT debuffs on that target, and filters out any that previously haven't ticked in the last ~2.5 seconds, and haven't exceeded their theoretical tick maximum count (dot duration / 3 seconds), although timer refreshes reset this maximum count.
For each DoT debuff for the target that isn't filtered, the plugin simulates the tick amount for each buff. This simulation takes the average combatant per-potency multiplier (see #1 below), and multiplies this by the DoT potency. It adds any buffs / subtracts known debuffs to arrive at a base tick amount. Then it multiplies this base amount by an amount that averages out the effects of crit / DH based on players past combat activity (see #2 below).
Each DoT debuff on the target includes a single byte with the base tick 'amount', which unfortunately is truncated. example: if the tick amount is 260 (0x0104), this byte will be 0x04. This 'low byte' of the dot tick is used to refine the simulated tick amount, which usually results in the simulation matching the base tick amount almost perfectly. There is a similar byte for DoT tick crit amount, that is used to refine the estimated player Crit %. This is sent in units of tenths of a percent, so 10% crit = 0x64.
#1: Combatant per-potency multiplier is calculated by taking every skill/spell cast (not autoattacks), dividing by the Crit / DH multiplier if it was a crit or DH hit, then subtracting the effect of any known buffs/debuffs. The result is then divided by the ability potency or combo potency to result in a per-potency multiplier from that hit. The multipliers are averaged out, with a sanity check if they vary on average more than 40% for the last 15 swings, it is rebalanced to match that new amount. outliers are excluded from all calculations if they are less than 50% or more than 200% of the prior potency average, unless the total swings is under 50.
#2: Crit and DH rate are calculated as the average of all past swings, minus any buff effects. For example, if there are 10 hits and 3 of them are crit, the prior crit rate is calculated as (new crit rate = (old crit rate * previous swing count + (IsCrit?1:0))/(previous swing count +1)). If there is a 10% crit buff, the (IsCrit?1:0) clause changes to (IsCrit?1:0)*(1-CritBuff%). I am not convinced this formula is 100% correct, but currently the code only supports Battle Litany and Devilment for crit bonus. I plan to revisit this in the future when I refactor the FFXIV_ACT_Plugin parser code. The crit percent is compared to the single byte from the DoT buff to make it more accurate.
The crit rate is added to the DoT ticks by calculating the per-tick crit multiplier formula (1.4+Crit%), and then adding it on as a fixed amount per hit with the formula: tick amount = base tick * (1+(Crit Multiplier-1)*Crit%). DH is calculated as a simple running average of past swings, and applied in the same way with a fixed DH multiplier of 1.25.
Known problems:
- If there is no past damage information, it is impossible to simulate DoT ticks. example: casting bio on a striking dummy after loading ACT.
- If there is only a little bit of past damage information, the accuracy of the simulation is lower, both for tick amounts and for crits, although it should not vary widely.
- DH buffs are not taken into account at all
- The effects of spell/skill speed scaling on DoT ticks are not accounted for. In some cases this may result in the loss of 256 damage from DoT ticks (still not very common, though). I hope to incorporate this by tracking cast duration each combatant in the future.
- Crit buffs are not fully accounted for, and could use improvements, but this has only a minor effect