Request: Open menu during messages plugin

reload? Can you tell me more details because i cant reproduce any problems. Did you put plugin below all the others?

This is the first script of my game, you can import it to a new project data folder

1. The first decision, chose new game+

when you arrive at the 2nd. decision Katie, Disco, or crystal. Save your game

When you load off the 2nd decision, It will put you back on a different route, almost as if you never made the first decision.

View attachment Map001.json
I see, but its not the same bug. I think thats why save during choices was disallowed in Ace. I can try to look for solution but i think its to difficult for me. All what i can do now is to disable save during choice.
That would be great also. ^^


I like the first one you posted, if you can disable save during choices on that one.


If not, I could use the second one.
after days of research i manage to do some kind of fix...


If you still need this plugin try this version

Spoiler
/*=============================================================================
* CallMenu.js
*=============================================================================*/

/*:=============================================================================
* @plugindesc v1.1 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.
* =============================================================================*/

/*=============================================================================*/
/* 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;
};

/* 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();
};

/* NEW */
Game_Interpreter.prototype.previousInterpreterCommand = function(){
this._index -= 1;
};

/* NEW */
Game_Interpreter.prototype.previousEventCode = function(){
return this._list[this._index-1].code;
};
/* NEW */
Game_Interpreter.prototype.currentEventIndex = function(){
return this._index;
};

