How to change max level for post game?

I want the maximum level cap to be changed to be higher only for my post game, but I can't find any good way to do this for MV. Any help would be appreciated.
Do you want the changed max level to break the cap of 99? You'll have to use a plugin for that, which might not work correctly with this solution - in that case, you'll have to let us know which plugin you're using.

If you want the cap during the game to be, say, 50, and then it goes up to 99, you can do this. Choose a switch in your game to indicate when the cap changes, then save this as a plugin:
Code:
Game_Actor.prototype.maxLevel = function() {
    return $gameSwitches.value(switchId) ? this.actor().maxLevel : 50;
};
where switchId is the ID of your switch.
Thanks dawg, appreciate it.
Actually, @ATT_Turan , this doesn't seem to work. No matter what the switch is set at, the cap just seems to be whatever value is in the plugin. Turning the switch on and off doesn't change anything.
Bumpy Dumpy
I just tested @ATT_Turan 's plugin and it seems to work just fine to me. Have you tried it in a clean new test project to rule out interference from other plugins? Have you made sure the switch id is correct? Have you made sure to actually give enough EXP to level beyond the limit you are experiencing?
Are you making sure that you've tested it by starting a new playtest? If you add a plugin or change anything in your project, loading a save game won't work.

Aside from that, it's probably what eomere mentioned (as did I in my original post) and you have another plugin that's interacting with that function.

Make sure you're starting a new game, and if it doesn't work, give us a screenshot of your plugin manager.

Are you putting in a value for the right switch? If you use leading 0s, it won't work, it has to be e.g. $gameValue.value(2) - make sure you're flipping the correct switch to test.
I tried it in a fresh project and it still doesn't work. Let me be more clear: I want to have something that lets the level cap simply switch from 50 to 60, that's all. Either way changing the switch in both my project and a test one doesn't seem to do anything.
Again, I confirmed that the plugin itself works just fine. Since we now ruled out interference, there must be something in the way you are using and/or testing it, that produces this wrong behavior. Could you please tell us in detail what you are actually doing? Preferably with screenshots?
I figured out a solution, it took me a bit to find but there's a plugin by Mr. Trivel that solves my exact problem. Thanks for the help anyway though, I appreciate it.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-change-max-level-for-post-game.151085/