View Full Version : Skill level -> Damage formulae
silospen
25-04-2007, 10:57
Hey guys,
I've been looking for some formulae that link skill levels to damage/defense/whatever the skill does. I was wondering if any of you guys had any lying around or knew that you could extract them from the code. I guess it's not just a case of MPQ extraction to get them out of the game, but I don't know.
I can approximate the formula's with polynomials (For example, FOH damage would work out as something like:
0.9638 *(foh,^2)+ (6.9412*foh)+ 197.3158
Where FOH is the skill level. It's reasonably accurate, but of course, I would like the exact version that is in the game. Some are easy enough as they are linear, but others are not.
Any clues?
Cheers.
krischan
25-04-2007, 11:41
You can have a look at the java scripts of a web page with a skill calculators (e.g. this one (http://diablo2.ingame.de/spiel/skills/calc/)) :wink3:
silospen
25-04-2007, 12:11
You can have a look at the java scripts of a web page with a skill calculators (e.g. this one (http://diablo2.ingame.de/spiel/skills/calc/)) :wink3:
Unfortunately, that calculator uses PHP to calculate the skill damage, which means that the actual formulae are not accessible unless you have the PHP source.
I don't think you're going to find it as easy as making each skill damage calc into a single equation. The skill sites out there would most likely handle it in stages.
For FoH for example (the lightning component), it's calculated by the following (shorted down for simplicity sake):
MinBase = 150
MaxBase = 200
EBonus1 = 15 (the bonus to both min and max from lvl 1 to 8)
EBonus2 = 30 (the bonus to both min and max from lvl 8 to 16)
EBonus3 = 45 (the bonus to both min and max from lvl 16 to 22)
EBonus4 = 55 (the bonus to both min and max from lvl 22 to lvl 28)
EBonus5 = 65 (the bonus to both min and max from lvl 28 onwards)
Some examples:
A level 1 FoH would have 150-200 lightning damage.
A level 2 FoH would have 165-215 lightning damage. (EBonus is 15)
A level 7 FoH would have 240-290 lightning damage.
A level 8 FoH would have 255-305 lightning damage.
A level 9 FoH would have 285-335 lightning damage. (now EBonus is 30)
A level 15 FoH would have 465-515 lightning damage.
A level 16 FoH would have 495-545 lightning damage.
A level 17 FoH would have 540-590 lightning damage. (now EBonus is 45)
A level 21 FoH would have 720-770 lightning damage.
A level 22 FoH would have 765-815 lightning damage.
A level 23 FoH would have 820-870 lightning damage. (now EBonus 55)
A level 27 FoH would have 1040-1090 lightning damage.
A level 28 FoH would have 1095-1145 lightning damage.
A level 29 FoH would have 1160-1210 lightning damage. (now EBonus is 65)
From this point onwards, the EBonus would always be 65.
If you want to try and put that into a single equation, then go for it, but these things are probably best done in multiple steps.
silospen
26-04-2007, 10:42
You can derive a reasonably accurate one with just the data there, with a little bit of calculation and consideration it shouldn't be too hard to work out, assuming you have the training data.
If you're interested, (0.9645*FOH^2)+(6.9483*FOH)+197.2252, where FOH is the skill level.
You can derive a reasonably accurate one with just the data there, with a little bit of calculation and consideration it shouldn't be too hard to work out, assuming you have the training data.
If you're interested, (0.9645*FOH^2)+(6.9483*FOH)+197.2252, where FOH is the skill level.
*emphasis added by me
I'm not quite sure I follow. That equation doesn't result in the correct damage (either min or max). I mean, the bolded part alone would result in an output of more than 200 (197+6 = 203, which isn't factoring in the other aspects of the equation), which is greater than even a level 1 max:
Skill level 1
(0.9645*1^2)+(6.9483*1)+197.2252
(0.93026025)+(6.9483)+197.2252
205.10376025 (the max lightning damage of FoH at level 1 should be 200)
Skill level 2
(0.9645*2^2)+(6.9483*2)+197.2252
(3.858)+(13.8966)+197.2252
214.9798 (the max lightning damage for FoH at level 2 should be 215, though this is close)
Skill level 3
(0.9645*3^2)+(6.9483*3)+197.2252
(8.6805)+(20.8449)+197.2252
226.7506 (the max lightning damage for FoH at level 3 should be 230)
Skill level 15
(0.9645*15^2)+(6.9483*15)+197.2252
(217.0125)+(104.2245)+197.2252
518.4622 (the max lightning damage for FoH at level 15 should be 515)
Skill Level 40
(0.9645*40^2)+(6.9483*40)+197.2252
(1543.2)+(277.932)+197.2252
2018.3572 (The max lighthing damage for FoH at level 40 should be 1925, 93 less than the output)
Skill Level 50
(0.9645*50^2)+(6.9483*50)+197.2252
(2411.25)+(347.415)+197.2252
2955.8902 (The max lightning damage for FoH at level 50 should be 2575, 380 less than the output)
I know that at lower levels it's only a little off, but as you can see, the higher up the skill levels, the more of a difference.
Edit: I know you said "reasonably accurate" but for it to be that, it would need to also take into account higher levels. Also, if you're going to use the equation for skill damage calculations, you'll want it to be pretty spot on, especially once you start factoring in synergies.
silospen
27-04-2007, 14:30
I know that at lower levels it's only a little off, but as you can see, the higher up the skill levels, the more of a difference.
Edit: I know you said "reasonably accurate" but for it to be that, it would need to also take into account higher levels. Also, if you're going to use the equation for skill damage calculations, you'll want it to be pretty spot on, especially once you start factoring in synergies.
Of course, that's because I had a lot of training data (1 - 20) for the lower skill levels and not so much for the higher, I just threw in the two or three you put down. Like I said, with more training data it could be a lot more accurate.
If you're trying to mathematically/computationally build characters (which is what i'm trying to do), you're looking at one hell of a lot of permutations and it would be an awful lot simpler if I can derive a reasonably accurate formula.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.