WoG heal modifier: Method to the madness?
Moderators: Fridmarr, Worldie, Aergis, theckhd
14 posts
• Page 1 of 1
WoG heal modifier: Method to the madness?
At 85 the equation is ((1929 + 2149 / 2) + 0.198 * AP), at level 50 it's ((240 + 266 / 2) + 0.198 * AP) and so on. The equation remains the same other than the first two numbers (1929 and 2149 at 85, and 240 and 266 at 50).
Is there a curve used to determine these two numbers? I can't seem to find one, and it would be really helpful for my purposes.
Is there a curve used to determine these two numbers? I can't seem to find one, and it would be really helpful for my purposes.
-

Jeremoot - Posts: 434
- Joined: Tue Feb 08, 2011 5:36 pm
Re: WoG heal modifier: Method to the madness?
A linear interpolation of the form f(x) = ax + b gives:
f(85) = 1929 = a*85 + b (1)
f(50) = 240 = a*50 + b (2)
Solving for a using (1) - (2)
1689 = 35*a
a = 48.257
=> b = 1929 - 85*a = -2412.86
So a linear interpolation of your lower bound is 48.257 * level - 2414.86
Unfortunately, you'll need more than two data points if your interpolation is not linear and I suspect it isn't. Given other equations, it's probably piecewise linear or exponential and you'd need data points for each expansion to work that out (eg 50, 55, 60, 65, 70, 75, 80, 82, 85).
f(85) = 1929 = a*85 + b (1)
f(50) = 240 = a*50 + b (2)
Solving for a using (1) - (2)
1689 = 35*a
a = 48.257
=> b = 1929 - 85*a = -2412.86
So a linear interpolation of your lower bound is 48.257 * level - 2414.86
Unfortunately, you'll need more than two data points if your interpolation is not linear and I suspect it isn't. Given other equations, it's probably piecewise linear or exponential and you'd need data points for each expansion to work that out (eg 50, 55, 60, 65, 70, 75, 80, 82, 85).
- Iminmmnni
- Posts: 46
- Joined: Thu Mar 24, 2011 4:41 pm
- Location: Melbourne
Re: WoG heal modifier: Method to the madness?
Wowhead has a slider bar that allows you to adjust the equation for every level.
It's certainly not linear. I'm pretty sure it is a piecewise equation, I went and mapped out the lower bound data for (level-9) up until 59, but I'm not smart enough to figure out an equation from it.
80-85:
It's certainly not linear. I'm pretty sure it is a piecewise equation, I went and mapped out the lower bound data for (level-9) up until 59, but I'm not smart enough to figure out an equation from it.
f(L) = {
[74+0, L-9 = 0]
[74+2, L-9 = 1] +2
[74+4, L-9 = 2] +2
[74+5, L-9 = 3] +1
[74+6, L-9 = 4] +1
[74+10, L-9 = 5] +4
[74+27, L-9 = 10]
[74+43, L-9 = 15]
[74+57, L-9 = 20]
[74+79, L-9 = 25]
[74+102, L-9 = 30]
[74+130, L-9 = 35]
[74+160, L-9 = 40]
[74+190, L-9 = 45]
[74+568, L-9 = 50]
80-85:
[1809, L-9 = 71]
[1833, L-9 = 72] -> Increase of 24
[1858, L-9 = 73] -> Increase of 25
[1881, L-9 = 74] -> Increase of 23
[1905, L-9 = 75] -> Increase of 24
[1929, L-9 = 76] -> Increase of 24
-

Jeremoot - Posts: 434
- Joined: Tue Feb 08, 2011 5:36 pm
Re: WoG heal modifier: Method to the madness?
I suppose I'll suck it up and hardcode 76 else if statements for now.
-

Jeremoot - Posts: 434
- Joined: Tue Feb 08, 2011 5:36 pm
Re: WoG heal modifier: Method to the madness?
I'd think a table or array would be less annoying. For example, make an 85-element array, store the base heal value for each level in that element of the array.
So for example, arrayName(85) would return the 85th element, which is the base heal value for level 85. arrayName(70) would similarly return the 70th element, which is the base heal value for level 70. And so on.
So for example, arrayName(85) would return the 85th element, which is the base heal value for level 85. arrayName(70) would similarly return the 70th element, which is the base heal value for level 70. And so on.
"Theck, Bringer of Numbers and Pounding Headaches," courtesy of Grehn|Skipjack.
MATLAB 5.x, Call to Arms 5.x, Talent Spec & Glyph Guide 5.x, Blog: Sacred Duty
MATLAB 5.x, Call to Arms 5.x, Talent Spec & Glyph Guide 5.x, Blog: Sacred Duty
-

theckhd - Moderator
- Posts: 7467
- Joined: Thu Jul 31, 2008 3:06 pm
- Location: Harrisburg, PA
Re: WoG heal modifier: Method to the madness?
theckhd wrote:I'd think a table or array would be less annoying. For example, make an 85-element array, store the base heal value for each level in that element of the array.
So for example, arrayName(85) would return the 85th element, which is the base heal value for level 85. arrayName(70) would similarly return the 70th element, which is the base heal value for level 70. And so on.
Gah, vectors changed in programming? I recall level[n] referring to position n+1.
- yappo
- Posts: 1107
- Joined: Wed Sep 17, 2008 4:15 pm
Re: WoG heal modifier: Method to the madness?
yappo wrote:Gah, vectors changed in programming? I recall level[n] referring to position n+1.
Depends on if the language likes to start at 0 or 1 for array numbering.
- gibborim
- Posts: 282
- Joined: Sun Nov 02, 2008 12:13 am
Re: WoG heal modifier: Method to the madness?
gibborim wrote:yappo wrote:Gah, vectors changed in programming? I recall level[n] referring to position n+1.
Depends on if the language likes to start at 0 or 1 for array numbering.
This tank greets antiquity
During the days we kind of didn't have much of an option.
- yappo
- Posts: 1107
- Joined: Wed Sep 17, 2008 4:15 pm
Re: WoG heal modifier: Method to the madness?
yappo wrote:Gah, vectors changed in programming? I recall level[n] referring to position n+1.
In C, declaring an array with size n starts at 0 and ends at n-1, which I believe is what you're referring to. For my purposes I just defined its size indirectly and used L-9 as the index.
Strange that in C an array is the first thing that would come to mind, but now that I'm wading through the uncharted waters of Lua the first thing that comes to mind is to write a series of conditional expressions.
-

Jeremoot - Posts: 434
- Joined: Tue Feb 08, 2011 5:36 pm
Re: WoG heal modifier: Method to the madness?
1-60, 60-70, 70-80, 80-85 probably all obey well defined formulas, with rounding error. Does wowhead get its numbers from tables in the game files?
Gladiator Psiven, 90 Tankadin
85 Dru, 85 Mage, 85 DK, 70 War, 70 Pal, 60 Priest, 60 Lock, 64 Rogue
Longtime addict of Space - Glory Through Conquest
85 Dru, 85 Mage, 85 DK, 70 War, 70 Pal, 60 Priest, 60 Lock, 64 Rogue
Longtime addict of Space - Glory Through Conquest
-

PsiVen - Moderator
- Posts: 4342
- Joined: Fri Jun 01, 2007 5:28 pm
- Location: On a Boat
Re: WoG heal modifier: Method to the madness?
Jeremoot wrote:yappo wrote:Gah, vectors changed in programming? I recall level[n] referring to position n+1.
In C, declaring an array with size n starts at 0 and ends at n-1, which I believe is what you're referring to. For my purposes I just defined its size indirectly and used L-9 as the index.
Strange that in C an array is the first thing that would come to mind, but now that I'm wading through the uncharted waters of Lua the first thing that comes to mind is to write a series of conditional expressions.
Haven't done Lua, but some C-based languages implemented complex conditions for switch case. If you're basically running with number of expac conditions, ie vanilla, TBC, WotLK and Cata, then an 85 position vector is a huge overkill. I guess you could just go with else if, even though a conditional (if supported) switch case followed by a break for each case ought to make it marginally faster. If Lua is compiled, however, then it won't matter at all. Should be implemented as a 85 condition long switch on integer case, due to exclusitivity, by the compilator.
Bah, ok, I'm rambling.
- yappo
- Posts: 1107
- Joined: Wed Sep 17, 2008 4:15 pm
Re: WoG heal modifier: Method to the madness?
yappo wrote:Haven't done Lua, but some C-based languages implemented complex conditions for switch case. If you're basically running with number of expac conditions, ie vanilla, TBC, WotLK and Cata, then an 85 position vector is a huge overkill. I guess you could just go with else if, even though a conditional (if supported) switch case followed by a break for each case ought to make it marginally faster. If Lua is compiled, however, then it won't matter at all. Should be implemented as a 85 condition long switch on integer case, due to exclusitivity, by the compilator.
Bah, ok, I'm rambling.
Lua doesn't actually have a "switch" statement.
PsiVen wrote:1-60, 60-70, 70-80, 80-85 probably all obey well defined formulas, with rounding error. Does wowhead get its numbers from tables in the game files?
I believe so, but I wouldn't know where to look, or if it's obfuscated.
-

Jeremoot - Posts: 434
- Joined: Tue Feb 08, 2011 5:36 pm
Re: WoG heal modifier: Method to the madness?
gibborim wrote:yappo wrote:Gah, vectors changed in programming? I recall level[n] referring to position n+1.
Depends on if the language likes to start at 0 or 1 for array numbering.
What he said. MATLAB starts at 1, and that's the language I tend to think in since I use it more frequently. In any event, the indexing issues wasn't the main point.
Jeremoot wrote:PsiVen wrote:1-60, 60-70, 70-80, 80-85 probably all obey well defined formulas, with rounding error. Does wowhead get its numbers from tables in the game files?
I believe so, but I wouldn't know where to look, or if it's obfuscated.
More to the point, it's probably more of a hassle to come up with the formulas than to hardcode an array. Unless someone else has worked the formula out and posted it somewhere, you'll have to manually collect all of those coefficients and then attempt to fit each section. If you're going to manually collect the coefficients anyway, you may as well just put them in an array immediately and reference them that way.
Coding the piecewise formula only saves you memory (instead of 85 integers, you can probably represent the piecewise with 10-15 values or less). But it'll cost you computation time in calculating the value whenever you want it, too. If the size of the array were much bigger, or you had to do this for a few thousand abilities, then the memory savings might be important. But one 85-element integer array takes a pitiful amount of memory, so it's probably the better choice based on performance.
"Theck, Bringer of Numbers and Pounding Headaches," courtesy of Grehn|Skipjack.
MATLAB 5.x, Call to Arms 5.x, Talent Spec & Glyph Guide 5.x, Blog: Sacred Duty
MATLAB 5.x, Call to Arms 5.x, Talent Spec & Glyph Guide 5.x, Blog: Sacred Duty
-

theckhd - Moderator
- Posts: 7467
- Joined: Thu Jul 31, 2008 3:06 pm
- Location: Harrisburg, PA
Re: WoG heal modifier: Method to the madness?
As well as greater performance, it's also "cleaner" code. That's why I made the thread, in hopes that somebody had worked out the formula.
To save trouble for anybody else, this is the resulting array:
base[0] is level 9, whereas base[76] is level 85. The resulting function is:
I left AP as a function parameter, so I could compare the gains from strength / AP.
EDIT: Updated for vengeance correction / 200% crit modifier change.
To save trouble for anybody else, this is the resulting array:
- Code: Select all
local base =
{
345,354,363,367.5,372,390,408,420,438,
451.5,469.5,483,499.5,517.5,531,544.5,562.5,574.5,588,
601.5,610.5,624,646.5,667.5,690,712.5,735,756,778.5,796.5,
819,840,867,894,919.5,951,978,1008,1035,1062,1092,1119,1149,
1176,1203,1233,1260,1287,1312.5,2683.5,2997,3049.5,3244.5,
3442.5,3651,3867,4089,4323,4561.5,4809,5065.5,5325,5599.5,5878.5,6169.5,
6465,6775.5,7093.57416,7752,8097,8449.5,8560.5,8676,8785.5,8896.5,9010.5
};
base[0] is level 9, whereas base[76] is level 85. The resulting function is:
- Code: Select all
function W39_HPS(AP)
local L = UnitLevel("player");
if L < 9 then
return 0;
end
local base =
{
345,354,363,367.5,372,390,408,420,438,
451.5,469.5,483,499.5,517.5,531,544.5,562.5,574.5,588,
601.5,610.5,624,646.5,667.5,690,712.5,735,756,778.5,796.5,
819,840,867,894,919.5,951,978,1008,1035,1062,1092,1119,1149,
1176,1203,1233,1260,1287,1312.5,2683.5,2997,3049.5,3244.5,
3442.5,3651,3867,4089,4323,4561.5,4809,5065.5,5325,5599.5,5878.5,6169.5,
6465,6775.5,7093.57416,7752,8097,8449.5,8560.5,8676,8785.5,8896.5,9010.5
};
local m = (0.594 * AP);
if L >= 10 then -- Vengeance
-- Base health is level / race dependant, this value is stolen from matlabadin.
local basehealth = 43285;
m = m + 0.0594 * (MODEL_STAM + (0.1 * basehealth));
end
m = base[L-9] + (m *((RAID_10AP == true) and 1.1 or 1));
return
(
(
1 +
(TalentRank(2,16)*0.05) + -- Guarded by the Light
(TalentRank(2,1)*0.02) + -- Divinity
(HasGlyph(54936)*0.1) -- Glyph of Word of Glory
)
*
(
1 +
(
(TalentRank(3,5)*0.05) + -- Rule of Law
(
(
RAID_5CRIT == true and
HasBuff(17007)==0 and
HasBuff(90309)==0 and
HasBuff(24604)==0 and
HasBuff(51701)==0 and
HasBuff(51470)==0 and
HasBuff(29801)==0
) and 0.05 or 0 -- 5% Crit raid buff
) +
(GetSpellCritChance(2)/100)
)
)
*
(m / 20) -- WoG is now on a 20 second CD.
);
end
I left AP as a function parameter, so I could compare the gains from strength / AP.
EDIT: Updated for vengeance correction / 200% crit modifier change.
Last edited by Jeremoot on Tue Jul 26, 2011 10:37 pm, edited 2 times in total.
-

Jeremoot - Posts: 434
- Joined: Tue Feb 08, 2011 5:36 pm
14 posts
• Page 1 of 1
Return to Advanced Theorycraft and Calculations
Who is online
Users browsing this forum: No registered users and 1 guest