StatValues
StatValues (for Warlocks and Mages) is an original addon that calculates the values of Crit, Hit and Int relative to spellpower depending on your current gear, buffs, specc and other factors. It also has the ability to simulate buffs and future gear upgrades.
The goal of the addon is to take every applicable factor into account, and get a mathematically correct answer for the age old question of "hit vs. crit" and "how much sp for a hit/crit", no longer needing to go by feeling or hearsay.
You use the addon by typing "/statvalues" or "/sv" followed by a selection of variables, for example "/statvalues print" or "/sv b".
Results of the "Print" and "Buffed" commands in my current gear.
Results of the "Custom" and "Custombuffed" commands in my current gear simulating replacing Briarwood Reed with Neltharion's Tear.
About StatValues:
StatValues works by calculating how much "true damage" your bolts will do, which is the average damage when resists and crits have been factored in. It first calculates this with your current setup, then with an extra crit, hit and intellect. It then calculates how much spellpower you would need to add to reach these values, thus getting the value ratio between crit/hit/int and spellpower for maximum bolt damage. Note that the addon does not calculate dps, only bolt damage, though for Warlocks and Mages this is essentially the same thing once divided by cast time.
The addon grabs the Spellpower, Crit and Hit from your currently equipped gear and buffs. If you're a Warlock advanced calculations are made for Improved Shadowbolt, if you're specced into that. It also considers Ruin (Warlock), Devastation (Warlock), Elemental Precision (Mage), Ice Shards (Mage) and Winter's Chill (Mage). Winter's Chill simulation is enabled by default, since even if you're not personally specced into it someone in your raid likely is, and can be disabled with a command.
TheoryCraft and BonusScanner are being used to grab the Sp, Crit and Hit from your gear and buffs, so you need to have them installed and enabled for StatValues to work.
For more detail about how the values are calculated see the "Mathematical Equations" section below or, even better, read the code for yourself. It's mostly math so even if you're not well versed in programming you should be able to understand most things.
The functions
‘Print’ or ‘p’
The most common function. Gathers your stats, calculates and prints the values of hit, crit and int relative to spellpower.
‘Buffed’ or ‘b’
Like Print, but adds stats equivalent to what you would have if you had had world- and raidbuffs and consumables.
The specific stats added are:
Note: Don't use this while already buffed, or it will show incorrect values.
‘Custom’ or ‘c’
Like print, but adds stats as specified by you using /script StatValues.customX = Y. You can use this to simulate future gear upgrades, unaccounted for buffs, or similar. Negative values are accepted.
'Custombuffed' or 'cb'
Combines 'Buffed' and 'Custom', allowing you to simulate altered gear with buffs.
‘Stats’ or ’s’
Gathers and prints the stats used by the addon. Spellpower, crit, hit and intellect.
‘Debug’
Prints some calculated values, so you can see where stuff went wrong, if it did. Most people will not need this information.
Other stuff of interest:
Assumptions:
Statics:
Mathematical equations:
TL,DR:
For more information see the attached readme.
If you have any questions about how the addon works, or if you think is anything is wrong feel free to write so here.
Download link
Changelog:
Sources:
StatValues (for Warlocks and Mages) is an original addon that calculates the values of Crit, Hit and Int relative to spellpower depending on your current gear, buffs, specc and other factors. It also has the ability to simulate buffs and future gear upgrades.
The goal of the addon is to take every applicable factor into account, and get a mathematically correct answer for the age old question of "hit vs. crit" and "how much sp for a hit/crit", no longer needing to go by feeling or hearsay.
You use the addon by typing "/statvalues" or "/sv" followed by a selection of variables, for example "/statvalues print" or "/sv b".
Results of the "Print" and "Buffed" commands in my current gear.
Results of the "Custom" and "Custombuffed" commands in my current gear simulating replacing Briarwood Reed with Neltharion's Tear.
About StatValues:
StatValues works by calculating how much "true damage" your bolts will do, which is the average damage when resists and crits have been factored in. It first calculates this with your current setup, then with an extra crit, hit and intellect. It then calculates how much spellpower you would need to add to reach these values, thus getting the value ratio between crit/hit/int and spellpower for maximum bolt damage. Note that the addon does not calculate dps, only bolt damage, though for Warlocks and Mages this is essentially the same thing once divided by cast time.
The addon grabs the Spellpower, Crit and Hit from your currently equipped gear and buffs. If you're a Warlock advanced calculations are made for Improved Shadowbolt, if you're specced into that. It also considers Ruin (Warlock), Devastation (Warlock), Elemental Precision (Mage), Ice Shards (Mage) and Winter's Chill (Mage). Winter's Chill simulation is enabled by default, since even if you're not personally specced into it someone in your raid likely is, and can be disabled with a command.
TheoryCraft and BonusScanner are being used to grab the Sp, Crit and Hit from your gear and buffs, so you need to have them installed and enabled for StatValues to work.
For more detail about how the values are calculated see the "Mathematical Equations" section below or, even better, read the code for yourself. It's mostly math so even if you're not well versed in programming you should be able to understand most things.
The functions
‘Print’ or ‘p’
The most common function. Gathers your stats, calculates and prints the values of hit, crit and int relative to spellpower.
‘Buffed’ or ‘b’
Like Print, but adds stats equivalent to what you would have if you had had world- and raidbuffs and consumables.
The specific stats added are:
Spellpower: Warlocks: Flask + Greater Arcane + Shadow Power + Brilliant Wizard oil = 261. Mages: Flask + Greater Arcane + Frost Power + Brilliant Wizard oil = 236.
Crit: Ony/Nef + Felwood + DM:N + Brilliant Wizard oil= 18%
Intellect: Blasted Lands + Arcane Intellect + Mark of the Wild = 68 intellect. The added benefits of Spirit of Zandalar (ZG buff), kings, if alliance, and the racial, if gnome, are also considered.
Crit: Ony/Nef + Felwood + DM:N + Brilliant Wizard oil= 18%
Intellect: Blasted Lands + Arcane Intellect + Mark of the Wild = 68 intellect. The added benefits of Spirit of Zandalar (ZG buff), kings, if alliance, and the racial, if gnome, are also considered.
‘Custom’ or ‘c’
Like print, but adds stats as specified by you using /script StatValues.customX = Y. You can use this to simulate future gear upgrades, unaccounted for buffs, or similar. Negative values are accepted.
'Custombuffed' or 'cb'
Combines 'Buffed' and 'Custom', allowing you to simulate altered gear with buffs.
‘Stats’ or ’s’
Gathers and prints the stats used by the addon. Spellpower, crit, hit and intellect.
‘Debug’
Prints some calculated values, so you can see where stuff went wrong, if it did. Most people will not need this information.
Other stuff of interest:
Assumptions:
Your target has 0 Shadow/Frost resistance.
The average critchange of all Warlocks in your raid is the same as your own. (Warlock only)
You (or someone in the raid) either have 5/5 Winter's Chill, or 0/5. (Mage only)
The average critchange of all Warlocks in your raid is the same as your own. (Warlock only)
You (or someone in the raid) either have 5/5 Winter's Chill, or 0/5. (Mage only)
Statics:
Spellpower coefficient for Shadowbolt: 3/3.5 [1]
Spellpower coefficient for Frostbolt: (3/3.5)*0.95 [1]
Amount of Intellect required for 1% crit for Warlock: 60.6 [1]
Amount of Intellect required for 1% crit for Mages: 59.5 [1]
Base crit chance for Warlock: 1.7% [1]
Base crit chance for Mages: 0.02% [1]
Base damage for Shadowbolt: 529 [2]
Base damage for Frostbolt: 464 [2]
See the bottom of the document for sources.
Spellpower coefficient for Frostbolt: (3/3.5)*0.95 [1]
Amount of Intellect required for 1% crit for Warlock: 60.6 [1]
Amount of Intellect required for 1% crit for Mages: 59.5 [1]
Base crit chance for Warlock: 1.7% [1]
Base crit chance for Mages: 0.02% [1]
Base damage for Shadowbolt: 529 [2]
Base damage for Frostbolt: 464 [2]
See the bottom of the document for sources.
Mathematical equations:
True damage:
DMG = HitEffect * CritEffect * SPEffect = (0.83 + Hit) * CritEffect * (Base + (Coeff * SP))
See statics for values of Coeff and Base.
Values of SP, Crit and Hit are gathered by the addon prior to running these methods.
CritEffect varies for Warlock and Mage.
CritEffect:
For mages it’s very simple;
CritEffect = (1 + Crit)
but for Warlocks it’s more complicated due to Improved. Shadowbolt.
If you are specced into this, the below is calculated, else it’s the same as for mages.
CritEffect = (1 + Crit) + ((0.2 + (0.2 * (1 - Crit) * 3)) * Crit)
1 + Crit is the standard crit damage gain.
0.2 is the base bonus, a crit will always give this bonus.
0.2 is the bonus lost per charge lost due to crits wasting charges, (1 - Crit) is the chance not to crit, and 3 is the amount of stacks lost after removing the first one which will always benefit you.
If you are only partly specced into Improved Shadowbolt, the value that is currently 0.2 will be changed to reflect this. For example if you’re 3/5 Improved Shadowbolt it would be 0.04 * 3 = 0.12.
To better understand this, try the calculations with a couple of examples, for example 0%, 10% and 100% crit, and see how it affects the outcome.
Please note that you do not need to factor hit rating into this, since a “would-be” crit which is resisted still applies the debuff, [3] and the change for a "crit to miss" is equal to the change for a "miss to crit", so they cancel eachother out. (1 - Hit) * (Crit) = (Crit) * (1 - Hit)
Statvalues:
We will use the Crit Value calculation for Warlocks in this example, since it's the most complex and therefore shows off all the calculations.
We solve for CritValue by breaking out the spelldamage part of the True Damage calculations, and then subtracting the original damage, thus answering the question “How much spellpower do I need in order to gain as much damage as I gain from 1% extra crit?”.
NewDamage = (CritEffect * HitEffect * SPEffect)
NewDamage / (CritEffect * HitEffect) = SPEffect = Base + (Coeff * SP)
NewDamage / (CritEffect * HitEffect) - Base = Coeff * SP
(NewDamage / (CritEffect * HitEffect) - Base) / Coeff = SP
Thus we see how much SP we need in order to achieve the same damage, had we not had the extra crit.
SP - OldSP = NewSP
NewSP is how much SP we need to add to our original SP, and this is the number we’re interested in.
DMG = HitEffect * CritEffect * SPEffect = (0.83 + Hit) * CritEffect * (Base + (Coeff * SP))
See statics for values of Coeff and Base.
Values of SP, Crit and Hit are gathered by the addon prior to running these methods.
CritEffect varies for Warlock and Mage.
CritEffect:
For mages it’s very simple;
CritEffect = (1 + Crit)
but for Warlocks it’s more complicated due to Improved. Shadowbolt.
If you are specced into this, the below is calculated, else it’s the same as for mages.
CritEffect = (1 + Crit) + ((0.2 + (0.2 * (1 - Crit) * 3)) * Crit)
1 + Crit is the standard crit damage gain.
0.2 is the base bonus, a crit will always give this bonus.
0.2 is the bonus lost per charge lost due to crits wasting charges, (1 - Crit) is the chance not to crit, and 3 is the amount of stacks lost after removing the first one which will always benefit you.
If you are only partly specced into Improved Shadowbolt, the value that is currently 0.2 will be changed to reflect this. For example if you’re 3/5 Improved Shadowbolt it would be 0.04 * 3 = 0.12.
To better understand this, try the calculations with a couple of examples, for example 0%, 10% and 100% crit, and see how it affects the outcome.
Please note that you do not need to factor hit rating into this, since a “would-be” crit which is resisted still applies the debuff, [3] and the change for a "crit to miss" is equal to the change for a "miss to crit", so they cancel eachother out. (1 - Hit) * (Crit) = (Crit) * (1 - Hit)
Statvalues:
We will use the Crit Value calculation for Warlocks in this example, since it's the most complex and therefore shows off all the calculations.
We solve for CritValue by breaking out the spelldamage part of the True Damage calculations, and then subtracting the original damage, thus answering the question “How much spellpower do I need in order to gain as much damage as I gain from 1% extra crit?”.
NewDamage = (CritEffect * HitEffect * SPEffect)
NewDamage / (CritEffect * HitEffect) = SPEffect = Base + (Coeff * SP)
NewDamage / (CritEffect * HitEffect) - Base = Coeff * SP
(NewDamage / (CritEffect * HitEffect) - Base) / Coeff = SP
Thus we see how much SP we need in order to achieve the same damage, had we not had the extra crit.
SP - OldSP = NewSP
NewSP is how much SP we need to add to our original SP, and this is the number we’re interested in.
TL,DR:
- Install addon.
- Type "/sv p" and "/sv b".
- Gear accordingly.
For more information see the attached readme.
If you have any questions about how the addon works, or if you think is anything is wrong feel free to write so here.
Download link
Changelog:
- Ver 1.1: Changed “buffed” and “custombuffed” commands to use the ZG buff (Spirit of Zandalar) and Brilliant Wizard Oil instead of Wizard Oil for both classes, and Elixir of Frost Power for mages.
Warlocks now gain 261 instead of 249 SP, Mages now gain 236 instead of 209 SP, both now gain 19% instead of 18% crit when buffed, and the int gain is increased by 15 percentage points.
Also fixed a bug with Warlocks with Ruin and Mages without 5/5 Ice Shards. - Ver 1.0: Public Release
Sources:
- Big TheoryCraft Thread (http://forum.twinstar.cz/showthread.php/57011-Big-TheoryCrafting-Thread)
- Original Research
- Video of a “Resisted Crit” http://www.dailymotion.com/video/x3d2w8m
Last edited: