MZ用プラグイン

GO PHアイテムを保管できる倉庫を作成MZ - PH_Warehouse_MZ.js

シェア用テキスト:
▼GO PHアイテムを保管できる倉庫を作成MZ(PrimeHover (RMMZ移植:GrayOgre)様作) - PH_Warehouse_MZ.js
https://plugin-mz.fungamemake.com/archives/2777
アイテムを保管できる倉庫を作成できます。

ふりがな:PHあいてむをほかんできるそうこをさくせい

機能概要: アイテムを保管できる倉庫を作成できます。

利用規約(ライセンス):https://creativecommons.org/licenses/by/4.0/deed.ja

作者:PrimeHover (RMMZ移植:GrayOgre)

作者サイト:https://grayogre.info/

解説ページ:https://grayogre.info/rmmz/plugin/

ファイル名:PH_Warehouse_MZ.js

プラグインのヘルプ:

/*:ja
 * PH - Warehouse/Storage for RMMZ
 * @target MZ
 * @plugindesc アイテムを保管できる倉庫を作成できます。
 *
 * @author PrimeHover (RMMZ移植:GrayOgre)
 * @version 1.3.3
 * @date 05/05/2021
 *
 * ---------------------------------------------------------------------------
 * この作品は、Creative Commons Attribution 4.0 International License の下で
 * ライセンスされています。
 * このライセンスを確認するには、次をご覧ください。
 * https://creativecommons.org/licenses/by/4.0/deed.ja
 * ---------------------------------------------------------------------------
 *
 * @param ---オプション---
 * @desc プラグインのオプションをカスタマイズしてください
 *
 * @param All_Together
 *   @text カテゴリ分け
 *   @desc アイテムを別々のカテゴリに分けて表示(false:カテゴリ分け / true:統合)
 *   @type boolean
 *   @default false
 *   @default false
 *
 * @param Stack_Item_Quantity
 *   @text 容量基準
 *   @desc 同じアイテムの複数を容量の1つの容量と見なすかどうか(false:1個で1容量 / true:1種類で1容量)
 *   @type boolean
 *   @default false
 *
 * @param ---表示テキスト---
 * @desc プラグインのテキストをカスタマイズしてください
 *
 * @param Withdraw_Text
 *   @text 引き出すテキスト
 *   @desc オプション ”Withdraw”の表示テキスト
 *   @type string
 *   @default 引き出す
 *
 * @param Deposit_Text
 *   @text 預けるテキスト
 *   @desc オプション ”Deposit”の表示テキスト
 *   @type string
 *   @default 預ける
 *
 * @param All_Text
 *   @text 全てテキスト
 *   @desc オプション ”All”の表示テキスト(”All Together”がtrueに設定されている場合のみ)
 *   @type string
 *   @default 全て
 *
 * @param Available_Space_Text
 *   @text 利用可能容量テキスト
 *   @desc 情報ウィンドウの表示テキスト
 *   @type string
 *   @default 利用可能容量:
 *
 * @command Create
 *   @text 倉庫を作成
 *   @desc 新しい倉庫を作成する
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 作成する倉庫の名前
 *     @type string
 *   @arg max_capacity
 *     @text 最大容量
 *     @desc 作成時の最大容量 
 *     @type number
 *     @default 50
 *   @arg rule
 *     @text ルール
 *     @desc 倉庫に適用するルールの名前
 *     @type string
 *     @default
 *
 * @command Show
 *   @text 倉庫を表示
 *   @desc 名前で指定された倉庫を表示する
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 使用する倉庫の名前
 *     @type string
 *
 * @command Remove
 *   @text 倉庫を削除
 *   @desc 名前で指定された倉庫を削除する
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 削除する倉庫の名前
 *     @type string
 *
 * @command LootItem
 *   @text 戦利品ボーナスアイテム追加
 *   @desc 作成した倉庫内に戦利品ボーナス用のアイテムを追加
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 使用する倉庫の名前
 *     @type string
 *   @arg id
 *     @text アイテムID
 *     @desc 追加するアイテムのID
 *     @type item
 *   @arg quantity
 *     @text 追加数
 *     @desc 追加するアイテム数 
 *     @type number
 *
 * @command LootWeapon
 *   @text 戦利品ボーナス武器追加
 *   @desc 作成した倉庫内に戦利品ボーナス用の武器を追加
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 使用する倉庫の名前
 *     @type string
 *   @arg id
 *     @text 武器ID
 *     @desc 追加する武器のID
 *     @type weapon
 *   @arg quantity
 *     @text 追加数
 *     @desc 追加する武器数 
 *     @type number
 *
 * @command LootArmor
 *   @text 戦利品ボーナス防具追加
 *   @desc 作成した倉庫内に戦利品ボーナス用の防具を追加
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 使用する倉庫の名前
 *     @type string
 *   @arg id
 *     @text 防具ID
 *     @desc 追加する防具のID
 *     @type armor
 *   @arg quantity
 *     @text 追加数
 *     @desc 追加する防具数 
 *     @type number
 *
 * @command LootKeyItem
 *   @text 戦利品ボーナス大事なもの追加
 *   @desc 作成した倉庫内に戦利品ボーナスの大事なものを追加
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 使用する倉庫の名前
 *     @type string
 *   @arg id
 *     @text アイテムID
 *     @desc 追加するアイテムのID
 *     @type item
 *   @arg quantity
 *     @text 格納数
 *     @desc 追加するアイテム数 
 *     @type number
 *
 * @command AddItem
 *   @text アイテム追加
 *   @desc 作成した倉庫内にアイテムを追加
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 使用する倉庫の名前
 *     @type string
 *   @arg id
 *     @text アイテムID
 *     @desc 追加するアイテムのID
 *     @type item
 *   @arg quantity
 *     @text 格納数
 *     @desc 追加するアイテム数 
 *     @type number
 *
 * @command AddWeapon
 *   @text 武器追加
 *   @desc 作成した倉庫内に武器を追加
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 使用する倉庫の名前
 *     @type string
 *   @arg id
 *     @text 武器ID
 *     @desc 追加する武器のID
 *     @type weapon
 *   @arg quantity
 *     @text 格納数
 *     @desc 追加する武器数 
 *     @type number
 *
 * @command AddArmor
 *   @text 防具追加
 *   @desc 作成した倉庫内に防具を追加
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 使用する倉庫の名前
 *     @type string
 *   @arg id
 *     @text 防具ID
 *     @desc 追加する防具のID
 *     @type armor
 *   @arg quantity
 *     @text 追加数
 *     @desc 追加する防具数 
 *     @type number
 *
 * @command AddKeyItem
 *   @text 大事なもの追加
 *   @desc 作成した倉庫内に大事なものを追加
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 使用する倉庫の名前
 *     @type string
 *   @arg id
 *     @text アイテムID
 *     @desc 追加するアイテムのID
 *     @type item
 *   @arg quantity
 *     @text 格納数
 *     @desc 追加するアイテム数 
 *     @type number
 *
 * @command SetMaxCapacity
 *   @text 最大容量設定
 *   @desc 既に作成されている倉庫の新しい最大容量を設定
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 使用する倉庫の名前
 *     @type string
 *   @arg quantity
 *     @text 最大容量
 *     @desc 倉庫に設定する最大容量 
 *     @type number
 *
 * @command IncreaseMaxCapacity
 *   @text 最大容量拡張
 *   @desc 既に作成されている倉庫の最大容量を増やす
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 使用する倉庫の名前
 *     @type string
 *   @arg quantity
 *     @text 追加容量
 *     @desc 追加する容量
 *     @type number
 *
 * @command DecreaseMaxCapacity
 *   @text 最大容量削減
 *   @desc 既に作成されている倉庫の最大容量を減らす
 *   @arg title
 *     @text 倉庫の名前
 *     @desc 使用する倉庫の名前
 *     @type string
 *   @arg quantity
 *     @text 削減容量
 *     @desc 倉庫から削減する容量 
 *     @type number
 *
 * @help
 *
 * Warehouse/Storage Plugin for RMMZ
 * 作者: PrimeHover (RMMZ移植:GrayOgre)
 *
 * 詳細説明: https://github.com/PrimeHover/Warehouse
 * 次のURLにあるコマンドとルールの使用例を確認してください。
 * http://forums.rpgmakerweb.com/index.php?/topic/50503-ph-warehousestorage/
 * ポルトガル語の例を確認してください。
 * http://www.mundorpgmaker.com.br/topic/114053-ph-warehousestorage/
 *
 * 翻訳:ムノクラ
 * https://fungamemake.com/
 * https://twitter.com/munokura/
 *
 * ---------------------------------------------------------------------------
 *
 * プラグインコマンド
 *
 * - Create 預かり所の名前
 *     # 倉庫を作成
 * - Create 預かり所の名前 50
 *     # 倉庫を作成し、その最大容量を50に設定
 * - Create 預かり所の名前 50 ルール
 *     # 倉庫を作成し、最大容量を50に設定し、ルールを設定
 *
 * - Show 預かり所の名前
 *     # 倉庫を表示
 * - Remove 預かり所の名前
 *     # 倉庫を削除
 * - LootItem  預かり所の名前 アイテムid 追加数
 *     # 作成した倉庫内に戦利品ボーナス用のアイテムを追加
 * - LootWeapon 預かり所の名前 武器id 追加数
 *     # 作成した倉庫内に戦利品ボーナス用の武器を追加
 * - LootArmor  預かり所の名前 防具id 追加数
 *     # 作成した倉庫内に戦利品ボーナス用の防具を追加
 * - LootKeyItem 預かり所の名前 アイテムid 追加数
 *     # 作成した倉庫内に戦利品ボーナスの大事なものを追加
 *
 * - AddItem 預かり所の名前 id 追加数
 *     # 作成した倉庫内にアイテムを追加
 * - AddWeapon 預かり所の名前 武器id 追加数>
 *     # 作成した倉庫内に武器を追加
 * - AddArmor 預かり所の名前 防具id 追加数
 *     # 作成した倉庫内に防具を追加
 *   AddKeyItem 預かり所の名前 アイテムid 追加数
 *     # 作成した倉庫内に大事なものを追加
 *
 * - SetMaxCapacity 預かり所の名前 最大容量
 *     # 既に作成されている倉庫の新しい最大容量を設定
 *   IncreaseMaxCapacity 預かり所の名前 追加容量
 *     # 既に作成されている倉庫の最大容量を増やす
 * - DecreaseMaxCapacity 預かり所の名前 削減容量
 *     # 既に作成されている倉庫の最大容量を減らす
 *
 * ---------------------------------------------------------------------------
 *
 * スクリプトコマンド
 *
 * - PHPlugins.PHWarehouse.prototype.exist(”預かり所の名前”);
 *      # 倉庫が存在するかどうかを確認
 *
 * - PHPlugins.PHWarehouse.prototype.getMaxCapacity(”預かり所の名前”);
 *      # 倉庫の最大容量を取得
 * - PHPlugins.PHWarehouse.prototype.getCurrentCapacity(”預かり所の名前”);
 *      # 倉庫の現在の容量を取得
 *
 * - PHPlugins.PHWarehouse.prototype.hasItem(”預かり所の名前”, id);
 *      # 倉庫に特定のアイテムの数量を返す
 * - PHPlugins.PHWarehouse.prototype.hasWeapon(”預かり所の名前”, id);
 *      # 倉庫に特定の武器の数量を返す
 * - PHPlugins.PHWarehouse.prototype.hasArmor(”預かり所の名前”, id);
 *      # 倉庫に特定の防具の数量を返す
 * - PHPlugins.PHWarehouse.prototype.hasKeyItem(”預かり所の名前”, id);
 *      # 倉庫に特定の大事なものの数量を返す
 *
 * ---------------------------------------------------------------------------
 *
 * ルール
 *
 * ルールは、特定の倉庫に保管できるアイテムを管理するための簡単な方法です。
 *
 * 倉庫の規則を作成するために、
 * ”PHWarehouse”と呼ばれるデータベースの中に
 * コモンイベントを作成しなければなりません。
 * そのコモンイベントの中で、
 * 倉庫に関する規則を取り込むためにいくつかの注釈を作成。
 *
 * これらの注釈は次の形式でなければなりません。
 *
 * {Title of the Rule}
 * [commands]
 *
 * 指定できる[commands]は次のとおりです。
 *
 * item: 1
 *   (アイテムIDが1の保管を許可)
 *
 * item: 1, 2, 3, 4
 *   (IDが1、2、3、4のアイテムを保管を許可)
 *
 * item: no
 *   (アイテムの保管を禁止)
 *
 * item-n: 1
 *   (IDが1のアイテム以外のアイテムの保管を許可)
 *   (ルールで'item'というコマンドを指定しなければ、
 *    全てのアイテムを保管を許可します)
 *
 * weapon: 1
 *   (ID 1の武器を保管を許可)
 *
 * weapon: 1, 2, 3, 4
 *   (ID 1、2、3、4の武器を保管を許可)
 *
 * weapon: no
 *   (武器の保管を拒否)
 *
 * weapon-n: 1
 *   (IDが1の武器以外の武器の保管を許可)
 *   (ルールで ”weapon”コマンドを指定しない場合、全ての武器を保管を許可)
 *
 * armor: 1
 *   (ID 1の防具の保管を許可)
 *
 * armor: 1, 2, 3, 4
 *   (id 1、2、3、4の防具を保管可能)
 *
 * armor: no
 *   (防具の保管を拒否)
 *
 * armor-n: 1
 *   (IDが1の防具を除く全ての防具を保管可能)
 *   (ルールで”armor”コマンドを指定しない場合、全ての防具の保管を許可)
 *
 * keyItem: 1
 *   (ID 1の大事なものの保管を許可)
 *
 * keyItem: 1, 2, 3, 4
 *   (IDが1、2、3、4の大事なものを保管を許可)
 *
 * keyItem: no
 *   (大事なものの保管を禁止)
 *
 * keyItem-n: 1
 *   (IDが1のものを除く全ての大事なものの保管を許可)
 *   (ルール内でコマンド”keyItem”を指定しない場合、
 *    全ての大事なものの保管を許可)
 */

スポンサードリンク

スポンサードリンク

-MZ用プラグイン

Copyright© #ツクプラMZ , 2024 All Rights Reserved.