Request: Open menu during messages plugin

Discussion in 'JS Plugin Requests' started by shinigamidelta, Feb 6, 2016.

    Tags:
  1. shinigamidelta

    shinigamidelta The Great and Powerful Member

    Messages:
    12
    Likes Received:
    2
    First Language:
    eng
    Would someone be so nice enough to create a plugin that allows you to open the menu during messages.


    The game I am importing into MV is a visual novel and the player needs to be able to open their inventory to trigger lots of events.


    It would be nice if the plugin would allow players to save during choices also.
     
    #1
    terrorchan and Bonkers like this.
  2. terrorchan

    terrorchan Literally a Gloop Veteran

    Messages:
    249
    Likes Received:
    179
    Location:
    USA
    First Language:
    English
    I really need this, too! Please someone help us :0
     
    #2
  3. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,061
    Location:
    Toronto
    First Language:
    English
    By default, when you press the cancel button during a message, it will just proceed the message.


    And when you press cancel during a choice, it will either do nothing, or select the "cancel" choice.


    Do you have a different way of opening the menu?
     
    #3
  4. shinigamidelta

    shinigamidelta The Great and Powerful Member

    Messages:
    12
    Likes Received:
    2
    First Language:
    eng
    Well I do have a different key to open the menu.
    but the plugin don't have to work during choices. As long as it work during normal text.

    Something like this
    http://www.rpgmakervxace.net/topic/375-open-menu-during-message/

    I used regendo used Script in RPG VX Ace, but when I made the switch to MV. I can't find a plugin to open the menu during messages.

    The only problem I had with Regendo script in VX ace, was It didn't let you save during choices.
     
    #4
  5. Krimer

    Krimer Veteran Veteran

    Messages:
    135
    Likes Received:
    101
    Location:
    Kiev, Ukraine
    First Language:
    Ukrainian
    its not difficult to open menu during messages by a different key, but MV has problem with loading save after saving in the middle of message.


    Input.keyMapper[117] = 'callmenu'; //Call menu by F6

    var _Scene_Map_update_Alias = Scene_Map.prototype.update;
    Scene_Map.prototype.update = function() {
    _Scene_Map_update_Alias.call(this);
    if (Input.isTriggered('callmenu')) {
    SceneManager.push(Scene_Menu);
    }
    };


    Add it like a regular plugin with any file name you like and activate it in plugin manager. Create event with several different messages, then open menu during messages by pressing F6. Save then Load that save. It will load game in next message.  


    Sorry my English not good to explain, try it and you will understand.


    Im done it like in Ace. But in Ace it works properly.


    I dont know how to fix it in MV because i am not good in JS, its too difficult for me. Maybe Tsukihime or someone else will do it.
     
    #5
  6. shinigamidelta

    shinigamidelta The Great and Powerful Member

    Messages:
    12
    Likes Received:
    2
    First Language:
    eng
    OMG THANKS SO MUCH krimer!.I could continue with the conversion of my game ^^. This works out 90% perfection for me.

    the script I used in vx ace didn't allow to save in messages so im fine with it.


    ^^ but if anyone could fix that save during messages problem, this would be 100% perfect
     
    #6
  7. Krimer

    Krimer Veteran Veteran

    Messages:
    135
    Likes Received:
    101
    Location:
    Kiev, Ukraine
    First Language:
    Ukrainian
    I kinda manage to fix it, lol. But now if save was made during choice it will bring error after load. But now during normal text it work fine and load messages properly. I will try to look for solution.
     
    #7
  8. terrorchan

    terrorchan Literally a Gloop Veteran

    Messages:
    249
    Likes Received:
    179
    Location:
    USA
    First Language:
    English
    I got mine to work fine. I just set it to when i press shift, it brings up the menu. Even if it's during a message, it'll just reload right there. Though, there are only a few button options. . . I gave up shift, but my game is a complete visual novel, anyway. It only took one event and one conditional branch to work :0

    Screenshot (62).png
     
    Last edited by a moderator: Feb 9, 2016
    #8
    Chaos17 likes this.
  9. shinigamidelta

    shinigamidelta The Great and Powerful Member

    Messages:
    12
    Likes Received:
    2
    First Language:
    eng
    that does seem like a great Idea xD


    The only problem in my case is, my game is already complete. I'm just importing it to MV. If I was to do that. I would have to go throughout the whole game and re-ad events


    before choices.
     
    #9
  10. Krimer

    Krimer Veteran Veteran

    Messages:
    135
    Likes Received:
    101
    Location:
    Kiev, Ukraine
    First Language:
    Ukrainian
    It will not fix the save problem. Try to create event with several different messages, then open menu during messages, save then load and look where you will load. If you add choice to event then open menu during choice and close menu you will get an error. So its bad solution.
     
    Last edited by a moderator: Feb 9, 2016
    #10
  11. terrorchan

    terrorchan Literally a Gloop Veteran

    Messages:
    249
    Likes Received:
    179
    Location:
    USA
    First Language:
    English
    I'm not getting an error message  :(


    I'm not using the javascript plugin, just a parallel process event on every map I need it for. 


    The only issue is that when you reload, it'll go to the next message (ie if you save on message 3, when you load it'll take you to message 4)


    Sorry if this is like the opposite of what you need to do. I'm just trying to trouble shoot for myself and I have no JS knowledge :(


    EDIT: I added a choice in and I'm not getting an error message, however if you save on the choice, it will skip the choice making process and go to the next thing without letting you choose, which is a problem. I'll see if I can get it to not let you open during the choice making process. 



    not what this is. This is a standalone parallel process event. Nothing else is on this event aside from what is seen here. Just add this to every map somewhere. So when you're in ANOTHER event, this event is still running and will funtion. Just copy-paste an event like this to every map. 


    If I can get it to fully work that is


    EDIT NUMBER TWO


    OK, I fixed the choice question issue!


    I added a switch and when you ask the question, flip the switch on. The menu can only be open if the switch is off. I'll show you:

    Screenshot (65).png

    Screenshot (64).png
     
    Last edited by a moderator: Feb 9, 2016
    #11
  12. Krimer

    Krimer Veteran Veteran

    Messages:
    135
    Likes Received:
    101
    Location:
    Kiev, Ukraine
    First Language:
    Ukrainian
    this is what i mean. If it ok for you then fine. But i think its not good at all.

    Did you tried close menu during choice? I just do it in clean project without any plugins and i get an error no matter what. Or we have different maker or i dont know.
     
    #12
  13. shinigamidelta

    shinigamidelta The Great and Powerful Member

    Messages:
    12
    Likes Received:
    2
    First Language:
    eng
    same after leaving menu out of choices

    1.png
     
    #13
  14. terrorchan

    terrorchan Literally a Gloop Veteran

    Messages:
    249
    Likes Received:
    179
    Location:
    USA
    First Language:
    English
    I got passed the choice crashing issue (check the edit I made to a previous post) but I don't think I can fix that message skipping part :(


    I guess we will need a plugin after all. :(  


    Sorry for being slow to understand >.< 


    But for now this will have to do I suppose
     
    Last edited by a moderator: Feb 9, 2016
    #14
  15. shinigamidelta

    shinigamidelta The Great and Powerful Member

    Messages:
    12
    Likes Received:
    2
    First Language:
    eng
    ^^ np least you tried. Glad your here trying to find solutions also
     
    #15
  16. terrorchan

    terrorchan Literally a Gloop Veteran

    Messages:
    249
    Likes Received:
    179
    Location:
    USA
    First Language:
    English


    I already fixed this issue >.< It's the skipping messages thing I can't get passed. 


    @GoodatMVpeople SOS We need help. Hopefully all the messages this is getting will flag them down TOT
     
    Last edited by a moderator: Feb 9, 2016
    #16
  17. Krimer

    Krimer Veteran Veteran

    Messages:
    135
    Likes Received:
    101
    Location:
    Kiev, Ukraine
    First Language:
    Ukrainian
    I manage to fix all the issues. It open and close menu during choice properly and load where you save. But it kinda bad solution, it can has compatibility issues with non-standart game message systems and choice windows. I need to check it so i will show it to you after that.
     
    Last edited by a moderator: Feb 9, 2016
    #17
  18. Krimer

    Krimer Veteran Veteran

    Messages:
    135
    Likes Received:
    101
    Location:
    Kiev, Ukraine
    First Language:
    Ukrainian
    /*=============================================================================
    * CallMenu.js
    *=============================================================================*/

    /*:
    * @plugindesc v1.0 Call menu during messages\choices on map by pressing one of the standart menu keys ESC, X, Insert, NUM 0.
    * @author Krimer
    * @Help
    * If you want call menu during choices just disallow cancel in choice command.
    * Place this plugin below non-standart message systems or choice windows in
    * plugin manager for compatibility.
    */


    /* OVERWRITE */
    DataManager.makeSaveContents = function() {
    var contents = {};
    contents.system = $gameSystem;
    contents.screen = $gameScreen;
    contents.timer = $gameTimer;
    contents.switches = $gameSwitches;
    contents.variables = $gameVariables;
    contents.selfSwitches = $gameSelfSwitches;
    contents.actors = $gameActors;
    contents.party = $gameParty;
    contents.map = $gameMap;
    contents.player = $gamePlayer;
    contents.message = $gameMessage;
    return contents;
    };

    /* OVERWRITE */
    DataManager.extractSaveContents = function(contents) {
    $gameSystem = contents.system;
    $gameScreen = contents.screen;
    $gameTimer = contents.timer;
    $gameSwitches = contents.switches;
    $gameVariables = contents.variables;
    $gameSelfSwitches = contents.selfSwitches;
    $gameActors = contents.actors;
    $gameParty = contents.party;
    $gameMap = contents.map;
    $gamePlayer = contents.player;
    $gameMessage = contents.message;
    };

    /* 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') && $gameMessage.isBusy()) {
    this.callMenu();
    }
    };

    /* OVERWRITE */
    Window_Message.prototype.isTriggered = function() {
    return (Input.isRepeated('ok') || TouchInput.isRepeated());
    };

    /* OVERWRITE */
    Window_ChoiceList.prototype.updatePlacement = function() {
    var positionType = $gameMessage.choicePositionType();
    var messageY = this._messageWindow.y;
    this.height = this.windowHeight();
    switch (positionType) {
    case 0:
    this.x = 0;
    break;
    case 1:
    this.x = (Graphics.boxWidth - this.width) / 2;
    break;
    case 2:
    this.x = Graphics.boxWidth - this.width;
    break;
    }
    if (messageY >= Graphics.boxHeight / 2) {
    this.y = messageY - this.height;
    } else {
    this.y = messageY + this._messageWindow.height;
    }
    };

    /* OVERWRITE */
    Window_ChoiceList.prototype.windowWidth = function() {
    return Graphics.boxWidth;
    };

    /* OVERWRITE */
    Window_ChoiceList.prototype.drawItem = function(index) {
    var rect = this.itemRectForText(index);
    this.drawTextEx(this.commandName(index), rect.x, rect.y);
    this.width = this.maxChoiceWidth() + this.padding * 2;
    this.updatePlacement();
    };

    /* End of File */

    i am done it for my purposes but tell me if you want change something.

    UPD: I create own topic for this plugin.
    Link - you can find latest version here..
     
    Last edited: Nov 13, 2018
    #18
  19. shinigamidelta

    shinigamidelta The Great and Powerful Member

    Messages:
    12
    Likes Received:
    2
    First Language:
    eng
    It is fixed in a way but a problem still occurs.

    If you save  during am message it does load up at the messag.


    But when you reload the game, it jumps you to a completely different message, than the one that should be orginally next
     
    #19
  20. Krimer

    Krimer Veteran Veteran

    Messages:
    135
    Likes Received:
    101
    Location:
    Kiev, Ukraine
    First Language:
    Ukrainian
    reload? Can you tell me more details because i cant reproduce any problems. Did you put plugin below all the others?
     
    #20

Share This Page