[SOLVED]Problems with Level Up item
RPG Maker MV SupportIts probably how your state is working. Show a screenshot of your state too. As it is you need a way to permanently increase the EXP as once you gain EXP it will check your EXP table again and will reset to the old level as your EXP doesn't match the level.
While gaining EXP can cause the actor's Level to change in most circumstances, I don't think that directly forcing them to Level Up will cause them to gain the EXP that they would normally need to get that Level. (Then, the battle occurs, the EXP is gained for defeating enemies, and the actor's level is recalculated based on their new EXP number, which is why you are seeing them level-down.)
I recommend having your item give EXP to actors directly, rather than giving them Levels directly. There's a useful method called nextRequiredExp() that you can use to get the amount of EXP an actor needs to Level Up. So I think that inside a damage formula, you'd write something like b.changeExp(b.nextRequiredExp(), true) instead of b.levelUp();
Once you get this approach right, you can probably get rid of the "dummy states" for leveling up, too.
I recommend having your item give EXP to actors directly, rather than giving them Levels directly. There's a useful method called nextRequiredExp() that you can use to get the amount of EXP an actor needs to Level Up. So I think that inside a damage formula, you'd write something like b.changeExp(b.nextRequiredExp(), true) instead of b.levelUp();
Once you get this approach right, you can probably get rid of the "dummy states" for leveling up, too.
Yeah those states are useless, especially as you add and remove them right away like that. You need to either increase the EXP directly or use the change level command in the event list (as that does give you the EXP), as otherwise the level up is temporary if done this way.
Why are you doing b.levelUp() + 1 ? That doesn't make much sense. And your item is giving damage equal to b's old level?
The Change Level event command changes the level, and then changes the experience to match the level. You are better off doing this:
b.changeLevel(b.level + 1)
The Change Level event command changes the level, and then changes the experience to match the level. You are better off doing this:
b.changeLevel(b.level + 1)
I cant remember exactly how the thread went but there was a thread on this site that recommended to use dummy states as the formula wouldn't work without them (the thread kinda ended there and didn't really make any mention of the state having an affect on it, I assumed the formula itself handled everything). I had researched more after that and all threads pretty much came to the same conclusion.
Coz I don't know what the hell I'm doing XD Your fix works though. Thanks!
If it's all working for you now, just report your first post and let the mods know, and they'll lock the thread for you.
Since I'm here anyway, I'll go ahead and close it.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/solved-problems-with-level-up-item.124032/

