Help with my simple EXP requirement plugin

Hi Guys,

Simple plugin here. All it does it alter the exp requirements for leveling up. This way, each level only takes 100EXP to level.

Game_Actor.prototype.expForLevel = function(level) {

    return (level-1) * 100;

};

What I need to/would like to do is add a max limit to this formula, so that it cannot increase past 9,800 (as that is what it takes to reach level 99 with this setup.

This way my characters will stop gaining exp even when level 99. 

Thanks in advance for any help guys,

Regards,

Moe
Math.min( (level - 1) * 100, 9800);

Should do the trick
Exp still seems to be climbing over 9800 in the status menu.

Current Plugin script, may be incorrect.

Game_Actor.prototype.expForLevel = function(level) {

    return Math.min( (level-1) * 100, 9800);

};

EXP.png
I can take a look after I finish work but it might be that the scene is using a different method to get the exp.

So it looks like, from the screenshot, that your actor is just earning more exp than is required, suggesting that maybe you should look at the function that give exp to the actor, and doing something like:

exp = Math.min(exp + gained, this.expToLevel(this.level));Or some such.

(I've not looked at the Actor class, but that should give you an idea of what to write)

Original thread: https://forums.rpgmakerweb.com/threads/help-with-my-simple-exp-requirement-plugin.54356/