Is possible to fix and add few functions in this plugin??

Discussion in 'JS Plugin Requests' started by jordanblake, Jun 2, 2017.

  1. jordanblake

    jordanblake Veteran Veteran

    Messages:
    38
    Likes Received:
    3
    Location:
    Chile
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Hello,yesterday i found this plugin what actually fills all i need in my project, the problem is, theres some bugs like, when you press "cancel" nothings happens, and im wonder if is possible to customize the background and add the option to make a access from the menu, the terms are:

    heres the plugin:

    https://forums.rpgmakerweb.com/index.php?threads/monster-storage-box.51591/


    the reason of the post is because the autor is inactive since Feb 3, 2017..
     
    #1
  2. Clock Out

    Clock Out Veteran Veteran

    Messages:
    92
    Likes Received:
    44
    First Language:
    English
    Primarily Uses:
    RMMV
    Found the close window bug at COLD.BREED.mainMenu.prototype.addMainCommands. Specifically this line.
    Code:
    this.addCommand("Cancel", " cancel", true); // Broken
    this.addCommand("Cancel", "cancel", true); // Fixed
    
    Remove the space from the 2nd argument as shown in the fixed line and the window closes normally.

    Here's a plugin to add the entry in the main menu.

    I recommend adding it after monsterstoragebox.
    Code:
    /**
    * monsterBoxMainMenu.js
    * 2017-06-01
    * Copyright (c) 2017 Dominic Herrera
    * License: Do anything you want.
    * Disclaimer: NO WARRANTY.
    */
    
    /*:
     * @plugindesc Add this plugin after monsterstoragebox in the plugin list.
     * @author Dominic Herrera
     * @help
     * Requires monsterstoragebox.js by Jeremy Cannady.
     * https://forums.rpgmakerweb.com/index.php?threads/monster-storage-box.51591/
     * Change the text shown on the menu by editing the monsterBoxMainMenu.js file.
     *
     * EXAMPLE
     *     this.addCommand("YOUR MENU TEXT HERE", "monsterStorageBox", true);
     */
    
    // Add storage box command to the main menu.
    (function (alias) {
        "use strict";
    
        function addOriginalCommands() {
            alias.call(this);
    
            this.addCommand("Monster Storage Box", "monsterStorageBox", true);
        }
      
        Window_MenuCommand.prototype.addOriginalCommands = addOriginalCommands;
    }(Window_MenuCommand.prototype.addOriginalCommands));
    
    // Add handler to start storage box scene when menu item activated.
    (function (alias) {
        "use strict";
    
        function createCommandWindow() {
            alias.call(this);
    
            this._commandWindow.setHandler("monsterStorageBox", function () {
                SceneManager.push(COLD.BREED.Scene_Breed_Select);
            });
        }
    
        Scene_Menu.prototype.createCommandWindow = createCommandWindow;
    }(Scene_Menu.prototype.createCommandWindow));
    
     
    Last edited: Jun 2, 2017
    #2
    jordanblake likes this.
  3. jordanblake

    jordanblake Veteran Veteran

    Messages:
    38
    Likes Received:
    3
    Location:
    Chile
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Wow, thanks very much fam, i'm not in my house now but seems will work like a charm, btw , there's any posibility to customize the background a little, i been watching some tutorials of js (making menu etc), but the code of the plugins seems pretty complex, i can understand theres a new windows making, but i dont know if is from party_scene making or what....

    i've tryed to use SRD background menu changer,because works with yanfly class,party and row plugin scenes just writing the scene class, but i'm not sure how works in this time...


    thanks very much again for the fix and the addon this help me a lot with my project.


    regards.
     
    #3
  4. Clock Out

    Clock Out Veteran Veteran

    Messages:
    92
    Likes Received:
    44
    First Language:
    English
    Primarily Uses:
    RMMV
    It should be possible but I'll have study the SRD_MenuBackgrounds.js file for a bit.
     
    #4
  5. jordanblake

    jordanblake Veteran Veteran

    Messages:
    38
    Likes Received:
    3
    Location:
    Chile
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    thanks very much buddy,you dont know how much this help me,im such a dumb so i dont understand too much,ill wait for the help.

    thanks a lot again.


    regards.
     
    #5
  6. Clock Out

    Clock Out Veteran Veteran

    Messages:
    92
    Likes Received:
    44
    First Language:
    English
    Primarily Uses:
    RMMV
    Found the problem.

    Code:
    COLD.BREED.Scene_Breed_Select = function() {
        this.initialize.apply(this, arguments);
    }
    The menu backgrounds plugin looks for a function name but won't find one because the function above has no name. Functions without names are known as anonymous functions in JavaScript. It's easy enough to add one.

    Code:
    COLD.BREED.Scene_Breed_Select = function Scene_Breed_Select() {
        this.initialize.apply(this, arguments);
    }
    And there we go! Change the function name just like I did above and then in the parameters for a custom window, set the Custom x Scene Name value to Scene_Breed_Select and set the other options to your liking.
     
    #6
    jordanblake likes this.
  7. jordanblake

    jordanblake Veteran Veteran

    Messages:
    38
    Likes Received:
    3
    Location:
    Chile
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    wow thanks for everything :D
     
    #7
  8. Clock Out

    Clock Out Veteran Veteran

    Messages:
    92
    Likes Received:
    44
    First Language:
    English
    Primarily Uses:
    RMMV
    Glad to help buddy!
     
    #8

Share This Page