22 December 2017

Damage Calculation In WildStar

What is theorycrafting without on-paper damage calculation? :p
I have no idea, that's why I ask you, L.O.L... Anyways let's jump right in.

The Base Damage

The people who followed the update posts of Carbine Studios over all those years know how the damage on skills is - or might be - calculated and what role Assault Power plays here.

According to balancing patches a percentage of assault power is changed and a value which increases with the level is changed. If we say these are the only values and when experimenting with the last patch values comparing it with the numbers on the tool-tips we can assume the following formula for assault abilities:

baseDamage = assaultPower * skillAssaultPowerMod + levelStatRate * yourLevel

Higher skill tiers increase the skillAssaultPowerMod and the levelStatRate

Now, this is a little bit old but Mortar Strike on Base Tier the inner AoE (Area of Effect) hits with 29.77 per level and 94.02% of Assault Power.

So let's assume we have 17765 Assault Power Rating and of course we're level 50.
17765 Assault Power Rating equals 17765 / 4 = 4441.25 Assault Power.
So for our base damage calculation:

baseDamage = 4441.25 * 0.9402 + 29.77 * 50

That's about 5664.16 damage.

Critical Hit Chance & Severity

Critical hit chance is, as the name says, the chance to hit harder. Severity is how hard you hit. By default, the severity is 150% (So a 50% damage increase compared to normal hits). The way I figured out how to calculate these both is by trial and error, but I'm gonna explain it a little bit.

No critical hit chance, but a lot of severity. 0% chance vs 300% severity.
If you have no critical hit chance you won't ever hit harder, so you'll have no damage increase here.

All hits are critical, but no severity. 100% chance vs 100% severity.
Even if each of your attacks hits critically if your critical hits don't hit harder your damage doesn't increase.

Okay, if all of our attacks are critical and severity doubles our damage. 100% chance vs 200% severity.
What happens? Our damage is doubled. As simple as it is.

Now if we critically hit every second time and still double the damage on a critical hit. 50% chance vs 200% severity.
Surprise. On average we get a 50% damage increase. So with half the critical hit chance, we deal half the damage increase from severity on average.

It doesn't take much to make the last step here but if you haven't got a feeling for math what happens here is:
criticalHitChance * criticalhitSeverity
 The damage increase occurs critical hit chance of the time and also we do 100% of our damage always. Keeping this in mind we get:
(1 + criticalHitChance * (criticalHitSeverity - 1))
So applying critical hit chance and severity to our damage calculation:

damage = baseDamage * (1 + (criticalHitChance * (criticalHitSeverity - 1))

Example: 
We have a 48% critical hit chance, 268% critical hit severity and the same damage as before.

damage = 5664.16 * (1 + 0.48 * (2.68 - 1))= ~10231.74

Multi-Hit Chance & Severity

WildStar has a stat called multi-hit chance and multi-hit severity. If your multi-hit chance triggers the severity of your previous damage is applied to the enemy a second time. This works exactly like critical hit chance and severity but our multi-hit severity is much lower.

So we have:  
multiHitChance * multiHitSeverity
However, compared to critical hit chance if multi-hit does not occur we don't have multi-hit damage. If the multi-hit chance is zero we don't do any additional damage.
So we keep this and add it to our formula like this:

damage = baseDamage * (1 + criticalHitChance * (criticalHitSeverity - 1)) + baseDamage * (multiHitChance * multiHitSeverity)

With our previous stats of 48% critical hit chance, 268% critical hit severity, 31% multi-hit chance, 48% multi-hit severity and our previous damage we now have:

damage = 5664.16 * (1 + 0.48 * (2.68 - 1)) + 5664.16 * (0.31 * 0.48) = 11074.57

HOLD IT - Synergy

Yep, Multi-Hit and Critical Hit synergizes. How? A multi-hit can be a critical hit too and a critical hit can multi-hit too. However the multi-hit takes the base damage not the critical damage. So we need to apply our critical hit chance and critical hit severity to our multi-hit:

dmg = baseDmg * (1 + CHC * (CHS - 1)) + baseDmg * (MHC * MHS) * (1 + CHC * (CHS - 1))
dmg stands for damage; baseDmg for baseDamage; CHC for critical hit chance; CHS for critical hit severity; MHC for multi-hit chance; MHS for multi-hit severity;

So our actual damage is:

damage = 5664.16 * (1 + 0.48 * (2.68 - 1)) + 5664.16 * (0.31 * 0.48) * (1 + 0.48 * (2.68 - 1)) = 11754.22

Next stat: Vigor

Vigor increases our damage respective to our health. If we have 100% health the whole damage increase of vigor is applied. If we have 50% of our health only 50% is applied:
1 + yourHealth * vigor
To calculate the average damage you can just use your average health.

Adding to the calculation:

dmg = baseDmg * (1 + CHC * (CHS - 1)) * (1 + (yourHP * vigor)) + baseDmg * (MHC * MHS) * (1 + CHC * (CHS - 1)) * (1 + (yourHP * vigor))
yourHP stands for your health points;

If we assume to have 18.2% vigor and 90% health on average we get:

damage = 5664.16 * (1 + 0.48 * (2.68 - 1)) * (1 + (0.9 * 0.182)) + 5664.16 * (0.31 * 0.48) * (1 + 0.48 * (2.68 - 1)) * (1 + (0.9 * 0.182)) = 13679.56

Strikethrough

Next up is strikethrough. So enemies have a deflect chance. There are tables on how much deflect chance the enemies have. You need the same amount of strikethrough as the enemy has deflect. Luckily there are raid buffs that decrease this value additionally. So how does strikethrough calculate?

If an enemy has 12.48% deflect chance and we have 12.48% strikethrough we'll hit 100% of the time. Alternatively we'll miss 12.48% - 12.48% = 0%. So our hit chance is:

100% - (enemyDeflect - strikethrough)

However, keep in mind this formula only counts if strikethrough is not higher than enemy deflect. Even worse strikethrough is supposed to convert to armor pierce however according to information it is bugged and strikethrough instead decreases your critical hit chance if over capped (going over a cap, as in the highest meaningful value).

Well assuming we do not overcap strikethrough:

dmg = baseDmg * (1 + CHC * (CHS - 1)) * (1 + yourHP * vigor) * (1 - (enemyDeflect - strikethrough))
+ baseDmg * (MHC * MHS) * (1 + CHC * (CHS - 1)) * (1 + yourHP * vigor) * (1 - (enemyDeflect - strikethrough))

Doing our damage calculation with 12.48% enemy deflect chance and 10.91% strikethrough results in:

damage = 5664.16 * (1 + 0.48 * (2.68 - 1)) * (1 + 0.9 * 0.182) * (1 - (0.1248 - 0.1091)) + 5664.16 * (0.31 * 0.48) * (1 + 0.48 * (2.68 - 1)) * (1 + 0.9 * 0.182) * (1 - (0.1248 - 0.1091)) = 13464.79

Armor and Resistances

Not done yet. Unfortunately. Armor is converted to resistance. My Spellslinger is currently running around with 39.39% resistance. Bosses have between  47.12% and 50.05% resistance. This means that we only do about 50% of our damage on those bosses. They resist about 50% of our damage.

Don't forget the more resist the enemy has the less damage we do. That means we need the opposite. So instead of enemyResist we use (1 - enemyResist).

So we add this number to our damage calculation:

dmg = baseDmg * (1 + CHC * (CHS - 1)) * (1 + yourHP * vigor) * (1 - (enemyDeflect - strikethrough)) * (1 - enemyResist) + baseDmg * (MHC * MHS) * (1 + CHC * (CHS - 1)) * (1 + yourHP * vigor) * (1 - (enemyDeflect - strikethrough)) * (1 - enemyResist)

If we take the resistance of the enemy of 47.12% into account we get this result:

damage = 5664.16 * (1 + 0.48 * (2.68 - 1)) * (1 + 0.9 * 0.182) * (1 - (0.1248 - 0.1091)) * (1 - 0.4712) + 5664.16 * (0.31 * 0.48) * (1 + 0.48 * (2.68 - 1)) * (1 + 0.9 * 0.182) * (1 - (0.1248 - 0.1091)) * (1 - 0.4712) = 7120.18

That's a drastic change but don't worry.

Your Savior: Armor Pierce

Luckily we have armor pierce in this game. Or unlucky, since our calculation gets even longer and worse. Well, how does armor pierce work?
After our raid buffs decrease the resistance of the boss additive, our armor pierce further decreases the resistance multiplicative.

So if the boss resistance is 47.12% and we decrease it by 10.5% to 36.62%. Now we have 9% armor pierce which further decreases it's resistance to 36.62% * (100% - 9%) = 36.62% * 91% = 33.32%.

So putting armor pierce into our calculation as well:

dmg = baseDmg * (1 + CHC * (CHS - 1) * (1 + yourHP * vigor) * (1 - (enemyDeflect - strikethrough)) * (1 - enemyResist * (1 - ARP)) + baseDmg * (MHC * MHS) * (1 + CHC * (CHS - 1)) * (1 + yourHP * vigor) * (1 - (enemyDeflect - strikethrough)) * (1 - enemyResist * (1 - ARP))
ARP stands for armor pierce ;)

So doing our calculation:

damage = 5664.16 * (1 + 0.48 * (2.68 - 1)) * (1 + 0.9 * 0.182) * (1 - (0.1248 - 0.1091)) * (1 - 0.4712 * (1 - 0.09)) + 5664.16 * (0.31 * 0.48) * (1 + 0.48 * (2.68 - 1)) * (1 + 0.9 * 0.182) * (1 - (0.1248 - 0.1091)) * (1 - 0.4712 * (1 - 0.09)) = 7691.20

Are We Done Yet?

Nope, unfortunately not. There is one more stat. Which one? Thanks to the primal matrix we now have tenacity. Tenacity deals more damage the less health the enemy has. So if we have 10.5% tenacity we deal 5.25% more damage when the enemy is at 50% and 0% more damage if the boss is at 100%.

dmg = baseDmg * (1 + CHC * (CHS - 1)) * (1 + yourHP * vigor) * (1 - (enemyDeflect - strikethrough)) * (1 - enemyResist * (1 - ARP)) * (1 + tenacity * (1 - enemyHP)) + baseDmg * (MHC * MHS) * (1 + CHC * (CHS - 1)) * (1 + yourHP * vigor) * (1 - (enemyDeflect - strikethrough)) * (1 - enemyResist * (1 - ARP)) * (1 + tenacity * (1 - enemyHP))

How much damage do we do then? You could assume 50% health on average so you could calculate with 5.25%. Alternatively, you can give a range. Let's do that.

If the enemy has 100% health:
Nothing changes damage is still 7691.20 as calculated earlier.

Enemy has 0% health
damage = 5664.16 * (1 + 0.48 * (2.68 - 1)) * (1 + 0.9 * 0.182) * (1 - (0.1248 - 0.1091)) * (1 - 0.4712 * (1 - 0.09)) * (1 + 0.105 * (1 - 0)) + 5664.16 * (0.31 * 0.48) * (1 + 0.48 * (2.68 - 1)) * (1 + 0.9 * 0.182) * (1 - (0.1248 - 0.1091)) * (1 - 0.4712 * (1 - 0.09)) * (1 + (0.105 * (1 - 0))) = 8498.77

So we have a range between 7691.20 and 8498.77 damage.

Enemy has 50% health (average).
damage = 5664.16 * (1 + 0.48 * (2.68 - 1)) * (1 + 0.9 * 0.182) * (1 - (0.1248 - 0.1091)) * (1 - 0.4712 * (1 - 0.09)) * (1 + (0.105 * (1 - 0.5))) + 5664.16 * (0.31 * 0.48) * (1 + 0.48 * (2.68 - 1)) * (1 + 0.9 * 0.182) * (1 - (0.1248 - 0.1091)) * (1 - 0.4712 * (1 - 0.09)) * (1 + (0.105 * (1 - 0.5))) = 8094.99

Done Finally?

Yes. Finally done. :)
I was simplifying this calculation prior to the update of the post but noticed that we lose accuracy and some other problems are raised. Treating the initial hit and multi-hit separately and adding them is a better solution. The problems that are raised are:


  • The initial critical hit and the multi-hit have the same critical chance but they might not both critical hit. It is safer to separate these.
  • It is unlikely for your health to change in this short amount of time but the initial hit changes the enemy's health thus the multi-hit damage changes respectively.
  • Very unlikely but the buff uptime may run out before the multi-hit hits resulting in different resistances.
