Changing how XP works

I'm Looking to make a level up system similar to Final Fantasy 15's with some misc. changes.
Final Fantasy 15's Level up system is a little different compared to most RPGs, when the party gains XP, the XP is stored until the party decides to sleep. When the party sleeps, that is when the level up occurs.

The game i'm making is kind of a roguelite, so i'm trying to implement some of that system but not all aspects of it, for example I'm trying to allow XP to be stored for your next run/character, along with being able to select how much xp you want to use towards your level up.(Like say you want to get to level 5 and have enough xp to get to 10, you can choose to store the remainder for later)

I did some digging as well and found a thread that was a step in the right direction:
this thread seemed similar to what i'm looking for, so i tried to use a plugin that ATT_Turan created/listed in it as well, but unfortunately i wasn't able to get it fully working, although it seemed to work for the OP of that thread so i think i've made a mistake somewhere.
Hmmm, can you just put in the changeExp level up while loop an additional condition that variable X has to be > 0. And in levelUp to decrease that variable by 1. Then in your sleep event it asks you how many levels you want to level up and you input a number to that variable (+ call the changeExp, can be done by just giving +1 exp or something). The exp you have left over is your exp minus the exp required to reach your current level.
you can do what rpgLoard69 said, as storing the exp inside a variable
and give out when needed.

another way is Gimmer_LicenseBoard that set experience to points
for them to use and how to level up their stats.

Original thread: https://forums.rpgmakerweb.com/threads/changing-how-xp-works.174875/