// DarkPlasma_WishListForFusionItem 1.0.0 // Copyright (c) 2025 DarkPlasma // This software is released under the MIT license. // http://opensource.org/licenses/mit-license.php /** * 2025/02/23 1.0.0 公開 */ /*: @target MZ @url https://github.com/elleonard/DarkPlasma-MZ-Plugins/tree/release @plugindesc Wishlist registration for Item Fusion Shop @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.0 You can add items to your wishlist in the Item Fusion Shop. Once you obtain an item from the Item Fusion Shop, it will be removed from your wishlist. About the message displayed when adding an item to your wishlist If you have a plugin that adds a message window to the Fusion Shop, such as DarkPlasma_Scene_MessageMixIn, you can display a message immediately when an item is added to the shop. This plugin requires the following plugins: DarkPlasma_StoreWishList version: 1.0.0 DarkPlasma_FusionItem version: 2.1.1 DarkPlasma_CustomKeyHandler version: 1.3.0 If using with the following plugins, add them below them: DarkPlasma_FusionItem DarkPlasma_CustomKeyHandler @param registerKey @text Registration/Deletion Key @desc Pressing this key in the Fusion Shop will add/remove the item from your wishlist. @type select @default shift @option shift @option control @option tab @param registerMessage @text Registration message @desc A message will be displayed when you register an item on your wishlist. @type multiline_string @default You have added {item} to your wishlist. */ /*:ja @plugindesc アイテム融合ショップ用ウィッシュリスト登録 @author DarkPlasma @license MIT @target MZ @url https://github.com/elleonard/DarkPlasma-MZ-Plugins/tree/release @base DarkPlasma_StoreWishList @base DarkPlasma_FusionItem @base DarkPlasma_CustomKeyHandler @orderAfter DarkPlasma_FusionItem @orderAfter DarkPlasma_CustomKeyHandler @param registerKey @desc 融合ショップでこのキーを押すと、対象アイテムをウィッシュリスト登録/削除します。 @text 登録/削除キー @type select @option shift @option control @option tab @default shift @param registerMessage @desc ウィッシュリスト登録時にメッセージを表示します。 @text 登録時メッセージ @type multiline_string @default {item}をウィッシュリストに登録しました。 @help version: 1.0.0 アイテム融合ショップでウィッシュリスト登録できます。 アイテム融合ショップでそのアイテムを入手すると、 ウィッシュリストから削除します。 ウィッシュリスト登録時のメッセージ表示について DarkPlasma_Scene_MessageMixIn など、 融合ショップにメッセージウィンドウを追加するプラグインがあると ショップで登録した際にその場でメッセージ表示できます。 本プラグインの利用には下記プラグインを必要とします。 DarkPlasma_StoreWishList version:1.0.0 DarkPlasma_FusionItem version:2.1.1 DarkPlasma_CustomKeyHandler version:1.3.0 下記プラグインと共に利用する場合、それよりも下に追加してください。 DarkPlasma_FusionItem DarkPlasma_CustomKeyHandler */ (() => { '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 = { registerKey: String(pluginParameters.registerKey || `shift`), registerMessage: String(pluginParameters.registerMessage || `{item}をウィッシュリストに登録しました。`), }; function Scene_FusionItem_WishListMixIn(sceneFusionItem) { const _createBuyWindow = sceneFusionItem.createBuyWindow; sceneFusionItem.createBuyWindow = function () { _createBuyWindow.call(this); this._buyWindow.setHandler('wishList', () => this.registerWishListItem()); }; sceneFusionItem.registerWishListItem = function () { const wishListItem = this._buyWindow.currentItemForWishList(); const resultData = wishListItem.resultData(); if (resultData) { if (!$gameParty.isInWishList(resultData)) { $gameParty.addWishListItem(resultData, wishListItem.materials); if (settings.registerMessage) { $gameMessage.add(settings.registerMessage.replaceAll('{item}', `${resultData.name}`)); } } else { $gameParty.deleteWishListItem(resultData); } } this._buyWindow.refresh(); this._buyWindow.activate(); }; } Scene_FusionItem_WishListMixIn(Scene_FusionItem.prototype); function Window_FusionShopBuy_WishListMixIn(windowFusionShopBuy) { windowFusionShopBuy.currentItemForWishList = function () { return new Game_WishListItem( { kind: DataManager.kindOf(this.item()), dataId: this.item().id, }, this.materials().map((material) => { return { kind: DataManager.kindOf(material.data), dataId: material.data.id, count: material.count, }; }), ); }; const _drawItemName = windowFusionShopBuy.drawItemName; windowFusionShopBuy.drawItemName = function (item, x, y, width) { const mustHighlight = $gameParty.isInWishList(item); const _resetTextColor = this.resetTextColor; if (mustHighlight) { this.changeTextColor(ColorManager.wishListRegisteredColor()); this.resetTextColor = () => {}; } _drawItemName.call(this, item, x, y, width); if (mustHighlight) { this.resetTextColor = _resetTextColor; this.resetTextColor(); } }; } Window_FusionShopBuy_WishListMixIn(Window_FusionShopBuy.prototype); Window_CustomKeyHandlerMixIn(settings.registerKey, Window_FusionShopBuy.prototype, 'wishList'); })();