So there we have it:

baseDmg= assaultPower * skillAssaultPowerMod + levelStatRate * yourLevel

initialDamage = baseDmg * (1 + CHC * (CHS - 1)) * (1 + yourHP * vigor) * (1 - (enemyDeflect - strikethrough)) * (1 - enemyResist * (1 - ARP)) * (1 + tenacity * (1 - enemyHP))

multiHitDamage = baseDmg * (MHC * MHS) * (1 + CHC * (CHS - 1)) * (1 + yourHP * vigor) * (1 - (enemyDeflect - strikethrough)) * (1 - enemyResist * (1 - ARP)) * (1 + tenacity * (1 - enemyHP))

totalDmg = initialDamage + multiHitDamage

Full formula:


totalDamage = (AP * skillAPMod + lvlStatRate * yourLvl) * (1 + CHC * (CHS - 1)) * (1 + yourHP * vigor) * (1 - (enemyDeflect - strikethrough)) * (1 - enemyResist * (1 - ARP)) * (1 + tenacity * (1 - enemyHP)) + baseDmg * (MHC * MHS) * (1 + CHC * (CHS - 1)) * (1 + yourHP * vigor) * (1 - (enemyDeflect - strikethrough)) * (1 - enemyResist * (1 - ARP)) * (1 + tenacity * (1 - enemyHP))
AP stands for Assault Power; skillAPMod for skillAssaultPowerModifier; lvlStatRate stands for level stat rate; yourLvl stands for your Level;
Liked the post? Noticed an error? Wanna discuss the content or leave a comment*? You can join or check into the discord to do so! (*Note: Comments are disabled to avoid saving user data on this website.)
>> Join Discord

About Me

My photo
I'm a B.Sc. Games Engineer and I created this blog to share my ideas, theorycrafting, thoughts and whatever I'm working on or doing.