Page 1 of 4

[Theorycraft] Calculating frostbolt damage exactly

PostPosted: Mon Feb 08, 2016 3:22 am
by Gnoggin
This post is for those who are interested in calculating the theoretical average damage of their frostbolts, and also finding out exact stat weightings for frost mages. This is important because it allows us to accurately compare two pieces of gear to work out which is better. Stat weightings are not constant values, but rather vary according to the actual stats you have. Crit and hit in particular become more valuable the more spellpower you have.

If you don't want to read the rest of this post, just look at this spreadsheet:
https://docs.google.com/spreadsheets/d/ ... sp=sharing

The spreadsheet lets you:
  • Calculate the average damage of your frostbolt with your current gear
  • Calculate your expected DPS with frostbolt
  • Calculate stat weightings for spell power, intellect, crit, hit, and spell pen
  • Work out how much a particular piece of gear improves your damage, allowing gear to be compared
How to use it:
  • Make a copy of the spreadsheet in your Google Drive so that you can edit it
  • Put in the stats box your current gear (for reference, example stats for certain sets of gear are given at the bottom of the spreadsheet)
  • You will see that stat weightings based on your gear are calculated, as is your expected frostbolt damage and DPS
  • If you want to compare two items in a certain slot, set your stats to be as they would be without any item in that slot. Then, put the stats for the item in the "Item Comparison" section and the spreadsheet will calculate which is better.
The following assumptions are made:
  • You are level 60
  • You are fighting a level 63 enemy (a boss)
  • You are using rank 10 frostbolt and nothing else
  • You have 2/2 Arcane subtlety, giving you a base of 10 spell pen
  • You have 5/5 Ice Shards, making your crits deal 200% damage
  • You have 3/3 Piercing ice, increasing the damage done by frost spells by 6%
