Call menu during messages

● ARCHIVED · READ-ONLY
Started by Krimer 58 posts Page 3 of 3 View original ↗
  1. MS_MANGO said:
    Thanks to a tutorial I managed to add the key bind inside rpg_core and rpg_scenes, and it's working.
    doing this inside the core file is a bad idea if you don't know what you do.
    always make a new plugin or alter a plugin that is able to do what you want.

    if you want the plugin to call the menu, do that inside the callMenu plugin instead
    or ask in the support to make this edit for you or how to add it.
  2. ShadowDragon said:
    doing this inside the core file is a bad idea if you don't know what you do.
    always make a new plugin or alter a plugin that is able to do what you want.

    if you want the plugin to call the menu, do that inside the callMenu plugin instead
    or ask in the support to make this edit for you or how to add it.
    I backed up the game before doing that. After adding it, I don't think I noticed any issues.
  3. not yet, but altering from the core or add function is ALWAYS a new plugin.
    as 1 its far safer and 2, it wont be removed if you update the engine.
  4. MS_MANGO said:
    Hello again. Thanks to a tutorial I managed to add the key bind inside rpg_core and rpg_scenes, and it's working. I was wondering if now it is possible to make a CallMenu plugin react to it as well? I'm sorry for bothering you again so soon.
    Well it should work just like that. But maybe depends where you put that part
    JavaScript:
        if (!SceneManager.isSceneChanging()) {
            this.updateCallItemMenu();
        }
    Because screenshot is cutting part of it I can't tell. You can put that part in Scene_Map.prototype.update in my plugin between lines 108 and 109.

    My plugin don't do much with keys. It's focusing more in save during messages, some fixes and compatibility with few others plugins, because maker had problems with that during that time. So any key mapper plugin should work.
  5. Krimer said:
    Well it should work just like that. But maybe depends where you put that part
    JavaScript:
        if (!SceneManager.isSceneChanging()) {
            this.updateCallItemMenu();
        }
    Because screenshot is cutting part of it I can't tell. You can put that part in Scene_Map.prototype.update in my plugin between lines 108 and 109.

    My plugin don't do much with keys. It's focusing more in save during messages, some fixes and compatibility with few others plugins, because maker had problems with that during that time. So any key mapper plugin should work.
    It works. I also was able to assign a switch to it. Thank you for finding time to help me!

    ShadowDragon said:
    not yet, but altering from the core or add function is ALWAYS a new plugin.
    as 1 its far safer and 2, it wont be removed if you update the engine.
    I see your point. I will try to get the changes into a plugin.
  6. Krimer said:
    In my plugin delete lines from 114 to 119. This function was needed for MV but not need for MZ. Should work after that.

    Hi, first, thank you so much for the CallMenu Plugin, it worked perfectly for me under RPG Maker MV. Now, I just migrated my game from MV to MZ, and so I deleted lines 114 to 119 of the plugin as you advised. The plugin then works in general, but there is one situation, where it does not work anymore (MZ):
    --> When there is a "decision", and I open the menu and save, it makes the save game. When I load the game, I start again at the decision point - so far, so good. BUT: independent of the decision I chose now, it will always take the decision that was marked when I had saved the game. Example: if my cursor was on decision 1, I save, I load, select 2, Then I will still have the outcome of decision one.

    Would you have any clue why this happens and how to fix?
    (Alternatively, I will have, as a workaround, to block the menu access during decisions, which is not very nice for the player)
  7. Nicikeller said:
    Hi, first, thank you so much for the CallMenu Plugin, it worked perfectly for me under RPG Maker MV. Now, I just migrated my game from MV to MZ, and so I deleted lines 114 to 119 of the plugin as you advised. The plugin then works in general, but there is one situation, where it does not work anymore (MZ):
    --> When there is a "decision", and I open the menu and save, it makes the save game. When I load the game, I start again at the decision point - so far, so good. BUT: independent of the decision I chose now, it will always take the decision that was marked when I had saved the game. Example: if my cursor was on decision 1, I save, I load, select 2, Then I will still have the outcome of decision one.

    Would you have any clue why this happens and how to fix?
    (Alternatively, I will have, as a workaround, to block the menu access during decisions, which is not very nice for the player)
    Well that problem was one of main problems which this plugin was made for. Due to differences between makers looks like the problem has returned.
    Here is MZ version of plugin, tell me if that works
    plugin
    Code:
    /*=============================================================================
     *  CallMenuMZ.js
     *=============================================================================*/
     
    var Imported = Imported || {};
    Imported.CallMenuMZ = true;
     
    /*:=============================================================================
    * @plugindesc v1.0 Call menu during messages\choices on map by pressing one of the standard menu keys ESC, X, Insert, NUM 0. For MZ
    * @author Krimer
    * @help
    * If you want call menu during choices just disallow cancel in choice command.
    * Place this plugin below non-standard message systems or choice windows in
    * plugin manager for better compatibility.
     
    * =============================================================================*/
     
    /*=============================================================================*/
    /* Alias */
    var _Game_Temp_initialize_Alias = Game_Temp.prototype.initialize;
    Game_Temp.prototype.initialize = function() {
        _Game_Temp_initialize_Alias.call(this)
        this._lastSelectedChoice = null;
    };
    
    /* NEW */
    Game_Temp.prototype.setLastSelectedChoice = function(f) {
        this._lastSelectedChoice = f
    };
    /* NEW */
    Game_Temp.prototype.getLastSelectedChoice = function() {
        return this._lastSelectedChoice
    };
    /* Alias*/
    var _Window_ChoiceList_callOkHandler = Window_ChoiceList.prototype.callOkHandler
    Window_ChoiceList.prototype.callOkHandler = function() {
        $gameTemp.setLastSelectedChoice(null)
        _Window_ChoiceList_callOkHandler.call(this);
    };
    /* Alias */
    var _Window_ChoiceList_callCancelHandler = Window_ChoiceList.prototype.callCancelHandler
    Window_ChoiceList.prototype.callCancelHandler = function() {
        $gameTemp.setLastSelectedChoice(null)
        _Window_ChoiceList_callCancelHandler.call(this);
    };
    /* Alias */
    var _Window_ChoiceList_selectDefault = Window_ChoiceList.prototype.selectDefault
    Window_ChoiceList.prototype.selectDefault = function() {
        if ($gameTemp.getLastSelectedChoice() !== null){
            this.select($gameTemp.getLastSelectedChoice());
        } else {
            _Window_ChoiceList_selectDefault.call(this);
        } 
    };
    /* Alias*/
    var _Window_ChoiceList_update = Window_ChoiceList.prototype.update
    Window_ChoiceList.prototype.update = function() {
        _Window_ChoiceList_update.call(this);
         if ((Input.isTriggered('escape') || Input.isTriggered('menu') || TouchInput.isCancelled()) && $gameMessage.isBusy() && $gameSystem.isMenuEnabled()) {
            $gameTemp.setLastSelectedChoice(this._index)
        }
     
    };
     
    /* Alias */
    var _DataManager_makeSaveContents_Alias = DataManager.makeSaveContents;
    DataManager.makeSaveContents = function () {
        var contents = _DataManager_makeSaveContents_Alias.call(this);
        contents.message = $gameMessage;
    
        return contents;
    };
    
    /* Alias */
    var _DataManager_extractSaveContents_Alias = DataManager.extractSaveContents;
    DataManager.extractSaveContents = function (contents) {
        _DataManager_extractSaveContents_Alias.call(this, contents);
        $gameMessage = contents.message;
        if ($gameMessage._choices.length !== 0) {
           
            $gameMessage.setChoiceCallback(n => {
                $gameMap._interpreter._branch[$gameMap._interpreter._indent] = n;
            });
        }
    
    };
    /* Alias */
    var _Scene_Map_update_Alias = Scene_Map.prototype.update;
    Scene_Map.prototype.update = function () {
        _Scene_Map_update_Alias.call(this);
        if ((Input.isTriggered('escape') || Input.isTriggered('menu') || TouchInput.isCancelled()) && $gameMessage.isBusy() && $gameSystem.isMenuEnabled()) {
            this.callMenu();
        }
    };
    /* OVERWRITE */
    Window_Message.prototype.isTriggered = function () {
        return (Input.isRepeated('ok') || TouchInput.isRepeated());
    };
     
    /* End of File */
    /*=============================================================================*/
    [/SPOILER]
  8. You fixed it, the code above works perfectly for MZ, also during choices - Many thanks again!
  9. Krimer said:
    Well that problem was one of main problems which this plugin was made for. Due to differences between makers looks like the problem has returned.
    Here is MZ version of plugin, tell me if that works
    plugin
    Code:
    /*=============================================================================
     *  CallMenuMZ.js
     *=============================================================================*/
     
    var Imported = Imported || {};
    Imported.CallMenuMZ = true;
     
    /*:=============================================================================
    * @plugindesc v1.0 Call menu during messages\choices on map by pressing one of the standard menu keys ESC, X, Insert, NUM 0. For MZ
    * @author Krimer
    * @help
    * If you want call menu during choices just disallow cancel in choice command.
    * Place this plugin below non-standard message systems or choice windows in
    * plugin manager for better compatibility.
     
    * =============================================================================*/
     
    /*=============================================================================*/
    /* Alias */
    var _Game_Temp_initialize_Alias = Game_Temp.prototype.initialize;
    Game_Temp.prototype.initialize = function() {
        _Game_Temp_initialize_Alias.call(this)
        this._lastSelectedChoice = null;
    };
    
    /* NEW */
    Game_Temp.prototype.setLastSelectedChoice = function(f) {
        this._lastSelectedChoice = f
    };
    /* NEW */
    Game_Temp.prototype.getLastSelectedChoice = function() {
        return this._lastSelectedChoice
    };
    /* Alias*/
    var _Window_ChoiceList_callOkHandler = Window_ChoiceList.prototype.callOkHandler
    Window_ChoiceList.prototype.callOkHandler = function() {
        $gameTemp.setLastSelectedChoice(null)
        _Window_ChoiceList_callOkHandler.call(this);
    };
    /* Alias */
    var _Window_ChoiceList_callCancelHandler = Window_ChoiceList.prototype.callCancelHandler
    Window_ChoiceList.prototype.callCancelHandler = function() {
        $gameTemp.setLastSelectedChoice(null)
        _Window_ChoiceList_callCancelHandler.call(this);
    };
    /* Alias */
    var _Window_ChoiceList_selectDefault = Window_ChoiceList.prototype.selectDefault
    Window_ChoiceList.prototype.selectDefault = function() {
        if ($gameTemp.getLastSelectedChoice() !== null){
            this.select($gameTemp.getLastSelectedChoice());
        } else {
            _Window_ChoiceList_selectDefault.call(this);
        }
    };
    /* Alias*/
    var _Window_ChoiceList_update = Window_ChoiceList.prototype.update
    Window_ChoiceList.prototype.update = function() {
        _Window_ChoiceList_update.call(this);
         if ((Input.isTriggered('escape') || Input.isTriggered('menu') || TouchInput.isCancelled()) && $gameMessage.isBusy() && $gameSystem.isMenuEnabled()) {
            $gameTemp.setLastSelectedChoice(this._index)
        }
     
    };
     
    /* Alias */
    var _DataManager_makeSaveContents_Alias = DataManager.makeSaveContents;
    DataManager.makeSaveContents = function () {
        var contents = _DataManager_makeSaveContents_Alias.call(this);
        contents.message = $gameMessage;
    
        return contents;
    };
    
    /* Alias */
    var _DataManager_extractSaveContents_Alias = DataManager.extractSaveContents;
    DataManager.extractSaveContents = function (contents) {
        _DataManager_extractSaveContents_Alias.call(this, contents);
        $gameMessage = contents.message;
        if ($gameMessage._choices.length !== 0) {
          
            $gameMessage.setChoiceCallback(n => {
                $gameMap._interpreter._branch[$gameMap._interpreter._indent] = n;
            });
        }
    
    };
    /* Alias */
    var _Scene_Map_update_Alias = Scene_Map.prototype.update;
    Scene_Map.prototype.update = function () {
        _Scene_Map_update_Alias.call(this);
        if ((Input.isTriggered('escape') || Input.isTriggered('menu') || TouchInput.isCancelled()) && $gameMessage.isBusy() && $gameSystem.isMenuEnabled()) {
            this.callMenu();
        }
    };
    /* OVERWRITE */
    Window_Message.prototype.isTriggered = function () {
        return (Input.isRepeated('ok') || TouchInput.isRepeated());
    };
     
    /* End of File */
    /*=============================================================================*/
    [/SPOILER]
    When I was using it, it always gave an error saying "Argument must be a Rectangle"
  10. Listen, I was trying to make a VN Template Tutorial for people and this Plugin is about to save my life, THANK YOU VERY MUCH!!!
  11. Ok, I tested it, I was lookig to a way to open the save menu and it opens the Main Menu and not the Save menu, I was looking at a way to only open that, haha but hey!
    It works!
    If you use the Non-Combat menu or add and remove comands during a dungeon exploration and leave, you can use it!
    Its good enough
  12. This saved my game, thank you so much.
  13. Hey man, sorry if Im an annoyance, but I found a glitch!

    If you open the menu while having dialogue and picture on screen, for some reason, the picture dissapears, it does not come back after that

    It could be problematic if someone wants to make a Visual novel with this plugin sadly

    EDIT: A wait no, its a plugin incompatibility, I'll check it out

    EDIT2: I found it! It seems if you get "Galv's Choice Picture" Plugin, then the images break with this plugin, so got it! that was the problem
  14. Carlonix said:
    Hey man, sorry if Im an annoyance, but I found a glitch!

    If you open the menu while having dialogue and picture on screen, for some reason, the picture dissapears, it does not come back after that

    It could be problematic if someone wants to make a Visual novel with this plugin sadly

    That's pretty much impossible in the scenario you've described.
    Either you're doing something else on top of that, or you're using something that's causing the issue.

    gif
    9825413726eb3fcc6f2e458e4671b388.gif
  15. Ah wait, I eddited my message, I solved it, Im just making this message just in case so you see it, I put all the info about the problem in my previous message, it was an error with a plugin
    Krimer said:
    That's pretty much impossible in the scenario you've described.
    Either you're doing something else on top of that, or you're using something that's causing the issue.

    gif
    9825413726eb3fcc6f2e458e4671b388.gif
  16. Carlonix said:
    Ah wait, I eddited my message, I solved it, Im just making this message just in case so you see it, I put all the info about the problem in my previous message, it was an error with a plugin
    Well, in this case, the issue isn't with this plugin, but with Galv's Choice Picture plugin. It doesn't handle the menu being opened during dialogue.
  17. @Carlonix But hey, I looked at Galv's Choice Picture plugin, I assume it's for MV. I couldn't find an MZ version. The solution is quite simple, here's a patch. Just add it at the end of Galv's Choice Picture plugin file.

    code
    JavaScript:
    Galv.CPICS.getPics = function() {
    
        if ($gameMessage._galvPicList) {
            Galv.CPICS.picList = $gameMessage._galvPicList;
            return;
        }
     
        Galv.CPICS.picList = [];
        if (!$gameMessage._choices) return;
        for (var i = 0; i < $gameMessage._choices.length; i++) {
            var txt = $gameMessage._choices[i].match(/<p:(.*)>/i);
            if (txt) Galv.CPICS.setPic(i,txt);
        }
    
        $gameMessage._galvPicList = Galv.CPICS.picList;
    };
    
    
    Galv.CPICS.Game_Message_clear = Game_Message.prototype.clear;
    Game_Message.prototype.clear = function() {
        Galv.CPICS.Game_Message_clear.call(this);
        this._galvPicList = null;
    };

  18. Krimer said:
    @Carlonix But hey, I looked at Galv's Choice Picture plugin, I assume it's for MV. I couldn't find an MZ version. The solution is quite simple, here's a patch. Just add it at the end of Galv's Choice Picture plugin file.

    code
    JavaScript:
    Galv.CPICS.getPics = function() {
    
        if ($gameMessage._galvPicList) {
            Galv.CPICS.picList = $gameMessage._galvPicList;
            return;
        }
     
        Galv.CPICS.picList = [];
        if (!$gameMessage._choices) return;
        for (var i = 0; i < $gameMessage._choices.length; i++) {
            var txt = $gameMessage._choices[i].match(/<p:(.*)>/i);
            if (txt) Galv.CPICS.setPic(i,txt);
        }
    
        $gameMessage._galvPicList = Galv.CPICS.picList;
    };
    
    
    Galv.CPICS.Game_Message_clear = Game_Message.prototype.clear;
    Game_Message.prototype.clear = function() {
        Galv.CPICS.Game_Message_clear.call(this);
        this._galvPicList = null;
    };

    Ah, Thanks!