# Experience Gain

## Recommended Posts

Cygnus_X    359
I'm not quite sure if this belongs in the math forum.... the game programming forum... or here. I guess I'll find out if a moderator decides to move it. At any rate, I'm building a Mud in which a combat unit gains experience (via combat) in proportion to 3 different factors. They are 1) the units wisdom, 2) number of attack turns the player uses, 3) the relative rank/expereince of the army you're attacking. I'm having trouble with the last one, but let me give some background info first. Wisdom is a trainable aspect of all combat units. It does not assist the unit in battle (as all the other trainable skills do), but it determines how much exp the unit gets post battle. Its good to have lots of wisdom as higher level units 'can' be more powerful, plus it keeps training costs down. Attack turns are generated 2 per hour and are considered a kind of currency (since this game is turn based, turns can be quite valuable). The more you use attacking someone, the higher the payback (in fact, the payback is exponential). However, if you use a bunch of turns and lose the battle, you're pretty much screwed for the day. The last factor of ranking (my rank vs. the enemies rank) should let a unit gain additional exp if he wins vs. a higher ranked opponent. Conversely, a higher ranked player should get a lower exp yield for attacking down. I wanted to do it this way to help prevent bottom feeding as well as letting late joiners to the game have a chance of catching up. But... I'm not sure how to factor it in. So far, the equation is exp_gain = wisdom * turns ^ (1.5)... but thats all I've got. Any ideas would be appreciated.

##### Share on other sites
To further facilitate the "catch-up" and reduce the "bottom-feeding", why not award XP for battles lost as well? With the turns factored in, you get XP for "hanging in there" against a far more powerful opposing force.

As to working out how differences in level will affect XP, I don' tthink I can contribute anything worthwhile without knowing more about your system. Will you have numerically designated levels? Level 10 vs. Level 57 is different that 39827 XP versus 84749 XP.

I liked the system Tactics Ogre used, where you got XP per action, so if you manage to hit a guy six levels ahead of you, you get forty XP, but you can beat on a guy six levels below you all day long and only get a few dozen.

##### Share on other sites
Guest Anonymous Poster
Actually, your post is exactly the type of thing I was looking for. I've been playing with the numbers for quite a while, and its given me a BIG headache trying to determine how to balance everything (and if I wrote the game, and I can't get a good grasp on it... I'm sure no one else can do much better). I could post a link to an excel spread sheet that would let you play around with how all the stats effect combat... but I really doubt it would help. So, I'm more or less looking for ideas as to how to approach it.

Anyways, the only thing I don't like about giving EXP even if you lose is that if 1000's of people decided to gang up on one guy, he'd suddenly (and almost over night) become the strongest player in the game. If somone were to register multiple accounts (and there is a lot I can do to help prevent it, but I don't believe there is any way of stopping it completely), it would make cheating in that mannor a lot more powerful.

So... that leaves me sorta back where I started. For the sake of discussion, the formula for experience is $LvL * ($LvL + 1) * 50. Thus, a level 1 unit would have a minimum exp of 100, a level 2 unit would have a minimum exp of 150, a level 3 unit would have a minimum exp of 600... etc. My last attempt at solving this delimma was to use the function: