PDIF

From FFXI Wiki
(Redirected from WRatio)

Physical Difference or "pDIF" is a series of functions that consider the ratio of player attack vs. monster defense and determine how much melee damage is dealt every time your character swings its weapon or gets swung at.
There are at least three different kinds of pDIF equations. The formulas below mostly refer to melee pDIF, with a nod here and there to ranged pDIF. They completely ignore pet/monster/avatar pDIF, which is thought to follow different equations or have different caps.

Pre-Randomizer pDIF Caps by Weapon Type
Weapon Type Non-crit Crit
1-Handed
Mandau icon.png Excalibur icon.png Guttler icon.png Kikoku icon.png Mjollnir icon.png
3.25 4.25
H2H & Great Katana
Spharai icon.png Amanomurakumo icon.png
3.5 4.5
2-Handed
Ragnarok icon.png Bravura icon.png Gungnir icon.png Claustrum icon.png
3.75 4.75
Scythe
Apocalypse icon.png
4 5
Archery & Throwing
Yoichinoyumi icon.png Wingedge icon.png
3.25 3.25*1.25
Marksmanship
Annihilator icon.png
3.5 3.5*1.25
Pre-Randomizer pDIF Caps by Weapon Type and Lv99 Jobs with Damage Limit+ Trait
Job: Abyss Burgeonet icon.png Black Belt icon.png Hunter's Beret icon.png Drachen Armet icon.png Fighter's Mask icon.png Saotome Kabuto icon.png Monster Helm icon.png Cirque Cappello icon.png Charis Tiara icon.png Raider's Bonnet icon.png Iga Zukin icon.png Duelist's Chapeau icon.png
Weapon Type Non-Crit Crit Non-Crit Crit Non-Crit Crit Non-Crit Crit
1-Handed 3.75 4.75 3.55 4.55 3.45 4.45 3.35 4.35
H2H & Great Katana 4.0 5.0 3.8 4.8 3.7 4.7 3.6 4.6
2-Handed 4.25 5.25 4.05 5.05 3.95 4.95 3.85 4.85
Scythe 4.5 5.5 4.3 5.3 4.2 5.2 4.1 5.1
Archery & Throwing 3.75 3.75*1.25 3.55 3.55*1.25 3.45 3.45*1.25 3.35 3.35*1.25
Marksmanship 4.0 4.0*1.25 3.8 3.8*1.25 3.7 3.7*1.25 3.6 3.6*1.25

Attack/Defense Ratio

  • Ratio = Attacker's Attack/ Target's Defense
    • 1H melee weapons have an effective ratio cap of 3.625
    • H2H and GKT melee weapons have an effective ratio cap of 3.875
    • Great Sword, Staff, Great Axe, and Polearm have an effective ratio cap of 4.125
    • Scythe has an effective Ratio of 4.375
    • Archery and Throwing have an unknown ratio cap (perhaps approximately 3.2375)
    • Marksmanship also has an unknown ratio cap (perhaps approximately 3.475)
NOTE: The effective ratio cap is the point where pDIFmin becomes equal to the pre-randomized pDIFmax value.

Example: 1H Player Earthworm Jim has 1000 Attack and is fighting a monster that has 500 Defense. His Ratio is 1000/500, or 2.00.

  • Additional Factors during this stage
  • Estimating Ratio via /check command
    • If your Ratio is less than 1, the monster will check "High Defense."
    • If it is higher than 1.25, the monster will check "Low Defense."

Level Correction Function (cRatio)

Level correction function imposes a penalty to attack/defense ratio if the target's level is higher than attacker's level (or item level). After the Attack/Defense Ratio has been corrected, it is referred to as "cRatio" or "corrected Ratio." This correction generally doesn't apply to zones with content added after 2013 including Adoulin, Ambuscade, and Escha/Reisenjima: refer to Level Difference Penalty for a full list of zones without level correction. Monsters are also affected by level correction when they attack players, but their formulas give a bonus to ratio when they are over the player's level. It is unclear whether this mechanic applies in the aforementioned zones, but it probably does not.

  • Melee attacks have 0.05/level ratio penalty
cRatio = Ratio - (target's level - attacker's level) × 0.05
  • Ranged attacks have 0.025/level ratio penalty
cRatio = Ratio - (target's level - attacker's level) × 0.025

These equations are one of the reasons that Rangers are preferred for fighting targets many levels above you.

Example: 1H Player Earthworm Jim has 2.00 Ratio, but the enemy he's fighting is level 124 and he's item level 119. The 5 level difference loses him .25 (=5×.05) Ratio, dropping him to 1.75 cRatio.

After Ratio and Level Correction (Melee)

Beyond this point, there are several competing models that explain how cRatio translates into damage. The below description of melee pDIF is from Motenten's model, extended due to the 2/2016 pDIF changes. For a review of model differences, please see the talk page. Ranged damage is better understood (or at least our understanding of it is challenged less frequently), so it will be handled separately at the bottom.