It is also assumed that for every 10 frost resistance the enemy has, your damage drops by 2.5%. This is largely based on information from The Dalaran Tome of Knowledge (see https://forum.nostalrius.org/viewtopic.php?f=44&t=1440). This may not be entirely accurate - see this discussion on Elitist Jerks (http://forums.elitistjerks.com/forums/t ... and-mages/). It is difficult to find conclusive information, especially since Nostalrius' combat mechanics may actually be different to retail vanilla.

To get a formula for average frostbolt damage, we first find the average frostbolt damage before stats are taken into account. Rank 10 frostbolt does between 429 and 464 damage according to db.vanillagaming.org. The average of this minimum and maximum is 446.5.

According to the Theorycraft addon, r10 frostbolt has a spellpower coefficient of 0.863. If you don't know what that means - all spells that scale with a spellpower have a specific value called their spellpower coefficient which is multiplied by your spellpower to obtain their actual damage.

Code: Select all
actual damage = base damage + spellpower * spellpower coefficient

So plugging in the values for r10 frostbolt, we have our first estimate for a formula for frostbolt damage:

Code: Select all
frostbolt damage = 446.5 + 0.863 * spellpower

Now we add in the possibility for critical strikes. Every 59.5 points of intellect gives 1% crit, meaning that your total crit chance is given by your bonus crit + your intellect / 5950. Since we have 5/5 Ice Shards our crits deal 200% damage, and so every percentage of crit increases your average damage by 1% (suppose you cast 100 frostbolts, if you have 1% extra crit then an extra 1 frostbolt would be expected to crit so you have increased your expected damage by the amount of 1 frostbolt i.e. 1%).

So with crit,
Code: Select all
frostbolt damage = (446.5 + 0.863 * spellpower) * (1 + crit + int/5950)

Against a level 63 enemy, you have 17% chance to miss with spells. Assuming that gaining 1% hit increases your average damage by 1%, we now have:
Code: Select all
frostbolt damage = (446.5 + 0.863 * spellpower) * (1 + crit + int/5950) * (0.83 + hit)

Then, using the presumption that every 10 spell penetration increases your average damage by 2.5%, we have:
Code: Select all
frostbolt damage = (446.5 + 0.863 * spellpower) * (1 + crit + int/5950) * (0.83 + hit) * (1 - 0.0025*(resistance-penetration))

And finally, with the 6% increased frost damage from Piercing Ice we have:
Code: Select all
frostbolt damage = (446.5 + 0.863 * spellpower) * (1 + crit + int/5950) * (0.83 + hit) * (1 - 0.0025*(resistance-penetration))


Using this formula it is now possible to work out your expected DPS simply by dividing by 2.5 (the cast time of frostbolt).
In order to get stat weightings, we just work out what our frostbolt damage would be if we increased a certain stat by a single unit (a unit being for example 10 spellpower, or 1% crit). This is what the Damage increased caused by stat increase column in the spreadsheet is showing. The stat weightings are all relative to the gain you get from 10 spellpower, which is fixed at 1.


I do not claim that any of the formulas here are the exact methods that Nostalrius uses to calculate damage. They are good estimates based on available information. If anyone notices mistakes or has queries, then I will be more than happy to update this post and the spreadsheet based on comments in this thread. Spell penetration is the mechanic which I am most unsure about, however the formulas used for hit and crit may also be slightly wrong so please do correct me if necessary.

Changelog
1.1
  • Fixed typo in FrostboltDamage function which was causing bad results
  • Changed weighting calculations to use deltas instead of differentials
  • All decimals now display to 3 decimal places
1.11
  • Changed frostbolt base average damage to 455 and spellpower coefficient to 0.814

Re: [Theorycraft] Calculating frostbolt damage exactly

PostPosted: Mon Feb 08, 2016 6:44 am
by sumail
Nice post I think this is a great idea. Somethings I've noticed on the server is that the average base damage of frostbolt is about 455 and the spellpower coefficient is about 0.814 (which it should be 3.0/3.5*0.95).

I believe your FrostboltDamage() function in the spreadsheet has a mistake in it as I get different values from using the function and calculating the damage manually.

The use of calculus is not needed for this function. I see in your stat weight cells you have what amounts to (df/dx*delta_x) / (df/dy*delta_y), for linearly functions df/dx = delta_f / delta_x so for this function (df/dx*delta_x) / (df/dy*delta_y) = delta_f_x / delta_f_y. Where delta_f_x is delta_f by changing x and delta_f_y is delta_f by changing y. For example let's say x is for spellpower and y is for crit. x = 10 and y = 0.01 for the weight you are looking at. So you can just do [ f(x,y+0.01) - f(x,y) ] / [ f(x+10,y) - f(x,y) ] to obtain the same result. Of course the method of using the partial derivatives works but it just seems like more work since the function is linear.

I think this is a really good starting point and could be extended to warlocks and perhaps fire mages in the future. I support this type of effort for coming up with a censuses way for people to determine the tradeoffs between pieces of gear.

Re: [Theorycraft] Calculating frostbolt damage exactly

PostPosted: Mon Feb 08, 2016 5:23 pm
by Gnoggin
You are correct, there was a typo in the FrostboltDamage function which was causing some problems (hit and crit were the wrong way round). This has been fixed.

I agree with what you're saying about the differentials - they were actually unnecessarily complicated. I have changed it to just use deltas as you suggested. Another advantage of this is that it lets you see how much your damage would increase if you increased a particular stat by one unit.

Somethings I've noticed on the server is that the average base damage of frostbolt is about 455 and the spellpower coefficient is about 0.814 (which it should be 3.0/3.5*0.95).


How have you gotten these numbers? Is this from analysis of combat logs or something?

Re: [Theorycraft] Calculating frostbolt damage exactly

PostPosted: Mon Feb 08, 2016 7:07 pm
by sumail
I got the 455 base damage by removing all spellpower gear and attacking mobs until I found the mid point base damage. However I did have 3/3 piercing ice and 3/3 arcane instability so I divided that base damage by 1.09 and got 455 base damage.

To determine the spellpower coefficient I did the same at 400 spellpower. I came up with an average mid point damage of 852 dividing by 1.09 I got 782. So we have:

782 = 455 + x*400
x = (782 - 455)/400
x ~= 0.816

Now the coefficient from what I've read should be 3.0/3.5*0.95 = 0.814, the difference between what I got and this is probably due to some rounding within the game or something (since the mid point damage is likely a non integer number). So I just assume 0.814 is what the server uses. It's close enough with what I came up with and really the discrepancies are negligible.

Re: [Theorycraft] Calculating frostbolt damage exactly

PostPosted: Tue Feb 09, 2016 6:24 pm
by Impsie
Frostbolt co-efficient is indeed 81.4% (3/3.5 * 0.95).

Any spell with an additional non-damage effect (snare, root) gets a 5% penalty to its spell co-efficient. This does not include talents (Improved Blizzard).

Frost Nova, Blastwave and Cone of Cold are our other spells that also get the 5% penalty.

Re: [Theorycraft] Calculating frostbolt damage exactly

PostPosted: Wed Feb 10, 2016 9:31 am
by sirael7
I haven't used the spreadsheet yet but just from looking at it:

Isn't Frostbolt a binary spell? Meaning that if you hit you always deal full damage. Then spell penetration should not have an impact on dps.

Re: [Theorycraft] Calculating frostbolt damage exactly

PostPosted: Wed Feb 10, 2016 3:01 pm
by Impsie
sirael7 wrote:I haven't used the spreadsheet yet but just from looking at it:

Isn't Frostbolt a binary spell? Meaning that if you hit you always deal full damage. Then spell penetration should not have an impact on dps.


Yes, Frostbolt cannot partially resist. Spell penetration won't have as much of an impact, but will make it less likely to fully resist. Generally it isn't worth it tho.

Re: [Theorycraft] Calculating frostbolt damage exactly

PostPosted: Wed Feb 10, 2016 5:10 pm
by sirael7
Impsie wrote:
Yes, Frostbolt cannot partially resist. Spell penetration won't have as much of an impact, but will make it less likely to fully resist. Generally it isn't worth it tho.


But according to the Mage Information Post a target with Curse of Elements on it (what should be assumed for the damage calculator) has already a 0% chance to fully resist a spell. So i think the spell penetration part should be deleted from the document.

Re: [Theorycraft] Calculating frostbolt damage exactly

PostPosted: Thu Feb 11, 2016 4:29 pm
by Impsie
sirael7 wrote:
Impsie wrote:
Yes, Frostbolt cannot partially resist. Spell penetration won't have as much of an impact, but will make it less likely to fully resist. Generally it isn't worth it tho.


But according to the Mage Information Post a target with Curse of Elements on it (what should be assumed for the damage calculator) has already a 0% chance to fully resist a spell. So i think the spell penetration part should be deleted from the document.


Then yes, Spell pen is worthless for frost in a PvE setting, at least with the bosses available. Not sure how much resistance AQ/Naxx bosses will have on them.

Re: [Theorycraft] Calculating frostbolt damage exactly

PostPosted: Thu Feb 11, 2016 6:31 pm
by sirael7
Impsie wrote:
sirael7 wrote:
Impsie wrote:
Yes, Frostbolt cannot partially resist. Spell penetration won't have as much of an impact, but will make it less likely to fully resist. Generally it isn't worth it tho.


But according to the Mage Information Post a target with Curse of Elements on it (what should be assumed for the damage calculator) has already a 0% chance to fully resist a spell. So i think the spell penetration part should be deleted from the document.


Then yes, Spell pen is worthless for frost in a PvE setting, at least with the bosses available. Not sure how much resistance AQ/Naxx bosses will have on them.


From what i have read, all bosses in Vanilla have the same resistance except for maybe 2 or so. Can't remember the exact number.