Changing Max Level in-game?

Discussion in 'RPG Maker MV' started by GoldenGemGames, Apr 17, 2019 at 5:09 AM.

  1. GoldenGemGames

    GoldenGemGames Veteran Veteran

    Messages:
    67
    Likes Received:
    6
    First Language:
    English
    Primarily Uses:
    RMMV
    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?
     
    Last edited: Apr 17, 2019 at 7:09 AM
    #1
  2. caethyril

    caethyril ^_^ Veteran

    Messages:
    598
    Likes Received:
    354
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    Interesting that it stores max level with the save data rather than referencing the database!

    Try this script call:
    Code:
    $gameActors.actor(1).maxLevel = 50;
    Just replace 1 with the ID of the actor in question. ^_^


    Edit: oh wow I completely misread the code there, it does reference $dataActors. :kaoslp:
     
    Last edited: Apr 17, 2019 at 5:15 PM
    #2
  3. GoldenGemGames

    GoldenGemGames Veteran Veteran

    Messages:
    67
    Likes Received:
    6
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
    Last edited: Apr 17, 2019 at 7:58 AM
    #3
  4. Trihan

    Trihan Speedy Scripter Veteran

    Messages:
    1,448
    Likes Received:
    952
    Location:
    Buckie, Scotland
    First Language:
    English
    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

    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.
     
    Last edited: Apr 17, 2019 at 9:05 AM
    #4
    caethyril likes this.
  5. GoldenGemGames

    GoldenGemGames Veteran Veteran

    Messages:
    67
    Likes Received:
    6
    First Language:
    English
    Primarily Uses:
    RMMV
    So the .json files are indeed 50. So I made an event to trigger the script and this happened:
    20190416_195933.jpg
     
    #5
  6. Trihan

    Trihan Speedy Scripter Veteran

    Messages:
    1,448
    Likes Received:
    952
    Location:
    Buckie, Scotland
    First Language:
    English
    Oh sugar, sorry. I missed a bit.

    $gameActors.actor(actor_id).maxLevel = function() {
    return this.actor().maxLevel;
    };
     
    #6
  7. GoldenGemGames

    GoldenGemGames Veteran Veteran

    Messages:
    67
    Likes Received:
    6
    First Language:
    English
    Primarily Uses:
    RMMV
    I have good and bad news.
    Good: No error screens appear.
    Bad: I still can't exceed lv. 30.
     
    #7
  8. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,020
    Likes Received:
    10,813
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    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.
     
    #8
  9. GoldenGemGames

    GoldenGemGames Veteran Veteran

    Messages:
    67
    Likes Received:
    6
    First Language:
    English
    Primarily Uses:
    RMMV
    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!
     
    Last edited: Apr 17, 2019 at 12:00 PM
    #9
    caethyril likes this.
  10. Trihan

    Trihan Speedy Scripter Veteran

    Messages:
    1,448
    Likes Received:
    952
    Location:
    Buckie, Scotland
    First Language:
    English
    Haha, those pesky plugins.
     
    #10
  11. GoldenGemGames

    GoldenGemGames Veteran Veteran

    Messages:
    67
    Likes Received:
    6
    First Language:
    English
    Primarily Uses:
    RMMV
    yeah. I bet those methods would've worked, but the plugin simply overrides it.
     
    #11

Share This Page