When you make certain changes to your game, you are forced to start your save file over since the save doesn't realize the change. I changed the Max level in my game from 30 to 50, but my current file is still capped at 30 and I really don't wanna start this file over again. Is there a script that changes this value to 50?
Changing Max Level in-game?
RPG Maker MV SupportTry this script call:
Code:
$gameActors.actor(1).maxLevel = 50;
Edit: oh wow I completely misread the code there, it does reference $dataActors. 😴
Not a good result. after this code is triggered, whenever the game tries to draw the levels or as a battle ends trying to add the earned exp, it pulls up the error screen. it says "this.maxLevel is not a function" depending on how you trigger the error screen 'this' may be 'actor' instead.
Okay, you've basically overwritten a function with a number, so the game code can no longer call it when it tries to. So first things first, do a script call with
(make sure you replace actor_id with the number for the actor in question)
What you want to do is open your project's Actors.json and make sure the maxLevel property for each actor is set to 50.
Code:
$gameActors.actor(actor_id) = function() {
return this.actor().maxLevel;
};
(make sure you replace actor_id with the number for the actor in question)
What you want to do is open your project's Actors.json and make sure the maxLevel property for each actor is set to 50.
So the .json files are indeed 50. So I made an event to trigger the script and this happened:
Oh sugar, sorry. I missed a bit.
$gameActors.actor(actor_id).maxLevel = function() {
return this.actor().maxLevel;
};
$gameActors.actor(actor_id).maxLevel = function() {
return this.actor().maxLevel;
};
I have good and bad news.
Good: No error screens appear.
Bad: I still can't exceed lv. 30.
You may have to save the actor's EXP to a variable, then remove all equipment and then remove them from the party, add them back to the party and initialize them, then set their EXP to the value in that variable. If I recall right, the actor's max level is set when you initialize them, so you need to re-initialize them to change it.
Good idea, but it didn't work. the only thing I didn't do is use the EXP as a variable. I guess I'll just have to start the file over, unless we figure this out. The makers of MV made a lot of weird decisions and this is one of them. If there's no way to change it mid-game then anyone who would want thier level cap to alter at different points in the game would be screwed. (though that's not what i'm doing)
EDIT: Figured it out. I had a level cap set to 30 in Yanfly's CoreEngine plugin. Whoops!
Haha, those pesky plugins.
yeah. I bet those methods would've worked, but the plugin simply overrides it.
Original thread: https://forums.rpgmakerweb.com/threads/changing-max-level-in-game.108040/