查看: 3021|回复: 0

[有事请教] (已解决)把对话中呼出菜单和跳过标题插件混用之后...

[复制链接]
梦石
20
星屑
13965
在线时间
1744 小时
注册时间
2017-1-12
回帖
1667

MZ评测员开拓者

发表于 2020-12-29 20:11:28 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 火锅深处 于 2020-12-30 19:38 编辑

(已解决)
发现原来是插件对应版本的问题导致之前根本就没回到标题,换成这个的4楼最后一个就没问题了,谢谢开关关大佬。
https://rpg.blue/thread-480758-1-1.html
------------------------------------------------------
【原问题】
应该不是因为这两个是MV版本插件吧...这两个插件在MZ是能用的。
但是假如说在地图A对话时,呼出菜单选择返回标题,回到事件标题,那么地图A那个进行到一半的对话仍然会在事件标题地图进行下去。(还没有测试对话以外的事件是否也会继续下去。
怎样能让它在返回事件标题地图时把上一个地图的事件通通中止呢?

[fold=对话中呼出菜单]
[pre lang="JavaScript"]/*=============================================================================
*  CallMenu.js
*=============================================================================*/

var Imported = Imported || {};
Imported.CallMenu = true;

/*:=============================================================================
* @plugindesc v1.4.6 Call menu during messages\choices on map by pressing one of the standard 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-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._savedInterpreter = null;
        this._lastSelectedChoice = null;
};
/* NEW */
Game_Temp.prototype.saveInterpreter = function(f) {
    this._savedInterpreter = f
};
/* NEW */
Game_Temp.prototype.getSavedInterpreter = function() {
        return this._savedInterpreter
};
/* 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 _Game_Interpreter_setupChoices_Alias = Game_Interpreter.prototype.setupChoices;
Game_Interpreter.prototype.setupChoices = function(params) {
        _Game_Interpreter_setupChoices_Alias.call(this, params);
        $gameTemp.saveInterpreter(this)
};
/* Alias */
var _DataManager_makeSaveContents_Alias = DataManager.makeSaveContents;
DataManager.makeSaveContents = function () {
    var contents = _DataManager_makeSaveContents_Alias.call(this);
    contents.message = $gameMessage;
        if ($gameMessage._choices.length !== 0) {
           contents.interpreter = $gameTemp.getSavedInterpreter()
        }
    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) {
                var gameInterpreter = contents.interpreter
                $gameTemp.saveInterpreter(gameInterpreter)
                $gameMessage.setChoiceCallback(function(n) {
                        gameInterpreter._branch[gameInterpreter._indent] = n;
                }.bind(this));
        }
};
/* 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());
};
/* Alias */
var _Window_ChoiceList_WidthEx_Alias = Window_ChoiceList.prototype.textWidthEx;
Window_ChoiceList.prototype.textWidthEx = function (text) {
        if(!SceneManager._scene.isActive()) return;
        return _Window_ChoiceList_WidthEx_Alias.call(this, text);
};
/* HIME_HiddenChoiceConditions Compatibility */
var _Window_ChoiceList_makeCommandList_Alias = Window_ChoiceList.prototype.makeCommandList
Window_ChoiceList.prototype.makeCommandList = function() {
        if(!SceneManager._scene.isActive()) return;
        _Window_ChoiceList_makeCommandList_Alias.call(this);
}
/* Galv_VisualNovelChoices Compatibility */
if (Imported.Galv_VisualNovelChoices) {
        var _Window_ChoiceList_drawItem_Alias = Window_ChoiceList.prototype.drawItem
        Window_ChoiceList.prototype.drawItem = function(index) {
        if(typeof this.choice_background === 'undefined'){
                this.choice_background = [];
        };
                _Window_ChoiceList_drawItem_Alias.call(this, index);
        };
}
/* SRD_TitleCommandCustomizer Compatibility */
if (Imported["SumRndmDde Title Command Customizer"]) {
        var _Scene_Title_createMessageWindow_Alias = Scene_Title.prototype.createMessageWindow
        Scene_Title.prototype.createMessageWindow = function() {
                $gameMessage.clear();
                _Scene_Title_createMessageWindow_Alias.call(this)
               
        };
}

/* End of File */
/*=============================================================================*/[/pre]
[/fold]

[fold=跳过标题(VIPArcher版本-MV)]
[pre lang="javascript"]//=============================================================================
// VIPArcher_SkipTitle.js
//=============================================================================

/*:
* @plugindesc 彻底跳过默认标题,包括事件里的返回标题和结束游戏时的返回
* @author VIPArcher
*
* @param Test Only
* @desc 设置为 true 时仅当测试时跳过,设置为 false 时彻底跳过
* @default true
* @type boolean
*
* @help 这个插件没有需要操作的指令,不需要帮助。
*/

void function() {
    var parameters = PluginManager.parameters('VIPArcher_SkipTitle');
    var testOnly = parameters['Test Only'] !== 'false';
    if (!testOnly || Utils.isOptionValid('test')) {
        Scene_Title.prototype.start = function() {
            Stage.prototype.initialize.call(this);
            SceneManager.clearStack();
            SceneManager.goto(Scene_Map);
        };
    }
}();[/pre]
[/fold]
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部