LargestRoad Wrote:Just take the partial derivative with respect to whichever variable you want of the damage range formula: c*(4*STR+DEX)*weapon attack/100 = max damage range
Actually, the OP needs to take the partial derivative with respect to weapon attack and divide it by the partial derivative with respect to STR to get his desired ratio.
I did this some time back on Asiasoft forums... I'll put it in the spoiler here. It's kinda long(winded).
Spoiler
I did this a long time ago. I was even about to use Lagrangian on this when I realised that it's such a simple linear relationship that I don't even need to bother about this.
I'll see if I can find the post or not.
Ok found it.
Quote:Magic Damage = MA*(4*INT + LUK)/100
Let's take my old ArchMage to compare. I'll hypothetically remove his Maple Earrings for now.
INT: 647
LUK: 132
MA: 241
An increase in 5 MA gives me 5/241 = 2.075% damage increase.
If I increase my INT by 14, then
56/(647*4 + 132) = 2.059% damage increase.
Which means, yes, scroll those Elemental Piercing earrings!
By the way, always compare % changes.
Actually I was thinking of trying to model the damage formula using PDE and Lagrangian multipliers to solve... but halfway I realised that it's kind of heavy machinery... you don't need to use a sledgehammer to kill an ant when you can just squish it.
Now for the proper math. I just came back from math exam, and am feeling pissed.
D = A(4I + L) where weapon multiplier = 1 and A is MA/100
dD = (4I+L)dA + 4AdI + AdL
or since we prefer to keep L as a constant,
dD|L = (4I + L)dA + 4AdI
Then from here you can throw in whatever you want, noting that dA must be expressed as the ratio of the potential gain to the current amount. Now if you look closely, if you assume L to be negligible e.g. pure INT guys... then it follows that if dA = dI, then you obviously need the same fractional change! i.e.:
delD/delA |I,L = 4I + L, and
delD/delI |A,L = 4A
and therefore,
delI/delA |L = (4I + L) / 4A
which approximates I/A.
The above result can also be easily obtained by noting that:
dD = (4I+L)dA + 4AdI [keeping L constant]
is an exact differential, which implies that
del(4I+L)/delI |A = del(4A)/delA |L
=> 4 = 4
i.e. their fractional rates of change are equal. The above result is obtained because we have defined the relationship between I and A (and L) by the Legendre transformation
D = A(4I + L)
which basically is the original equation!
So to cut the long story short, every MA is worth totalINT/totalMA amount of INT. E.g. I have 800INT and 125MA, so every MA is equivalent to 800/125 = 6.4INT.
The effect of potential EQ does not change the outcome because %INT, %ATT and %DMG all equally affect the equation ASSUMING you're just adding MA or INT. If you're deciding between a %INT and a %MA eq, then it depends on what you are currently wearing because +% equipment adds additively, i.e.
(1+%D)D = (1+%A)A[4(1+%I)I + (1+%L)L]
So if you already have MW or some %INT eq and you are considering between a %INT or a %MA eq, then %MA will be better. If you don't have anything of those and are buying them new, then for the same %, they make no difference.
It doesn't take anymore complicated math to show why stacking %INT is not as good as distributing %MA and %INT. Let's try this: if you could add .1 to %A or %I and you have a current %I only of .15, then which would be larger?
If I add .1 to the already existing .15 from MW, then
D'/D = A[4(1+.15+.1)I] / A[4(1+1.15)I] = 1.25/1.15
Whereas if I add .1 to MA, then
D''/D = (1+.1)A[4(1+.15)I] / A[4(1+1.15)I] = 1.1
And if you punch your calculator, 1.25/1.15 = 1.087 < 1.1
This will ALWAYS be true because (1+%I) and (1+%A) are all greater than 1, and if you didn't know, squares have a larger area per unit surface area than rectangles. Don't believe? Try differentiating it yourself. The perimeter is how much % you can give, and the area is the amount of damage you can deal. Same goes for %D.
CONCLUSION: Each MA is worth TotalINT/TotalMA amount of INT, and this effect is independent of %potentialgear for the case of direct addition of INT and/or MA.
AND: Spread out your %MA, %INT and %DMG. Currently not sure if %stat adds directly to %INT or is a secondary external multiplier.
2147483647 Wrote:Actually, the OP needs to take the partial derivative with respect to weapon attack and divide it by the partial derivative with respect to STR to get his desired ratio.
range = c / 100 * (4*floor[str*(1+%str)] + floor[dex*(1+%dex)]) * floor[w.atk*(1+%w.atk)]
If you assume the various variables are continuous, and remove the floors, it takes care of most of the problem, and you end up with a similar result. But of course it won't be perfectly accurate cause MS doesn't have continuous damage ranges.
2011-06-30, 07:17 PM (This post was last modified: 2011-07-01, 01:52 AM by 2147483647.)
That's the same damage formula with potential bonuses. Since potential bonuses are already floored when you view them in your stat window, it's pointless to build a formula to account for them, since you can just floor everything externally before inserting them into the following formula:
(4*STR+DEX)/(4*WAtk)
It's also impossible to account for flooring, since continuity is a requirement for derivation. Flooring stats externally is actually advantageous when programming, because then you can use those stats for other formulae as well.
I don't really see the need for a precise calculator to be built. If someone is considering a piece of equipment, all he has to do is calculate stats before and after, floor it externally, and then insert it into the formula to find the ratio.
If someone is wondering about "which equipment will give me more damage", the answer is: if (4*STR+DEX) < (4*WAtk), then STR gives more damage, and in any other case, WAtk gives more damage. By how much? Plug it into the very simple equation and find out. Anyone who's passed 8th grade should be able to do this.
Hadriel, the reason your math isn't holding up is that you're using total differentials and abusing the definition of a differential. The following is your work, but I cleaned up some of the symbols:
You then suggested taking the ratios of the two terms to yield:
4/100*MA*Δ(INT)
1/100*(4INT+LUK)*Δ(MA)
4*MA*Δ(INT)
(4INT+LUK)*Δ(MA)
The problem here is that because Δ(INT) and Δ(MA) are differentials, they are supposed to cancel out when you take the limit as Δ(INT) and Δ(MA) both approach 0. This results in the reciprocal of the formula found just by taking individual partial derivatives and dividing them.
Also, LUK isn't negligible. Say that someone (who is ridiculously overpowered) has 2000 INT but only 100 LUK. The ratio of INT to LUK is about 20:1, which is far from "negligible". In fact, it accounts for more than 1% of the total damage, even if you multiply it by 4 (the natural multiplier in the equation).
I'm not sure why you use the Legendre transformation here, but as you probably already know, the Legendre transform is useless when all the variables are known to exact certainty. That's why your transform didn't reveal anything new.
octopusprime Wrote:Facepalm, your ratios were backwards.
whan are you going to have more w.attk than main stat anyways, except below level 50, where it doesn't even matter? i wasn't aware that how you placed the numbers was important.
ShinkuDragon Wrote:whan are you going to have more w.attk than main stat anyways, except below level 50, where it doesn't even matter? i wasn't aware that how you placed the numbers was important.
the way you relate the terms and then relay the ratio proximal to your relation is. I was making a joke at any rate.
ShinkuDragon Wrote:whan are you going to have more w.attk than main stat anyways, except below level 50, where it doesn't even matter? i wasn't aware that how you placed the numbers was important.
i always read them as X to Y ratio. also, it's not like i'm dividing, if i said something like 1000/200, then yes, math would be necesary, but if i say 1/5, each 1 equals 5, and the 0.2 you get from making the operation has no relevance, unless you want to know how much w.attk your 1 point of str is ~_~
2147483647 Wrote:That's the same damage formula with potential bonuses. Since potential bonuses are already floored when you view them in your stat window, it's pointless to build a formula to account for them, since you can just floor everything externally before inserting them into the following formula:
(4*STR+DEX)/(4*WAtk)
There are two distinct ways to raise str/w.atk though: Add directly to them (+str, +w.atk) or add percent to them (+%str, +%w.atk).
If you have 3300 total str (due to ~154% gear) and you add +1 str on your gear, the total becomes 3303, maybe even 3305 if it tips MW's percentage gain. So if you're looking for a functional definition of a "str to atk ratio" that compares bonuses to the two stats, rather than something fairly pointless (what is str/atk? Why does that number ever matter?) you should include the breakdown between the two ways you gain stats.
DM = Damage Multiplier of weapon
PS = Primary stat of the class that uses the weapon
SS = Secondary stat of the class that uses the weapon
Note: The Primary Stat is the stat that yields more damage (STR for Warriors), while the Secondary Stat is the one that yields less and is usually required to wear equipment (DEX for Warriors).
Derivation
Since all the Max Damage formulae follow the exact same format of DM*(4 * PS + SS) * (Attack / 100),
2147483647 Wrote:Actually, the OP needs to take the partial derivative with respect to weapon attack and divide it by the partial derivative with respect to STR to get his desired ratio.
Oh man, by the time I just found out how to get no. of primary stats per WA, I just got ninja-ed by that.
But anyway, I'll just show again how I solved that using easy yet very different approach.
My idea is that...
Max damage when PS + n = Max damage when WA + 1
where n = no. of primary stat increased (Assume that there's no change in WA and SS)
M - Multiplier
PS - Current primary stats
SS - Current secondary stats
WA - Current weapon attack