Verification Needed Motenten has expressed that this model is complete in an algorithmic manner, but explicitly incomplete.

1. wRatio

  • 1. Calculate wRatio using your cRatio
    • If you critical hit: wRatio = (cRatio + 1)
    • If you do not critical hit: wRatio = (cRatio + 0)
Example 1: 1H Player Earthworm Jim has 2.0 cRatio. If he crits, he will have 3.0 wRatio. If he doesn't crit, he will have 2.0 wRatio.
Example 2: 1H Player Earthworm Jim has 3.0 cRatio. If he crits, he will have 4.0 wRatio. If he doesn't crit, he will have 3.0 wRatio.
  • Optional: You can represent this mathematically write this using a logical expression, which will be 1 when true and 0 when false. Rand represents a random number from 0 to 1.
wRatio = cRatio + ( Rand < CritRate% )
ex: If your critical hit rate is 25% (0.25) and Rand (A random number between 0-1) is 0.1, the equation becomes wRatio = cRatio + 1

2. qRatio

  • 1. Determine the Upper and Lesser Limit
    • Upper Limit (See UL Equations)
    • Lesser Limit (See LL Equations)
    • Min/Max is only there for testing convenience; do not bother with them if they are confusing
    • Verification Needed It is currently unknown if the cap per weapon type is applied to the UL and the LL. Doing so would only be noticeable when the UL is above the cap but the LL is not, resulting in a lower average result on the following step of qRatio.
wRatio UL Equation Min Max
0 ≤ wRatio < 0.5 wRatio + 0.5 0.5 < 1
0.5 ≤ wRatio < 0.7 1 1 1
0.7 ≤ wRatio < 1.2 wRatio + .3 1 < 1.5
1.2 ≤ wRatio < 1.5 (wRatio × 0.25) + wRatio 1.5 < 1.875
1.5 ≤ wRatio wRatio + 0.375 1.875 (varies)
wRatio LL Equation Min Max
0 ≤ wRatio < 0.38 0 0 0
0.38 ≤ wRatio < 1.25 (wRatio) × (1176/1024) - (448/1024) 0 < 4083/4096
1.25 ≤ wRatio < 1.51 1 1 1
1.51 ≤ wRatio < 2.44 (wRatio) × (1176/1024) - (755/1024) 0.9968359375 2.064882813
2.44 ≤ wRatio wRatio - 0.375 2.065 (varies)
min and max pDIF curves
  • 2. Randomly select a value between LL and UL
    • If the value is less than zero, set to zero
    • If the value is greater than the cap shown for your weapon type in the list below, set to the cap value.
      • 1H qRatio caps at 3.25 for non-crits and 4.25 for crits
      • H2H and Great Katana qRatio caps at 3.5 for non-crits and 4.5 for crits
      • Great Sword, Staff, Great Axe, and Polearm qRatio caps at 3.75 for non-crits and 4.75 for crits
      • Scythe qRatio caps at 4 for non-crits and 5 for crits

3. Multiply the final

Calculate the initial damage value using qRatio, then multiply it by a random number between 1 and 1.05 flooring each step.

  • For example, if the final qRatio is 3.
    • Step 1: initialDMG = floor((WpnDmg+fSTR)*3)
    • Step 2: Choose and random number between 1 and 1.05. In this example let us choose 1.05.
    • Step 3: DMG = floor(initialDMG*1.05)

In total, the equation would look like: DMG = floor(floor(WpnDmg+fSTR)*qRatio)*Random#1~1.05)

Average Melee pDIF(qRatio)

The expression for finding average pDIF requires accounting for the "spike" frequency(%) of the pDIF=1 occurance between wRatio range: 0.5-1.5 as well as accounting for the caps and the lower and upper end of the wRatio ranges.

  • avgPDIF = sRatio*1.0 + lowCap%*pDIFminCap + highCap%*pDIFmaxCap + (1 - sRatio - lowCap% - highCap%)*(((pDIFmax - pDIFmin) / 2) + pDIFmin)
  • avgDMG = floor(floor((DMG+fSTR)*(sRatio*1.0 + lowCap%*pDIFminCap + highCap%*pDIFmaxCap + (1 - sRatio - lowCap% - highCap%) * (((pDIFMax - pDIFMin) / 2) + pDIFMin)))*(1 + Randomizer%/2))

Note: the % terms in the equations are used in their decimal forms.

Explanation of Terms

sRatio: Using the large data set provided by Masamune, Montenten plotted the data to find the Spike frequency started at 0.5 wratio and rose linearly to plateau at 33% between 0.75 and 1.25 before finally falling linearly again to 0 at 1.5 wRatio. This can be modeled as sRatio.

  • sRatio = (0.5 - abs(wRatio - 1)) * 1.2
    • if (sRatio < 0) then sRatio = 0
    • if (sRatio > .333) then sRatio = 0.333 (~33.3%)
    • Limit it to between 0 and 0.333, anything below 0.5 wRatio or above 1.5 wRatio will be negative, capped at 0, and thus not generate any spikes.

pDIFminCap: The minimum pDIF allowed. Always 0.

lowCap%: The % of random generated number that will fall below 0. To find this you need to compare pDIF max to the uncapped lower equation (wRatio)*(1176/1024)-(448/1024) for values below 0.38 wRatio.

  • lowCap% = Absolute(pDIFminUncapped)/(pDIFmax+Absolute(pDIFminUncapped))
  • This term is only needed when the uncapped pDIFmin falls below 0.
    • Example Using 0.25 wRatio : lowCap% = Abs(-0.15039063)/(0.75+Abs(-0.15039063)) = 0.15039063/(0.75+0.15039063) = 0.1670282 (~16.7%)

pDIFmaxCap: The maximum pDIF allows. Will change based on physical damage limit.

  • Example : Bard 1 hand non-crit cap without any pdl+. Effective max wRatio = 3.625. Using Montentens upper equation(wRatio-0.375) = 3.25 =pDIFmaxCap.

highCap%: The % of random generated number that will fall above the cap. To find this you need to compare uncapped pDIFmax to the pDIFmaxCap and pDIFmin.

  • highCap% = (pDIFmaxUncapped - pDIFmaxCap)/(pDIFmaxUncapped - pDIFmin)
  • This term is only needed when the uncapped pDIFmax falls above the cap.
    • Example : Bard 1 hand non-crit cap without any pdl+ at a wRatio of 3.5 using his upper equation(wRatio+0375) to find pDIFmaxUncapped. highCap% = (3.875 - 3.25)/(3.875 - 3.125) = 0.83333 (~83.3%)

pDIFmax: pDIF value using the relevant upper equation.

pDIFmin: pDIF value using the relevant lower equation.

Randomizer: Always 5% multiplier when calculating final damage. In the average equation it is exactly half, or expressed as 1+0.05/2 = 1.025.

Average melee pDIF Example

  • wRatio = 0.773.
  • sRatio = 0.3276
  • pDIF max = 0.773+0.3 = 1.073
  • pDIF min = (1176/1024)*0.773-(448/1024) = 0.450242188
  • lowCap%, pDIFminCap, highCap%, pDIFmaxCap terms are not needed as we are in the middle of the range and will be set to 0.

Average pDIF(qRatio) = 0.3276*1 + (1 - 0.3276)*(((1.073 - 0.450242188)/2)+0.450242188) = 0.8397

   Please note if you are referencing Montenten's Bgwiki post he reports a predicted average of 0.8435 @0.773 wRatio. This is because he used pDIFmax = 1.023 which he got from his updated upper limit equation of pDIF = wRatio + 0.25 which he validated later in post #168 in the reference "Montenten's pDIF graphs and testing (Montenten, BG Forums)". He also included the randomizer term 1.025 in this calcualtion to help him fit the actual data[(0.3276+(1-0.3276)*(((1.023-0.450242188)/2)+0.450242188))*(1.025) = 0.8435]. Ideally you would not multiply the randomizer until after you calculate and floor your initial damage.

After Ratio and Level Correction (Ranged )

Ranged damage uses cRatio, which is calculated as described above. Then it picks a random value between the below damage limits. It is notable that there is no secondary random multiplier for ranged damage, but qRatio is capped differently for different weapon types:

  • Archery and Throwing qRatio is capped at 3.25
  • Marksmanship qRatio is capped at 3.50
cRatio UL Equation Min Max
0 ≤ cRatio < 0.9 cRatio × (10/9) 0 1
0.9 ≤ cRatio < 1.1 1 1 1
1.1 ≤ cRatio cRatio 1.1 3.5
cRatio LL Equation
0 ≤ cRatio < 0.9 cRatio 0 0.9
0.9 ≤ cRatio < 1.1 1 1 1
1.1 ≤ cRatio cRatio×(20/19) - (3/19) 1.1 3.5
Ranged pDIF Min and Max curves

Ranged Critical Hit Damage

Unlike melee hits (which have additive damage from critical hits), Ranged critical hits are implemented as a +25% multiplier that bypasses the cap.

  • Critical ranged pDIF = Normal Ranged pDIF × 1.25

Distance Correction

Also unlike melee hits, ranged attacks have Distance Correction and utilize True Shot, which uniquely affects damage multipliers for Ranged Attacks and also is not capped.

Ex: Master RNG with 4% True Shot gear 7% from traits and 8% from gifts would have 19% True Shot. The multiplier for archery would then become 3.25 * 1.19 = 3.8675 and the multiplier for marksmanship would become 3.5 * 1.19 = 4.165 if fired from proper distance ranges.

References