本帖最后由 我是大仙 于 2023-1-20 22:33 编辑
我写了一个小插件以解决这个问题。
需要注意的是,系统没有“读档”这个文本设置,你需要自己在这个插件的设置栏设置一下用来读取存档的按钮名称(Command Name)
我直接把“读取存档”这个功能加到所有按钮之后了,如果你想改到其他位置,可以参考折叠内容里的方法。
顺带一提,这个插件的文件名要是"AddLoad.js".
//============================================================================= // RPG Maker MZ - AddLoad //============================================================================= /*: * @target MZ * @plugindesc AddLoad * @author Errke * * * @param LoadName * @text Command Name * @desc The Name of the Load Command * @type string * * @help AddLoad.js * Add a command in menu scene. * * */ (() => { const pluginName = 'AddLoad'; const parameters = PluginManager.parameters(pluginName); const LoadName = parameters['LoadName'] || 'load game'; const _window_menucommand_pro = Window_MenuCommand.prototype.makeCommandList; Window_MenuCommand.prototype.makeCommandList = function() { _window_menucommand_pro.apply(this,arguments); this.addLoadCommand(); }; Window_MenuCommand.prototype.addLoadCommand = function() { this.addCommand(LoadName, "load", true); }; //const _scene_menu_pro = Scene_Menu.prototype.createCommandWindow; Scene_Menu.prototype.createCommandWindow = function() { const rect = this.commandWindowRect(); const commandWindow = new Window_MenuCommand(rect); commandWindow.setHandler("item", this.commandItem.bind(this)); commandWindow.setHandler("skill", this.commandPersonal.bind(this)); commandWindow.setHandler("equip", this.commandPersonal.bind(this)); commandWindow.setHandler("status", this.commandPersonal.bind(this)); commandWindow.setHandler("formation", this.commandFormation.bind(this)); commandWindow.setHandler("options", this.commandOptions.bind(this)); commandWindow.setHandler("save", this.commandSave.bind(this)); commandWindow.setHandler("load", this.commandLoad.bind(this)); commandWindow.setHandler("gameEnd", this.commandGameEnd.bind(this)); commandWindow.setHandler("cancel", this.popScene.bind(this)); this.addWindow(commandWindow); this._commandWindow = commandWindow; }; Scene_Menu.prototype.commandLoad = function() { SceneManager.push(Scene_Load); }; })();
//=============================================================================
// RPG Maker MZ - AddLoad
//=============================================================================
/*:
* @target MZ
* @plugindesc AddLoad
* @author Errke
*
*
* @param LoadName
* @text Command Name
* @desc The Name of the Load Command
* @type string
*
* @help AddLoad.js
* Add a command in menu scene.
*
*
*/
(() => {
const pluginName = 'AddLoad';
const parameters = PluginManager.parameters(pluginName);
const LoadName = parameters['LoadName'] || 'load game';
const _window_menucommand_pro = Window_MenuCommand.prototype.makeCommandList;
Window_MenuCommand.prototype.makeCommandList = function() {
_window_menucommand_pro.apply(this,arguments);
this.addLoadCommand();
};
Window_MenuCommand.prototype.addLoadCommand = function() {
this.addCommand(LoadName, "load", true);
};
//const _scene_menu_pro = Scene_Menu.prototype.createCommandWindow;
Scene_Menu.prototype.createCommandWindow = function() {
const rect = this.commandWindowRect();
const commandWindow = new Window_MenuCommand(rect);
commandWindow.setHandler("item", this.commandItem.bind(this));
commandWindow.setHandler("skill", this.commandPersonal.bind(this));
commandWindow.setHandler("equip", this.commandPersonal.bind(this));
commandWindow.setHandler("status", this.commandPersonal.bind(this));
commandWindow.setHandler("formation", this.commandFormation.bind(this));
commandWindow.setHandler("options", this.commandOptions.bind(this));
commandWindow.setHandler("save", this.commandSave.bind(this));
commandWindow.setHandler("load", this.commandLoad.bind(this));
commandWindow.setHandler("gameEnd", this.commandGameEnd.bind(this));
commandWindow.setHandler("cancel", this.popScene.bind(this));
this.addWindow(commandWindow);
this._commandWindow = commandWindow;
};
Scene_Menu.prototype.commandLoad = function() {
SceneManager.push(Scene_Load);
};
})();
更换按钮位置的方法 |