Request: Open menu during messages plugin

shinigamidelta

The Great and Powerful
Member
Joined
Aug 6, 2014
Messages
12
Reaction score
2
First Language
eng
Primarily Uses
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
 

Krimer

Veteran
Veteran
Joined
May 10, 2013
Messages
136
Reaction score
102
First Language
Ukrainian
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.
 

shinigamidelta

The Great and Powerful
Member
Joined
Aug 6, 2014
Messages
12
Reaction score
2
First Language
eng
Primarily Uses
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.
 

Krimer

Veteran
Veteran
Joined
May 10, 2013
Messages
136
Reaction score
102
First Language
Ukrainian
after days of research i manage to do some kind of fix...


If you still need this plugin try this version

/*=============================================================================
* 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..
 
Last edited:

shinigamidelta

The Great and Powerful
Member
Joined
Aug 6, 2014
Messages
12
Reaction score
2
First Language
eng
Primarily Uses
after days of research i manage to do some kind of fix...


If you still need this plugin try this version

/*=============================================================================
* 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
 
Last edited by a moderator:

Krimer

Veteran
Veteran
Joined
May 10, 2013
Messages
136
Reaction score
102
First Language
Ukrainian
i forgot to update version here. I fix some minor bugs long time ago.


Latest version

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..
 
Last edited:

shinigamidelta

The Great and Powerful
Member
Joined
Aug 6, 2014
Messages
12
Reaction score
2
First Language
eng
Primarily Uses
i forgot to update version here. I fix some minor bugs long time ago.


Latest version

/*=============================================================================
* 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!
 
Last edited by a moderator:

Kemezryp

it's me
Veteran
Joined
Oct 25, 2015
Messages
36
Reaction score
4
First Language
Polish
Primarily Uses
Your plugin is not compatible with Yanfly Extension Message Pack 1.
I fixed that by editing line 66:
this.width = this.maxChoiceWidth() + this.padding * 2
and removing existing 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.
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Finally the new pc is working!! But it seems a lost my license to Windows 10 because of the hardware changing :(
Tune in next time for our newest Episode: "PC issues return! Palm uses every swear in the lexicon!"
gotta update my game project thread page later
So trying out Ultra Mode 7 was a bad idea. How do I not include this in my game? XD
Stumbled upon an RPG Maker game on Steam called 'Boobs vs Zombies' while looking for a zombie themed fantasy RTS. lol

Forum statistics

Threads
93,558
Messages
913,463
Members
123,095
Latest member
fr34ksh0w_w1ll0w
Top