MV Reduce EXP by % via Event

This is for MV.

I'm trying to do this without adding another plugin to my project. I'm creating an item that will teleport the player back to their home base, but I'd like it to reduce the player's current EXP by a %. Just a one-time cost. You can only reduce EXP by a constant value within an event. Is there a script code that will let me possibly reduce EXP by a % instead?

Essentially, I don't want it to cost a set # because I want it to be usable if you have a small or large amount of EXP.

Thanks! :LZSexcite:
You can do this with a variable, e.g. reduce Harold's EXP by 15% of their current EXP:

◆Comment:Get current EXP ◆Control Variables:#0007 Calc = EXP of Harold ◆Comment:Multiply by 15 / 100 (i.e. 15%) ◆Control Variables:#0007 Calc *= 15 ◆Control Variables:#0007 Calc /= 100 ◆Comment:Reduce EXP by that amount ◆Change EXP:Harold, - {Calc}
(Control Variables -> Game Data -> Actor -> EXP for current EXP, I'm guessing the rest is self-explanatory.)
You can do this with a variable, e.g. reduce Harold's EXP by 15% of their current EXP:

◆Comment:Get current EXP ◆Control Variables:#0007 Calc = EXP of Harold ◆Comment:Multiply by 15 / 100 (i.e. 15%) ◆Control Variables:#0007 Calc *= 15 ◆Control Variables:#0007 Calc /= 100 ◆Comment:Reduce EXP by that amount ◆Change EXP:Harold, - {Calc}

(Control Variables -> Game Data -> Actor -> EXP for current EXP, I'm guessing the rest is self-explanatory.)
Oh! Yes! This worked. Thank you 😂
Great, happy RPG Making! 👋

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/reduce-exp-by-via-event.153623/