HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Xperience question

01-02-2004, 09:34 PM#1
Milkman
How can you determine how much exp you get from a unit? I cant find a field in the editor that does this. I also wonder how you would set the Hero - XP gained in the Gameplay constants for good results, i mean it takes a lot of time to test it out since there are quite a lot of fields to be filled in.

I hope there is a way or I'll have to do it by triggers and that wont be nice =)

Thankful for any answers - The MilkmaN
01-02-2004, 11:17 PM#2
Daleth
I believe the "bounty" fields determine the unit's exp worth.
01-03-2004, 12:48 AM#3
linkmaster23
its thier point worth. Tahts what it is. I set it to 60000 once it was fun...*walks away*
01-03-2004, 09:38 AM#4
Krakou
Quote:
Originally posted by Brett Wood

Description for the Hero XP Gained gameplay constants:
Table - Table of values representing experience gained for each unit level of the killed unit, (Hero for killing other heroes, Normal for killing normal units and creeps.)
For getting values which are not in the table: (only the exp value for level 1 units is defined by default)
Experience for killing a unit = Constant Factor + (Level Factor * (Level of the Unit)) + (Previous Value Factor * (Exp. for killing a unit one level less than this one))
or simply:
f(x) = C + L*<unit level> + P*f(x-1), where x is the level of the unit being killed.
01-03-2004, 09:41 AM#5
HeyPetray
Ok, so lets say a Gnoll Level 1 is worth 20 and Your hero is level 1. Can you put that in the equation as an example? emote_confused
01-03-2004, 10:12 AM#6
Krakou
Quote:
Originally posted by Brett Wood

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

and so on.

And that's all there is to it.