// DarkPlasma_EquipDetail 1.0.2 // Copyright (c) 2024 DarkPlasma // This software is released under the MIT license. // http://opensource.org/licenses/mit-license.php /** * 2024/04/20 1.0.2 共通化した実装を基底プラグインに分離 * 2024/04/17 1.0.1 詳細説明を開けるウィンドウのmixinを共通化 * 2024/04/17 1.0.0 公開 */ /*: @target MZ @url https://github.com/elleonard/DarkPlasma-MZ-Plugins/tree/release @plugindesc Display detailed equipment descriptions in equipment scenes @author DarkPlasma @license MIT @help English Help Translator: munokura This is an unofficial English translation of the plugin help, created to support global RPG Maker users. Feedback is welcome to improve translation quality (see: https://github.com/munokura/DarkPlasma-MZ-Plugins ). Original plugin by DarkPlasma. Please check the latest official version at: https://github.com/elleonard/DarkPlasma-MZ-Plugins/tree/release ----- version: 1.0.2 Hovering the cursor over equipment in the equipment scene and pressing a specific button opens the equipment details window. You can enter a detailed description in the equipment's memo field using the following: This plugin requires the following plugins: DarkPlasma_CustomKeyHandler version:1.3.0 DarkPlasma_DisplayDatabaseDetailWindow version:1.0.0 If using with the following plugins, add this plugin below them: DarkPlasma_CustomKeyHandler DarkPlasma_DisplayDatabaseDetailWindow @param openDetailKey @text Detailed explanation button @desc Sets the button to open the detailed description. @type select @default shift @option pageup @option pagedown @option shift @option control @option tab */ /*:ja @plugindesc 装備シーンで装備品の詳細説明を表示する @author DarkPlasma @license MIT @target MZ @url https://github.com/elleonard/DarkPlasma-MZ-Plugins/tree/release @base DarkPlasma_CustomKeyHandler @base DarkPlasma_DisplayDatabaseDetailWindow @orderAfter DarkPlasma_CustomKeyHandler @orderAfter DarkPlasma_DisplayDatabaseDetailWindow @param openDetailKey @desc 詳細説明を開くためのボタンを設定します。 @text 詳細説明ボタン @type select @option pageup @option pagedown @option shift @option control @option tab @default shift @help version: 1.0.2 装備シーンの装備にカーソルを合わせて特定のボタンを押すと 装備詳細説明ウィンドウを開きます。 装備のメモ欄に下記のような記述で詳細説明を記述できます。 本プラグインの利用には下記プラグインを必要とします。 DarkPlasma_CustomKeyHandler version:1.3.0 DarkPlasma_DisplayDatabaseDetailWindow version:1.0.0 下記プラグインと共に利用する場合、それよりも下に追加してください。 DarkPlasma_CustomKeyHandler DarkPlasma_DisplayDatabaseDetailWindow */ (() => { 'use strict'; const pluginName = document.currentScript.src.replace(/^.*\/(.*).js$/, function () { return arguments[1]; }); const pluginParametersOf = (pluginName) => PluginManager.parameters(pluginName); const pluginParameters = pluginParametersOf(pluginName); const settings = { openDetailKey: String(pluginParameters.openDetailKey || `shift`), }; function Scene_Equip_DetailMixIn(sceneEquip) { const _create = sceneEquip.create; sceneEquip.create = function () { _create.call(this); this.createDetailWindow(); }; const _createSlotWindow = sceneEquip.createSlotWindow; sceneEquip.createSlotWindow = function () { _createSlotWindow.call(this); this._slotWindow.setHandler('detail', () => this.toggleDetailWindow(this._slotWindow)); }; const _createItemWindow = sceneEquip.createItemWindow; sceneEquip.createItemWindow = function () { _createItemWindow.call(this); this._itemWindow.setHandler('detail', () => this.toggleDetailWindow(this._itemWindow)); }; sceneEquip.createDetailWindow = function () { this._detailWindowLayer = new WindowLayer(); this._detailWindowLayer.x = (Graphics.width - Graphics.boxWidth) / 2; this._detailWindowLayer.y = (Graphics.height - Graphics.boxHeight) / 2; this.addChild(this._detailWindowLayer); this._detailWindow = new Window_DetailText(this.detailWindowRect()); this._detailWindowLayer.addChild(this._detailWindow); this._itemWindow.setDetailWindow(this._detailWindow); this._slotWindow.setDetailWindow(this._detailWindow); }; sceneEquip.detailWindowRect = function () { return this.slotWindowRect(); }; sceneEquip.toggleDetailWindow = function (activeWindow) { activeWindow.activate(); this._detailWindow.scrollTo(0, 0); if (!this._detailWindow.visible) { this._detailWindow.show(); } else { this._detailWindow.hide(); } }; } Scene_Equip_DetailMixIn(Scene_Equip.prototype); Window_WithDetailWindowMixIn(settings.openDetailKey, Window_EquipSlot.prototype); Window_WithDetailWindowMixIn(settings.openDetailKey, Window_EquipItem.prototype); })();