Calculating HP from Vit @ lvl80 / downleveled
Based on the wiki http://wiki.guildwars2.com/wiki/Health
The health is increased in tiers. You’d have to formulate based on those tiers.
var L = level;
var V = Vitality;
health = L* 28;
if( L > 19) { health += (L-19) * 42; }
if( L > 39) { health += (L-39) * 70; }
if( L > 59) { health += (L-59) * 70; }
if( L > 79) { health += 70; }
health += V * 10;
This above formula would be for high health (warrior, necro)
——————————-
health = L* 18;
if( L > 19) { health += (L-19) * 27; }
if( L > 39) { health += (L-39) * 45; }
if( L > 59) { health += (L-59) * 45; }
if( L > 79) { health += 45; }
health += V * 10;
This is for medium hit point (Engi, ranger, mesmer)
—————————————————————
health = L* 5;
if( L > 19) { health += (L-19) * 7.5; }
if( L > 39) { health += (L-39) * 12.5; }
if( L > 59) { health += (L-59) * 12.5; }
if( L > 79) { health += 12.5; }
health += V * 10;
And this is for lower hit point professions (Thief, ele, guard)
(edited by DigitalKirin.9714)
Codes I use in gw2dungeons.net: http://pastebin.com/PpfGTjzB
Health = base health (profession) + vitality health (vitality).
Base health can be calculated by using the formula Kirin gave above (just check numbers from wiki as he copypasted bit too much).
Stat scaling is based on base stats. You can check wiki how many base stats you get each level. Then calculate base stats for wanted level (for example level 30 has 206 base stats) and divide by base stats at your level (level 80 has 916 base stats). For example 1000 vitality would be 1000 * 206 / 916 = 225 vitality at level 30.
To get health from vitality just multiply it by 10. For example 225 vitality gives 2250 health.
(edited by Wethospu.6437)
Perfect, after a bit of coding here’s the result:
- http://i.imgur.com/cDgqyHW.png (top left)
Shows allies around you (<6,800 radius open world, and unlimited for party members) and their Vitality deviation from base. Good way to guess people’s traits (a lvl 80 ele with 200 vit deviation most likely implies he traited 20pts in water), and their gear (36vit most likely means a cheap backpiece), and obviously easily spot fellow pvt’ers
Now, at lvl 80 traiting 200pts results in +200 vitality. When downscaled that is not the case anymore. Looks like that’s the next thing to figure out so I can add a +traitPoints deviation from base. Doesn’t look like I’ll be sleeping tonight XD
(edited by frifox.5283)
Can you elaborate more? Stats scale same regardless of source so I don’t see what’s the issue.
- At lvl 80, +100 vit = 10 points in vit line.
- At lvl 65, +48 vit = 10 points in vit line.
Of course I know this because I looked at my hero panel, but what if I don’t know how many traits player has spent. For example,
- At lvl 65, +230 vit over base = how points in vit line?
Obviously, both lvl and vit-over-base will be variables.
You seem to have messed up something.
With level 80 character I reseted my traits, went to lvl 66 area and put 100 trait points. I got 73 stat points which is exactly same as ratio between lvl 66 and lvl 80 base stat points.
Then I took my lvl 67 character, reseted his traits and put 100 trait points. I stayed at city so he didn’t get downscaled and he got exactly 100 points.
To calculate stats from traits correctly you need both original level and downscaled level.
Level: ratio basestats debuginfo
1: 0.026200873362445413 24 statcalculator.js:58
2: 0.03056768558951965 28 statcalculator.js:58
3: 0.034934497816593885 32 statcalculator.js:58
4: 0.039301310043668124 36 statcalculator.js:58
5: 0.043668122270742356 40 statcalculator.js:58
6: 0.048034934497816595 44 statcalculator.js:58
7: 0.05240174672489083 48 statcalculator.js:58
8: 0.056768558951965066 52 statcalculator.js:58
9: 0.0611353711790393 56 statcalculator.js:58
10: 0.06768558951965066 62 statcalculator.js:58
11: 0.07423580786026202 68 statcalculator.js:58
12: 0.08078602620087336 74 statcalculator.js:58
13: 0.08733624454148471 80 statcalculator.js:58
14: 0.09388646288209607 86 statcalculator.js:58
15: 0.10043668122270742 92 statcalculator.js:58
16: 0.10698689956331878 98 statcalculator.js:58
17: 0.11353711790393013 104 statcalculator.js:58
18: 0.12008733624454149 110 statcalculator.js:58
19: 0.12663755458515283 116 statcalculator.js:58
20: 0.13537117903930132 124 statcalculator.js:58
21: 0.14410480349344978 132 statcalculator.js:58
22: 0.15283842794759825 140 statcalculator.js:58
23: 0.1615720524017467 148 statcalculator.js:58
24: 0.1703056768558952 156 statcalculator.js:58
25: 0.17903930131004367 164 statcalculator.js:58
26: 0.18777292576419213 172 statcalculator.js:58
27: 0.1965065502183406 180 statcalculator.js:58
28: 0.2052401746724891 188 statcalculator.js:58
29: 0.21397379912663755 196 statcalculator.js:58
30: 0.22489082969432314 206 statcalculator.js:58
31: 0.23580786026200873 216 statcalculator.js:58
32: 0.24672489082969432 226 statcalculator.js:58
33: 0.2576419213973799 236 statcalculator.js:58
34: 0.2685589519650655 246 statcalculator.js:58
35: 0.2794759825327511 256 statcalculator.js:58
36: 0.2903930131004367 266 statcalculator.js:58
37: 0.30131004366812225 276 statcalculator.js:58
38: 0.31222707423580787 286 statcalculator.js:58
39: 0.3231441048034934 296 statcalculator.js:58
40: 0.33624454148471616 308 statcalculator.js:58
41: 0.34934497816593885 320 statcalculator.js:58
42: 0.3624454148471616 332 statcalculator.js:58
43: 0.37554585152838427 344 statcalculator.js:58
44: 0.388646288209607 356 statcalculator.js:58
45: 0.4017467248908297 368 statcalculator.js:58
46: 0.4148471615720524 380 statcalculator.js:58
47: 0.4279475982532751 392 statcalculator.js:58
48: 0.4410480349344978 404 statcalculator.js:58
49: 0.45414847161572053 416 statcalculator.js:58
50: 0.46943231441048033 430 statcalculator.js:58
51: 0.4847161572052402 444 statcalculator.js:58
52: 0.5 458 statcalculator.js:58
53: 0.5152838427947598 472 statcalculator.js:58
54: 0.5305676855895196 486 statcalculator.js:58
55: 0.5458515283842795 500 statcalculator.js:58
56: 0.5611353711790393 514 statcalculator.js:58
57: 0.5764192139737991 528 statcalculator.js:58
58: 0.5917030567685589 542 statcalculator.js:58
59: 0.6069868995633187 556 statcalculator.js:58
60: 0.6244541484716157 572 statcalculator.js:58
61: 0.6419213973799127 588 statcalculator.js:58
62: 0.6593886462882096 604 statcalculator.js:58
63: 0.6768558951965066 620 statcalculator.js:58
64: 0.6943231441048034 636 statcalculator.js:58
65: 0.7117903930131004 652 statcalculator.js:58
66: 0.7292576419213974 668 statcalculator.js:58
67: 0.7467248908296943 684 statcalculator.js:58
68: 0.7641921397379913 700 statcalculator.js:58
69: 0.7816593886462883 716 statcalculator.js:58
70: 0.8013100436681223 734 statcalculator.js:58
71: 0.8209606986899564 752 statcalculator.js:58
72: 0.8406113537117904 770 statcalculator.js:58
73: 0.8602620087336245 788 statcalculator.js:58
74: 0.8799126637554585 806 statcalculator.js:58
75: 0.8995633187772926 824 statcalculator.js:58
76: 0.9192139737991266 842 statcalculator.js:58
77: 0.9388646288209607 860 statcalculator.js:58
78: 0.9585152838427947 878 statcalculator.js:58
79: 0.9781659388646288 896 statcalculator.js:58
80: 1 916
(edited by Wethospu.6437)
I found the culprit – I was playing with traits using a lvl 69 alt. Using a proper lvl 80 char everything calculated as expected.