//============================================================================= // RPG Maker MZ - IM_CustomTitle // // Copyright 2025 I'm moralist/min-pub.com All rights reserved. // This source code or any portion thereof must not be // reproduced or used without licensed in any manner whatsoever. //============================================================================= /*: * @target MZ * @plugindesc タイトルに回想を追加する * @author 四号戦車 * * @help * * タイトルコマンドを変更します * 現状回想の追加のみです。 * */ (() => { "use strict"; //======================================================================== // プラグイン定義 //======================================================================== const pluginName = "IM_CustomTitle"; const script = document.currentScript; const param = PluginManagerEx.createParameter(script); //======================================================================== // 定数定義 //======================================================================== const TEXT_ALBUM = "0900-062-n062-0"; //======================================================================== // コアスクリプト変更部 (Window_TitleCommand) //======================================================================== const _Window_TitleCommand_prototype_makeCommandList = Window_TitleCommand.prototype.makeCommandList; Window_TitleCommand.prototype.makeCommandList = function() { const continueEnabled = this.isContinueEnabled(); this.addCommand(TextManager.newGame, "newGame"); this.addCommand(TextManager.continue_, "continue", continueEnabled); this.addCommand(TextResource.getText(TEXT_ALBUM), "album"); this.addCommand(TextManager.options, "options"); }; //======================================================================== // コアスクリプト変更部 (Scene_Title) //======================================================================== const _Scene_Title_prototype_commandWindowRect = Scene_Title.prototype.commandWindowRect; Scene_Title.prototype.commandWindowRect = function() { const rect = _Scene_Title_prototype_commandWindowRect.apply(this, arguments); rect.height = this.calcWindowHeight(4, true); return rect; }; Scene_Title.prototype.commandAlbum = function() { DataManager.setupNewGame(); // 回想部屋移動用フラグを立てておく $gameSwitches.setValue(9, true); // 後はNEW GAMEと同じ this._commandWindow.close(); this.fadeOutAll(); SceneManager.goto(Scene_Map); }; const _Scene_Title_prototype_createCommandWindow = Scene_Title.prototype.createCommandWindow; Scene_Title.prototype.createCommandWindow = function() { _Scene_Title_prototype_createCommandWindow.apply(this, arguments); this._commandWindow.setHandler("album", this.commandAlbum.bind(this)); } // タッチUI削除 //======================================================================== // コアスクリプト変更部 (Window_Options) //======================================================================== const _Window_Options_prototype_addGeneralOptions = Window_Options.prototype.addGeneralOptions; Window_Options.prototype.addGeneralOptions = function() { this.addCommand(TextManager.alwaysDash, "alwaysDash"); this.addCommand(TextManager.commandRemember, "commandRemember"); }; //======================================================================== // コアスクリプト変更部 (Scene_Options) //======================================================================== const _Scene_Options_prototype_maxCommands = Scene_Options.prototype.maxCommands; Scene_Options.prototype.maxCommands = function() { return 6; }; })();