Sign in to follow this  
mohamedkna

Enemy exp scaling with character exp needed till next level scaling

Recommended Posts

Hello guys,

                I am making an rpg game with specific leveling system I want when a level 1 player fights a level 25 monster to level up to level 20-25 then when he goes and fight the same monster he then levels slowly like level 30 then level 32, 35, 36 on his next 4 fights respectively  meaning you must always fight a monster higher than your level else you will level up really slow

At the same time I want a level 1 player to fight a 20000 enemy and then gains like 10000 levels then on his next fight he gains like 50000 then he gains another 50000 meaning that if the player fights a really strong monster he levels up fast until he reaches the level of that monster then he level up real slowly, This system doesn't have to be perfect at all but you get the idea So any help on the equations, I searched really hard and found elementary functions like

Power function:

y = a * x^b + c

Or Linear functions:

y = mx + b

Also exp. functions and log functions but I cant seem to get the desired effect or even get any close to it, Any help or any tip on where I can find my answer is highly appreciated ty

Edited by mohamedkna

Share this post


Link to post
Share on other sites

Usually, when a character "fights" an excessively high level monster the character dies or runs away, without earning experience or any other reward. Your formulas for experience points and levels only need to behave well in a very limited range of monster levels above or below the intended enemy strength.

There are various approaches to calibrate how many experience points beating a monster should be worth. For example, we could reduce the gain depending on character experience. If the character has C experience points and the monster has a reference value of M experience points which simply reflects its power, victory should give the player f(C,M) experience points, with some obvious constraints:

  • C>=0 and M>=0
  • f(C,M) >=0: the character never loses experience.
  • f(C,0) =0 (approximately): monsters of negligible strength are worth nothing
  • f(0,M)=M (approximately): an arbitrary scaling to connect the scale of C values corresponding to character levels and the how many victories are required to earn them
  • f(a,M)>f(b,M) if a<b: less experience at higher levels for the same victory
  • f(C,a)>f(C,b) if a<b: more experience for bigger monsters, at any level
  • f(C,M)=0 if C>=M (approximately): fighting reltively weak monsters should be useless

Given these constraints, an obvious simple formula is f(C,M)=M*M/(M+C), which equals M/2 if C=M.

It can be generalized to f(C,M)=M*(M/(M+C))^k, with the exponent k greater than 1, to obtain a sharper "knee" in the curve the larger k is.

Edited by LorenzoGatti

Share this post


Link to post
Share on other sites

I suggest looking into how the Borderlands series handles leveling up.

(This is what I have noticed from my playthroughs)

The higher the enemies level is, The more xp you get upto a limit.

So killing a enemy that is around the same level or lower will get you like 1xp, But 5 levels higher gets you ~100-~300xp.

Also the harder the enemy is (Badass, Super BA, Ultimate BA) applies some kinda multiplier to the xp.

 

HTH

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this