Creature Handler Archive

Thread: Pet damage formula

Dodece
Tue May 17, 2005 6:57 pm
#1

Bump this is a must read thread for all.
Joker9125
Sat May 28, 2005 9:33 am
#2

/bump



http://forums.station.sony.com/swg/board/message?board.id=creature_handler&message.id=218063">Clicky To My Sticky

"If nothing else, I've got time to explore some of the other games my friends are playing. It could easily be argued that the NGE is the best thing ever to happen to guild wars" - Me

Velitham MCH
Chessack
Sat May 28, 2005 10:35 am
#3

I'm not sure why you saw no relationship between %max-min and level... perhaps because you plotted them in reverse? Here, LEVEL would be the independent variable - it determines all everything. Since %max-min would depend on level, it is the dependent variable. Level should be on the X-axis (horizontal) and %max-min should be on he Y-axis (vertical). When you do this, you can get a nearly perfect straight line.

As with defense, I put this information into MatLab:


>> [LEVEL, DAM, MAX, MIN, TOHIT, PCT]

ans =

20.0000 176.0000 250.0000 50.0000 67.0000 0.6300
48.0000 254.0000 330.0000 70.0000 104.0000 0.7077
50.0000 272.0000 350.0000 80.0000 107.0000 0.7111
50.0000 265.0000 340.0000 80.0000 107.0000 0.7115
55.0000 285.0000 350.0000 80.0000 131.0000 0.7593
56.0000 296.0000 360.0000 90.0000 133.0000 0.7630
62.0000 313.0000 370.0000 90.0000 151.0000 0.7964
65.0000 326.0000 380.0000 90.0000 157.0000 0.8138



Now, if you plot level against PCT, you get a nearly straight line. However a matlab regression of PCT = LEVEL * B gave a "B" that was not acceptable, so I tried as before a polynomial fit, but those didn't work too well either. However, some other things did work. For instance, doing a polynomial fit of DAMAGE to LEVEL, we get:


>> P = polyfit(LEVEL, DAM, 1)

P =

3.3236 104.7014




In a polynomial fit, the first term is the coefficient and the second term is the "intercept" so in other words:

PREDICTED DAMAGE = LEVEL * 3.3 + 104.7

If we apply this formula, we get the following data:


>> PREDICT_DAM = LEVEL * P(1) + P(2)

PREDICT_DAM =

171.1737
264.2351
270.8823
270.8823
287.5004
290.8240
310.7657
320.7366

>> [LEVEL, DAM, PREDICT_DAM]

ans =

20.0000 176.0000 171.1737
48.0000 254.0000 264.2351
50.0000 272.0000 270.8823
50.0000 265.0000 270.8823
55.0000 285.0000 287.5004
56.0000 296.0000 290.8240
62.0000 313.0000 310.7657
65.0000 326.0000 320.7366



Here, LEVEL is the left column, DAMAGE you measured in battle is the middle, and the PREDICTED damage (from the polynomial equation) is on the right. Notice how extremely close the polynomial fit has gotten us to the actual damage. Clearly, the damage done is about 3.3 * level + 104, as the equation predicts.

I also was able to do a nice polynomial fit for minimum and maximum damage:


>> Q = polyfit(LEVEL, MIN, 1)

Q =

0.9458 30.7484

>> PREDICT_MIN = LEVEL * Q(1) + Q(2)

PREDICT_MIN =

49.6653
76.1489
78.0406
78.0406
82.7698
83.7157
89.3907
92.2283

>> [LEVEL, MIN, PREDICT_MIN]

ans =

20.0000 50.0000 49.6653
48.0000 70.0000 76.1489
50.0000 80.0000 78.0406
50.0000 80.0000 78.0406
55.0000 80.0000 82.7698
56.0000 90.0000 83.7157
62.0000 90.0000 89.3907
65.0000 90.0000 92.2283

>> R = polyfit(LEVEL, MAX, 1)

R =

2.8902 194.5731

>> PREDICT_MAX = LEVEL * R(1) + R(2)

PREDICT_MAX =

252.3768
333.3020
339.0824
339.0824
353.5333
356.4235
373.7646
382.4351

>> [LEVEL, MAX, PREDICT_MAX]

ans =

20.0000 250.0000 252.3768
48.0000 330.0000 333.3020
50.0000 350.0000 339.0824
50.0000 340.0000 339.0824
55.0000 350.0000 353.5333
56.0000 360.0000 356.4235
62.0000 370.0000 373.7646
65.0000 380.0000 382.4351


These are clearly very close to the formulae actually used to compute the various values.

To sum up so far (rounding off):

ACTUAL DAMAGE (in combat) = (LEVEL * 3.3) + 105
MIN DAM (datapad) = (LEVEL * 0.95) + 31
MAX DAMAGE (datapad) = (LEVEL * 2.9) + 195

Of course the REAL question is, what the heck is the relationship between MIN, MAX, and ACTUAL damage? For this we have two variates (min and max) so we need to do a multivariate analysis. I did this in MatLab using standard least-squares multiple regression. To perform this operation you need to add a column of "ones" to stand in for the constant that will be computed:


>> DATA = [ones(8,1), MIN, MAX]

DATA =

1 50 250
1 70 330
1 80 350
1 80 340
1 80 350
1 90 360
1 90 370
1 90 380

% And now the least-squares regression:
>> COEFFS = DATA\DAM

COEFFS =

-87.7200
0.7785
0.8785



This means that by least-squares regression (roughly):

DAMAGE (done in combat) = (MIN * 0.78) + (MAX * 0.88) - 88 .

To test this we plug min and max into the equation and get PREDICTED_DAM again, this time, predicted from the multivariate regression:


>> PRED_DAM = COEFFS(1) + MIN * COEFFS(2) + MAX * COEFFS(3)

PRED_DAM =

170.8300
256.6800
282.0350
273.2500
282.0350
298.6050
307.3900
316.1750

>> [LEVEL, DAM, PRED_DAM]

ans =

20.0000 176.0000 170.8300
48.0000 254.0000 256.6800
50.0000 272.0000 282.0350
50.0000 265.0000 273.2500
55.0000 285.0000 282.0350
56.0000 296.0000 298.6050
62.0000 313.0000 307.3900
65.0000 326.0000 316.1750


I dunno... but that looks pretty stinkin' close to me.

So the upshot is, if you want to figure out damage from min-max, use the following equation:


DAMAGE (done in combat) = (MIN * 0.78) + (MAX * 0.88) - 88 .

C



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Dejah Thoris
Dancer, Musician, Image Designer
Kor Spera, Corellia, Naritus
Joker9125
Sat May 28, 2005 2:54 pm
#4

The above poster completely lost me. Which says something................


Anyway heres my contribution.


When I ran the origional posters % of min-max equation through my C++ compiler i noticed that for every 5 to hit you gain a 1% damage increase. IE a pet with a to hit of 5 and a min/max damage of 0-100 would do 51 damage or 51% of the min/max(A to hit of 0 means your pet does 50% of the min/max damage).


So next I tried to see what relation level had to this and I came up with a pretty hardfast rule. For every level your pet is above its target it gets a 3% boost which translates to a 15 to bonus (This bonus caps at a max of 250). So for every level your pet is above its targets level add 15 to its to hit value and you should get the right damage. I did notice three things however


1. Grouping with your pet applies this bonus as if your pets level is = to yours


2. It seems to be only a 2% bonus if your pet is fighting an elite creature/NPC (If your pet isnt an elite)


3.A pet with a max damage of 302 would only do 300 max and a pet with a max damage of 319 would only do 310 damage. So it seems that when doing this you have to change the last number of the damage to a 0.


Ok im bout to be late for work so can someone test this a bit more throughly.




http://forums.station.sony.com/swg/board/message?board.id=creature_handler&message.id=218063">Clicky To My Sticky

"If nothing else, I've got time to explore some of the other games my friends are playing. It could easily be argued that the NGE is the best thing ever to happen to guild wars" - Me

Velitham MCH
OfficerDibble
Sat May 28, 2005 6:21 pm
#5




Chessack wrote:
I'm not sure why you saw no relationship between %max-min and level...




There was no *direct* relationship between %max-min and level, though it was obvious level factored in somewhere. Racial variations between creatures would cause any analysis based on level to become only an approximation, whereas I was looking for an exact formula based on the stats in the datapad in order to try and make sense of these stats.






Chessack wrote:
Of course the REAL question is, what the heck is the relationship between MIN, MAX, and ACTUAL damage?




This was the point of the original post, the formula: Damage = (to hit/500)*(max-min) + (max+min)/2 , was more or less exact to within the 0 decimal places we see in game. Unfortunately this is no longer relevant after publish 17 which changed things quite significantly for pets. What this formula did *not* show was the relationship between level and the creatures stats as shown in the datapad, your polynomial fits show this quite nicely and they are still relevant after publish 17

PinaColada
Tue Jun 07, 2005 2:24 pm
#6


After reading this thread and trying to comprehend, I've decided that my math skills aren't up to par. So could someone explain how pet damage is calculated in layman's terms? (e.g. the damage formula was nice but then someone said that it's now obsolete?) My pets seem to never be hitting anywhere near where their max. In fact, they seemed to be hitting nearer their min. Also, how does the lvl of the mob factor into the damage?


Thanks in advance!

Thaumaturgist
Wed Jun 08, 2005 6:02 am
#7

Read this post. It has the new formulas. If you still have questions on them post again.

Post 17 Calculations



Thaumaturgsit - Sunrunner
Master spy and loving it!!
Guild - OPFOR

Page 1 of 1
Previous Next