Event when you need 1 EXP to level up

Hello! I expose what I want to know if it can be done. I'm using the Galv plugin from Manual Level Up. Well, this leaves you at 1 EXP when you can level up. But there is no notification when you can level up.

My question is, can you do that, when the actor has 1 EXP left to level up, do an event to notify the player?

I would have to do it for each actor, but doing it for one would be copy and paste for each actor.

With variables is it possible?

Thank you!
everything is possible, but it probably require a plugin or a modifaction
to the plugin or addon.

it would be wise to link the plugin you target, so we can take a look at
the correct one without finding it.
You can do it without plug-ins or a script, but it'd be tedious. Have a common event that runs after combat (many ways to do this, but there are plug-ins that would make it simpler) that checks actor exp (variable = game data = exp of actor). Then check the actors level.

Then for every level you can check how much exp is needed before level up (There's surely a script call that can check that and simplify the process), then find the difference between the exp needed to level up and the current actor exp and then run whatever eventing you want to trigger if it's 1.
JavaScript:
Math.abs($gameActors.actor(1).nextRequiredExp()) + Math.abs($gameActors.actor(1).expForLevel($gameActors.actor(1).level) - $gameActors.actor(1).currentExp()) - Math.abs($gameActors.actor(1).expForLevel($gameActors.actor(1).level) - $gameActors.actor(1).currentExp())

Actor EXP to Next LV
(=> Actor Max EXP of current LV - Actor current LV EXP)


you can use this code in an if condition, and when result is "1" thats what you are looking for as trigger..
This script code above is for usage on actor with id 1.. for other actors you need to edit the parts where the actor id is located


this code and some more can be found in my signature spoiler where i store the scripts for my srd hudmaker..
the script above is used for the hud that shows the needed exp for the next level up..
JavaScript:
Math.abs($gameActors.actor(1).nextRequiredExp()) + Math.abs($gameActors.actor(1).expForLevel($gameActors.actor(1).level) - $gameActors.actor(1).currentExp()) - Math.abs($gameActors.actor(1).expForLevel($gameActors.actor(1).level) - $gameActors.actor(1).currentExp())

Actor EXP to Next LV
(=> Actor Max EXP of current LV - Actor current LV EXP)


you can use this code in an if condition, and when result is "1" thats what you are looking for as trigger..
This script code above is for usage on actor with id 1.. for other actors you need to edit the parts where the actor id is located


this code and some more can be found in my signature spoiler where i store the scripts for my srd hudmaker..
the script above is used for the hud that shows the needed exp for the next level up..

It works! Thank you, is just all i wanted!

Original thread: https://forums.rpgmakerweb.com/threads/event-when-you-need-1-exp-to-level-up.154425/