HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Formula for exp

09-14-2008, 11:57 PM#1
botanic
quite frankely I cant remember how to do it basically i need the formula

200,500,900,1400

is how it increases per lvl

too bad im brain dead =/
09-15-2008, 08:01 PM#2
Anopob
Is this what you're looking for?

edited link
09-16-2008, 12:12 PM#3
botanic
no i had figured it out tho if anyone ever needs

Set TotalExpForNextLvl = (0.00 + ((((Power((Real(CurrentLVL)), 2.00)) x 0.50) + (1.50 x (Real(CurrentLVL)))) x 100.00))


.5x^2+(1.5x)100

actually wouldnt 50x^2 + 150x be better to use?
09-16-2008, 07:26 PM#4
PurplePoot
50n(n+3) is the simplest solution (It's faster, and of course yields the same answer).
09-17-2008, 12:39 AM#5
Ammorth
you need the exp for the previous level to get the next. The problem is the previous level must be the exact decimal but when you display, it should be R2I(value+0.5) to round it like the game does.
09-17-2008, 07:02 PM#6
botanic
ammorth what do you mean i just was using it as a real because then i would get the average exp of all heros on the map in relation to the exp to the average next lvl
09-17-2008, 07:28 PM#7
PurplePoot
Ammoroth, no you don't. See the post right above yours.
09-18-2008, 02:03 AM#8
Ammorth
look at http://www.wc3campaigns.net/showpost...1&postcount=16

and even http://www.wc3campaigns.net/showpost...1&postcount=13

The first one is an arithmetic method which, although in theory works, does not provide an acurate representation of the exp required (some stupid rounding errors). The second post is the better idea as it doesn't have a rounding problem and doesn't require any data from game constants.
09-19-2008, 02:25 AM#9
Strilanc
You can make a closed form formula [one that doesn't require computing all the previous levels to get the nth level] but it's not very pretty.

I get:
Code:
En =
    f^(n-g)*Eg
    + (gl + c) * (f^(n-g) - 1) / (f - 1)
    + (n - g) / (f - 1)
    + (f^(n-g) - 1) / (f - 1)^2

g = last level specified by table [usually 1]
Ei = total experience to reach level i
l = level factor
f = previous value factor
n = level

*Note: ironically won't work for f=1, you need to take the limit or derive a separate formula for that case. I'm also pretty sure there's errors in there, since I did it pretty quickly.
09-19-2008, 04:21 AM#10
botanic
uh guys problem solved without the extra 50 steps its just 50n(n+3)
09-19-2008, 04:53 AM#11
Strilanc
Quote:
Originally Posted by botanic
uh guys problem solved without the extra 50 steps its just 50n(n+3)

Not if you change level factors and things like that.
09-19-2008, 06:53 PM#12
botanic
if you come to chnage the level factor just take the level factor

ex .9*50n(n+3)