So I have been very interested in FFXI damage equations for the last few years and you may have seen some of my other posts. A lot of times I am posting because I can't find source info for Bgwiki and this is just another one of those situations. Basically I was looking for the correct order of operations for calculating hits/crits with most relevant terms. It took me a little over a year but I believe I have everything in the correct order. See below. I will also post a summary of all the testing I did to validate it. If anything looks incorrect feel free to provide a test or data that contests it and I will double check.
EQUATIONS:
Melee = Floor(Floor(Floor(Floor(Floor(Floor(Floor[(Wpn + fSTR)*k]*DATA+)*AugDATA)*pDIF)*Rand)*SD)*SR)
Melee Crit = Floor(Floor(Floor(Floor(Floor(Floor(Floor(Floor(Floor[(Wpn + fSTR)*k]*DATA+)*AugDATA)*critpDIF)*Rand)*CritB)*SD)*SR)
60+ THF SATA = Floor(Floor(Floor(Floor(Floor(Floor(Floor(Floor{[Floor[(Wpn + fSTR)*k] + Floor(DEX*X) + Floor(AGI*X)]*DATA+}*AugDATA)*critpDIF)*Rand)*CritB)*SD)*SR)
Ranged = Floor(Floor(Floor(Floor(Floor[(Wpn+ Ammo + fSTR2)*k]*pDIF)*TS)*SR)
Ranged Crit = Floor(Floor(Floor(Floor(Floor(Floor[(Wpn+ Ammo + fSTR2)*k]*pDIF)*TS)*1.25)*CritB)*SR)
TERMS:
1. Wpn = Damage on Weapon
2. Ammo = Damage on Ammo
3. fSTR / fSTR2= Function of your STR vs Enemies VIT capped by floor(Wpn/9)+8 , fSTR is for melee, fSTR2 is for ranged and is 2x as large at the same STR value
4. k = relic/empyrean...rng mythic 2-3x multiplier proc likely also here but not confirmed.
5. pDIF = Enter Cratio in Montenten's equation. Cratio is your Attack divided by the mobs Defense then level corrected(Level correction is being removed over time from most zones and isn't relevant in todays endgame). It is capped by the equation = Floor[function{(WpnCap+pdltrait)*pdl%}*256]/256
6. critpDIF = Add +1 to your Cratio before putting it in Montenten's equation. It is capped by the equation = Floor[function{(WpnCap+pdltrait)*pdl%+1}*256]/256. I tested and confirmed pdl% doesn't affect the +1 portion of the crit. Also, tested in the 1.25-1.5 range that crits are not double the minimum damage so its not a straight +1 to your final pDIF. It must be a +1 to the ratio.
7. CritB = Critical Attack Bonus+ traits which is additive with Dead Aim(rng only) and JPgifts. (8% trait + 10% dead aim = 1+0.18)
8. SR = Species Resistance (IE: Birds +25% w/ piercing = 1+0.25)
9. Rand = The randomizer. It ranges from 1 to 1.05 (For melee only!)
10. DEX*X/AGI*X = Contribution when using SA/TA as THF main only with *X being the equipment benefit. IE: Rogue's Armelts+1(15% = 1+0.15)
11. DATA+ = DA+ or TA+ equipment (not shown in this table at the top, but calculated in buffs section and added to DPS). IE: Cichol Mantle(20% = 1+0.2)
12. AugDATA = Augments double or triple attack ability given by Empyrean armor set bonus. Warrior set is a 2x multiplier and Thief set is 3x.
13. TS = True shot (3% = 1.03)
14. SD = Scarlet Delirium - increase is rounded to nearest integer value (1% = 1.01 )
15. 1.25 = Modifier for ranged critical hits
16. Floor = round down to the nearest integer
SUPPORTING DATA: In many cases I needed trusts for dia/buffs to hit attack cap.
Species Resistance occurs after 1.05 melee multiplier
- 99 NIN/49SAM vs Ogrefly, 27 dmg dagger, capped Att/fSTR, no pdl%+, +25% species(piercing)
After min = F(F([27+11]*(3.25+26/256))*1.25)= 158
After 1.05 max = F(F(F([27+11]*(3.25+26/256))*1.05)*1.25)= 166
Before min = F(F([27+11]*1.25)*(3.25+26/256))= 157
After 1.05 max = F(F(F([27+11]*1.25)*(3.25+26/256))*1.05)= 164
Actual values 158-166
Melee CritBonus Occurs before Species
- 99 DRK/41WHM vs Ghoul, 15 dmg club, capped Att/fSTR, no pdl%+, 8% critBonus, +25% species(piercing)
After Species min = F(F(F([15+9]*(4.25+128/256))*1.25)*1.08) = 153
After Species max = F(F(F(F([15+9]*(4.25+128/256))*1.05)*1.25)*1.08) = 159
Before Species min = F(F(F([15+9]*(4.25+128/256))*1.08)*1.25) = 153
Before Species max = F(F(F(F([15+9]*(4.25+128/256))*1.05)*1.08)*1.25) = 160
Actual values 153-160
Melee CritBonus Occurs after the 1.05 multiplier
- 99 THF/49NIN vs lesser gaylas, 8 dmg sword, capped Att/fSTR2, no pdl%+, 14% Critbonus trait from traits
After 1.05 min = F(F([8+8]*(3.25+26/256))*1.14)= 78
After 1.05 max = F(F(F([8+8]*(3.25+26/256))*1.05)*1.14)= 82
Before 1.05 min = F(F([8+8]*(3.25+26/256))*1.14)= 78
Before 1.05 max = F(F(F([8+8]*(3.25+26/256))*1.14)*1.05)= 81
Actual values 78-82
Augment DA occurs After DATA+
- 99 WAR/49NIN vs Flamingo, 1 dmg Gsword, capped Att/fSTR, 20% DATA+, no pdl%+, 4/5 Boii Armor
After DATA+ min F(F(F([1+8]*1.2)*2)*(3.75+51/256)) = 78
After DATA+ max F(F(F(F([1+8]*1.2)*2)*(3.75+51/256))*1.05) = 81
Before DATA+ min F(F(F([1+8]*2)*1.2)*(3.75+51/256)) = 82
Before DATA+ max F(F(F(F([1+8]*2)*1.2)*(3.75+51/256))*1.05) = 86
Actual values 78-81
Augment DA occurs before pDIF
- 99 WAR/49NIN vs Flamingo, 3 dmg club, capped Att/fSTR, 20% DATA+, no pdl%+, 4/5 Boii Armor
After pDIF min = F(F(F([3+8]*1.2)*(3.25+51/256))*2) = 88
After pDIF max = F(F(F(F([3+8]*1.2)*(3.25+51/256))*2)*1.05) = 92
Before pDIF min = F(F(F([3+8]*2)*1.2)*(3.25+51/256)) = 89
Before pDIF max = F(F(F(F([3+8]*2)*1.2)*(3.25+51/256))*1.05) = 93
Actual values 89-93
DATA+ occurs after relic "k"
- 99 WAR/49NIN vs Flamingo, 99 dmg Bravura, capped Att/fSTR, 20% DATA+, no pdl%+
After k min = F(F(F([99+19]*2)*1.2)*(3.75+51/256)) = 1117
After k max = F(F(F(F([99+19]*2)*1.2)*(3.75+51/256))*1.05) = 1172
Before k min = F(F(F([99+19]*1.2)*2)*(3.75+51/256)) = 1113
Before k max = F(F(F(F([99+19]*1.2)*2)*(3.75+51/256))*1.05) = 1168
Actual values 1127-1170
Scarlet Delirium occurs before Species
- 99 DRK/49WAR vs Flamingo, 17 dmg Power Crossbow + 10 dmg bronze bolt, capped Att/fSTR2, no pdl%+, +25% species(piercing), 1823->1753 HP = 1% Scarlet Deliriun bonus
I am fairly certain the way Scarlet D. works is the % increase is calculated first as a decimal, then multiplied by 100, then floored.
EX: 1823->1753 = 100*(70/(1823*2)) = 1.919912. Then floored to a decimal that is 1%.
So the modifier would be 1.01. But it was very hard to test I was only able to get ranges of 1-5% damage loss and had very little time to log the melee swings.
After species = F(F(F([17+10+18]*(3.5+128/256))*1.25)*1.01) = 227
Before species = F(F(F([17+10+18]*(3.5+128/256))*1.01)*1.25) = 226
Before pDIF = F(F(F([17+10+18]*1.01)*(3.5+128/256))*1.25) = 225
Actual value 226
Crit Scarlet Delirium occurs after Critbonus
- 99 DRK/49WAR vs Flamingo, 17 dmg Power Crossbow + 10 dmg bronze bolt, capped Att/fSTR2, no pdl%+, +25% species(piercing), 14% critbonus, 1823->1753 HP or 1% Scarlet Deliriun bonus
After CritB = F(F(F(F(F([17+10+18]*(3.5+128/256))*1.25)*1.14)*1.01)*1.25) = 322
Before CritB = F(F(F(F(F([17+10+18]*(3.5+128/256))*1.01)*1.25)*1.14)*1.25) = 321
Actual value 322
Ranged Crit 1.25 occurs before critBonus
- 99 THF/49NIN vs Stone Eater, 126 dmg Phulax bow + 5 dmg stone arrow, capped Att/fSTR2, no pdl%+, 14% Critbonus trait
After CritBonus = F(F(F([126+5+44]*(3.25+26/256))*1.14)*1.25) = 835
Before CritBonus = F(F(F([126+5+44]*(3.25+26/256))*1.25)*1.14) = 834
Actual value 834
Ranged CritBonus occurs before Species Resistance
- 99 THF/49NIN vs Huge hornet, 126 dmg Phulax bow + 5 dmg stone arrow, capped Att/fSTR2, no pdl%+, 14% Critbonus trait
After Species = F(F(F(F([126+5+44]*(3.25+26/256))*1.25)*1.25)*1.14) = 1043
Before Species = F(F(F(F([126+5+44]*(3.25+26/256))*1.25)*1.14)*1.25) = 1042
Actual value 1042
True Shot after pDIF (testing was actually done with Weaponskills)
- 99 RNG/41WHM vs stone eater, 6 dmg short bow + 12 dmg beetle arrow, capped Att/fSTR2, no pdl%+, 7% True Shot, Sidewinder with 92 AGI and 95STR = 65WSC, @5fTP
True shot before ftp = F(F(F([6+12+16+65]*1.07)*5)*(3.25+77/256)) = 1864
True shot after ftp = F(F(F([6+12+16+65]*5)*1.07)*(3.25+77/256)) = 1878
True shot after pdif = F(F(F([6+12+16+65]*5)*(3.25+77/256))*1.07) = 1879
Actual value 1879
True Shot before Species(testing was actually done with Weaponskills)
- 99 RNG/41WHM vs Huge Hornet, 6 dmg short bow + 12 dmg beetle arrow, capped Att/fSTR2, no pdl%+, 7% True Shot, Sidewinder with 92 AGI and 95STR = 65WSC, @5fTP
True shot after pDIF = F(F(F(F([6+12+16+65]*5)*(3.25+77/256))*1.07)*1.25) = 2348
True shot after Species = F(F(F(F([6+12+16+65]*5)*(3.25+77/256))*1.25)*1.07) = 2349
Actual value 2348
DEX and AGI are floored seperately for SA+TA.
I needed to build tp, then position king of hearts behind the mob, stand slightly out of range and engage+WS to get the bonuses to kick in
- 99 THF/41WHM vs Sand Hare, 28 dmg Dagger, capped Att/fSTR, no pdl%+, 14% Crit Bonus, 138 DEX with Toutatis's cape +10%, 117 AGI with Pillager's armlets +15%
Together = F(138*0.1+117*0.15) = 286
Separate = F(138*0.1)+F(117*0.15) = 285
AGI+DEX Floored together min = F(F(F(39+286)*(4.25+26/256))*1.14) = 1611
AGI+DEX Floored together max = F(F(F(F(39+286)*(4.25+26/256))*1.05)*1.14) = 1691
AGI+DEX Floored separate min = F(F(F(39+285)*(4.25+26/256))*1.14) = 1606
AGI+DEX Floored separate max = F(F(F(F(39+285)*(4.25+26/256))*1.05)*1.14) = 1686
Actual values 1608-1683
pdl%+ is a straight multiplier to pDIF which is then converted to a x/256 value… or… pDIF=(Floor[(pdif+pdltrait)*pdl%*256])/256
I did this with 2 other combinations of arrows to confirm and only the x/256 conversion predicted the right answer.
- 99 SAM/1RNG vs Wild Rabbit, 126 Phulax bow + 5 dmg stone arrow, capped Att/fSTR, 1% pdl%+, 209 STR 157AGI, Peircing arrow = 1fTP
pDIF*1.01 = 3.48371… = F(F((126+5+44+120)*3.48371...)*1) = 1027
pDIF*1.01 converted to 1024 = 3.48340… = F(F((126+5+44+120)*3.48340...)*1) = 1027
pDIF*1.01 converted to 256 = 3.48047… = F(F((126+5+44+120)*3.48047...)*1) = 1026
pDIF*(1+3/256) = 3.48964… = F(F((126+5+44+120)*3.48964...)*1) = 1029
pDIF*(1+11/1024) = 3.48627… = F(F((126+5+44+120)*3.48627...)*1) = 1028
pDIF*(1+10/1024) = 3.48290… = F(F((126+5+44+120)*3.48290...)*1) = 1027
Actual value 1026
Original "k" position found here:
https://www.bluegartr.com/threads/43101-Relic-3x-damage-formula
Empyrean "k" is the same position as relic "k":
https://www.ffxiah.com/forum/topic/58732/empyrean-aftermath-synergy-with-souleater/1/#3773548
"k" and Augment DA stacking found here:
https://www.bluegartr.com/threads/98420-Final-Magian-Empyreon-Armor.?p=4204854&viewfull=1#post4204854
Melee Crits follow cRatio+1
https://www.ffxiah.com/forum/topic/57976/critical-hits-follow-c-ratio1/
