Cap xp gains at level thresholds?

[Obligatory "I'm-new-so-this-might-be-an-easy-solution"] 🙂

In my project, I'd like to turn off automatic leveling up, and instead make the PC visit a trainer to test their skills against a special benchmark monster. Winning this fight lifts the cap and levels the actor up.

For example, if the next level is at 400 xp and the PC is at 385, and earns 20 xp from a fight, only 14 is actually added because the cap is 399. And then, further xp gains are wasted until the test is complete.

I can currently think of no way to accomplish this via eventing (like, a huge janky parallel common event with pages and pages of conditionals can get me 85% of the way there but there are too many situations where it'd break down), and I'm afraid I may need a plugin. I googled "rpg maker mv plugin" along with several different ways to describe my needs, but came up with nothing.

Lookin forward to replies!
Did you see this plugin by Galv? Since it requires level ups to happen from a new scene, you could eliminate the option to level up from the status menu and then require the player to check in with your benchmark monster and use a script call to open the scene once the player has met the conditions.
That is very close. It does the xp cap perfectly, and comes with the manual level-up I need. It just doesn't have the option to do the actual level up normally; in other words, you can't turn off the point-distribution process.
You could try asking if someone could write a plugin or edit to turn that part off. You might have more luck getting that done than someone creating an entirely new plugin. IDK, I know very little about JS and whether these things would be difficult to do or not.
I got a pluugin that levels its level and only continue its level when a new class is learned,
or given. so if you player is lv 5 and cant pas that level, a new class need to be learned
in order to level it up higher. (in my spoiler ShadowDragon_TF) has the class level cap.
Thank you, Dragon. Is the plugin configurable in a way that it still caps the xp at level thresholds, but doesn't require a new class? I'd have to have a class for every level.
not really, dont know how to cap the exp, you can also make dummy class (no class name)
if you dont use classes, but you can increase it when actor pass teh trial.

you might be able to cap exp from another plugin. my knowledge isn't that advanced yet.
so I try to make minor function to learn MV more 🙂

Original thread: https://forums.rpgmakerweb.com/threads/cap-xp-gains-at-level-thresholds.123033/