Removing Character Level from Menues

Discussion in 'Learning Javascript' started by Matseb2611, Jul 29, 2017.

  1. Matseb2611

    Matseb2611 Innovate, don't emulate Veteran

    Messages:
    4,582
    Likes Received:
    6,425
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi. I'm trying to find a way to remove character level from the menues since my game doesn't use them. I managed to use a main menu plugin (Galv's Bust Menu) where I hid the level from the main menu, but it's still remaining in the Skills menu.

    Is there a way to remove it, perhaps via a small plugin snippet? I don't see a point in using some grand plugin to have an overhaul of the entire Skills menu when I only need to get rid of the character level that's still being shown. I would guess it must be something pretty simple. Any tips?

    Thanks for any help. :)
     
    #1
  2. CleanWater

    CleanWater Independent Developer Veteran

    Messages:
    627
    Likes Received:
    730
    Location:
    Brazil
    First Language:
    PT-BR
    Primarily Uses:
    Other
    You will need to search in the scripts for the part where it is responsible for showing the levels in the screens, then manually delete this piece of code. I don't own MV, so I can't help much with this.

    Just be careful to not delete the wrong piece of code, or something that is linked to another thing later that might cause crashes.
     
    #2
    Matseb2611 likes this.
  3. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Don't delete it. Just put return as the first command :)

    In my version of MV, it's Window_Base.prototype.drawActorLevel, on line 516 of rpg_windows.js

    Code:
    Window_Base.prototype.drawActorLevel = function(actor, x, y) {
        return; // <--- this is the inserted line
        this.changeTextColor(this.systemColor());
        this.drawText(TextManager.levelA, x, y, 48);
        this.resetTextColor();
        this.drawText(actor.level, x + 84, y, 36, 'right');
    };
    
    This might leave a gap in your menus, so if you need to close that up, you'll need to find all the places that call this method and adjust the positioning of the following elements to cater for the level being removed.
     
    #3
    Matseb2611 likes this.
  4. lilcooldude69

    lilcooldude69 Veteran Veteran

    Messages:
    33
    Likes Received:
    4
    First Language:
    English
    yeah never delete from the rtp js. comment out and replace or add.
     
    #4
    Matseb2611 likes this.
  5. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Or rewrite it as a plugin.
     
    #5
    Matseb2611 likes this.
  6. Matseb2611

    Matseb2611 Innovate, don't emulate Veteran

    Messages:
    4,582
    Likes Received:
    6,425
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    Thank you all very much. I'll give that a try.
    One more question. What's the best program to use in order to make edits to the js files?
     
    #6
  7. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    any text editor will do. Notepad++. I use Sublime Text.
     
    #7
    Matseb2611 likes this.
  8. Matseb2611

    Matseb2611 Innovate, don't emulate Veteran

    Messages:
    4,582
    Likes Received:
    6,425
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    Great, thanks! That worked.
    Well, not initially, so I figured one of the plugins must be overwriting the original bit of code for the character level, so I copied the whole section with the 'return' line as a separate plugin file and inserted it at the very end of the plugin list, and that did it (in case anyone else is getting the same problem). :)
     
    #8
    Eliaquim likes this.

Share This Page