HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Difficulties figuring out hero exp table

05-15-2006, 10:26 PM#1
FyreDaug
I want to set up my hero table to be something like this

level 1, 100exp
level 2, 250exp
level 3, 550exp
level 4, 1150exp

etc.

Also, is there a way to change how much exp is given by units? Is it controlled by what level they are? If so, how much does each level give out?

EDIT: And just for reference, say level 1 gives 50 exp, but theres 2 heroes there, do each get 25exp assuming they are within range? And im looking in gameplay constants obviously.
05-15-2006, 11:52 PM#2
st33m
Taken from http://www.wc3campaigns.net/showthre...403#post796403

Quote:
-----aiursrage

The overall purpose of these four fields is to define a value of experience
for every possible level. The "Table" field does this by simply specifying
exactly that, an experience value for each level.

For example:
Hero XP Gained - Hero, Table = 100,120,160,220,300
which means that a hero will receive 100 XP for killing a level 1 hero, 120
XP for killing a level 2 hero, and so forth.
Now then, explicitly setting a value for every single hero level can be
tedious and wasteful if you have a lot of hero levels (say, 500). So, the
three formula fields are used to calculate all values beyond those in the
existing table field.
This formula computes the experience value "f(x)", for level "x", based on
the level and previous experience value, as well as a constant:

f(x) = C + L*x + P*f(x-1)

where

C = Constant Factor field
L = Level Factor field
P = Previous Value field

Continuing our example using the Hero XP Gained - Hero fields (C = 100, L = 0,
P = 1), the experience gained from killing a level 6 hero would be:
100 + 0*6 + 1*300 = 400
Note that the 300 is the experience for level 5, which comes from the table.
For level 7, we get:
100 + 0*7 + 1*400 = 500
and so on. This particular equation is quite simple, it just adds 100 more for
every level.
Now we can look at the Hero XP Gained - Normal fields, where

Table = 25 (only one entry!)
C = 5
L = 5
P = 1

and compute

f(1) = 25 (from table)
f(2) = 5 + 5*2 + 1*25 = 40
f(3) = 5 + 5*3 + 1*40 = 60
f(4) = 5 + 5*4 + 1*60 = 85
f(5) = 5 + 5*5 + 1*85 = 115
05-16-2006, 06:12 PM#3
FyreDaug
Thanks man, +rep