/* Alias */
var _Scene_Save_onSavefileOk_Alias = Scene_Save.prototype.onSavefileOk;
Scene_Save.prototype.onSavefileOk = function() {
if ($gameMessage.choices().length != 0 && $gameMap._interpreter._waitMode == "message"){
$gameMessage.clear();
interpreter = $gameMap._interpreter;
if (interpreter.previousEventCode() == 102){
for (;😉 {
interpreter.previousInterpreterCommand();
if (interpreter.currentEventIndex() != 0){
if (interpreter.previousEventCode() != 401 && interpreter.previousEventCode() != 101) break;
if (interpreter.nextEventCode() == 101) break;
} else {
break;
}
};
};
};
_Scene_Save_onSavefileOk_Alias.call(this);
};

/* End of File */
/*=============================================================================*/

This is almost like previous but now i hope it properly save and load during choice.


If you want different key for call menu, find this:


if (Input.isTriggered('escape') && $gameMessage.isBusy()) {


and change 'escape' to any value from "Input.keyMapper" in "rpg_core.js" or any value from any full input plugin if you using one.


UPD: I create own topic for this plugin.
Link - you can find latest version here..
after days of research i manage to do some kind of fix...


If you still need this plugin try this version

Spoiler
/*=============================================================================
* CallMenu.js
*=============================================================================*/

/*:=============================================================================
* @plugindesc v1.1 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.
* =============================================================================*/

/*=============================================================================*/
/* 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;
};

/* 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();
};

/* NEW */
Game_Interpreter.prototype.previousInterpreterCommand = function(){
this._index -= 1;
};

/* NEW */
Game_Interpreter.prototype.previousEventCode = function(){
return this._list[this._index-1].code;
};
/* NEW */
Game_Interpreter.prototype.currentEventIndex = function(){
return this._index;
};

/* Alias */
var _Scene_Save_onSavefileOk_Alias = Scene_Save.prototype.onSavefileOk;
Scene_Save.prototype.onSavefileOk = function() {
if ($gameMessage.choices().length != 0 && $gameMap._interpreter._waitMode == "message"){
$gameMessage.clear();
interpreter = $gameMap._interpreter;
if (interpreter.previousEventCode() == 102){
for (;😉 {
interpreter.previousInterpreterCommand();
if (interpreter.currentEventIndex() != 0){
if (interpreter.previousEventCode() != 401 && interpreter.previousEventCode() != 101) break;
if (interpreter.nextEventCode() == 101) break;
} else {
break;
}
};
};
};
_Scene_Save_onSavefileOk_Alias.call(this);
};

/* End of File */
/*=============================================================================*/

This is almost like previous but now i hope it properly save and load during choice.


If you want different key for call menu, find this:



if (Input.isTriggered('escape') && $gameMessage.isBusy()) {


and change 'escape' to any value from "Input.keyMapper" in "rpg_core.js" or any value from any full input plugin if you using one.

So I started using your newer version. It seems to be working fine.


The only problem now is, If the choices are to long, they cut off some of the letters.


I tried messing with some of the numbers in the plugin, chaning the 2's. but I couldn't get it to work like normally.


but when i open the menu and close it, the choices reappear as normal


asd.png
i forgot to update version here. I fix some minor bugs long time ago.


Latest version

Spoiler
Code:
/*=============================================================================
 *  CallMenu.js
 *=============================================================================*/

/*:=============================================================================
* @plugindesc v1.2 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.
* =============================================================================*/

/*=============================================================================*/
/* 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;
};

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

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

/* Alias */
var Window_ChoiceList_WidthEx_Alias = Window_ChoiceList.prototype.textWidthEx;
Window_ChoiceList.prototype.textWidthEx = function(text) {
    try {
        return Window_ChoiceList_WidthEx_Alias.call(this, text);
    }
    catch(e) {
        return;
    }
};

/* NEW */
Game_Interpreter.prototype.previousInterpreterCommand = function(){       
  this._index -= 1;
};

/* NEW */
Game_Interpreter.prototype.previousEventCode = function(){
    return this._list[this._index-1].code;
};

/* NEW */
Game_Interpreter.prototype.currentEventIndex = function(){
    return this._index;
};

/* Alias */
var _Scene_Save_onSavefileOk_Alias = Scene_Save.prototype.onSavefileOk;
Scene_Save.prototype.onSavefileOk = function() {
    if ($gameMessage.choices().length != 0 && $gameMap._interpreter._waitMode == "message"){
        $gameMessage.clear();
        interpreter = $gameMap._interpreter;
        if (interpreter.previousEventCode() == 102){
            for (;;) {
                interpreter.previousInterpreterCommand();
                if (interpreter.currentEventIndex() != 0){
                    if (interpreter.previousEventCode() != 401 && interpreter.previousEventCode() != 101) break;
                    if (interpreter.nextEventCode() == 101) break;
                }    else {
                    break;
                }
            };
        };
    };
    _Scene_Save_onSavefileOk_Alias.call(this);
};


/* End of File */
/*=============================================================================*/


UPD: I create own topic for this plugin.
Link - you can find latest version here..
i forgot to update version here. I fix some minor bugs long time ago.


Latest version

Spoiler
/*=============================================================================
* CallMenu.js
*=============================================================================*/

/*:=============================================================================
* @plugindesc v1.2 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.
* =============================================================================*/

/*=============================================================================*/
/* 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;
};

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

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

/* Alias */
var Window_ChoiceList_WidthEx_Alias = Window_ChoiceList.prototype.textWidthEx;
Window_ChoiceList.prototype.textWidthEx = function(text) {
try {
return Window_ChoiceList_WidthEx_Alias.call(this, text);
}
catch(e) {
return;
}
};

/* NEW */
Game_Interpreter.prototype.previousInterpreterCommand = function(){
this._index -= 1;
};

/* NEW */
Game_Interpreter.prototype.previousEventCode = function(){
return this._list[this._index-1].code;
};

/* NEW */
Game_Interpreter.prototype.currentEventIndex = function(){
return this._index;
};

/* Alias */
var _Scene_Save_onSavefileOk_Alias = Scene_Save.prototype.onSavefileOk;
Scene_Save.prototype.onSavefileOk = function() {
if ($gameMessage.choices().length != && $gameMap._interpreter._waitMode == "message"){
$gameMessage.clear();
interpreter = $gameMap._interpreter;
if (interpreter.previousEventCode() == 102){
for (;😉 {
interpreter.previousInterpreterCommand();
if (interpreter.currentEventIndex() != ){
if (interpreter.previousEventCode() != 401 && interpreter.previousEventCode() != 101) break;
if (interpreter.nextEventCode() == 101) break;
} else {
break;
}
};
};
};
_Scene_Save_onSavefileOk_Alias.call(this);
};


/* End of File */
/*=============================================================================*/

Omg thx, it seems to be working perfectly. This was the last piece of the puzzle I needed to complete my game.

Now I will play through my game and make sure everything is working properly ^^ I couldn't have done it without yo. Your the best Krimer!
Your plugin is not compatible with Yanfly Extension Message Pack 1.
I fixed that by editing line 66:
Spoiler: Line 66
this.width = this.maxChoiceWidth() + this.padding * 2
and removing existing line 95.
Spoiler: Line 95
this.updatePlacement();
Everything works for me now. Thanks for plugin!

QUICK EDIT: I modified v1.0. Didn't see there was v1.2, but this version doesn't work for me anyway, I'm not surprised tho, since i have lotta plugins.
newest thread I guess

https://forums.rpgmakerweb.com/index.php?threads/call-menu-during-messages.101958/#post-961952

Original thread: https://forums.rpgmakerweb.com/threads/request-open-menu-during-messages-plugin.56323/