├── README.md ├── plugins ├── Battle │ ├── Enemy │ │ ├── EnemyMpCostZero.js │ │ └── ExportEnemy.js │ ├── ShowWeaponTypeSkill.js │ ├── Exp │ │ ├── FixedExp.js │ │ └── LoseExp.js │ ├── Escape.js │ ├── Tp.js │ ├── ElementAverage.js │ ├── HideCommand.js │ ├── DropItemCount.js │ └── Troop │ │ └── RandomTroop.js ├── Config │ ├── Key │ │ ├── TenKeyPad.js │ │ └── Jump.js │ ├── Option │ │ ├── VolumeOffset.js │ │ ├── Peaceful.js │ │ ├── AutoSave.js │ │ └── Snow.js │ └── Max │ │ ├── MaxGold.js │ │ ├── MaxStatus.js │ │ └── MaxPrice.js ├── System │ ├── Save │ │ ├── IncreaseEquipType.js │ │ ├── OverWriteAutoSave.js │ │ ├── NoEncrypt.js │ │ └── CustomSave.js │ ├── Switch │ │ ├── ToggleSwitch.js │ │ └── TempSwitches.js │ ├── Name │ │ ├── NameCommonEvent.js │ │ ├── NameSwitch.js │ │ ├── NameCommand.js │ │ └── NameShop.js │ ├── Ex │ │ ├── ExItem.js │ │ └── ExLevel.js │ ├── PartyFloorDamage.js │ └── MoveSpeed.js ├── Data │ ├── Skill │ │ ├── CriticalSkill.js │ │ ├── Erase.js │ │ └── GuardSkill.js │ ├── Equip │ │ ├── ReleaseEquip.js │ │ └── RetryOptimize.js │ ├── Item │ │ ├── ShowSecret.js │ │ └── ReincarnationItem.js │ └── State │ │ ├── AngryState.js │ │ └── MemberState.js ├── Scene │ ├── Title │ │ ├── ChangeSplashWait.js │ │ └── Title.js │ ├── Shop │ │ ├── KeyItem.js │ │ ├── NoSale.js │ │ ├── ShopRate.js │ │ └── CurrencyUnit.js │ ├── Menu │ │ └── LeftMenu.js │ └── Battle │ │ └── SkillMV.js ├── Game │ ├── Bgm │ │ ├── MapBgm.js │ │ └── RandomBgm.js │ ├── Event │ │ ├── NameWindow.js │ │ └── Quiz.js │ └── Map │ │ ├── EternalName.js │ │ └── EncountAirShip.js └── Base │ ├── Debug │ └── PluginCount.js │ └── Start │ └── StartPosition.js ├── .gitignore └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | # RPGツクールMZのプラグイン 2 | RPGツクールMZのプラグインです。 3 | 4 | 使い方は、Wiki を参照してください。 5 | https://github.com/pota-gon/RPGMakerMZ/wiki 6 | 7 | -------------------------------------------------------------------------------- /plugins/Battle/Enemy/EnemyMpCostZero.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 敵消費MPコスト0 Ver1.0.0(2025/1/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Battle/Enemy/EnemyMpCostZero.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: 初期版完成 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 敵キャラがMP消費スキルを使用するときにコストが0になります 19 | 20 | ## 使い方 21 | 初期設定は必要ありません 22 | プラグイン導入だけで動作します 23 | */ 24 | (() => { 25 | 'use strict'; 26 | 27 | /** 28 | * スキルの消費 MP 計算 29 | * 30 | * @param {} skill - 31 | * @returns {} 32 | */ 33 | Game_Enemy.prototype.skillMpCost = function(skill) { 34 | return 0; 35 | }; 36 | })(); 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # 公開しないプラグイン 2 | plugins/Archive 3 | plugins/Base/Core/PotBase.js 4 | plugins/Base/Patch/FixEnemyY.js 5 | plugins/Base/Patch/MaxEnemyY.js 6 | plugins/Base/Start/StartMembers.js 7 | plugins/Battle/Card 8 | plugins/Battle/Troop/TroopRewards.js 9 | plugins/Data/Equip/ActorSpecialEquip.js 10 | plugins/Data/Equip/AddEquipType.js 11 | plugins/Data/Equip/ClassSpecialEquip.js 12 | plugins/Data/Equip/NoActorSpecialEquip.js 13 | plugins/Data/Equip/NoClassSpecialEquip.js 14 | plugins/Data/Skill/SummonBattler.js 15 | plugins/Game/Color.js 16 | plugins/Scene/Window/ChangeChara.js 17 | plugins/Scene/Window/Story.js 18 | plugins/Scene/Window/Template 19 | plugins/Self 20 | plugins/System/Ex/ExSkill.js 21 | plugins/System/Ex/ExState.js 22 | plugins/System/Ex/Highlight.js 23 | plugins/System/Name/NameBattle.js 24 | -------------------------------------------------------------------------------- /plugins/Config/Key/TenKeyPad.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | テンキー入力 Ver1.0.1(2023/6/26) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Config/Key/TenKeyPad.js 6 | @orderAfter wasdKeyMZ 7 | @target MZ 8 | @author ポテトードラゴン 9 | 10 | ・アップデート情報 11 | * Ver1.0.1 ロンチプラグインの wasdKeyMZ.js と競合するため、順番をエラー表示するように修正 12 | 13 | Copyright (c) 2025 ポテトードラゴン 14 | Released under the MIT License. 15 | https://opensource.org/license/mit 16 | 17 | @help 18 | ## 概要 19 | テンキーの 7 を Qキー 9 を W キーに拡張します 20 | 21 | ## 使い方 22 | 初期設定は必要ありません 23 | プラグイン導入だけで動作します 24 | */ 25 | (() => { 26 | 'use strict'; 27 | 28 | // ベースプラグインの処理 29 | function Potadra_getPluginName(extension = 'js') { 30 | const reg = new RegExp(".+\/(.+)\." + extension); 31 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 32 | } 33 | 34 | // パラメータ用定数 35 | const plugin_name = Potadra_getPluginName(); 36 | const params = PluginManager.parameters(plugin_name); 37 | 38 | Input.keyMapper[103] = 'pageup'; 39 | Input.keyMapper[105] = 'pagedown'; 40 | })(); 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 ポテトードラゴン 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /plugins/System/Save/IncreaseEquipType.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | セーブ後装備タイプ増加可能 Ver1.0.0(2023/1/18) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/Save/IncreaseEquipType.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: 初期版完成 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | セーブ後に装備タイプを増やすとエラーになる問題を解決します 19 | 20 | ## 使い方 21 | 初期設定は必要ありません 22 | プラグイン導入だけで動作します 23 | */ 24 | (() => { 25 | 'use strict'; 26 | 27 | /** 28 | * ロード後の処理 29 | */ 30 | const _Game_System_onAfterLoad = Game_System.prototype.onAfterLoad; 31 | Game_System.prototype.onAfterLoad = function() { 32 | _Game_System_onAfterLoad.apply(this, arguments); 33 | 34 | for (const actor of $gameActors._data) { 35 | if (actor) { 36 | const slots = actor.equipSlots(); 37 | const maxSlots = slots.length; 38 | for (let i = 0; i < maxSlots; i++) { 39 | if (!actor._equips[i]) actor._equips[i] = new Game_Item(); 40 | } 41 | } 42 | } 43 | }; 44 | })(); 45 | -------------------------------------------------------------------------------- /plugins/Battle/ShowWeaponTypeSkill.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 武器不一致スキル非表示 Ver1.3.3(2022/4/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Battle/ShowWeaponTypeSkill.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.3.3: コピーライト更新 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | アクターが装備している武器タイプと 19 | スキルの武器タイプが一致しない場合、スキルを非表示にします 20 | ※ 戦闘時のみ非表示になります 21 | 22 | 例えば、剣を装備している場合 23 | 斧のスキルを覚えていても戦闘時は表示しないようになります 24 | 25 | ## 使い方 26 | 初期設定は必要ありません 27 | プラグイン導入だけで動作します 28 | */ 29 | (() => { 30 | 'use strict'; 31 | 32 | /** 33 | * スキルリストの作成 34 | * 35 | * @returns {} 36 | */ 37 | const _Window_BattleSkill_makeItemList = Window_BattleSkill.prototype.makeItemList; 38 | Window_BattleSkill.prototype.makeItemList = function() { 39 | _Window_BattleSkill_makeItemList.apply(this, arguments); 40 | if (this._actor) { 41 | this._data = this._actor.skills().filter(function(item) { 42 | if (!this._actor.isSkillWtypeOk(item)) { 43 | return false; 44 | } else { 45 | return this.includes(item); 46 | } 47 | }, this); 48 | } 49 | }; 50 | })(); 51 | -------------------------------------------------------------------------------- /plugins/Config/Key/Jump.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | ジャンプ Ver1.0.1(2023/6/26) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Config/Key/Jump.js 6 | @orderAfter wasdKeyMZ 7 | @target MZ 8 | @author ポテトードラゴン 9 | 10 | ・アップデート情報 11 | * Ver1.0.1: ロンチプラグインの wasdKeyMZ.js と競合するため、順番をエラー表示するように修正 12 | 13 | Copyright (c) 2025 ポテトードラゴン 14 | Released under the MIT License. 15 | https://opensource.org/license/mit 16 | 17 | @help 18 | ## 概要 19 | Jキーを押すことでその場でジャンプします 20 | 21 | ## 使い方 22 | 初期設定は必要ありません 23 | プラグイン導入だけで動作します 24 | */ 25 | (() => { 26 | 'use strict'; 27 | 28 | // ベースプラグインの処理 29 | function Potadra_getPluginName(extension = 'js') { 30 | const reg = new RegExp(".+\/(.+)\." + extension); 31 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 32 | } 33 | 34 | // パラメータ用定数 35 | const plugin_name = Potadra_getPluginName(); 36 | const params = PluginManager.parameters(plugin_name); 37 | 38 | Input.keyMapper[74] = 'J'; 39 | 40 | const _Game_Player_triggerButtonAction = Game_Player.prototype.triggerButtonAction; 41 | Game_Player.prototype.triggerButtonAction = function() { 42 | const value = _Game_Player_triggerButtonAction.apply(this, arguments); 43 | if (Input.isTriggered("J")) { 44 | this.jump(0, 0); 45 | } 46 | return value; 47 | }; 48 | })(); 49 | -------------------------------------------------------------------------------- /plugins/Config/Option/VolumeOffset.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | オプションボリューム切り替え範囲 Ver1.0.5(2025/1/18) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Config/Option/VolumeOffset.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.5: ヘルプ更新 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | オプションのボリューム切り替え範囲を変更します 19 | 20 | ## 使い方 21 | 1. プラグインパラメータ: ボリューム切替範囲(volumeOffset) を変更します 22 | 2. オプションのボリュームを選択すると指定した範囲の%ごとの切り替えになります 23 | 24 | @param volumeOffset 25 | @type number 26 | @text ボリューム切替範囲 27 | @desc ボリュームの切り替え範囲 28 | @default 20 29 | @min 1 30 | @max 100 31 | */ 32 | (() => { 33 | 'use strict'; 34 | 35 | // ベースプラグインの処理 36 | function Potadra_getPluginName(extension = 'js') { 37 | const reg = new RegExp(".+\/(.+)\." + extension); 38 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 39 | } 40 | 41 | // パラメータ用定数 42 | const plugin_name = Potadra_getPluginName(); 43 | const params = PluginManager.parameters(plugin_name); 44 | 45 | // 各パラメータ用定数 46 | const volumeOffset = Number(params.volumeOffset || 0); 47 | 48 | /** 49 | * ボリュームの切り替え範囲 50 | * 51 | * @returns {} 52 | */ 53 | Window_Options.prototype.volumeOffset = function() { 54 | return volumeOffset; 55 | }; 56 | })(); 57 | -------------------------------------------------------------------------------- /plugins/System/Switch/ToggleSwitch.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | トグルスイッチ Ver1.2.5(2022/12/2) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/Switch/ToggleSwitch.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.2.5: URLを修正 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 指定したスイッチのON・OFFを交互に切り替えるプラグインコマンドを提供します 19 | 20 | ## 使い方 21 | 1. プラグインコマンドを呼び出します 22 | 2. プラグインコマンドからON・OFFを交互に切り替えたいスイッチを指定します 23 | 3. プラグインコマンドを指定したイベントが呼び出されると 24 | 指定したスイッチのON・OFFが切り替わります 25 | 26 | @command toggle_switch 27 | @text トグルスイッチ 28 | @desc 指定したスイッチのON・OFFを交互に切り替えます 29 | 30 | @arg ToggleSwitch 31 | @type switch 32 | @text トグルスイッチ 33 | @desc ON・OFFを交互に切り替えるスイッチ 34 | */ 35 | (() => { 36 | 'use strict'; 37 | 38 | // ベースプラグインの処理 39 | function Potadra_getPluginName(extension = 'js') { 40 | const reg = new RegExp(".+\/(.+)\." + extension); 41 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 42 | } 43 | 44 | // パラメータ用変数 45 | const plugin_name = Potadra_getPluginName(); 46 | 47 | // プラグインコマンド(トグルスイッチ) 48 | PluginManager.registerCommand(plugin_name, "toggle_switch", args => { 49 | const ToggleSwitch = Number(args.ToggleSwitch); 50 | $gameSwitches.setValue(ToggleSwitch, !$gameSwitches.value(ToggleSwitch)); 51 | }); 52 | })(); 53 | -------------------------------------------------------------------------------- /plugins/Battle/Exp/FixedExp.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | Exp固定 Ver1.0.3(2025/1/18) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Battle/Exp/FixedExp.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.3: ヘルプ更新 11 | * Ver1.0.2: 固定経験値が正しく反映されていなかったのを修正 12 | 13 | Copyright (c) 2025 ポテトードラゴン 14 | Released under the MIT License. 15 | https://opensource.org/license/mit 16 | 17 | @help 18 | ## 概要 19 | レベルを上げるのに必要な経験値を固定にします 20 | 21 | ## 使い方 22 | 1. プラグインパラメータ: 固定経験値(FixedExp) を変更します 23 | 2. 全アクターの必要経験値が設定した値になります 24 | 25 | @param FixedExp 26 | @type number 27 | @text 固定経験値 28 | @desc 固定する経験値の値です。初期値は 100 です 29 | @default 100 30 | @min 1 31 | */ 32 | (() => { 33 | 'use strict'; 34 | 35 | // ベースプラグインの処理 36 | function Potadra_getPluginName(extension = 'js') { 37 | const reg = new RegExp(".+\/(.+)\." + extension); 38 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 39 | } 40 | 41 | // パラメータ用定数 42 | const plugin_name = Potadra_getPluginName(); 43 | const params = PluginManager.parameters(plugin_name); 44 | 45 | // 各パラメータ用定数 46 | const FixedExp = Number(params.FixedExp || 100); 47 | 48 | /** 49 | * 指定レベルに上がるのに必要な累計経験値の取得 50 | * 51 | * @param {number} level - レベル 52 | */ 53 | Game_Actor.prototype.expForLevel = function(level) { 54 | if (level === 1) return 0; 55 | 56 | return FixedExp * (level - 1); 57 | }; 58 | })(); 59 | -------------------------------------------------------------------------------- /plugins/Config/Max/MaxGold.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 所持金の最大数変更 Ver1.3.4(2022/4/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Config/Max/MaxGold.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.3.4: リファクタ 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 所持金の最大数をパラメータで指定した値に変更します 19 | 20 | ## 使い方 21 | パラメータを変更し、所持金の最大数を変更してください 22 | 導入時は、 999999999999999 となっています 23 | 24 | @param MaxGold 25 | @type number 26 | @text 所持金最大数 27 | @desc 所持金の最大数 28 | @default 999999999999999 29 | @min 0 30 | @max 999999999999999 31 | */ 32 | (() => { 33 | 'use strict'; 34 | 35 | // ベースプラグインの処理 36 | function Potadra_getPluginName(extension = 'js') { 37 | const reg = new RegExp(".+\/(.+)\." + extension); 38 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 39 | } 40 | 41 | // パラメータ用変数 42 | const plugin_name = Potadra_getPluginName(); 43 | const params = PluginManager.parameters(plugin_name); 44 | 45 | // 各パラメータ用変数 46 | const MaxGold = Number(params.MaxGold || 999999999999999); 47 | 48 | /** 49 | * パーティを扱うクラスです。所持金やアイテムなどの情報が含まれます。 50 | * このクラスのインスタンスは $gameParty で参照されます。 51 | * 52 | * @class 53 | */ 54 | 55 | /** 56 | * 所持金の最大値を取得 57 | * 58 | * @returns {number} 所持金の最大値 59 | */ 60 | Game_Party.prototype.maxGold = function() { 61 | // 変更 62 | // return 99999999; 63 | return MaxGold; 64 | }; 65 | })(); 66 | -------------------------------------------------------------------------------- /plugins/System/Save/OverWriteAutoSave.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | オートセーブ上書き許可 Ver1.0.0(2023/4/25) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/Save/OverWriteAutoSave.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: 初期版完成 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | オートセーブを上書き出来るようにします 19 | 20 | ## 使い方 21 | 初期設定は必要ありません 22 | プラグイン導入だけで動作します 23 | 24 | @param PlayTest 25 | @type boolean 26 | @text テスト時のみ有効 27 | @desc テスト時のみ有効にするか 28 | @on 有効にする 29 | @off 常に有効 30 | @default false 31 | */ 32 | (() => { 33 | 'use strict'; 34 | 35 | // ベースプラグインの処理 36 | function Potadra_getPluginName(extension = 'js') { 37 | const reg = new RegExp(".+\/(.+)\." + extension); 38 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 39 | } 40 | function Potadra_convertBool(bool) { 41 | if (bool === "false" || bool === '' || bool === undefined) { 42 | return false; 43 | } else { 44 | return true; 45 | } 46 | } 47 | function Potadra_isTest(play_test = true) { 48 | return !play_test || Utils.isOptionValid("test"); 49 | } 50 | 51 | // パラメータ用定数 52 | const plugin_name = Potadra_getPluginName(); 53 | const params = PluginManager.parameters(plugin_name); 54 | 55 | // 各パラメータ用定数 56 | const PlayTest = Potadra_convertBool(params.PlayTest); 57 | 58 | /** 59 | * 60 | * 61 | * @param {} savefileId - 62 | * @returns {} 63 | */ 64 | Window_SavefileList.prototype.isEnabled = function(savefileId) { 65 | if (this._mode === "save" && Potadra_isTest(PlayTest)) { 66 | return savefileId >= 0; 67 | } else { 68 | return !!DataManager.savefileInfo(savefileId); 69 | } 70 | }; 71 | })(); 72 | -------------------------------------------------------------------------------- /plugins/Battle/Escape.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 必ず逃走 Ver1.4.4(2022/4/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Battle/Escape.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.4.4: コピーライト更新 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 逃走の成功率を100%にします 19 | 20 | ## 使い方 21 | 初期設定は必要ありません 22 | プラグイン導入だけで動作します 23 | 24 | @param EscapeRatio 25 | @type number 26 | @text 逃走成功率 27 | @desc 100 で 100%、 50 で 50% の確率で 28 | 逃走に成功するようになります 29 | @max 100 30 | @min 1 31 | @default 100 32 | 33 | @param EscapeRatioVariable 34 | @type variable 35 | @text 逃走成功率変数 36 | @desc 逃走成功率を管理する変数 37 | なしの場合、逃走成功率で指定した値が逃走成功率になります 38 | @default 0 39 | */ 40 | (() => { 41 | 'use strict'; 42 | 43 | // ベースプラグインの処理 44 | function Potadra_getPluginName(extension = 'js') { 45 | const reg = new RegExp(".+\/(.+)\." + extension); 46 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 47 | } 48 | 49 | // パラメータ用変数 50 | const plugin_name = Potadra_getPluginName(); 51 | const params = PluginManager.parameters(plugin_name); 52 | 53 | // 各パラメータ用変数 54 | const EscapeRatioVariable = Number(params.EscapeRatioVariable || 0); 55 | let EscapeRatio = Number(params.EscapeRatio || 1); 56 | 57 | /** 58 | * 戦闘の進行を管理する静的クラスです。 59 | * 60 | * @namespace 61 | */ 62 | 63 | /** 64 | * 逃走成功率の作成 65 | */ 66 | BattleManager.makeEscapeRatio = function() { 67 | if (EscapeRatioVariable !== 0) { // ゲーム中に逃走成功率を変更するための変数を使う場合 68 | EscapeRatio = $gameVariables.value(EscapeRatioVariable); 69 | if (EscapeRatio <= 0) { 70 | EscapeRatio = 100; // 変数が 0 以下の場合、強制的に 100% にする。 71 | } 72 | } 73 | this._escapeRatio = EscapeRatio / 100; 74 | }; 75 | })(); 76 | -------------------------------------------------------------------------------- /plugins/Data/Skill/CriticalSkill.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | クリティカルスキル Ver1.0.0(2025/1/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Data/Skill/CriticalSkill.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: 初期版完成 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 会心率を指定できるスキルを作成します 19 | 20 | ## 使い方 21 | 1. クリティカルスキルにしたいスキルを作成 22 | 2. ダメージの会心をありに変更 23 | 3. メモに <会心: 50> のように記載。(会心率が50%のスキルになる。) 24 | ※ アイテムも同じように設定できます 25 | 26 | @param CriticalMetaName 27 | @text 会心タグ 28 | @desc 会心に使うメモ欄タグの名称 29 | デフォルトは 会心 30 | @default 会心 31 | */ 32 | (() => { 33 | 'use strict'; 34 | 35 | // ベースプラグインの処理 36 | function Potadra_getPluginName(extension = 'js') { 37 | const reg = new RegExp(".+\/(.+)\." + extension); 38 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 39 | } 40 | function Potadra_meta(meta, tag) { 41 | if (meta) { 42 | const data = meta[tag]; 43 | if (data) { 44 | if (data !== true) { 45 | return data.trim(); 46 | } else { 47 | return true; 48 | } 49 | } 50 | } 51 | return false; 52 | } 53 | function Potadra_random(probability, rate = 1) { 54 | return Math.random() <= probability / 100 * rate; 55 | } 56 | 57 | // パラメータ用定数 58 | const plugin_name = Potadra_getPluginName(); 59 | const params = PluginManager.parameters(plugin_name); 60 | 61 | // 各パラメータ用定数 62 | const CriticalMetaName = String(params.CriticalMetaName || '会心'); 63 | 64 | /** 65 | * 会心判定 66 | * 67 | * @param {} target - 68 | */ 69 | const _Game_Action_itemCri = Game_Action.prototype.itemCri; 70 | Game_Action.prototype.itemCri = function(target) { 71 | // クリティカルスキル判定 72 | const critical = Potadra_meta(this.item().meta, CriticalMetaName); 73 | if (critical) return Potadra_random(Number(critical)); 74 | 75 | return _Game_Action_itemCri.apply(this, arguments); 76 | }; 77 | })(); 78 | -------------------------------------------------------------------------------- /plugins/Battle/Exp/LoseExp.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 敗北経験値 Ver1.0.1(2025/7/22) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Battle/Exp/LoseExp.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.1: 小数点は切り捨てるように修正 11 | * Ver1.0.0: 初期版完成 12 | 13 | Copyright (c) 2025 ポテトードラゴン 14 | Released under the MIT License. 15 | https://opensource.org/license/mit 16 | 17 | @help 18 | ## 概要 19 | 敗北時に通常の経験値の半分を獲得できるようにします 20 | 21 | ## 仕様 22 | - 敗北時の経験値 = 通常経験値 ÷ 2 23 | - 小数点以下は全て切り捨てされます 24 | 25 | ## 使い方 26 | 初期設定は必要ありません 27 | プラグイン導入だけで動作します 28 | 29 | ## 例 30 | - 通常経験値100 → 敗北経験値50 31 | - 通常経験値1 → 敗北経験値0(0.5を切り捨て) 32 | - 通常経験値3 → 敗北経験値1(1.5を切り捨て) 33 | - 通常経験値5 → 敗北経験値2(2.5を切り捨て) 34 | */ 35 | (() => { 36 | 'use strict'; 37 | 38 | /** 39 | * 敗北の処理 40 | */ 41 | const _BattleManager_processDefeat = BattleManager.processDefeat; 42 | BattleManager.processDefeat = function () { 43 | _BattleManager_processDefeat.apply(this, arguments); 44 | this.potadraLoseMakeRewards(); 45 | this.displayRewards(); 46 | this.potadraLoseGainExp(); 47 | }; 48 | 49 | /** 50 | * 敗北経験値の作成 51 | */ 52 | BattleManager.potadraLoseMakeRewards = function () { 53 | this._rewards = { 54 | gold: 0, 55 | exp: Math.floor($gameTroop.expTotal() / 2), // 小数点以下は全て切り捨て 56 | items: [] 57 | }; 58 | }; 59 | 60 | /** 61 | * 経験値の獲得とレベルアップの表示 62 | */ 63 | BattleManager.potadraLoseGainExp = function () { 64 | const exp = this._rewards.exp; 65 | for (const actor of $gameParty.allMembers()) { 66 | actor.potadraGainExp(exp); 67 | } 68 | }; 69 | 70 | /** 71 | * 経験値の獲得(経験獲得率を考慮) 72 | * 73 | * @param {number} exp - 経験値 74 | */ 75 | Game_Actor.prototype.potadraGainExp = function (exp) { 76 | const newExp = this.currentExp() + Math.round(exp * this.potadraFinalExpRate()); 77 | this.changeExp(newExp, this.shouldDisplayLevelUp()); 78 | }; 79 | 80 | /** 81 | * 最終的な経験獲得率の計算 82 | * 戦闘に出ているか控えかで変わる 83 | * 84 | * @returns {number} 最終的な経験獲得率 85 | */ 86 | Game_Actor.prototype.potadraFinalExpRate = function () { 87 | return this.isBattleMember() ? 1 : this.benchMembersExpRate(); 88 | }; 89 | })(); 90 | -------------------------------------------------------------------------------- /plugins/System/Name/NameCommonEvent.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 名前コモンイベント呼び出し Ver1.0.5(2025/1/18) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/Name/NameCommonEvent.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.5 11 | - 名前検索用のパラメータ追加 12 | - ヘルプ更新 13 | * Ver1.0.4: 検索時のバグ修正 14 | 15 | Copyright (c) 2025 ポテトードラゴン 16 | Released under the MIT License. 17 | https://opensource.org/license/mit 18 | 19 | @help 20 | ## 概要 21 | 名前でコモンイベントを呼び出します 22 | 23 | ## 使い方 24 | 1. プラグインコマンド「コモンイベント呼び出し」を選択 25 | 2. コモンイベントの名前を設定 26 | 3. イベントを呼び出すと、コモンイベントを名前から呼び出すようになります 27 | 28 | @command common_event 29 | @text コモンイベント呼び出し 30 | @desc 名前からコモンイベントを呼び出します 31 | 32 | @arg name 33 | @type string 34 | @text 名前 35 | @desc コモンイベントの呼び出しに使う名称 36 | 37 | @arg common_event 38 | @parent name 39 | @type common_event 40 | @text コモンイベント名検索用 41 | @desc このパラメータはデータとしては使用しません 42 | */ 43 | (() => { 44 | 'use strict'; 45 | 46 | // ベースプラグインの処理 47 | function Potadra_getPluginName(extension = 'js') { 48 | const reg = new RegExp(".+\/(.+)\." + extension); 49 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 50 | } 51 | function Potadra_search(data, id, column = "name", search_column = "id", val = "", initial = 1) { 52 | if (!id) return val; 53 | for (let i = initial; i < data.length; i++) { 54 | if (!data[i]) continue; 55 | if (search_column && data[i][search_column] == id) { 56 | val = column ? data[i][column] : data[i]; 57 | break; 58 | } else if (i == id) { 59 | val = data[i]; 60 | break; 61 | } 62 | } 63 | return val; 64 | } 65 | function Potadra_nameSearch(data, name, column = "id", search_column = "name", val = "", initial = 1) { 66 | return Potadra_search(data, name, column, search_column, val, initial); 67 | } 68 | 69 | // パラメータ用変数 70 | const plugin_name = Potadra_getPluginName(); 71 | 72 | // プラグインコマンド(コモンイベント呼び出し) 73 | PluginManager.registerCommand(plugin_name, "common_event", args => { 74 | const name = String(args.name); 75 | const id = Potadra_nameSearch($dataCommonEvents, name); 76 | if (id) { 77 | $gameTemp.reserveCommonEvent(id); 78 | } 79 | }); 80 | })(); 81 | -------------------------------------------------------------------------------- /plugins/Scene/Title/ChangeSplashWait.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | スプラッシュ画面ウェイト時間変更 Ver1.0.0(2025/1/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Scene/Title/ChangeSplashWait.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: 初期版完成 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | スプラッシュ画面のウェイト時間を変更可能にします 19 | 20 | ## 使い方 21 | 1. RPGツクールMZを1.8.0以降にアップデート 22 | 2. コアスクリプトを1.8.0以降に更新 23 | 3. img/system/Splash.png に表示したいスプラッシュ画像を配置 24 | 4. システム1の「スプラッシュ画面を表示」にチェックを入れる 25 | 5. パラメータのウェイト時間を変更する 26 | 6. ゲームを起動すると指定したウェイトの時間だけロゴを表示するようになります 27 | 28 | ### パラメータ説明 29 | 30 | #### ウェイト時間(Wait) 31 | ロゴを表示する時間(1フレーム: 1/60秒) 32 | デフォルト(120フレーム: 2秒) 33 | 34 | #### スキップ有効(EnableSkip) 35 | 決定キーやクリックによるスキップを有効にするか 36 | デフォルト(スキップ有効) 37 | 38 | @param Wait 39 | @type number 40 | @text ウェイト時間 41 | @desc ロゴを表示する時間(1フレーム: 1/60秒) 42 | デフォルト(120フレーム: 2秒) 43 | @default 120 44 | @min 1 45 | @max 999999999999999 46 | 47 | @param EnableSkip 48 | @type boolean 49 | @text スキップ有効 50 | @desc 決定キーやクリックによるスキップを有効にするか 51 | @on 有効にする(デフォルト) 52 | @off 無効にする 53 | @default true 54 | */ 55 | (() => { 56 | 'use strict'; 57 | 58 | // ベースプラグインの処理 59 | function Potadra_getPluginName(extension = 'js') { 60 | const reg = new RegExp(".+\/(.+)\." + extension); 61 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 62 | } 63 | function Potadra_convertBool(bool) { 64 | if (bool === "false" || bool === '' || bool === undefined) { 65 | return false; 66 | } else { 67 | return true; 68 | } 69 | } 70 | 71 | // パラメータ用定数 72 | const plugin_name = Potadra_getPluginName(); 73 | const params = PluginManager.parameters(plugin_name); 74 | 75 | // 各パラメータ用定数 76 | const Wait = Number(params.Wait || 120); 77 | const EnableSkip = Potadra_convertBool(params.EnableSkip); 78 | 79 | Scene_Splash.prototype.initWaitCount = function() { 80 | if (this.isEnabled()) { 81 | this._waitCount = Wait; 82 | } else { 83 | this._waitCount = 0; 84 | } 85 | }; 86 | 87 | Scene_Splash.prototype.checkSkip = function() { 88 | if (!EnableSkip) return false; 89 | 90 | if (Input.isTriggered("ok") || TouchInput.isTriggered()) { 91 | this._waitCount = 0; 92 | } 93 | }; 94 | })(); 95 | -------------------------------------------------------------------------------- /plugins/System/Ex/ExItem.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | アイテム名参照制御文字 Ver1.2.6(2025/10/4) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/Ex/ExItem.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.2.6: 2つ以上同時に使用出来ないバグ修正 11 | * Ver1.2.5: ヘルプ更新 12 | 13 | Copyright (c) 2025 ポテトードラゴン 14 | Released under the MIT License. 15 | https://opensource.org/license/mit 16 | 17 | @help 18 | ## 概要 19 | アイテム名を参照する制御文字 \II を追加します 20 | 21 | ## 使い方 22 | \II[ポーション] のようにアイテム名を記載すると 23 | [アイコン]ポーション のようにアイコンとアイテム名が表示されるようになります 24 | 25 | アイテム名には、武器や防具も指定することが出来ます 26 | 同じアイテム名がある場合は、最初に見つけたアイテム名が表示されます 27 | */ 28 | (() => { 29 | 'use strict'; 30 | 31 | // ベースプラグインの処理 32 | function Potadra_search(data, id, column = "name", search_column = "id", val = "", initial = 1) { 33 | if (!id) return val; 34 | for (let i = initial; i < data.length; i++) { 35 | if (!data[i]) continue; 36 | if (search_column && data[i][search_column] == id) { 37 | val = column ? data[i][column] : data[i]; 38 | break; 39 | } else if (i == id) { 40 | val = data[i]; 41 | break; 42 | } 43 | } 44 | return val; 45 | } 46 | function Potadra_itemSearch(name, column = false, search_column = "name", val = false, initial = 1) { 47 | const item = Potadra_search($dataItems, name, column, search_column, val, initial); 48 | if (item) return item; 49 | const weapon = Potadra_search($dataWeapons, name, column, search_column, val, initial); 50 | if (weapon) return weapon; 51 | const armor = Potadra_search($dataArmors, name, column, search_column, val, initial); 52 | if (armor) return armor; 53 | return false; 54 | } 55 | 56 | /** 57 | * 制御文字の事前変換 58 | * 実際の描画を始める前に、原則として文字列に変わるものだけを置き換える。 59 | * 文字「\」はエスケープ文字(\e)に変換。 60 | * 61 | * @param {} text - 62 | * @returns {} 63 | */ 64 | const _Window_Base_convertEscapeCharacters = Window_Base.prototype.convertEscapeCharacters; 65 | Window_Base.prototype.convertEscapeCharacters = function(text) { 66 | let tmp_text = _Window_Base_convertEscapeCharacters.apply(this, arguments); 67 | tmp_text = tmp_text.replace(/\x1bII\[(.+?)\]/gi, (_, p1) => 68 | "\x1bI[" + Potadra_itemSearch(p1, 'iconIndex') + "]" + p1 69 | ); 70 | return tmp_text; 71 | }; 72 | })(); 73 | -------------------------------------------------------------------------------- /plugins/Scene/Shop/KeyItem.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 大事なもの売却禁止 Ver1.0.2(2025/1/18) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Scene/Shop/KeyItem.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.2: リファクタリング(class記法に修正) 11 | * Ver1.0.1: コピーライト更新 12 | 13 | Copyright (c) 2025 ポテトードラゴン 14 | Released under the MIT License. 15 | https://opensource.org/license/mit 16 | 17 | @help 18 | ## 概要 19 | ショップで大事なものを一覧に表示しないようにします 20 | 21 | ## 使い方 22 | 初期設定は必要ありません 23 | プラグイン導入だけで動作します 24 | */ 25 | (() => { 26 | 'use strict'; 27 | 28 | //------------------------------------------------------------------------------ 29 | // Window_ShopItemCategory 30 | //------------------------------------------------------------------------------ 31 | // ショップ画面で、通常アイテムや装備品の分類を選択するウィンドウです。 32 | //------------------------------------------------------------------------------ 33 | class Window_ShopItemCategory extends Window_ItemCategory { 34 | /** 35 | * オブジェクト初期化 36 | * 37 | * @param {} rect - 38 | */ 39 | constructor(rect) { 40 | super(rect); 41 | } 42 | 43 | /** 44 | * 桁数の取得 45 | * 46 | * @returns {} 47 | */ 48 | maxCols() { 49 | return 3; 50 | } 51 | 52 | /** 53 | * コマンドリストの作成 54 | */ 55 | makeCommandList() { 56 | if (this.needsCommand("item")) { 57 | this.addCommand(TextManager.item, "item"); 58 | } 59 | if (this.needsCommand("weapon")) { 60 | this.addCommand(TextManager.weapon, "weapon"); 61 | } 62 | if (this.needsCommand("armor")) { 63 | this.addCommand(TextManager.armor, "armor"); 64 | } 65 | }; 66 | } 67 | 68 | /** 69 | * カテゴリウィンドウの作成 70 | */ 71 | Scene_Shop.prototype.createCategoryWindow = function() { 72 | const rect = this.categoryWindowRect(); 73 | this._categoryWindow = new Window_ShopItemCategory(rect); 74 | this._categoryWindow.setHelpWindow(this._helpWindow); 75 | this._categoryWindow.hide(); 76 | this._categoryWindow.deactivate(); 77 | this._categoryWindow.setHandler("ok", this.onCategoryOk.bind(this)); 78 | this._categoryWindow.setHandler("cancel", this.onCategoryCancel.bind(this)); 79 | this.addWindow(this._categoryWindow); 80 | }; 81 | })(); 82 | -------------------------------------------------------------------------------- /plugins/System/Name/NameSwitch.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 名前スイッチ Ver1.0.0(2025/1/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/Name/NameSwitch.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: 名前検索用のパラメータ追加 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 名前でスイッチをON・OFFできるプラグインコマンド「名前スイッチ」を追加します 19 | 20 | ## 使い方 21 | 1. イベントコマンドから、プラグインコマンドを選択 22 | 2. プラグイン名に「NameSwitch」を指定 23 | ※ コマンド名は「名前スイッチ」が自動で選択されます 24 | 3. 引数の「スイッチ名(SwitchName)」にスイッチ名を記載 25 | 4. 引数の「操作(Operation)」でON・OFFを選択 26 | 27 | ### プラグインコマンド説明 28 | 29 | #### 名前スイッチ 30 | 名前でスイッチをON・OFFに出来るプラグインコマンド 31 | 32 | ##### スイッチ名(SwitchName) 33 | スイッチ名を記載 34 | 35 | ##### 操作(Operation) 36 | ON・OFFを選択 37 | 38 | @command switch_name 39 | @text 名前スイッチ 40 | @desc 名前を指定してスイッチを呼び出す 41 | 42 | @arg SwitchName 43 | @type string 44 | @text スイッチ名 45 | @desc スイッチを名前で指定 46 | 47 | @arg switch 48 | @parent SwitchName 49 | @type switch 50 | @text スイッチ名検索用 51 | @desc このパラメータはデータとしては使用しません 52 | 53 | @arg Operation 54 | @type boolean 55 | @text 操作 56 | @desc スイッチをON・OFF設定 57 | @default true 58 | */ 59 | (() => { 60 | 'use strict'; 61 | 62 | // ベースプラグインの処理 63 | function Potadra_getPluginName(extension = 'js') { 64 | const reg = new RegExp(".+\/(.+)\." + extension); 65 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 66 | } 67 | function Potadra_convertBool(bool) { 68 | if (bool === "false" || bool === '' || bool === undefined) { 69 | return false; 70 | } else { 71 | return true; 72 | } 73 | } 74 | 75 | // パラメータ用定数 76 | const plugin_name = Potadra_getPluginName(); 77 | 78 | function switchSearch (name, value) { 79 | for (let i = 0; i < $dataSystem.switches.length; i++) { 80 | if ($dataSystem.switches[i] === name) { 81 | $gameSwitches.setValue(i, value); 82 | return true; 83 | } 84 | } 85 | console.warn('スイッチ「' + name + '」が見つかりません。'); 86 | } 87 | 88 | // プラグインコマンド(名前スイッチ) 89 | PluginManager.registerCommand(plugin_name, "switch_name", args => { 90 | const SwitchName = String(args.SwitchName); 91 | const Operation = Potadra_convertBool(args.Operation); 92 | switchSearch(SwitchName, Operation); 93 | }); 94 | })(); 95 | -------------------------------------------------------------------------------- /plugins/System/Ex/ExLevel.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | Lv参照制御文字 Ver1.0.1(2025/7/22) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/Ex/ExLevel.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.1: アクター名を指定できる機能追加 11 | * Ver1.0.0: 初期版完成 12 | 13 | Copyright (c) 2025 ポテトードラゴン 14 | Released under the MIT License. 15 | https://opensource.org/license/mit 16 | 17 | @help 18 | ## 概要 19 | レベルを参照する制御文字 \Lv を追加します 20 | 21 | ## 使い方 22 | \Lv[アクターID] OR \Lv[アクター名] のように記載すると 23 | 該当するアクター のレベルを参照できるようになります 24 | */ 25 | (() => { 26 | 'use strict'; 27 | 28 | // ベースプラグインの処理 29 | function Potadra_search(data, id, column = "name", search_column = "id", val = "", initial = 1) { 30 | if (!id) return val; 31 | for (let i = initial; i < data.length; i++) { 32 | if (!data[i]) continue; 33 | if (search_column && data[i][search_column] == id) { 34 | val = column ? data[i][column] : data[i]; 35 | break; 36 | } else if (i == id) { 37 | val = data[i]; 38 | break; 39 | } 40 | } 41 | return val; 42 | } 43 | function Potadra_nameSearch(data, name, column = "id", search_column = "name", val = "", initial = 1) { 44 | return Potadra_search(data, name, column, search_column, val, initial); 45 | } 46 | function Potadra_checkName(data, name, val = false) { 47 | if (isNaN(name)) { 48 | return Potadra_nameSearch(data, name.trim(), "id", "name", val); 49 | } 50 | return Number(name || val); 51 | } 52 | 53 | /** 54 | * 制御文字の事前変換 55 | * 実際の描画を始める前に、原則として文字列に変わるものだけを置き換える。 56 | * 文字「\」はエスケープ文字(\e)に変換。 57 | * 58 | * @param {} text - 59 | * @returns {} 60 | */ 61 | const _Window_Base_convertEscapeCharacters = Window_Base.prototype.convertEscapeCharacters; 62 | Window_Base.prototype.convertEscapeCharacters = function(text) { 63 | let tmp_text = _Window_Base_convertEscapeCharacters.apply(this, arguments); 64 | tmp_text = tmp_text.replace(/\x1bLv\[(.+?)\]/gi, (_, p1) => 65 | this.potadraActorLevel(p1) 66 | ); 67 | return tmp_text; 68 | }; 69 | 70 | /** 71 | * アクター n 番のレベルを取得 72 | * 73 | * @param {} n - 74 | * @returns {} 75 | */ 76 | Window_Base.prototype.potadraActorLevel = function(n) { 77 | const actor_id = Potadra_checkName($dataActors, n); 78 | if (!actor_id) return ""; 79 | 80 | return $gameActors.actor(actor_id)._level; 81 | }; 82 | })(); 83 | -------------------------------------------------------------------------------- /plugins/System/Switch/TempSwitches.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 一時スイッチ Ver1.0.3(2022/12/2) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/Switch/TempSwitches.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.3: URLを修正 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | セーブデータとして保持しない一時スイッチを 19 | 操作するプラグインコマンドを追加します 20 | 21 | ## 使い方 22 | 一時スイッチは条件分岐のスクリプトに以下の条件を入れることで参照できます 23 | $gameTemp._TempSwitches[一時スイッチ番号] 24 | 25 | 例: 一時スイッチ番号1を指定する場合 26 | $gameTemp._TempSwitches[1] 27 | 28 | @command temp_switch_on 29 | @text 一時スイッチON 30 | @desc 指定した一時スイッチをONにします 31 | 32 | @arg temp_switch 33 | @type number 34 | @text 一時スイッチ番号 35 | @desc 操作する一時スイッチ番号を指定します 36 | @default 1 37 | @min 0 38 | 39 | @command temp_switch_off 40 | @text 一時スイッチOFF 41 | @desc 指定した一時スイッチをOFFにします 42 | 43 | @arg temp_switch 44 | @type number 45 | @text 一時スイッチ番号 46 | @desc 操作する一時スイッチ番号を指定します 47 | @default 1 48 | @min 0 49 | 50 | @command temp_switch_toggle 51 | @text 一時スイッチトグル 52 | @desc 指定したスイッチのON・OFFを交互に切り替えます 53 | 54 | @arg temp_switch 55 | @type number 56 | @text 一時スイッチ番号 57 | @desc 操作する一時スイッチ番号を指定します 58 | @default 1 59 | @min 0 60 | */ 61 | (() => { 62 | 'use strict'; 63 | 64 | // ベースプラグインの処理 65 | function Potadra_getPluginName(extension = 'js') { 66 | const reg = new RegExp(".+\/(.+)\." + extension); 67 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 68 | } 69 | 70 | // パラメータ用変数 71 | const plugin_name = Potadra_getPluginName(); 72 | 73 | const _Game_Temp_initialize = Game_Temp.prototype.initialize; 74 | Game_Temp.prototype.initialize = function() { 75 | _Game_Temp_initialize.apply(this, arguments); 76 | this._TempSwitches = []; 77 | }; 78 | 79 | // プラグインコマンド(一時スイッチON) 80 | PluginManager.registerCommand(plugin_name, "temp_switch_on", args => { 81 | const temp_switch = Number(args.temp_switch); 82 | $gameTemp._TempSwitches[temp_switch] = true; 83 | }); 84 | 85 | // プラグインコマンド(一時スイッチOFF) 86 | PluginManager.registerCommand(plugin_name, "temp_switch_off", args => { 87 | const temp_switch = Number(args.temp_switch); 88 | $gameTemp._TempSwitches[temp_switch] = false; 89 | }); 90 | 91 | // プラグインコマンド(一時スイッチトグル) 92 | PluginManager.registerCommand(plugin_name, "temp_switch_toggle", args => { 93 | const temp_switch = Number(args.temp_switch); 94 | $gameTemp._TempSwitches[temp_switch] = !$gameTemp._TempSwitches[temp_switch]; 95 | }); 96 | })(); 97 | -------------------------------------------------------------------------------- /plugins/Battle/Tp.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | TP Ver1.0.2(2023/12/9) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Battle/Tp.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.2: TP最大値 を設定する機能追加 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | TPの設定を変更します 19 | 20 | ## 使い方 21 | TP関連のパラメータを必要に応じて変更してください 22 | 23 | @param MaxTp 24 | @type number 25 | @text TP最大値 26 | @desc TPの最大値 27 | @default 100 28 | 29 | @param FixedTp 30 | @type boolean 31 | @text TP初期化固定 32 | @desc TP初期化の値を固定にするか 33 | @on 固定にする 34 | @off 固定にしない 35 | @default true 36 | 37 | @param InitTp 38 | @parent FixedTp 39 | @type number 40 | @text 戦闘開始TP初期値 41 | @desc 戦闘開始時のTP初期値 42 | @default 0 43 | 44 | @param NoChargeTpDamage 45 | @type boolean 46 | @text 被ダメージ時にTPを回復しない 47 | @desc 被ダメージ時にTPを回復するかどうか 48 | @on 回復しない 49 | @off 回復する 50 | @default true 51 | */ 52 | (() => { 53 | 'use strict'; 54 | 55 | // ベースプラグインの処理 56 | function Potadra_getPluginName(extension = 'js') { 57 | const reg = new RegExp(".+\/(.+)\." + extension); 58 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 59 | } 60 | function Potadra_convertNum(value, default_value) { 61 | return Number(value || default_value); 62 | } 63 | function Potadra_convertBool(bool) { 64 | if (bool === "false" || bool === '' || bool === undefined) { 65 | return false; 66 | } else { 67 | return true; 68 | } 69 | } 70 | 71 | // パラメータ用変数 72 | const plugin_name = Potadra_getPluginName(); 73 | const params = PluginManager.parameters(plugin_name); 74 | 75 | // 各パラメータ用変数 76 | const MaxTp = Potadra_convertNum(params.MaxTp, 100); 77 | const FixedTp = Potadra_convertBool(params.FixedTp); 78 | const InitTp = Potadra_convertNum(params.InitTp, 0); 79 | const NoChargeTpDamage = Potadra_convertBool(params.NoChargeTpDamage); 80 | 81 | /** 82 | * TP の最大値を取得 83 | * 84 | * @returns {number} 85 | */ 86 | Game_BattlerBase.prototype.maxTp = function() { 87 | return MaxTp; 88 | }; 89 | 90 | /** 91 | * TP の初期化 92 | */ 93 | if (FixedTp) { 94 | Game_Battler.prototype.initTp = function() { 95 | this.setTp(InitTp); 96 | }; 97 | } 98 | 99 | /** 100 | * 被ダメージによる TP チャージ 101 | * 102 | * @param {} damageRate - 103 | */ 104 | if (NoChargeTpDamage) { 105 | Game_Battler.prototype.chargeTpByDamage = function(damageRate) {}; 106 | } 107 | })(); 108 | -------------------------------------------------------------------------------- /plugins/Game/Bgm/MapBgm.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | マップ戦闘BGM Ver1.2.7(2023/7/3) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Game/Bgm/MapBgm.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.2.7: 戦闘終了ME停止が正しく動作していないバグ修正 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 戦闘になったとき、マップのBGMをそのまま使用します 19 | 20 | ## 使い方 21 | 初期設定は必要ありません 22 | プラグイン導入だけで動作します 23 | 24 | @param MapBgmSwitch 25 | @type switch 26 | @text マップBGMスイッチ 27 | @desc このスイッチがON のときにマップBGMを戦闘BGMにします 28 | 0(なし)の場合は、常にマップBGMとなります 29 | @default 0 30 | 31 | @param StopVictoryMe 32 | @type boolean 33 | @text 戦闘終了ME停止 34 | @desc 戦闘終了MEを止めるか 35 | 止めない場合、BGMを中断して戦闘終了ME が流れます 36 | @on 止める 37 | @off 止めない 38 | @default true 39 | */ 40 | (() => { 41 | 'use strict'; 42 | 43 | // ベースプラグインの処理 44 | function Potadra_getPluginName(extension = 'js') { 45 | const reg = new RegExp(".+\/(.+)\." + extension); 46 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 47 | } 48 | function Potadra_convertBool(bool) { 49 | if (bool === "false" || bool === '' || bool === undefined) { 50 | return false; 51 | } else { 52 | return true; 53 | } 54 | } 55 | function Potadra_checkSwitch(switch_no, bool = true) { 56 | return switch_no === 0 || $gameSwitches.value(switch_no) === bool; 57 | } 58 | 59 | // パラメータ用変数 60 | const plugin_name = Potadra_getPluginName(); 61 | const params = PluginManager.parameters(plugin_name); 62 | 63 | // 各パラメータ用定数 64 | const MapBgmSwitch = Number(params.MapBgmSwitch || 0); 65 | const StopVictoryMe = Potadra_convertBool(params.StopVictoryMe); 66 | 67 | /** 68 | * 戦闘 BGM の演奏 69 | */ 70 | const _BattleManager_playBattleBgm = BattleManager.playBattleBgm; 71 | BattleManager.playBattleBgm = function() { 72 | if (!Potadra_checkSwitch(MapBgmSwitch)) { 73 | _BattleManager_playBattleBgm.apply(this, arguments); 74 | } 75 | }; 76 | 77 | /** 78 | * 戦闘終了 ME の演奏 79 | */ 80 | const _BattleManager_playVictoryMe = BattleManager.playVictoryMe; 81 | BattleManager.playVictoryMe = function() { 82 | if (Potadra_checkSwitch(MapBgmSwitch) && StopVictoryMe) return true; 83 | 84 | _BattleManager_playVictoryMe.apply(this, arguments); 85 | }; 86 | 87 | /** 88 | * 戦闘開始前、マップBGM停止 89 | */ 90 | const _Scene_Map_stopAudioOnBattleStart = Scene_Map.prototype.stopAudioOnBattleStart; 91 | Scene_Map.prototype.stopAudioOnBattleStart = function() { 92 | if (!Potadra_checkSwitch(MapBgmSwitch)) { 93 | _Scene_Map_stopAudioOnBattleStart.apply(this, arguments); 94 | } 95 | }; 96 | })(); 97 | -------------------------------------------------------------------------------- /plugins/Battle/ElementAverage.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 属性平均計算 Ver1.3.6(2022/9/10) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Battle/ElementAverage.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.3.6: 他プラグイン導入時の convertBool が無条件で true を返すバグ修正 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 属性有効度を最大値ではなく、平均値で算出します 19 | 20 | 炎の剣などの属性を含む装備で 21 | ダメージが軽減されるようになります 22 | 23 | ## 使い方 24 | 初期設定は必要ありません 25 | プラグイン導入だけで動作します 26 | 27 | ### 例: 炎の剣でサラマンダーを攻撃する場合 28 | 29 | #### 設定内容 30 | ・炎の剣(武器) 31 | 攻撃時属性: 物理 32 | 攻撃時属性: 炎 33 | 34 | ・サラマンダー(敵キャラ) 35 | 属性有効度: 炎 * 0% 36 | ※ 属性有効度は設定しない場合 100% になるので 37 | この場合、物理の属性有効度は 100% となります 38 | 39 | #### 導入前(最大値で算出) 40 | 全ての属性の中で % が1番高いものが属性有効度となる 41 | [物理(100%), 炎(0%)] => 属性有効度: 100%(属性によるダメージに変動なし) 42 | 43 | #### 導入後(平均値で算出) 44 | 全ての属性の平均値が属性有効度となる 45 | [物理(100%), 炎(0%)] => 属性有効度: 50%(属性によるダメージが 1/2 になる) 46 | 47 | ## パラメータ 48 | 49 | ### 最小値で算出 (Min) 50 | 51 | #### 最小値で算出 (true) 52 | 全ての属性の中で % が1番低いものが属性有効度となる 53 | [物理(100%), 炎(0%)] => 属性有効度: 0%(ダメージ0) 54 | 55 | @param Min 56 | @type boolean 57 | @text 最小値で算出 58 | @desc 最小値で算出するオプションです 59 | @on 最小値で算出 60 | @off 平均値で算出 61 | @default false 62 | */ 63 | (() => { 64 | 'use strict'; 65 | 66 | // ベースプラグインの処理 67 | function Potadra_getPluginName(extension = 'js') { 68 | const reg = new RegExp(".+\/(.+)\." + extension); 69 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 70 | } 71 | function Potadra_convertBool(bool) { 72 | if (bool === "false" || bool === '' || bool === undefined) { 73 | return false; 74 | } else { 75 | return true; 76 | } 77 | } 78 | 79 | // パラメータ用変数 80 | const plugin_name = Potadra_getPluginName(); 81 | const params = PluginManager.parameters(plugin_name); 82 | 83 | // 各パラメータ用変数 84 | const Min = Potadra_convertBool(params.Min); 85 | 86 | /** 87 | * 属性の平均値の取得 88 | * 89 | * @param {} target - 90 | * @param {array} elements - 属性 ID の配列 91 | * @returns {} 与えられた属性の中の平均値を返す 92 | */ 93 | Game_Action.prototype.elementsMaxRate = function(target, elements) { 94 | if (elements.length > 0) { 95 | const rates = elements.map(elementId => target.elementRate(elementId)); 96 | if (Min) { 97 | return Math.min(...rates); 98 | } else { 99 | // 平均値計算 100 | const sum = rates.reduce((r, rate) => r + rate, 0); 101 | return Math.max(1, sum / Math.max(1, rates.length)); 102 | } 103 | } 104 | return 1; 105 | }; 106 | })(); 107 | -------------------------------------------------------------------------------- /plugins/Base/Debug/PluginCount.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | プラグイン数カウント Ver1.0.3(2025/1/18) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Base/Debug/PluginCount.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.3: プラグイン名表示(ShowPlayName)のログレベルを情報に変更 11 | * Ver1.0.2: プラグイン名表示機能を追加 12 | * Ver1.0.1: コンソールログの出力方法を修正 13 | 14 | Copyright (c) 2025 ポテトードラゴン 15 | Released under the MIT License. 16 | https://opensource.org/license/mit 17 | 18 | @help 19 | ## 概要 20 | プラグインの総数とONになっているプラグイン数を表示します 21 | 22 | ## 使い方 23 | 初期設定は必要ありません 24 | プラグイン導入だけで動作します 25 | 26 | @param PlayTest 27 | @type boolean 28 | @text テスト時のみ有効 29 | @desc テスト時のみ有効にするか 30 | @on 有効にする 31 | @off 常に有効 32 | @default true 33 | 34 | @param ShowPlayName 35 | @type boolean 36 | @text プラグイン名表示 37 | @desc プラグイン名を表示するか 38 | @on 表示する 39 | @off 表示しない 40 | @default false 41 | */ 42 | (() => { 43 | 'use strict'; 44 | 45 | // ベースプラグインの処理 46 | function Potadra_getPluginName(extension = 'js') { 47 | const reg = new RegExp(".+\/(.+)\." + extension); 48 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 49 | } 50 | function Potadra_convertBool(bool) { 51 | if (bool === "false" || bool === '' || bool === undefined) { 52 | return false; 53 | } else { 54 | return true; 55 | } 56 | } 57 | function Potadra_getDirPath(dir) { 58 | if (StorageManager.isLocalMode()) { 59 | const path = require("path"); 60 | const base = path.dirname(process.mainModule.filename); 61 | return path.join(base, dir + '/'); 62 | } else { 63 | return dir + '/'; 64 | } 65 | } 66 | function Potadra_isTest(play_test = true) { 67 | return !play_test || Utils.isOptionValid("test"); 68 | } 69 | 70 | // パラメータ用定数 71 | const plugin_name = Potadra_getPluginName(); 72 | const params = PluginManager.parameters(plugin_name); 73 | 74 | // 各パラメータ用定数 75 | const PlayTest = Potadra_convertBool(params.PlayTest); 76 | const ShowPlayName = Potadra_convertBool(params.ShowPlayName); 77 | 78 | function countPlugins() { 79 | const pluginPath = Potadra_getDirPath('js') + 'plugins.js'; 80 | const lines = StorageManager.fsReadFile(pluginPath).split('\n'); 81 | let line_count = 0; 82 | let on_count = 0; 83 | for (let line of lines) { 84 | if (line.includes('name')) { 85 | line = JSON.parse(line.replace(/,$/, '')); 86 | if (ShowPlayName) console.info(line.name); 87 | line_count++; 88 | if (line.status) on_count++; 89 | } 90 | } 91 | console.info('総プラグイン数:' + line_count); 92 | console.info('ONになっているプラグイン数:' + on_count); 93 | } 94 | 95 | if (Potadra_isTest(PlayTest)) countPlugins(); 96 | })(); 97 | -------------------------------------------------------------------------------- /plugins/Scene/Menu/LeftMenu.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 左メニュー Ver1.0.3(2022/9/10) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Scene/Menu/LeftMenu.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.3: 他プラグイン導入時の convertBool が無条件で true を返すバグ修正 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | メニューを左側に表示します 19 | 20 | ## 使い方 21 | 初期設定は必要ありません 22 | プラグイン導入だけで動作します 23 | 24 | @param PageButtonPosition 25 | @type boolean 26 | @text ページ切り替えボタン位置 27 | @desc ページ切り替えボタンの位置 28 | @on 左揃え 29 | @off 右揃え 30 | @default true 31 | */ 32 | (() => { 33 | 'use strict'; 34 | 35 | // ベースプラグインの処理 36 | function Potadra_getPluginName(extension = 'js') { 37 | const reg = new RegExp(".+\/(.+)\." + extension); 38 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 39 | } 40 | function Potadra_convertBool(bool) { 41 | if (bool === "false" || bool === '' || bool === undefined) { 42 | return false; 43 | } else { 44 | return true; 45 | } 46 | } 47 | 48 | // パラメータ用変数 49 | const plugin_name = Potadra_getPluginName(); 50 | const params = PluginManager.parameters(plugin_name); 51 | 52 | // 各パラメータ用定数 53 | const PageButtonPosition = Potadra_convertBool(params.PageButtonPosition); 54 | 55 | /** 56 | * 右手持ちモード 57 | * 58 | * @returns {boolean} true: 右にメニューを配置、false: 左にメニューを配置 59 | */ 60 | Scene_Base.prototype.isRightInputMode = function() { 61 | return false; 62 | }; 63 | 64 | /** 65 | * キャンセルボタン作成 66 | */ 67 | Scene_MenuBase.prototype.createCancelButton = function() { 68 | this._cancelButton = new Sprite_Button("cancel"); 69 | this._cancelButton.x = 0; 70 | this._cancelButton.y = this.buttonY(); 71 | this.addWindow(this._cancelButton); 72 | }; 73 | 74 | /** 75 | * ページ切り替えボタン作成 76 | */ 77 | Scene_MenuBase.prototype.createPageButtons = function() { 78 | this._pageupButton = new Sprite_Button("pageup"); 79 | if (PageButtonPosition) { 80 | this._pageupButton.x = this._cancelButton.width + 4; 81 | } else { 82 | this._pageupButton.x = Graphics.boxWidth - this._cancelButton.width - 4; 83 | } 84 | this._pageupButton.y = this.buttonY(); 85 | const pageupRight = this._pageupButton.x + this._pageupButton.width; 86 | this._pagedownButton = new Sprite_Button("pagedown"); 87 | this._pagedownButton.x = pageupRight + 4; 88 | this._pagedownButton.y = this.buttonY(); 89 | this.addWindow(this._pageupButton); 90 | this.addWindow(this._pagedownButton); 91 | this._pageupButton.setClickHandler(this.previousActor.bind(this)); 92 | this._pagedownButton.setClickHandler(this.nextActor.bind(this)); 93 | }; 94 | })(); 95 | -------------------------------------------------------------------------------- /plugins/Battle/HideCommand.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 戦闘コマンド非表示 Ver1.4.5(2022/9/10) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Battle/HideCommand.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.4.5: 他プラグイン導入時の convertBool が無条件で true を返すバグ修正 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 戦闘コマンドの中で不要なものを非表示に出来ます 19 | 20 | ## 使い方 21 | パラメータで非表示設定が出来るので、不要なものを非表示にしてください 22 | 23 | @param HideAttackCommand 24 | @type boolean 25 | @text 攻撃コマンド非表示 26 | @desc 攻撃コマンド非表示設定 27 | @on 表示しない 28 | @off 表示する 29 | @default false 30 | 31 | @param HideCannotAttack 32 | @type boolean 33 | @text 攻撃コマンド封印時非表示 34 | @desc 攻撃コマンドが封印されている場合非表示にする設定 35 | @on 表示しない 36 | @off 表示する 37 | @default false 38 | 39 | @param HideSkillCommand 40 | @type boolean 41 | @text スキルコマンド非表示 42 | @desc スキルコマンド非表示設定 43 | @on 表示しない 44 | @off 表示する 45 | @default false 46 | 47 | @param HideGuardCommand 48 | @type boolean 49 | @text 防御コマンド非表示 50 | @desc 防御コマンド非表示設定 51 | @on 表示しない 52 | @off 表示する 53 | @default false 54 | 55 | @param HideItemCommand 56 | @type boolean 57 | @text アイテムコマンド非表示 58 | @desc アイテムコマンド非表示設定 59 | @on 表示しない 60 | @off 表示する 61 | @default false 62 | */ 63 | (() => { 64 | 'use strict'; 65 | 66 | // ベースプラグインの処理 67 | function Potadra_getPluginName(extension = 'js') { 68 | const reg = new RegExp(".+\/(.+)\." + extension); 69 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 70 | } 71 | function Potadra_convertBool(bool) { 72 | if (bool === "false" || bool === '' || bool === undefined) { 73 | return false; 74 | } else { 75 | return true; 76 | } 77 | } 78 | 79 | // パラメータ用変数 80 | const plugin_name = Potadra_getPluginName(); 81 | const params = PluginManager.parameters(plugin_name); 82 | 83 | // 各パラメータ用変数 84 | const HideAttackCommand = Potadra_convertBool(params.HideAttackCommand); 85 | const HideCannotAttack = Potadra_convertBool(params.HideCannotAttack); 86 | const HideSkillCommand = Potadra_convertBool(params.HideSkillCommand); 87 | const HideGuardCommand = Potadra_convertBool(params.HideGuardCommand); 88 | const HideItemCommand = Potadra_convertBool(params.HideItemCommand); 89 | 90 | /** 91 | * コマンドリストの作成 92 | */ 93 | Window_ActorCommand.prototype.makeCommandList = function() { 94 | if (this._actor) { 95 | if (!HideAttackCommand) { 96 | if (!HideCannotAttack || HideCannotAttack && this._actor.canAttack()) { 97 | this.addAttackCommand(); 98 | } 99 | } 100 | if (!HideSkillCommand) this.addSkillCommands(); 101 | if (!HideGuardCommand) this.addGuardCommand(); 102 | if (!HideItemCommand) this.addItemCommand(); 103 | } 104 | }; 105 | })(); 106 | -------------------------------------------------------------------------------- /plugins/System/Name/NameCommand.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 名前コマンド Ver1.0.0(2025/10/19) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/Name/NameCommand.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: 安定したのでバージョンを 1.0.0 に変更 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 名前で参照するプラグインコマンドを提供します 19 | 20 | ## 使い方 21 | 22 | ### メンバーの入れ替え 23 | 1. プラグインコマンドを呼び出します 24 | 2. コマンド名『メンバーの入れ替え』を選択します 25 | 3. 引数の『名前』に「アクターの名前」を入力します 26 | 4. 引数の『操作(加える OR 外す)』で、「加える」か「外す」を選択します 27 | 5. 引数の『初期化』で、「メンバーを加えるときに初期化するか」を選択します 28 | 29 | @command swap_actor 30 | @text メンバーの入れ替え 31 | @desc 名前でメンバーの入れ替えをします 32 | 33 | @arg name 34 | @type string 35 | @text 名前 36 | @desc 入れ替えたいメンバーの名称 37 | 38 | @arg actor 39 | @parent name 40 | @type actor 41 | @text アクター名検索用 42 | @desc このパラメータはデータとしては使用しません 43 | 44 | @arg operation 45 | @type boolean 46 | @text 操作(加える OR 外す) 47 | @desc メンバーの入れ替えの操作(加える OR 外す) 48 | @on 加える 49 | @off 外す 50 | @default true 51 | 52 | @arg init 53 | @parent operation 54 | @type boolean 55 | @text 初期化 56 | @desc メンバーの加入時に初期化するか 57 | @on 初期化する 58 | @off 初期化しない 59 | @default false 60 | */ 61 | (() => { 62 | 'use strict'; 63 | 64 | // ベースプラグインの処理 65 | function Potadra_getPluginName(extension = 'js') { 66 | const reg = new RegExp(".+\/(.+)\." + extension); 67 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 68 | } 69 | function Potadra_convertBool(bool) { 70 | if (bool === "false" || bool === '' || bool === undefined) { 71 | return false; 72 | } else { 73 | return true; 74 | } 75 | } 76 | function Potadra_search(data, id, column = "name", search_column = "id", val = "", initial = 1) { 77 | if (!id) return val; 78 | for (let i = initial; i < data.length; i++) { 79 | if (!data[i]) continue; 80 | if (search_column && data[i][search_column] == id) { 81 | val = column ? data[i][column] : data[i]; 82 | break; 83 | } else if (i == id) { 84 | val = data[i]; 85 | break; 86 | } 87 | } 88 | return val; 89 | } 90 | function Potadra_nameSearch(data, name, column = "id", search_column = "name", val = "", initial = 1) { 91 | return Potadra_search(data, name, column, search_column, val, initial); 92 | } 93 | 94 | // パラメータ用変数 95 | const plugin_name = Potadra_getPluginName(); 96 | 97 | // プラグインコマンド(メンバーの入れ替え) 98 | PluginManager.registerCommand(plugin_name, 'swap_actor', function(args) { 99 | const name = String(args.name); 100 | const operation = Potadra_convertBool(args.operation) ? 0 : 1; 101 | const init = Potadra_convertBool(args.operation); 102 | this.command129([Potadra_nameSearch($dataActors, name), operation, init]); 103 | }); 104 | })(); 105 | -------------------------------------------------------------------------------- /plugins/Config/Max/MaxStatus.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | ステータス最大値設定 Ver1.0.0(2025/10/19) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Config/Max/MaxStatus.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: 安定したのでバージョンを 1.0.0 に変更 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 通常能力値の最大値を設定する機能を追加します 19 | 20 | ## 使い方 21 | 1. 最大値を変更したいプラグインパラメータを変更 22 | 2. 能力値が設定した上限に切り替わります 23 | ※ -1 を設定すると無限になります 24 | 25 | @param ActorHPMax 26 | @text アクターHP最大値 27 | @desc アクターのHPの最大値 28 | ※ -1 を設定すると無限になります 29 | @default 99999 30 | @min -1 31 | @max 999999999999999 32 | 33 | @param ActorMPMax 34 | @text アクターMP最大値 35 | @desc アクターのMPの最大値 36 | ※ -1 を設定すると無限になります 37 | @default 99999 38 | @min -1 39 | @max 999999999999999 40 | 41 | @param ActorOtherMax 42 | @text アクターその他能力値最大値 43 | @desc アクターのその他の通常能力値の最大値 44 | ※ -1 を設定すると無限になります 45 | @default 9999 46 | @min -1 47 | @max 999999999999999 48 | 49 | @param EnemyHPMax 50 | @text 敵キャラHP最大値 51 | @desc 敵キャラのHPの最大値 52 | ※ -1 を設定すると無限になります 53 | @default 99999 54 | @min -1 55 | @max 999999999999999 56 | 57 | @param EnemyMPMax 58 | @text 敵キャラMP最大値 59 | @desc 敵キャラのMPの最大値 60 | ※ -1 を設定すると無限になります 61 | @default 99999 62 | @min -1 63 | @max 999999999999999 64 | 65 | @param EnemyOtherMax 66 | @text 敵キャラその他能力値最大値 67 | @desc 敵キャラのその他の通常能力値の最大値 68 | ※ -1 を設定すると無限になります 69 | @default 9999 70 | @min -1 71 | @max 999999999999999 72 | */ 73 | (() => { 74 | 'use strict'; 75 | 76 | // ベースプラグインの処理 77 | function Potadra_getPluginName(extension = 'js') { 78 | const reg = new RegExp(".+\/(.+)\." + extension); 79 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 80 | } 81 | 82 | // パラメータ用定数 83 | const plugin_name = Potadra_getPluginName(); 84 | const params = PluginManager.parameters(plugin_name); 85 | 86 | // 各パラメータ用定数 87 | const ActorHPMax = Number(params.ActorHPMax || 0); 88 | const ActorMPMax = Number(params.ActorMPMax || 0); 89 | const ActorOtherMax = Number(params.ActorOtherMax || 0); 90 | const EnemyHPMax = Number(params.EnemyHPMax || 0); 91 | const EnemyMPMax = Number(params.EnemyMPMax || 0); 92 | const EnemyOtherMax = Number(params.EnemyOtherMax || 0); 93 | 94 | /** 95 | * 通常能力値の最大値取得 96 | * 97 | * @param {} paramId - 98 | * @returns {} 99 | */ 100 | Game_Actor.prototype.paramMax = function(paramId) { 101 | if (paramId === 0) { 102 | return ActorHPMax === -1 ? Infinity : ActorHPMax; 103 | } else if (paramId === 1) { 104 | return ActorMPMax === -1 ? Infinity : ActorMPMax; 105 | } else { 106 | return ActorOtherMax === -1 ? Infinity : ActorOtherMax; 107 | } 108 | }; 109 | Game_Enemy.prototype.paramMax = function(paramId) { 110 | if (paramId === 0) { 111 | return EnemyHPMax === -1 ? Infinity : EnemyHPMax; 112 | } else if (paramId === 1) { 113 | return EnemyMPMax === -1 ? Infinity : EnemyMPMax; 114 | } else { 115 | return EnemyOtherMax === -1 ? Infinity : EnemyOtherMax; 116 | } 117 | }; 118 | })(); 119 | -------------------------------------------------------------------------------- /plugins/Data/Equip/ReleaseEquip.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 装備解放 Ver1.0.3(2025/5/29) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Data/Equip/ReleaseEquip.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.3: リファクタリング(共通処理 Potadra_checkSystem を使うように修正) 11 | * Ver1.0.2: リファクタリング(_stateSteps を states を使うように修正) 12 | * Ver1.0.1: meta データの取得処理を修正 13 | 14 | Copyright (c) 2025 ポテトードラゴン 15 | Released under the MIT License. 16 | https://opensource.org/license/mit 17 | 18 | @help 19 | ## 概要 20 | 装備封印よりも強力な装備解放機能を追加します 21 | 22 | ## 使い方 23 | アクター・職業・武器・防具・ステートのメモ欄に 24 | ID指定の場合 <装備解放: 2> や <装備解放: 盾> などを記載します 25 | すると、装備封印で封印されている装備も装備出来るようになります 26 | 27 | 例: 大剣を片手で持つ大男などを実現できるようになります 28 | 29 | @param ReleaseEquipMetaName 30 | @text 装備解放タグ 31 | @desc 装備解放に使うメモ欄タグの名称 32 | デフォルトは 装備解放 33 | @default 装備解放 34 | */ 35 | (() => { 36 | 'use strict'; 37 | 38 | // ベースプラグインの処理 39 | function Potadra_checkSystem(data, name, val = false) { 40 | if (isNaN(name)) { 41 | for (let i = 1; i < data.length; i++) { 42 | if (name === data[i]) { 43 | return i; 44 | } 45 | } 46 | return val; 47 | } 48 | return Number(name || val); 49 | } 50 | function Potadra_getPluginName(extension = 'js') { 51 | const reg = new RegExp(".+\/(.+)\." + extension); 52 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 53 | } 54 | function Potadra_meta(meta, tag) { 55 | if (meta) { 56 | const data = meta[tag]; 57 | if (data) { 58 | if (data !== true) { 59 | return data.trim(); 60 | } else { 61 | return true; 62 | } 63 | } 64 | } 65 | return false; 66 | } 67 | 68 | // パラメータ用変数 69 | const plugin_name = Potadra_getPluginName(); 70 | const params = PluginManager.parameters(plugin_name); 71 | 72 | // 各パラメータ用定数 73 | const ReleaseEquipMetaName = String(params.ReleaseEquipMetaName || '装備解放'); 74 | 75 | // 装備解放の有無判定 76 | function isReleaseEquip(etypeId, meta) { 77 | const etype = Potadra_meta(meta, ReleaseEquipMetaName); 78 | return Potadra_checkSystem($dataSystem.equipTypes, etype) === etypeId; 79 | } 80 | 81 | /** 82 | * 装備封印の判定 83 | * 84 | * @param {} etypeId - 85 | * @returns {} 86 | */ 87 | Game_Actor.prototype.isEquipTypeSealed = function(etypeId) { 88 | // 装備解放の判定(アクター) 89 | if (isReleaseEquip(etypeId, this.actor().meta)) return false; 90 | 91 | // 装備解放の判定(職業) 92 | if (isReleaseEquip(etypeId, this.currentClass().meta)) return false; 93 | 94 | // 装備解放の判定(武器・防具) 95 | for (const item of this.equips()) { 96 | if (item && isReleaseEquip(etypeId, item.meta)) return false; 97 | } 98 | 99 | // 装備解放の判定(ステート) 100 | for (const state of this.states()) { 101 | if (state && isReleaseEquip(etypeId, state.meta)) return false; 102 | } 103 | 104 | // 装備封印の判定 105 | return this.traitsSet(Game_BattlerBase.TRAIT_EQUIP_SEAL).includes(etypeId); 106 | }; 107 | })(); 108 | -------------------------------------------------------------------------------- /plugins/Battle/DropItemCount.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | ドロップアイテム個数表示 Ver1.3.6(2023/7/12) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Battle/DropItemCount.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.3.6 11 | - アイテムの入手数が1個のとき、メッセージを変更できる機能追加 12 | - ヘルプ修正 13 | 14 | Copyright (c) 2025 ポテトードラゴン 15 | Released under the MIT License. 16 | https://opensource.org/license/mit 17 | 18 | @help 19 | ## 概要 20 | ドロップアイテムの個数をまとめて表示します 21 | 22 | ## 使い方 23 | 同じアイテムを複数落としたときの表示が簡易化されます 24 | 細かい表示内容はパラメータで変更することも出来ます 25 | 26 | ### 導入前 27 | ポーションを手に入れた! 28 | ポーションを手に入れた! 29 | 30 | ### 導入後 31 | ポーションを2個手に入れた! 32 | ※ アイテム名の前にアイコンも表示されます 33 | 34 | @param ObtainItemMessage 35 | @type multiline_string 36 | @text アイテム入手メッセージ 37 | @desc アイテム入手時のメッセージ。無記入の場合、表示しません 38 | %1: アイコン番号 %2: アイテム名 %3: 個数 39 | @default \I[%1]%2を%3個手に入れた! 40 | 41 | @param OneItemMessage 42 | @type multiline_string 43 | @text アイテム1個時入手メッセージ 44 | @desc アイテムが1個のときの入手時のメッセージ。無記入の場合 45 | 使用しません。%1: アイコン番号 %2: アイテム名 %3: 個数 46 | @default 47 | */ 48 | (() => { 49 | 'use strict'; 50 | 51 | // ベースプラグインの処理 52 | function Potadra_getPluginName(extension = 'js') { 53 | const reg = new RegExp(".+\/(.+)\." + extension); 54 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 55 | } 56 | 57 | // パラメータ用変数 58 | const plugin_name = Potadra_getPluginName(); 59 | const params = PluginManager.parameters(plugin_name); 60 | 61 | // 各パラメータ用変数 62 | const ObtainItemMessage = String(params.ObtainItemMessage); 63 | const OneItemMessage = String(params.OneItemMessage); 64 | 65 | /** 66 | * 戦闘の進行を管理する静的クラスです。 67 | * 68 | * @namespace 69 | */ 70 | 71 | /** 72 | * ドロップアイテムの表示 73 | */ 74 | BattleManager.displayDropItems = function() { 75 | // ドロップアイテムを配列で取得 76 | const items = this._rewards.items; 77 | 78 | // ドロップアイテムがない場合は、終了 79 | if (items.length > 0) { 80 | // ドロップアイテムの個数を調べる 81 | const item_counts = {}; 82 | items.forEach(function(item) { 83 | if (item) { 84 | if (item_counts[item.name]) { 85 | item_counts[item.name]++; 86 | } else { 87 | item_counts[item.name] = 1; 88 | } 89 | } 90 | }); 91 | 92 | // ドロップアイテムの表示 93 | const gain_items = []; 94 | $gameMessage.newPage(); 95 | items.forEach(function(item) { 96 | if (item) { 97 | // 同じアイテムを重複して表示しないようにする 98 | if (gain_items.indexOf(item) == -1) { 99 | if (OneItemMessage && item_counts[item.name] === 1) { 100 | $gameMessage.add(OneItemMessage.format(item.iconIndex, item.name, item_counts[item.name])); 101 | } else if (ObtainItemMessage) { 102 | $gameMessage.add(ObtainItemMessage.format(item.iconIndex, item.name, item_counts[item.name])); 103 | } 104 | gain_items.push(item); 105 | } 106 | } 107 | }); 108 | } 109 | }; 110 | })(); 111 | -------------------------------------------------------------------------------- /plugins/System/Save/NoEncrypt.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | セーブ暗号化解除 Ver1.2.6(2024/11/20) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/Save/NoEncrypt.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.2.6: テスト時のみ有効(PlayTest)の説明修正 11 | * Ver1.2.5 12 | - isPlayTest が正しく機能していなかったのを修正 13 | - 一部パラメータの名前変更 14 | - 他プラグイン導入時の convertBool が無条件で true を返すバグ修正 15 | 16 | Copyright (c) 2025 ポテトードラゴン 17 | Released under the MIT License. 18 | https://opensource.org/license/mit 19 | 20 | @help 21 | ## 概要 22 | セーブ内容の暗号化と圧縮をしないように変更します 23 | 24 | ## 使い方 25 | 初期設定は必要ありません 26 | プラグイン導入だけで動作します 27 | 28 | このプラグイン導入前のセーブは、読み書き不可能になるので、一度削除するか 29 | セーブを実施し、上書きしてください 30 | 31 | また、圧縮をしないため、ゲームを公開する前にプラグインをOFFもしくは 32 | 削除することをおすすめします 33 | 34 | @param PlayTest 35 | @type boolean 36 | @text テスト時のみ有効 37 | @desc テスト時のみ有効にするか 38 | @on 有効にする 39 | @off 常に有効 40 | @default true 41 | 42 | @param JsonFormat 43 | @type boolean 44 | @text JSON整形 45 | @desc セーブしたときのJSONを整形するか 46 | @on 整形する 47 | @off 整形しない 48 | @default true 49 | */ 50 | (() => { 51 | 'use strict'; 52 | 53 | // ベースプラグインの処理 54 | function Potadra_getPluginName(extension = 'js') { 55 | const reg = new RegExp(".+\/(.+)\." + extension); 56 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 57 | } 58 | function Potadra_convertBool(bool) { 59 | if (bool === "false" || bool === '' || bool === undefined) { 60 | return false; 61 | } else { 62 | return true; 63 | } 64 | } 65 | function Potadra_isTest(play_test = true) { 66 | return !play_test || Utils.isOptionValid("test"); 67 | } 68 | 69 | // パラメータ用定数 70 | const plugin_name = Potadra_getPluginName(); 71 | const params = PluginManager.parameters(plugin_name); 72 | 73 | // 各パラメータ用定数 74 | const PlayTest = Potadra_convertBool(params.PlayTest); 75 | const JsonFormat = Potadra_convertBool(params.JsonFormat); 76 | 77 | if (Potadra_isTest(PlayTest)) { 78 | if (JsonFormat) { 79 | /** 80 | * 81 | * 82 | * @param {} object - 83 | */ 84 | StorageManager.objectToJson = function(object) { 85 | return new Promise((resolve, reject) => { 86 | try { 87 | const json = JSON.stringify(JsonEx._encode(object, 0), null, 4); 88 | resolve(json); 89 | } catch (e) { 90 | reject(e); 91 | } 92 | }); 93 | }; 94 | } 95 | 96 | /** 97 | * 98 | * 99 | * @param {} saveName - 100 | * @param {} object - 101 | */ 102 | StorageManager.saveObject = function(saveName, object) { 103 | return this.objectToJson(object) 104 | .then(zip => this.saveZip(saveName, zip)); 105 | }; 106 | 107 | /** 108 | * 109 | * 110 | * @param {} saveName - 111 | */ 112 | StorageManager.loadObject = function(saveName) { 113 | return this.loadZip(saveName) 114 | .then(json => this.jsonToObject(json)); 115 | }; 116 | } 117 | })(); 118 | -------------------------------------------------------------------------------- /plugins/System/PartyFloorDamage.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | パーティー床ダメージ率 Ver1.0.3(2025/1/18) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/PartyFloorDamage.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.3: リファクタリング(_stateSteps を states を使うように修正) 11 | * Ver1.0.2: meta データの取得処理を修正 12 | 13 | Copyright (c) 2025 ポテトードラゴン 14 | Released under the MIT License. 15 | https://opensource.org/license/mit 16 | 17 | @help 18 | ## 概要 19 | 特徴の特殊能力値: 床ダメージ率 のパーティー能力版を追加します 20 | 21 | ## 使い方 22 | アクター・職業・武器・防具・ステートのメモ欄に 23 | <床ダメージ率: 50%> を記載します 24 | すると、床ダメージ率がパーティー全体に適用されます 25 | 26 | パーティー床ダメージ率は、通常の床ダメージ率と合わせて 27 | 一番小さい値(ダメージが少なくなる値)が適用されます 28 | 29 | @param PartyFloorDamageMetaName 30 | @text パーティー床ダメージ率タグ 31 | @desc パーティー床ダメージ率に使うメモ欄タグの名称 32 | デフォルトは 床ダメージ率 33 | @default 床ダメージ率 34 | */ 35 | (() => { 36 | 'use strict'; 37 | 38 | // ベースプラグインの処理 39 | function Potadra_getPluginName(extension = 'js') { 40 | const reg = new RegExp(".+\/(.+)\." + extension); 41 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 42 | } 43 | function Potadra_meta(meta, tag) { 44 | if (meta) { 45 | const data = meta[tag]; 46 | if (data) { 47 | if (data !== true) { 48 | return data.trim(); 49 | } else { 50 | return true; 51 | } 52 | } 53 | } 54 | return false; 55 | } 56 | 57 | // パラメータ用変数 58 | const plugin_name = Potadra_getPluginName(); 59 | const params = PluginManager.parameters(plugin_name); 60 | 61 | // 各パラメータ用定数 62 | const PartyFloorDamageMetaName = String(params.PartyFloorDamageMetaName || '床ダメージ率'); 63 | 64 | // パーティー床ダメージの算出 65 | function partyFloorDamage(meta, basicFloorDamage) { 66 | const floor_damage_str = Potadra_meta(meta, PartyFloorDamageMetaName); 67 | if (floor_damage_str) { 68 | return basicFloorDamage * (parseFloat(floor_damage_str) / 100); 69 | } 70 | return basicFloorDamage; 71 | } 72 | 73 | /** 74 | * 床ダメージの処理 75 | */ 76 | Game_Actor.prototype.executeFloorDamage = function() { 77 | const basicFloorDamage = this.basicFloorDamage(); 78 | const floorDamages = [Math.floor(basicFloorDamage * this.fdr), this.maxFloorDamage()]; 79 | 80 | for (const actor of $gameParty.allMembers()) { 81 | // パーティー床ダメージの算出(アクター) 82 | floorDamages.push(partyFloorDamage(actor.actor().meta, basicFloorDamage)); 83 | 84 | // パーティー床ダメージの算出(職業) 85 | floorDamages.push(partyFloorDamage(actor.currentClass().meta, basicFloorDamage)); 86 | 87 | // パーティー床ダメージの算出(武器・防具) 88 | for (const item of actor.equips()) { 89 | if (item) { 90 | floorDamages.push(partyFloorDamage(item.meta, basicFloorDamage)); 91 | } 92 | } 93 | 94 | // パーティー床ダメージの算出(ステート) 95 | // ステート 96 | for (const state of actor.states()) { 97 | if (!state) continue; 98 | 99 | floorDamages.push(partyFloorDamage(state.meta, basicFloorDamage)); 100 | } 101 | } 102 | 103 | const realDamage = Math.min.apply(null, floorDamages); 104 | this.gainHp(-realDamage); 105 | if (realDamage > 0) { 106 | this.performMapDamage(); 107 | } 108 | }; 109 | })(); 110 | -------------------------------------------------------------------------------- /plugins/Config/Option/Peaceful.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | ピースフル Ver1.0.2(2023/7/3) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Config/Option/Peaceful.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.2: オプションの最大値の設定判定が想定より大きくなっていた問題を修正 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | マイクラのピースフルのようにランダムエンカウントを 19 | 無効にするオプションを追加します 20 | 21 | ## 使い方 22 | メニュー > オプション に ピースフルオプションが追加されます 23 | 切り替えることで、ランダムエンカウントを無効にすることが出来ます 24 | 25 | * ピースフルONで、ランダムエンカウント無効 26 | * ピースフルOFFで、ランダムエンカウント有効 27 | 28 | @param NewGameOption 29 | @type boolean 30 | @text ニューゲーム時 31 | @desc ニューゲーム開始時のオプションの状態 32 | @default false 33 | 34 | @param OptionName 35 | @type string 36 | @text ピースフルオプション名 37 | @desc ランダムエンカウントを無効にするオプション名 38 | @default ピースフル 39 | */ 40 | (() => { 41 | 'use strict'; 42 | 43 | // ベースプラグインの処理 44 | function Potadra_getPluginName(extension = 'js') { 45 | const reg = new RegExp(".+\/(.+)\." + extension); 46 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 47 | } 48 | function Potadra_convertBool(bool) { 49 | if (bool === "false" || bool === '' || bool === undefined) { 50 | return false; 51 | } else { 52 | return true; 53 | } 54 | } 55 | 56 | // パラメータ用変数 57 | const plugin_name = Potadra_getPluginName(); 58 | const params = PluginManager.parameters(plugin_name); 59 | 60 | // 各パラメータ用定数 61 | const NewGameOption = Potadra_convertBool(params.NewGameOption); 62 | const OptionName = String(params.OptionName || 'ピースフル'); 63 | 64 | /** 65 | * オプションデータを生成して返す 66 | * 67 | * @returns {} オプションデータ 68 | */ 69 | const _ConfigManager_makeData = ConfigManager.makeData; 70 | ConfigManager.makeData = function() { 71 | const config = _ConfigManager_makeData.apply(this, arguments); 72 | config.peaceful = this.peaceful; 73 | return config; 74 | }; 75 | 76 | /** 77 | * 指定オプションを適用 78 | * 79 | * @param {} config - オプションデータ 80 | */ 81 | const _ConfigManager_applyData = ConfigManager.applyData; 82 | ConfigManager.applyData = function(config) { 83 | _ConfigManager_applyData.apply(this, arguments); 84 | this.peaceful = this.readFlag(config, "peaceful", NewGameOption); 85 | }; 86 | 87 | /** 88 | * オプションの項目数 89 | * ここで指定した値より項目が多い場合、スクロールして表示されます。 90 | * 91 | * @returns {number} オプションの項目数 92 | */ 93 | const _Scene_Options_maxCommands = Scene_Options.prototype.maxCommands; 94 | Scene_Options.prototype.maxCommands = function() { 95 | let max_commands = _Scene_Options_maxCommands.apply(this, arguments); 96 | return max_commands += 1; 97 | }; 98 | 99 | /** 100 | * 101 | */ 102 | const _Window_Options_addGeneralOptions = Window_Options.prototype.addGeneralOptions; 103 | Window_Options.prototype.addGeneralOptions = function() { 104 | _Window_Options_addGeneralOptions.apply(this, arguments); 105 | this.addCommand(OptionName, "peaceful"); 106 | }; 107 | 108 | /** 109 | * エンカウントの更新 110 | */ 111 | Scene_Map.prototype.updateEncounter = function() { 112 | if (ConfigManager.peaceful) { 113 | $gamePlayer.makeEncounterCount(); // ピースフル解除時にエンカウントしてしまうため、エンカウントを再設定する 114 | } else if ($gamePlayer.executeEncounter()) { 115 | SceneManager.push(Scene_Battle); 116 | } 117 | }; 118 | })(); 119 | -------------------------------------------------------------------------------- /plugins/Data/Equip/RetryOptimize.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 最強装備判定リトライ Ver1.0.2(2025/8/6) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Data/Equip/RetryOptimize.js 6 | @orderBefore ExcludeAtOptimize 7 | @target MZ 8 | @author ポテトードラゴン 9 | 10 | ・アップデート情報 11 | * Ver1.0.2: 不要な処理を削除 12 | * Ver1.0.1: 高速化対応 13 | * Ver1.0.0: 初期版完成 14 | 15 | Copyright (c) 2025 ポテトードラゴン 16 | Released under the MIT License. 17 | https://opensource.org/license/mit 18 | 19 | @help 20 | ## 概要 21 | 装備に「武器タイプ装備」や「二刀流」があった場合 22 | 最強装備が正常に反映されないため 23 | 最強装備の装備を実施したあと、もう一度最強装備します 24 | 25 | ## 使い方 26 | 初期設定は必要ありません 27 | プラグイン導入だけで動作します 28 | 29 | @param Optimize 30 | @text 最強装備タグ 31 | @desc 最強装備の優先度を決めるメモ欄タグの名称 32 | デフォルトは 最強装備。武器・防具のメモ欄に記載 33 | @default 最強装備 34 | 35 | @param SkipOptimize 36 | @text Skipタグ 37 | @desc 最強装備対象外の防具のメモ欄タグの名称 38 | デフォルトは Skip 39 | @default Skip 40 | */ 41 | (() => { 42 | 'use strict'; 43 | 44 | // ベースプラグインの処理 45 | function Potadra_getPluginName(extension = 'js') { 46 | const reg = new RegExp(".+\/(.+)\." + extension); 47 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 48 | } 49 | function Potadra_meta(meta, tag) { 50 | if (meta) { 51 | const data = meta[tag]; 52 | if (data) { 53 | if (data !== true) { 54 | return data.trim(); 55 | } else { 56 | return true; 57 | } 58 | } 59 | } 60 | return false; 61 | } 62 | 63 | // パラメータ用変数 64 | const plugin_name = Potadra_getPluginName(); 65 | const params = PluginManager.parameters(plugin_name); 66 | 67 | // 各パラメータ用変数 68 | const Optimize = String(params.Optimize || '最強装備'); 69 | const SkipOptimize = String(params.SkipOptimize || 'Skip'); 70 | 71 | /** 72 | * 最強装備 73 | */ 74 | Game_Actor.prototype.optimizeEquipments = function() { 75 | // 1. 計算中の能力値再計算を無効化 76 | // refreshは非常に重い処理なので、最適化中は一時的に何もしない関数に置き換えます。 77 | const originalRefresh = this.refresh; 78 | this.refresh = function() {}; 79 | 80 | const maxSlots = this.equipSlots().length; 81 | 82 | // 2. 最適化対象の装備をすべて外す 83 | for (let i = 0; i < maxSlots; i++) { 84 | const item = this.equips()[i]; 85 | if (item && Potadra_meta(item.meta, SkipOptimize)) { 86 | continue; 87 | } 88 | if (this.isEquipChangeOk(i)) { 89 | this.changeEquip(i, null); 90 | } 91 | } 92 | 93 | // 3. 最強装備を決定(2回実行して依存関係を解決) 94 | for (let j = 0; j < 2; j++) { 95 | for (let i = 0; i < maxSlots; i++) { 96 | if (this.isEquipChangeOk(i)) { 97 | const best_equip_item = this.bestEquipItem(i); 98 | if (best_equip_item) { 99 | this.changeEquip(i, this.bestEquipItem(i)); 100 | } 101 | } 102 | } 103 | } 104 | 105 | // 4. 処理を元に戻し、最後に一度だけ能力値を再計算 106 | this.refresh = originalRefresh; 107 | this.refresh(); 108 | }; 109 | 110 | /** 111 | * 指定アイテムと装備アイテムの能力の差分の値を返す 112 | * 113 | * @param {RPG.EquipItem} item - アイテム 114 | * @returns {number} 指定アイテムと装備アイテムの能力の差分の値 115 | */ 116 | Game_Actor.prototype.calcEquipItemPerformance = function(item) { 117 | const performance = Potadra_meta(item.meta, Optimize); 118 | return performance ? performance : item.params.reduce((a, b) => a + b); 119 | }; 120 | })(); 121 | -------------------------------------------------------------------------------- /plugins/Config/Option/AutoSave.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | オートセーブオプション Ver1.0.6(2025/1/18) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Config/Option/AutoSave.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.6: ヘルプ更新 11 | * Ver1.0.5: オプションの最大値の設定判定が想定より大きくなっていた問題を修正 12 | 13 | Copyright (c) 2025 ポテトードラゴン 14 | Released under the MIT License. 15 | https://opensource.org/license/mit 16 | 17 | @help 18 | ## 概要 19 | オートセーブの有無を変更するオプションを追加します 20 | 21 | ## 使い方 22 | 1. プラグインを導入 23 | 2. オプションにオートセーブが追加されます 24 | 3. ON で、オートセーブ有効。OFF で、オートセーブを無効にできます 25 | */ 26 | (() => { 27 | 'use strict'; 28 | 29 | // 初期値 30 | ConfigManager.autoSave = false; 31 | 32 | /** 33 | * オプションデータを生成して返す 34 | * 35 | * @returns {} オプションデータ 36 | */ 37 | const _ConfigManager_makeData = ConfigManager.makeData; 38 | ConfigManager.makeData = function() { 39 | const config = _ConfigManager_makeData.apply(this, arguments); 40 | config.autoSave = this.autoSave; 41 | return config; 42 | }; 43 | 44 | /** 45 | * 指定オプションを適用 46 | * 47 | * @param {} config - オプションデータ 48 | */ 49 | const _ConfigManager_applyData = ConfigManager.applyData; 50 | ConfigManager.applyData = function(config) { 51 | _ConfigManager_applyData.apply(this, arguments); 52 | this.autoSave = this.readFlag(config, "autoSave", $dataSystem.optAutosave); 53 | }; 54 | 55 | /** 56 | * オプションの項目数 57 | * ここで指定した値より項目が多い場合、スクロールして表示されます。 58 | * 59 | * @returns {number} オプションの項目数 60 | */ 61 | const _Scene_Options_maxCommands = Scene_Options.prototype.maxCommands; 62 | Scene_Options.prototype.maxCommands = function() { 63 | let max_commands = _Scene_Options_maxCommands.apply(this, arguments); 64 | return max_commands += 1; 65 | }; 66 | 67 | /** 68 | * オートセーブの有効状態 69 | * 70 | * @returns {} 71 | */ 72 | Game_System.prototype.isAutosaveEnabled = function() { 73 | return ConfigManager.autoSave; 74 | }; 75 | 76 | /** 77 | * 78 | */ 79 | const _Window_Options_addGeneralOptions = Window_Options.prototype.addGeneralOptions; 80 | Window_Options.prototype.addGeneralOptions = function() { 81 | _Window_Options_addGeneralOptions.apply(this, arguments); 82 | this.addCommand(TextManager.autosave, "autoSave"); 83 | }; 84 | 85 | // オートセーブ判定 86 | function autoSave(mode, autosave) { 87 | const autoSavefileId = 0; 88 | let save_count = autosave ? autoSavefileId : 1; 89 | 90 | // ロード画面でオートセーブが有効でなくてもオートセーブがあるとき、ロード出来るようにする 91 | if (mode === 'load' && !autosave && DataManager.savefileExists(autoSavefileId)) { 92 | save_count = 0; 93 | } 94 | 95 | return save_count; 96 | } 97 | 98 | /** 99 | * 項目数の取得 100 | * 101 | * @returns {} 102 | */ 103 | Window_SavefileList.prototype.maxItems = function() { 104 | return DataManager.maxSavefiles() - autoSave(this._mode, this._autosave); 105 | }; 106 | 107 | /** 108 | * 109 | * 110 | * @param {} index - 111 | * @returns {} 112 | */ 113 | Window_SavefileList.prototype.indexToSavefileId = function(index) { 114 | return index + autoSave(this._mode, this._autosave); 115 | }; 116 | 117 | /** 118 | * 119 | * 120 | * @param {} savefileId - 121 | * @returns {} 122 | */ 123 | Window_SavefileList.prototype.savefileIdToIndex = function(savefileId) { 124 | return savefileId - autoSave(this._mode, this._autosave); 125 | }; 126 | })(); 127 | -------------------------------------------------------------------------------- /plugins/Config/Option/Snow.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 雪オプション Ver1.0.3(2023/7/3) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Config/Option/Snow.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.3: オプションの最大値の設定判定が想定より大きくなっていた問題を修正 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 雪を降らせるオプションを追加します 19 | 20 | ## 使い方 21 | メニュー > オプション に 雪オプションが追加されます 22 | 切り替えることで、雪を降らすことが出来ます 23 | 24 | * 雪ONで、雪が降ります 25 | * 雪OFFで、雪が止みます 26 | 27 | @param NewGameOption 28 | @type boolean 29 | @text ニューゲーム時 30 | @desc ニューゲーム開始時のオプションの状態 31 | @default false 32 | 33 | @param Power 34 | @type number 35 | @text 雪の強さ 36 | @desc 雪の強さを 1 ~ 9 で設定します 37 | デフォルトは 5 です 38 | @default 5 39 | @min 1 40 | @max 9 41 | 42 | @param OptionName 43 | @type string 44 | @text 雪オプション名 45 | @desc 雪を降らせるオプション名 46 | @default 雪 47 | */ 48 | (() => { 49 | 'use strict'; 50 | 51 | // ベースプラグインの処理 52 | function Potadra_getPluginName(extension = 'js') { 53 | const reg = new RegExp(".+\/(.+)\." + extension); 54 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 55 | } 56 | function Potadra_convertBool(bool) { 57 | if (bool === "false" || bool === '' || bool === undefined) { 58 | return false; 59 | } else { 60 | return true; 61 | } 62 | } 63 | 64 | // パラメータ用変数 65 | const plugin_name = Potadra_getPluginName(); 66 | const params = PluginManager.parameters(plugin_name); 67 | 68 | // 各パラメータ用定数 69 | const NewGameOption = Potadra_convertBool(params.NewGameOption); 70 | const Power = Number(params.Power || 5); 71 | const OptionName = String(params.OptionName || '雪'); 72 | 73 | /** 74 | * オプションデータを生成して返す 75 | * 76 | * @returns {} オプションデータ 77 | */ 78 | const _ConfigManager_makeData = ConfigManager.makeData; 79 | ConfigManager.makeData = function() { 80 | const config = _ConfigManager_makeData.apply(this, arguments); 81 | config.snow = this.snow; 82 | return config; 83 | }; 84 | 85 | /** 86 | * 指定オプションを適用 87 | * 88 | * @param {} config - オプションデータ 89 | */ 90 | const _ConfigManager_applyData = ConfigManager.applyData; 91 | ConfigManager.applyData = function(config) { 92 | _ConfigManager_applyData.apply(this, arguments); 93 | this.snow = this.readFlag(config, "snow", NewGameOption); 94 | }; 95 | 96 | /** 97 | * オプションの項目数 98 | * ここで指定した値より項目が多い場合、スクロールして表示されます。 99 | * 100 | * @returns {number} オプションの項目数 101 | */ 102 | const _Scene_Options_maxCommands = Scene_Options.prototype.maxCommands; 103 | Scene_Options.prototype.maxCommands = function() { 104 | let max_commands = _Scene_Options_maxCommands.apply(this, arguments); 105 | return max_commands += 1; 106 | }; 107 | 108 | /** 109 | * 110 | */ 111 | const _Window_Options_addGeneralOptions = Window_Options.prototype.addGeneralOptions; 112 | Window_Options.prototype.addGeneralOptions = function() { 113 | _Window_Options_addGeneralOptions.apply(this, arguments); 114 | this.addCommand(OptionName, "snow"); 115 | }; 116 | 117 | /** 118 | * 119 | */ 120 | const _Scene_Map_updateMain = Scene_Map.prototype.updateMain; 121 | Scene_Map.prototype.updateMain = function() { 122 | _Scene_Map_updateMain.apply(this, arguments); 123 | if (ConfigManager.snow) { 124 | $gameScreen.changeWeather('snow', Power, 0); 125 | } else { 126 | $gameScreen.changeWeather('none', 0, 0); 127 | } 128 | }; 129 | })(); 130 | -------------------------------------------------------------------------------- /plugins/Data/Skill/Erase.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | ニフラム Ver1.0.0(2022/4/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Data/Skill/Erase.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0 11 | - MITライセンスに変更 12 | - 1.5.0 用にパラメータの一部上限解除 13 | 14 | Copyright (c) 2025 ポテトードラゴン 15 | Released under the MIT License. 16 | https://opensource.org/license/mit 17 | 18 | @help 19 | ## 概要 20 | ドラクエのニフラムと同様の機能を追加します 21 | 22 | ## 使い方 23 | 下記、説明を参考にニフラムの設定をしてください 24 | 25 | ### スキルの設定 26 | 1. ニフラムとするスキルを作成する 27 | 2. スキルのメモに <ニフラム> と記載する 28 | 29 | ### 属性の設定(任意) 30 | 1. ニフラム用の属性を作成する 31 | 2. プラグインパラメータの属性IDに 1. で作成したニフラム用の属性IDを指定する 32 | 33 | #### 敵キャラの設定(任意) 34 | 1. 設定したニフラム用の属性有効度を 0 ~ 100% で設定します 35 | 2. 0 で完全にニフラム無効(ボスなどに指定) 36 | 100% 以上の場合は、命中判定だけ行われます 37 | 38 | @param ElementId 39 | @type number 40 | @text 属性ID 41 | @desc ニフラムの有効度を判定する属性ID 42 | @default 0 43 | @min 0 44 | 45 | @param EraseMessage 46 | @type multiline_string 47 | @text ニフラム成功メッセージ 48 | @desc ニフラム成功時のメッセージ。空文字の場合、表示しません 49 | %1: 敵キャラ名 50 | @default %1を 51 | ひかりのなかへ けしさった! 52 | 53 | @param ActionFailureMessage 54 | @type multiline_string 55 | @text ニフラム失敗メッセージ 56 | @desc ニフラム失敗時のメッセージ。空文字の場合、表示しません 57 | %1: 敵キャラ名 58 | @default %1には効かなかった! 59 | */ 60 | (() => { 61 | 'use strict'; 62 | 63 | // ベースプラグインの処理 64 | function Potadra_getPluginName(extension = 'js') { 65 | const reg = new RegExp(".+\/(.+)\." + extension); 66 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 67 | } 68 | 69 | // パラメータ用変数 70 | const plugin_name = Potadra_getPluginName(); 71 | const params = PluginManager.parameters(plugin_name); 72 | 73 | // 各パラメータ用定数 74 | const ElementId = Number(params.ElementId || 0); 75 | const EraseMessage = String(params.EraseMessage); 76 | const ActionFailureMessage = String(params.ActionFailureMessage); 77 | 78 | // ニフラム実行処理 79 | function Erase(target) { 80 | if ($gameParty.inBattle()) { 81 | target.hide(); 82 | target.clearActions(); 83 | target.clearStates(); 84 | } 85 | } 86 | 87 | // ニフラム判定処理 88 | function isErase(target, item) { 89 | return target.result().isHit() && item.meta['ニフラム'] && Math.random() < EraseRate(target); 90 | } 91 | 92 | // ニフラム有効度取得 93 | function EraseRate(target) { 94 | if (ElementId === 0) { 95 | return 1; 96 | } else { 97 | return target.elementRate(ElementId); 98 | } 99 | } 100 | 101 | /** 102 | * アクション実行 103 | * 104 | * @param {} target - 105 | */ 106 | const _Game_Action_apply = Game_Action.prototype.apply; 107 | Game_Action.prototype.apply = function(target) { 108 | _Game_Action_apply.apply(this, arguments); 109 | const result = target.result(); 110 | result.Erase = isErase(target, this.item()); 111 | if (result.Erase) { 112 | Erase(target); 113 | } 114 | }; 115 | 116 | /** 117 | * 通常アクションの呼び出し 118 | * 119 | * @param {} subject - 120 | * @param {} target - 121 | */ 122 | const _BattleManager_invokeNormalAction = BattleManager.invokeNormalAction; 123 | BattleManager.invokeNormalAction = function(subject, target) { 124 | _BattleManager_invokeNormalAction.apply(this, arguments); 125 | if (this._action.item().meta['ニフラム']) { 126 | this._logWindow.displayErase(this.applySubstitute(target)); 127 | } 128 | }; 129 | 130 | /** 131 | * 行動結果の表示(ニフラム) 132 | * 133 | * @param {} subject - 134 | * @param {} target - 135 | */ 136 | Window_BattleLog.prototype.displayErase = function(target) { 137 | const result = target.result(); 138 | if (result.used && EraseMessage && result.Erase) { 139 | this.push("addText", EraseMessage.format(target.name())); 140 | } else if (ActionFailureMessage) { 141 | this.push("addText", ActionFailureMessage.format(target.name())); 142 | } 143 | }; 144 | })(); 145 | -------------------------------------------------------------------------------- /plugins/Battle/Enemy/ExportEnemy.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 敵キャラ画像出力 Ver1.0.0(2025/1/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Battle/Enemy/ExportEnemy.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: 初期版完成 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | ゲーム起動時に敵キャラの画像(色相付き)を指定のフォルダに出力します 19 | 20 | ## 使い方 21 | 1. パラメータの「出力パス(ExportPath)」で出力するパスを設定 22 | 2. ゲームを起動します 23 | 3. パラメータの「出力パス(ExportPath)」で 24 | 指定したフォルダに敵キャラ画像(色相付き)が出力されます 25 | 26 | ### パラメータ説明 27 | 28 | #### 出力パス(ExportPath) 29 | 敵キャラの画像を出力するパス。デフォルトは /export 30 | 31 | @param ExportPath 32 | @type string 33 | @text 出力パス 34 | @desc 敵キャラの画像を出力するパス 35 | @default /export 36 | */ 37 | (() => { 38 | 'use strict'; 39 | 40 | // ベースプラグインの処理 41 | function Potadra_getPluginName(extension = 'js') { 42 | const reg = new RegExp(".+\/(.+)\." + extension); 43 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 44 | } 45 | function Potadra_getDirPath(dir) { 46 | if (StorageManager.isLocalMode()) { 47 | const path = require("path"); 48 | const base = path.dirname(process.mainModule.filename); 49 | return path.join(base, dir + '/'); 50 | } else { 51 | return dir + '/'; 52 | } 53 | } 54 | 55 | // パラメータ用変数 56 | const plugin_name = Potadra_getPluginName(); 57 | const params = PluginManager.parameters(plugin_name); 58 | 59 | // 各パラメータ用定数 60 | const ExportPath = String(params.ExportPath || '/export'); 61 | 62 | /** 63 | * 開始処理 64 | */ 65 | const _Scene_Boot_start = Scene_Boot.prototype.start; 66 | Scene_Boot.prototype.start = function() { 67 | _Scene_Boot_start.apply(this, arguments); 68 | 69 | if (StorageManager.isLocalMode()) { 70 | // バックアップフォルダ作成 71 | const backupDirPath = Potadra_getDirPath(ExportPath); 72 | StorageManager.fsMkdir(backupDirPath); 73 | 74 | for (let i = 1; i < $dataEnemies.length; i++) { 75 | const enemyId = i; 76 | if ($dataEnemies[enemyId]) { 77 | const enemy = new Game_Enemy(enemyId, 200, 200); 78 | const name = enemy.battlerName(); 79 | const hue = enemy.battlerHue(); 80 | 81 | // 画像が指定されていないデータはスキップ 82 | if (!name) continue; 83 | 84 | const path = require("path"); 85 | const file = backupDirPath + name + ".png"; 86 | const dirName = path.dirname(file); 87 | 88 | // サブフォルダを作成 89 | StorageManager.fsMkdir(dirName); 90 | 91 | let bitmap; 92 | if ($gameSystem.isSideView()) { 93 | bitmap = ImageManager.loadSvEnemy(name); 94 | } else { 95 | bitmap = ImageManager.loadEnemy(name); 96 | } 97 | 98 | bitmap.addLoadListener(() => { 99 | if (bitmap.canvas) { 100 | const canvas = bitmap.canvas; 101 | const context = canvas.getContext('2d'); 102 | context.filter = `hue-rotate(${hue}deg)`; 103 | context.drawImage(canvas, 0, 0); 104 | 105 | const fs = require('fs'); 106 | const exportPath = dirName + '/' + path.basename(name) + hue + ".png"; 107 | if (!fs.existsSync(exportPath)) { 108 | const data = canvas.toDataURL('img/png').replace(/^.*,/, ''); 109 | const buffer = Buffer.from(data, 'base64'); 110 | fs.writeFileSync(exportPath, buffer); 111 | } 112 | } 113 | }); 114 | } 115 | } 116 | } 117 | }; 118 | })(); 119 | -------------------------------------------------------------------------------- /plugins/Scene/Shop/NoSale.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 売却不可 Ver1.0.0(2025/1/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Scene/Shop/NoSale.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: 初期版完成 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 価格が指定されているものも、売却不可にするメモタグを追加します 19 | 20 | ## 使い方 21 | 1. アイテム・武器・防具のメモ欄に<売却不可>または、<売却非表示>と記載します 22 | 2. ショップで売却するときに売却不可になります 23 | 24 | ### メモタグ説明 25 | アイテム・武器・防具のメモ欄に以下のいずれかのタグを記載してください 26 | 27 | <売却不可> 28 | 売却できないようになります。一覧には表示されます 29 | 30 | <売却非表示> 31 | 売却の一覧に表示されないようになります 32 | 33 | ※ タグの名称はプラグインパラメータから変更することも可能です 34 | 35 | ### パラメータ説明 36 | 37 | #### 売却不可タグ(NoSaleMetaName) 38 | <売却不可>タグの名称を指定します 39 | 40 | #### 売却非表示タグ(NoViewMetaName) 41 | <売却非表示>タグの名称を指定します 42 | 43 | @param NoSaleMetaName 44 | @text 売却不可タグ 45 | @desc 売却不可に使うメモ欄タグの名称 46 | デフォルトは 売却不可 47 | @default 売却不可 48 | 49 | @param NoViewMetaName 50 | @text 売却非表示タグ 51 | @desc 売却非表示に使うメモ欄タグの名称 52 | デフォルトは 売却非表示 53 | @default 売却非表示 54 | */ 55 | (() => { 56 | 'use strict'; 57 | 58 | // ベースプラグインの処理 59 | const window_shop_shell_no_sale_params = Potadra_getPluginParams('NoSale'); 60 | const Window_ShopSell_NoSaleMetaName = String(window_shop_shell_no_sale_params.NoSaleMetaName || '売却不可'); 61 | const window_shop_shell_max_price_params = Potadra_getPluginParams('MaxPrice'); 62 | const Window_ShopSell_PriceMetaName = String(window_shop_shell_max_price_params.PriceMetaName || '価格'); 63 | const window_shop_shell_shop_rate_params = Potadra_getPluginParams('ShopRate'); 64 | const Window_ShopSell_BuyRate = window_shop_shell_shop_rate_params ? Number(window_shop_shell_shop_rate_params.BuyRate || 1) : 1; 65 | if (window_shop_shell_no_sale_params || window_shop_shell_max_price_params) { 66 | Window_ShopSell.prototype.isEnabled = function(item) { 67 | if (!item) return false; 68 | if (window_shop_shell_no_sale_params && Potadra_meta(item.meta, Window_ShopSell_NoSaleMetaName)) { 69 | return false; 70 | } 71 | if (window_shop_shell_max_price_params) { 72 | return Potadra_MetaPrice(item, Window_ShopSell_PriceMetaName, Window_ShopSell_BuyRate) > 0; 73 | } else { 74 | return item && item.price > 0; 75 | } 76 | }; 77 | } 78 | function Potadra_MetaPrice(item, price_meta_name, rate = 1) { 79 | const meta_price = Potadra_meta(item.meta, price_meta_name); 80 | return (meta_price ? Number(meta_price) : item.price) * rate; 81 | } 82 | function Potadra_isPlugin(plugin_name) { 83 | return PluginManager._scripts.includes(plugin_name); 84 | } 85 | function Potadra_getPluginParams(plugin_name) { 86 | return Potadra_isPlugin(plugin_name) ? PluginManager.parameters(plugin_name) : false; 87 | } 88 | function Potadra_getPluginName(extension = 'js') { 89 | const reg = new RegExp(".+\/(.+)\." + extension); 90 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 91 | } 92 | function Potadra_meta(meta, tag) { 93 | if (meta) { 94 | const data = meta[tag]; 95 | if (data) { 96 | if (data !== true) { 97 | return data.trim(); 98 | } else { 99 | return true; 100 | } 101 | } 102 | } 103 | return false; 104 | } 105 | 106 | 107 | // パラメータ用定数 108 | const plugin_name = Potadra_getPluginName(); 109 | const params = PluginManager.parameters(plugin_name); 110 | 111 | // 各パラメータ用定数 112 | const NoViewMetaName = String(params.NoViewMetaName || '売却非表示'); 113 | 114 | /** 115 | * アイテムをリストに含めるかどうか 116 | * 117 | * @param {} item - 118 | * @returns {} 119 | */ 120 | const _Window_ItemList_includes = Window_ItemList.prototype.includes; 121 | Window_ShopSell.prototype.includes = function(item) { 122 | let value = _Window_ItemList_includes.apply(this, arguments); 123 | if (item && Potadra_meta(item.meta, NoViewMetaName)) value = false; 124 | return value; 125 | }; 126 | })(); 127 | -------------------------------------------------------------------------------- /plugins/System/Name/NameShop.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 名前ショップ Ver1.3.8(2025/1/18) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/Name/NameShop.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.3.8 11 | - 名前検索用のパラメータ位置変更 12 | - ヘルプ更新 13 | - リファクタリング 14 | * Ver1.3.7: 名前検索用のパラメータ追加 15 | * Ver1.3.6 16 | - 検索時のバグ修正 17 | - 他プラグイン導入時の convertBool が無条件で true を返すバグ修正 18 | 19 | Copyright (c) 2025 ポテトードラゴン 20 | Released under the MIT License. 21 | https://opensource.org/license/mit 22 | 23 | @help 24 | ## 概要 25 | 名前を指定してショップの処理を呼び出します 26 | 27 | ## 使い方 28 | 1. プラグインコマンド「名前ショップ」を選択 29 | 2. プラグインコマンドからショップの設定を実施 30 | 3. イベントを呼び出すと、設定したショップが呼び出されます 31 | 32 | @command name_shop_item 33 | @text 名前ショップ 34 | @desc 名前を指定してショップの処理を呼び出す 35 | 36 | @arg goods 37 | @type struct[] 38 | @text 商品リスト 39 | @desc ショップの商品リスト 40 | 41 | @arg buyOnly 42 | @type boolean 43 | @text 購入のみ 44 | @desc 購入するのみにするか 45 | @on 購入のみ 46 | @off 購入と売却 47 | @default false 48 | */ 49 | 50 | /*~struct~GoodsList: 51 | @param name 52 | @type string 53 | @text 商品名 54 | @desc 商品名(アイテム)を名前で指定 55 | 56 | @param price 57 | @type number 58 | @text 価格 59 | @desc 価格を指定。0: データベースの価格を適用 60 | @default 0 61 | 62 | @param item 63 | @type item 64 | @text アイテム名検索用 65 | @desc このパラメータはデータとしては使用しません 66 | 67 | @param weapon 68 | @type weapon 69 | @text 武器名検索用 70 | @desc このパラメータはデータとしては使用しません 71 | 72 | @param armor 73 | @type armor 74 | @text 防具名検索用 75 | @desc このパラメータはデータとしては使用しません 76 | */ 77 | (() => { 78 | 'use strict'; 79 | 80 | // ベースプラグインの処理 81 | function Potadra_getPluginName(extension = 'js') { 82 | const reg = new RegExp(".+\/(.+)\." + extension); 83 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 84 | } 85 | function Potadra_convertBool(bool) { 86 | if (bool === "false" || bool === '' || bool === undefined) { 87 | return false; 88 | } else { 89 | return true; 90 | } 91 | } 92 | function Potadra_search(data, id, column = "name", search_column = "id", val = "", initial = 1) { 93 | if (!id) return val; 94 | for (let i = initial; i < data.length; i++) { 95 | if (!data[i]) continue; 96 | if (search_column && data[i][search_column] == id) { 97 | val = column ? data[i][column] : data[i]; 98 | break; 99 | } else if (i == id) { 100 | val = data[i]; 101 | break; 102 | } 103 | } 104 | return val; 105 | } 106 | function Potadra_nameSearch(data, name, column = "id", search_column = "name", val = "", initial = 1) { 107 | return Potadra_search(data, name, column, search_column, val, initial); 108 | } 109 | 110 | // パラメータ用変数 111 | const plugin_name = Potadra_getPluginName(); 112 | 113 | // プラグインコマンド(名前ショップ) 114 | PluginManager.registerCommand(plugin_name, "name_shop_item", args => { 115 | const goods = []; 116 | const buy_only = Potadra_convertBool(args.buyOnly); 117 | if (args.goods) { 118 | const good_lists = JSON.parse(args.goods); 119 | let type, val; 120 | 121 | for (const good_list of good_lists) { 122 | const good_data = JSON.parse(good_list); 123 | const name = good_data.name; 124 | const price = good_data.price; 125 | 126 | // アイテム 127 | type = 0; 128 | val = Potadra_nameSearch($dataItems, name); 129 | 130 | if (!val) { 131 | // 武器 132 | type = 1; 133 | val = Potadra_nameSearch($dataWeapons, name); 134 | if (!val) { 135 | // 防具 136 | type = 2; 137 | val = Potadra_nameSearch($dataArmors, name); 138 | } 139 | } 140 | 141 | if (val) { 142 | let set = 0; 143 | if (price > 0) { 144 | set = 1; 145 | } 146 | goods.push([type, val, set, price]); 147 | } 148 | } 149 | } 150 | 151 | SceneManager.push(Scene_Shop); 152 | SceneManager.prepareNextScene(goods, buy_only); 153 | }); 154 | })(); 155 | -------------------------------------------------------------------------------- /plugins/Scene/Shop/ShopRate.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | ショップレート Ver1.3.5(2023/9/11) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Scene/Shop/ShopRate.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.3.5 11 | - ヘルプ追加 12 | - MaxPrice.js と CurrencyUnit.js の競合を解消 13 | 14 | Copyright (c) 2025 ポテトードラゴン 15 | Released under the MIT License. 16 | https://opensource.org/license/mit 17 | 18 | @help 19 | ## 概要 20 | ショップの購入時と売却時のレートを設定します 21 | 22 | ## 使い方 23 | プラグインパラメータの購入レートもしくは、売却レートを変更します 24 | デフォルトはプラグイン導入前と同じになっています 25 | 26 | ・設定例: 購入レートも売却レートも設定方法は一緒です 27 | - 10倍に設定したい場合: 10 28 | - 5倍に設定したい場合 : 5 29 | - 2倍に設定したい場合 : 2 30 | - 価格と同じ : 1 31 | - 半額にしたい場合 : 0.5 32 | - 1/4にしたい場合 : 0.25 33 | - 1/10にしたい場合 : 0.1 34 | 35 | CurrencyUnit.js 導入時は、このプラグインの設定は無効となるため 36 | CurrencyUnit.js のプラグインパラメータで、レート設定を行ってください 37 | 38 | @param BuyRate 39 | @type number 40 | @text 購入レート 41 | @desc 購入倍率 42 | @min 0 43 | @decimals 2 44 | @default 1.00 45 | 46 | @param SellRate 47 | @type number 48 | @text 売却レート 49 | @desc 売却倍率 50 | @min 0 51 | @decimals 2 52 | @default 0.50 53 | */ 54 | (() => { 55 | 'use strict'; 56 | 57 | // ベースプラグインの処理 58 | const common_max_price_params = Potadra_getPluginParams('MaxPrice'); 59 | const CommonPriceMetaName = common_max_price_params ? String(common_max_price_params.PriceMetaName || '価格') : false; 60 | const common_shop_rate_params = Potadra_getPluginParams('ShopRate'); 61 | let CommonBuyRate = common_shop_rate_params ? Number(common_shop_rate_params.BuyRate || 1) : 1; 62 | let CommonSellRate = common_shop_rate_params ? Number(common_shop_rate_params.SellRate || 0.5) : 0.5; 63 | const common_currency_unit_params = Potadra_getPluginParams('CurrencyUnit'); 64 | const CommonCurrencyUnitSwitch = Number(common_currency_unit_params.CurrencyUnitSwitch || 25); 65 | const CommonSecondBuyRate = Number(common_currency_unit_params.SecondBuyRate || 1); 66 | const CommonSecondSellRate = Number(common_currency_unit_params.SecondSellRate || 0.5); 67 | if (common_currency_unit_params) { 68 | CommonBuyRate = Number(common_currency_unit_params.BuyRate || 1); 69 | CommonSellRate = Number(common_currency_unit_params.SellRate || 0.5); 70 | } 71 | Window_ShopBuy.prototype.makeItemList = function() { 72 | this._data = []; 73 | this._price = []; 74 | for (const goods of this._shopGoods) { 75 | const item = this.goodsToItem(goods); 76 | if (item) { 77 | this._data.push(item); 78 | if (common_currency_unit_params && Potadra_isSecound(CommonCurrencyUnitSwitch)) { 79 | this._price.push(goods[2] === 0 ? Potadra_MetaPrice(item, CommonPriceMetaName, CommonSecondBuyRate) : goods[3]); 80 | } else { 81 | this._price.push(goods[2] === 0 ? Potadra_MetaPrice(item, CommonPriceMetaName, CommonBuyRate) : goods[3]); 82 | } 83 | } 84 | } 85 | }; 86 | Scene_Shop.prototype.sellingPrice = function() { 87 | if (common_currency_unit_params && Potadra_isSecound(CommonCurrencyUnitSwitch)) { 88 | return Math.floor(Potadra_MetaPrice(this._item, CommonPriceMetaName, CommonSecondSellRate)); 89 | } else { 90 | return Math.floor(Potadra_MetaPrice(this._item, CommonPriceMetaName, CommonSellRate)); 91 | } 92 | }; 93 | function Potadra_meta(meta, tag) { 94 | if (meta) { 95 | const data = meta[tag]; 96 | if (data) { 97 | if (data !== true) { 98 | return data.trim(); 99 | } else { 100 | return true; 101 | } 102 | } 103 | } 104 | return false; 105 | } 106 | function Potadra_MetaPrice(item, price_meta_name, rate = 1) { 107 | const meta_price = Potadra_meta(item.meta, price_meta_name); 108 | return (meta_price ? Number(meta_price) : item.price) * rate; 109 | } 110 | function Potadra_isSecound(switch_no) { 111 | return $gameSwitches && $gameSwitches.value(switch_no) === true; 112 | } 113 | function Potadra_isPlugin(plugin_name) { 114 | return PluginManager._scripts.includes(plugin_name); 115 | } 116 | function Potadra_getPluginParams(plugin_name) { 117 | return Potadra_isPlugin(plugin_name) ? PluginManager.parameters(plugin_name) : false; 118 | } 119 | 120 | })(); 121 | -------------------------------------------------------------------------------- /plugins/Base/Start/StartPosition.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | ゲーム開始時のプレイヤー位置を固定 Ver1.1.1(2025/5/29) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Base/Start/StartPosition.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.1.1: 初期マップを指定しなかったとき、プレイヤーの向きだけ設定出来るように修正 11 | * Ver1.1.0: MZ1.9.0アップデートにて追加された「@type location」で設定するように変更(再設定が必要になります) 12 | * Ver1.0.0: 初期版完成 13 | 14 | Copyright (c) 2025 ポテトードラゴン 15 | Released under the MIT License. 16 | https://opensource.org/license/mit 17 | 18 | @help 19 | ## 概要 20 | 本番用のゲーム開始時のプレイヤー位置を固定します 21 | 22 | ## 使い方 23 | 本番時のみ、こちらのプラグインの初期位置を参照することで 24 | テストプレイ時に初期位置を変更したときに 25 | いきなりラスボスから始まるのを防ぐためのプラグインです 26 | 27 | 1. プラグインパラメータにて、マップの座標を設定します 28 | 2. テストプレイを実施し、マップの初期位置が正しくなっているかチェックします 29 | 3. プラグインパラメータの 本番時のみ有効(PlayProd)を 30 |  「有効にする(true)」に変更します 31 | 32 | こうすることで、テストプレイ時はマップに指定した初期位置から 33 | 公開時には、プラグインで指定した初期位置からプレイすることが出来ます 34 | 35 | @param PlayProd 36 | @type boolean 37 | @text 本番時のみ有効 38 | @desc 本番時のみ有効にするか 39 | @on 有効にする 40 | @off 常に有効 41 | @default false 42 | 43 | @param map 44 | @type location 45 | @text 初期マップ 46 | @desc 初期マップ情報 47 | @default {"mapId":"0","x":"0","y":"0"} 48 | 49 | @param StartDirection 50 | @type select 51 | @text プレイヤー初期向き 52 | @desc プレイヤーの初期向き 53 | @default 2 54 | @option 下 55 | @value 2 56 | @option 左 57 | @value 4 58 | @option 右 59 | @value 6 60 | @option 上 61 | @value 8 62 | */ 63 | (() => { 64 | 'use strict'; 65 | 66 | // ベースプラグインの処理 67 | function Potadra_getPluginName(extension = 'js') { 68 | const reg = new RegExp(".+\/(.+)\." + extension); 69 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 70 | } 71 | function Potadra_convertBool(bool) { 72 | if (bool === "false" || bool === '' || bool === undefined) { 73 | return false; 74 | } else { 75 | return true; 76 | } 77 | } 78 | function Potadra_convertMap(struct_map, cast = false) { 79 | if (!struct_map) return false; 80 | let map; 81 | try { 82 | map = JSON.parse(struct_map); 83 | } catch(e){ 84 | return false; 85 | } 86 | let map_id = map.mapId; 87 | if (cast) map_id = Number(map_id || 0); 88 | const x = Number(map.x || 0); 89 | const y = Number(map.y || 0); 90 | return {"mapId": map_id, "x": x, "y": y}; 91 | } 92 | function Potadra_isProd(production = true) { 93 | return !production || !Utils.isOptionValid("test"); 94 | } 95 | function Potadra_search(data, id, column = "name", search_column = "id", val = "", initial = 1) { 96 | if (!id) return val; 97 | for (let i = initial; i < data.length; i++) { 98 | if (!data[i]) continue; 99 | if (search_column && data[i][search_column] == id) { 100 | val = column ? data[i][column] : data[i]; 101 | break; 102 | } else if (i == id) { 103 | val = data[i]; 104 | break; 105 | } 106 | } 107 | return val; 108 | } 109 | function Potadra_nameSearch(data, name, column = "id", search_column = "name", val = "", initial = 1) { 110 | return Potadra_search(data, name, column, search_column, val, initial); 111 | } 112 | function Potadra_checkName(data, name, val = false) { 113 | if (isNaN(name)) { 114 | return Potadra_nameSearch(data, name.trim(), "id", "name", val); 115 | } 116 | return Number(name || val); 117 | } 118 | 119 | // パラメータ用定数 120 | const plugin_name = Potadra_getPluginName(); 121 | const params = PluginManager.parameters(plugin_name); 122 | 123 | // 各パラメータ用定数 124 | const PlayProd = Potadra_convertBool(params.PlayProd); 125 | const map = Potadra_convertMap(params.map); 126 | const StartDirection = Number(params.StartDirection || 2); 127 | 128 | if (Potadra_isProd(PlayProd)) { 129 | /** 130 | * ゲーム開始時のプレイヤー位置 131 | */ 132 | Game_Player.prototype.setupForNewGame = function() { 133 | const map_id = Potadra_checkName($dataMapInfos, map.mapId, 0); 134 | if (map_id !== 0) { 135 | this.reserveTransfer(map_id, map.x, map.y, StartDirection, 0); 136 | } else { 137 | const mapId = $dataSystem.startMapId; 138 | const x = $dataSystem.startX; 139 | const y = $dataSystem.startY; 140 | this.reserveTransfer(mapId, x, y, StartDirection, 0); 141 | } 142 | }; 143 | } 144 | })(); 145 | -------------------------------------------------------------------------------- /plugins/Data/Item/ShowSecret.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 隠しアイテム表示 Ver1.0.6(2024/11/20) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Data/Item/ShowSecret.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.6: テスト時のみ有効(PlayTest)の説明修正 11 | * Ver1.0.5 12 | - isPlayTest が正しく機能していなかったのを修正 13 | - 一部パラメータの名前変更 14 | - 他プラグイン導入時の convertBool が無条件で true を返すバグ修正 15 | 16 | Copyright (c) 2025 ポテトードラゴン 17 | Released under the MIT License. 18 | https://opensource.org/license/mit 19 | 20 | @help 21 | ## 概要 22 | メニュー画面のアイテムに隠しアイテムを表示します 23 | 24 | ## 使い方 25 | 初期設定は必要ありません 26 | プラグイン導入だけで動作します 27 | 28 | @param PlayTest 29 | @type boolean 30 | @text テスト時のみ有効 31 | @desc テスト時のみ有効にするか 32 | @on 有効にする 33 | @off 常に有効 34 | @default true 35 | 36 | @param SecretItemA 37 | @type string 38 | @text 隠しアイテムA表示名 39 | @desc 隠しアイテムAの表示名 40 | @default 隠しアイテムA 41 | 42 | @param SecretItemB 43 | @type string 44 | @text 隠しアイテムB表示名 45 | @desc 隠しアイテムBの表示名 46 | @default 隠しアイテムB 47 | */ 48 | (() => { 49 | 'use strict'; 50 | 51 | // ベースプラグインの処理 52 | function Potadra_getPluginName(extension = 'js') { 53 | const reg = new RegExp(".+\/(.+)\." + extension); 54 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 55 | } 56 | function Potadra_convertBool(bool) { 57 | if (bool === "false" || bool === '' || bool === undefined) { 58 | return false; 59 | } else { 60 | return true; 61 | } 62 | } 63 | function Potadra_isTest(play_test = true) { 64 | return !play_test || Utils.isOptionValid("test"); 65 | } 66 | 67 | // パラメータ用変数 68 | const plugin_name = Potadra_getPluginName(); 69 | const params = PluginManager.parameters(plugin_name); 70 | 71 | // 各パラメータ用定数 72 | const PlayTest = Potadra_convertBool(params.PlayTest); 73 | const SecretItemA = String(params.SecretItemA); 74 | const SecretItemB = String(params.SecretItemB); 75 | 76 | if (Potadra_isTest(PlayTest)) { 77 | /** 78 | * アイテム画面で、所持アイテムの一覧を表示するウィンドウです。 79 | * 80 | * @class 81 | */ 82 | 83 | /** 84 | * アイテムをリストに含めるかどうか 85 | * 86 | * @param {} item - 87 | * @returns {} 88 | */ 89 | Window_ItemList.prototype.includes = function(item) { 90 | switch (this._category) { 91 | case "item": 92 | return DataManager.isItem(item) && item.itypeId === 1; 93 | case "weapon": 94 | return DataManager.isWeapon(item); 95 | case "armor": 96 | return DataManager.isArmor(item); 97 | case "keyItem": 98 | return DataManager.isItem(item) && item.itypeId === 2; 99 | case 'SecretItemA': 100 | return DataManager.isItem(item) && item.itypeId === 3; 101 | case 'SecretItemB': 102 | return DataManager.isItem(item) && item.itypeId === 4; 103 | default: 104 | return false; 105 | } 106 | }; 107 | 108 | 109 | /** 110 | * アイテム画面またはショップ画面で、 111 | * 通常アイテムや装備品の分類を選択するウィンドウです。 112 | * 113 | * @class 114 | */ 115 | 116 | /** 117 | * 桁数の取得 118 | * 119 | * @returns {} 120 | */ 121 | Window_ItemCategory.prototype.maxCols = function() { 122 | let max_cols = 2; 123 | if (this.needsCommand("item")) max_cols++; 124 | if (this.needsCommand("weapon")) max_cols++; 125 | if (this.needsCommand("armor")) max_cols++; 126 | if (this.needsCommand("keyItem")) max_cols++; 127 | return max_cols; 128 | }; 129 | 130 | /** 131 | * コマンドリストの作成 132 | */ 133 | Window_ItemCategory.prototype.makeCommandList = function() { 134 | if (this.needsCommand("item")) { 135 | this.addCommand(TextManager.item, "item"); 136 | } 137 | if (this.needsCommand("weapon")) { 138 | this.addCommand(TextManager.weapon, "weapon"); 139 | } 140 | if (this.needsCommand("armor")) { 141 | this.addCommand(TextManager.armor, "armor"); 142 | } 143 | if (this.needsCommand("keyItem")) { 144 | this.addCommand(TextManager.keyItem, "keyItem"); 145 | } 146 | this.addCommand(SecretItemA, 'SecretItemA'); 147 | this.addCommand(SecretItemB, 'SecretItemB'); 148 | }; 149 | } 150 | })(); 151 | -------------------------------------------------------------------------------- /plugins/Game/Event/NameWindow.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 名前ウィンドウ自動化 Ver1.3.6(2024/11/3) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Game/Event/NameWindow.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.3.6: プラグインパラメータの名前ウィンドウ除外イベント名(IgnoreEventName) が機能していなかったバグを修正 11 | * Ver1.3.5: コピーライト更新 12 | 13 | Copyright (c) 2025 ポテトードラゴン 14 | Released under the MIT License. 15 | https://opensource.org/license/mit 16 | 17 | @help 18 | ## 概要 19 | 名前ウィンドウに何も入力してなくてもある程度自動で名前を設定します 20 | 21 | ## 使い方 22 | 初期設定は必要ありません 23 | プラグイン導入だけで動作します 24 | 25 | @param IgnoreEventName 26 | @text 名前ウィンドウ除外イベント名 27 | @desc 通常ウィンドウで文章の表示をするときにイベント名が 28 | この文字列を含む場合、名前ウィンドウを表示しない 29 | @default EV 30 | */ 31 | (() => { 32 | 'use strict'; 33 | 34 | // ベースプラグインの処理 35 | function Potadra_getPluginName(extension = 'js') { 36 | const reg = new RegExp(".+\/(.+)\." + extension); 37 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 38 | } 39 | 40 | // パラメータ用変数 41 | const plugin_name = Potadra_getPluginName(); 42 | const params = PluginManager.parameters(plugin_name); 43 | 44 | // 各パラメータ用変数 45 | const IgnoreEventName = String(params.IgnoreEventName || ''); 46 | 47 | /** 48 | * イベントコマンドを実行するインタプリタです。 49 | * このクラスは Game_Map クラス、Game_Troop クラス、 50 | * Game_Event クラスの内部で使用されます。 51 | * 52 | * @class 53 | */ 54 | 55 | /** 56 | * 文章の表示 57 | * 58 | * @param {array} params - 59 | * 66 | * @returns {} 67 | */ 68 | Game_Interpreter.prototype.command101 = function(params) { 69 | if ($gameMessage.isBusy()) { 70 | return false; 71 | } 72 | 73 | $gameMessage.setFaceImage(params[0], params[1]); 74 | $gameMessage.setBackground(params[2]); 75 | $gameMessage.setPositionType(params[3]); 76 | 77 | if (params[4]) { 78 | // 名前が指定されている場合は、そちらを表示する 79 | $gameMessage.setSpeakerName(params[4]); 80 | } else if (params[2] == 0) { 81 | // 通常ウィンドウの場合 82 | const event_name = $dataMap.events[this._eventId].name; 83 | if (event_name.includes(IgnoreEventName)) { 84 | // IgnoreEventName で指定されているイベント名の場合、名前ウィンドウは表示しない 85 | } else if (params[0]) { 86 | // 顔グラフィックが指定されている場合 87 | const event = $gameMap._events[this._eventId]; 88 | const image = event.page().image; 89 | 90 | if (image.characterName === params[0] && image.characterIndex === params[1]) { 91 | // 現在のページの歩行グラフィックと 92 | // 文章の表示の顔グラフィックが一致した場合 93 | // イベント名を名前として表示 94 | $gameMessage.setSpeakerName(event_name); 95 | } else { 96 | // 現在のページの歩行グラフィックと 97 | // データベースのアクターの歩行グラフィックが一致した場合 98 | // アクターの名前を名前として表示 99 | for (let i = 1; i < $dataActors.length; i++) { 100 | const actor = $dataActors[i]; 101 | if (actor.characterName == params[0] && actor.characterIndex == params[1]) { 102 | $gameMessage.setSpeakerName(actor.name); 103 | break; 104 | } 105 | } 106 | } 107 | } else { 108 | // 顔グラフィックが指定されていない場合、イベント名を名前として表示 109 | $gameMessage.setSpeakerName(event_name); 110 | } 111 | } 112 | 113 | while (this.nextEventCode() === 401) { 114 | // Text data 115 | this._index++; 116 | $gameMessage.add(this.currentCommand().parameters[0]); 117 | } 118 | 119 | switch (this.nextEventCode()) { 120 | case 102: // Show Choices 121 | this._index++; 122 | this.setupChoices(this.currentCommand().parameters); 123 | break; 124 | case 103: // Input Number 125 | this._index++; 126 | this.setupNumInput(this.currentCommand().parameters); 127 | break; 128 | case 104: // Select Item 129 | this._index++; 130 | this.setupItemChoice(this.currentCommand().parameters); 131 | break; 132 | } 133 | 134 | this.setWaitMode("message"); 135 | 136 | return true; 137 | }; 138 | })(); 139 | -------------------------------------------------------------------------------- /plugins/Scene/Battle/SkillMV.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 戦闘スキル・アイテム選択MV風 Ver1.0.4(2024/9/22) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Scene/Battle/SkillMV.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.4: 敵キャラ選択キャンセル時にアクターのステータスウィンドウが表示されなくなるバグ修正 11 | * Ver1.0.3: 他プラグイン導入時の convertBool が無条件で true を返すバグ修正 12 | 13 | Copyright (c) 2025 ポテトードラゴン 14 | Released under the MIT License. 15 | https://opensource.org/license/mit 16 | 17 | @help 18 | ## 概要 19 | 戦闘中のスキルとアイテム選択をMV風に変更します 20 | 21 | ## 使い方 22 | 初期設定は必要ありません 23 | プラグイン導入だけで動作します 24 | 25 | @param CancelButtonPosition 26 | @type boolean 27 | @text キャンセルボタン位置 28 | @desc キャンセルボタンの位置 29 | @on 左揃え 30 | @off 右揃え 31 | @default false 32 | 33 | @param CommandAndStatusShow 34 | @type boolean 35 | @text コマンド・ステータス表示可否 36 | @desc コマンド・ステータスの表示可否 37 | @on 表示する 38 | @off 表示しない 39 | @default true 40 | */ 41 | (() => { 42 | 'use strict'; 43 | 44 | // ベースプラグインの処理 45 | function Potadra_getPluginName(extension = 'js') { 46 | const reg = new RegExp(".+\/(.+)\." + extension); 47 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 48 | } 49 | function Potadra_convertBool(bool) { 50 | if (bool === "false" || bool === '' || bool === undefined) { 51 | return false; 52 | } else { 53 | return true; 54 | } 55 | } 56 | 57 | // パラメータ用変数 58 | const plugin_name = Potadra_getPluginName(); 59 | const params = PluginManager.parameters(plugin_name); 60 | 61 | // 各パラメータ用定数 62 | const CancelButtonPosition = Potadra_convertBool(params.CancelButtonPosition); 63 | const CommandAndStatusShow = Potadra_convertBool(params.CommandAndStatusShow); 64 | 65 | /** 66 | * スキルウィンドウのサイズ指定(アイテムウィンドウもデフォルトはこちらで設定) 67 | * 68 | * @returns {} 69 | */ 70 | Scene_Battle.prototype.skillWindowRect = function() { 71 | const ww = Graphics.boxWidth; 72 | let skill_height = Graphics.height - (this.helpAreaTop() + this._helpWindow.height); 73 | // コマンド・ステータスを表示する場合、その分だけスキルウィンドウのサイズを小さくする 74 | if (CommandAndStatusShow) { 75 | skill_height -= Math.max(this._statusWindow.height, this._actorCommandWindow.height); 76 | } 77 | const calc = Math.floor(skill_height / 48); 78 | const wh = this.calcWindowHeight(calc, true); 79 | const wx = 0; 80 | const wy = this.helpAreaTop() + this.helpAreaHeight(); 81 | return new Rectangle(wx, wy, ww, wh); 82 | }; 83 | 84 | /** 85 | * ヘルプ位置 86 | * 87 | * @returns {} 88 | */ 89 | Scene_Battle.prototype.helpAreaTop = function() { 90 | return 48; 91 | }; 92 | 93 | /** 94 | * キャンセルボタン作成 95 | */ 96 | Scene_Battle.prototype.createCancelButton = function() { 97 | this._cancelButton = new Sprite_Button("cancel"); 98 | if (CancelButtonPosition) { 99 | this._cancelButton.x = 4; 100 | } else { 101 | this._cancelButton.x = Graphics.boxWidth - this._cancelButton.width - 4; 102 | } 103 | this._cancelButton.y = 0; 104 | this.addWindow(this._cancelButton); 105 | }; 106 | 107 | /** 108 | * コマンド[スキル] 109 | */ 110 | Scene_Battle.prototype.commandSkill = function() { 111 | this._skillWindow.setActor(BattleManager.actor()); 112 | this._skillWindow.setStypeId(this._actorCommandWindow.currentExt()); 113 | this._skillWindow.refresh(); 114 | this._skillWindow.show(); 115 | this._skillWindow.activate(); 116 | if (!CommandAndStatusShow) { 117 | this._statusWindow.hide(); 118 | this._actorCommandWindow.hide(); 119 | } 120 | }; 121 | 122 | /** 123 | * コマンド[アイテム] 124 | */ 125 | Scene_Battle.prototype.commandItem = function() { 126 | this._itemWindow.refresh(); 127 | this._itemWindow.show(); 128 | this._itemWindow.activate(); 129 | if (!CommandAndStatusShow) { 130 | this._statusWindow.hide(); 131 | this._actorCommandWindow.hide(); 132 | } 133 | }; 134 | 135 | /** 136 | * 137 | */ 138 | const _Scene_Battle_onSelectAction = Scene_Battle.prototype.onSelectAction; 139 | Scene_Battle.prototype.onSelectAction = function() { 140 | this._skillWindow.hide(); 141 | this._itemWindow.hide(); 142 | _Scene_Battle_onSelectAction.apply(this, arguments); 143 | }; 144 | 145 | /** 146 | * 敵キャラ[キャンセル] 147 | */ 148 | const _Scene_Battle_onEnemyCancel = Scene_Battle.prototype.onEnemyCancel; 149 | Scene_Battle.prototype.onEnemyCancel = function() { 150 | this._statusWindow.show(); 151 | _Scene_Battle_onEnemyCancel.apply(this, arguments); 152 | }; 153 | })(); 154 | -------------------------------------------------------------------------------- /plugins/System/MoveSpeed.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 移動速度変更 Ver1.0.0(2025/1/18) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/MoveSpeed.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: リファクタリング(_stateSteps を states を使うように修正) 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 歩行速度とダッシュ速度を変更できる機能を追加します 19 | 20 | ## 使い方 21 | 22 | ### 共通設定 23 | プラグインパラメータの歩行速度倍率 OR ダッシュ速度倍率を変更してください 24 | 変更した倍率の速度で移動するようになります 25 | 26 | ### メモタグ設定 27 | アクター・職業・武器・防具・ステートに移動速度を変更できるメモを追加します 28 | <移動速度: 歩行速度倍率, ダッシュ速度倍率, 優先度> 29 | 30 | 例: <移動速度: 1.8, 1,8, 0> 31 | => 歩行速度: 1.8倍、ダッシュ速度: 1.8倍、優先度: 0 となる 32 | 33 | #### 歩行速度倍率 34 | 通常の歩行速度を 1 とした倍率を指定します 35 | 36 | #### ダッシュ速度倍率 37 | 通常のダッシュ速度を 1 とした倍率を指定します 38 | 39 | #### 優先度 40 | 他の設定との優先度を指定します 41 | 速度変更設定が複数ある場合、この優先度が高い速度となります 42 | 43 | 優先度が同じ場合は、一番倍率の低い(一番遅い)設定が適用されます 44 | 45 | @param Walk 46 | @type number 47 | @text 歩行速度倍率 48 | @desc 歩行の速度倍率 49 | 通常の歩行速度を 1 とした倍率。デフォルト値は 1.5 50 | @default 1.5 51 | @decimals 2 52 | 53 | @param Dash 54 | @type number 55 | @text ダッシュ速度倍率 56 | @desc ダッシュの速度倍率 57 | 通常のダッシュ速度を 1 とした倍率。デフォルト値は 1.5 58 | @default 1.5 59 | @decimals 2 60 | 61 | @param MoveSpeedMetaName 62 | @text 移動速度タグ 63 | @desc 移動速度に使うメモ欄タグの名称 64 | デフォルトは 移動速度 65 | @default 移動速度 66 | */ 67 | (() => { 68 | 'use strict'; 69 | 70 | // ベースプラグインの処理 71 | function Potadra_getPluginName(extension = 'js') { 72 | const reg = new RegExp(".+\/(.+)\." + extension); 73 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 74 | } 75 | function Potadra_metaData(meta_data, delimiter = '\n') { 76 | if (meta_data) { 77 | const data = meta_data.split(delimiter); 78 | if (data) return data.map(datum => datum.trim()); 79 | } 80 | return false; 81 | } 82 | 83 | // パラメータ用変数 84 | const plugin_name = Potadra_getPluginName(); 85 | const params = PluginManager.parameters(plugin_name); 86 | 87 | // 各パラメータ用定数 88 | const Walk = Number(params.Walk || 1.5); 89 | const Dash = Number(params.Dash || 1.5); 90 | const MoveSpeedMetaName = String(params.MoveSpeedMetaName || '移動速度'); 91 | 92 | function convert(data) { 93 | let walk = Number(data[0]); 94 | let dash = Number(data[1]); 95 | let priority = Number(data[2]); 96 | return [walk, dash, priority]; 97 | } 98 | 99 | // 移動速度タグチェック 100 | function checkSpeed(walk, dash, priority, data) { 101 | if (!data) return false; 102 | 103 | const [new_walk, new_dash, new_priority] = convert(data); 104 | 105 | // 優先度が高い場合、無条件で置き換え 106 | // 優先度が同じの場合、歩行速度 OR ダッシュ速度が遅いものを置き換え 107 | const value = new_priority > priority || (new_priority === priority && (new_walk < walk || new_dash < dash)); 108 | return value ? [new_walk, new_dash, new_priority] : false; 109 | } 110 | 111 | /** 112 | * 1 フレームあたりの移動距離を計算 113 | * 114 | * @returns {} 115 | */ 116 | const _Game_CharacterBase_distancePerFrame = Game_CharacterBase.prototype.distancePerFrame; 117 | Game_CharacterBase.prototype.distancePerFrame = function() { 118 | let walk = Walk; 119 | let dash = Dash; 120 | let priority = -999999999999999; 121 | let new_data = []; 122 | 123 | for (const actor of $gameParty.allMembers()) { 124 | // 移動速度(アクター) 125 | let data = Potadra_metaData(actor.actor().meta[MoveSpeedMetaName], ','); 126 | if (data) [walk, dash, priority] = convert(data); 127 | 128 | // 移動速度(職業) 129 | data = Potadra_metaData(actor.currentClass().meta[MoveSpeedMetaName], ','); 130 | new_data = checkSpeed(walk, dash, priority, data); 131 | if (new_data) [walk, dash, priority] = new_data; 132 | 133 | // 移動速度(武器・防具) 134 | for (const item of actor.equips()) { 135 | if (item) { 136 | data = Potadra_metaData(item.meta[MoveSpeedMetaName], ','); 137 | new_data = checkSpeed(walk, dash, priority, data); 138 | if (new_data) [walk, dash, priority] = new_data; 139 | } 140 | } 141 | 142 | // 移動速度(ステート) 143 | for (const state of actor.states()) { 144 | data = Potadra_metaData(state.meta[MoveSpeedMetaName], ','); 145 | new_data = checkSpeed(walk, dash, priority, data); 146 | if (new_data) [walk, dash, priority] = new_data; 147 | } 148 | } 149 | 150 | let rate = this.isDashing() ? dash : walk; 151 | const value = _Game_CharacterBase_distancePerFrame.apply(this, arguments); 152 | return value * rate; 153 | }; 154 | })(); 155 | -------------------------------------------------------------------------------- /plugins/Data/Item/ReincarnationItem.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 転生アイテム Ver1.2.1(2023/12/9) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Data/Item/ReincarnationItem.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.2.1 11 | - リファクタリング 12 | - ヘルプ修正 13 | 14 | Copyright (c) 2025 ポテトードラゴン 15 | Released under the MIT License. 16 | https://opensource.org/license/mit 17 | 18 | @help 19 | ## 概要 20 | メモ欄のタグで指定したレベルで使用可能になる転生アイテムを追加します 21 | 22 | ## 使い方 23 | 1. 転生用アイテムを作成します 24 | 2. アイテムのメモ欄に以下のメモを記載します 25 | ※ スキルに設定すると転生用スキルを作成することができます 26 | 27 | <転生:99,1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1> 28 | => 転生の設定を 29 | 転生可能Lv,転生後Lv,最大HP,最大MP,攻撃力,防御力,魔法力,魔法防御,敏捷性,運 30 | で指定します 31 | 32 | ・転生可能Lv 33 | 転生可能になるレベルを指定します 34 | 35 | ・転生後Lv 36 | 転生アイテムを使った後のレベルを指定します 37 | 38 | ・最大HP 39 | 転生後に加算される最大HPを指定します 40 | 転生後、アクターの最大HP × このパラメータ が加算されます 41 | 42 | ・最大MP 43 | 転生後に加算される最大MPを指定します 44 | 転生後、アクターの最大MP × このパラメータ が加算されます 45 | 46 | ・攻撃力 47 | 転生後に加算される攻撃力を指定します 48 | 転生後、アクターの攻撃力 × このパラメータ が加算されます 49 | 50 | ・防御力 51 | 転生後に加算される防御力を指定します 52 | 転生後、アクターの防御力 × このパラメータ が加算されます 53 | 54 | ・魔法力 55 | 転生後に加算される魔法力を指定します 56 | 転生後、アクターの魔法力 × このパラメータ が加算されます 57 | 58 | ・魔法防御 59 | 転生後に加算される魔法防御を指定します 60 | 転生後、アクターの魔法防御 × このパラメータ が加算されます 61 | 62 | ・敏捷性 63 | 転生後に加算される敏捷性を指定します 64 | 転生後、アクターの敏捷性 × このパラメータ が加算されます 65 | 66 | ・運 67 | 転生後に加算される運を指定します 68 | 転生後、アクターの運 × このパラメータ が加算されます 69 | 70 | 転生後の能力値の増加率のレートは、0.1 にすると 71 | 現在の能力の 1/10 が加算されます 72 | 73 | @param ReincarnationMetaName 74 | @text 転生タグ 75 | @desc 転生に使うメモ欄タグの名称 76 | デフォルトは 転生 77 | @default 転生 78 | */ 79 | (() => { 80 | 'use strict'; 81 | 82 | // ベースプラグインの処理 83 | function Potadra_getPluginName(extension = 'js') { 84 | const reg = new RegExp(".+\/(.+)\." + extension); 85 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 86 | } 87 | function Potadra_metaData(meta_data, delimiter = '\n') { 88 | if (meta_data) { 89 | const data = meta_data.split(delimiter); 90 | if (data) return data.map(datum => datum.trim()); 91 | } 92 | return false; 93 | } 94 | 95 | // パラメータ用変数 96 | const plugin_name = Potadra_getPluginName(); 97 | const params = PluginManager.parameters(plugin_name); 98 | 99 | // 各パラメータ用変数 100 | const ReincarnationMetaName = String(params.ReincarnationMetaName || "転生"); 101 | 102 | /** 103 | * アクション実行 104 | * 105 | * @param {} target - 106 | */ 107 | const _Game_Action_apply = Game_Action.prototype.apply; 108 | Game_Action.prototype.apply = function(target) { 109 | _Game_Action_apply.apply(this, arguments); 110 | applyReincarnation(this, target); 111 | }; 112 | 113 | /** 114 | * 転生 115 | * 116 | * @param {} item - 117 | * @param {} target - 118 | */ 119 | function applyReincarnation(action, target) { 120 | const item = action.item(); 121 | const data = Potadra_metaData(item.meta[ReincarnationMetaName], ','); 122 | if (testApplyReincarnation(target, data)) { 123 | const LV = Number(data[1] || 1); 124 | const MHP = Number(data[2] || 0.1); 125 | const MMP = Number(data[3] || 0.1); 126 | const ATK = Number(data[4] || 0.1); 127 | const DEF = Number(data[5] || 0.1); 128 | const MAT = Number(data[6] || 0.1); 129 | const MDF = Number(data[7] || 0.1); 130 | const AGI = Number(data[8] || 0.1); 131 | const LUK = Number(data[9] || 0.1); 132 | target.addParam(0, Math.floor(target.mhp * MHP)); 133 | target.addParam(1, Math.floor(target.mmp * MMP)); 134 | target.addParam(2, Math.floor(target.atk * ATK)); 135 | target.addParam(3, Math.floor(target.def * DEF)); 136 | target.addParam(4, Math.floor(target.mat * MAT)); 137 | target.addParam(5, Math.floor(target.mdf * MDF)); 138 | target.addParam(6, Math.floor(target.agi * AGI)); 139 | target.addParam(7, Math.floor(target.luk * LUK)); 140 | target.changeLevel(LV, false); 141 | } 142 | action.makeSuccess(target); 143 | } 144 | 145 | /** 146 | * アイテム使用可能判定 147 | * 148 | * @param {} target - 149 | */ 150 | const _Game_Action_testApply = Game_Action.prototype.testApply; 151 | Game_Action.prototype.testApply = function(target) { 152 | const test_apply = _Game_Action_testApply.apply(this, arguments); 153 | return test_apply || testApplyReincarnation(target, this.item()); 154 | }; 155 | 156 | /** 157 | * 転生アイテム使用可能判定 158 | * アクターのレベル >= 転生アイテムのレベル で使用可能 159 | * 160 | * @param {} target - 161 | * @param {} item - 162 | */ 163 | function testApplyReincarnation(target, data) { 164 | if (data) { 165 | return target.level >= Number(data[0]); 166 | } else { 167 | return false; 168 | } 169 | } 170 | })(); 171 | -------------------------------------------------------------------------------- /plugins/System/Save/CustomSave.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | セーブ内容カスタマイズ Ver1.0.0(2025/10/19) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/System/Save/CustomSave.js 6 | @orderAfter NoEncrypt 7 | @target MZ 8 | @author ポテトードラゴン 9 | 10 | ・アップデート情報 11 | * Ver1.0.0: 安定したのでバージョンを 1.0.0 に変更 12 | 13 | Copyright (c) 2025 ポテトードラゴン 14 | Released under the MIT License. 15 | https://opensource.org/license/mit 16 | 17 | @help 18 | ## 概要 19 | セーブ内容のカスタマイズを実施します 20 | 21 | ## 使い方 22 | パラメータの設定を変更し、必要なセーブデータを選択してください 23 | 24 | @param System 25 | @type boolean 26 | @text システム 27 | @desc システムのセーブデータを保存するか 28 | @on 保存する 29 | @off 保存しない 30 | @default true 31 | 32 | @param Screen 33 | @type boolean 34 | @text スクリーン 35 | @desc スクリーンのセーブデータを保存するか 36 | @on 保存する 37 | @off 保存しない 38 | @default true 39 | 40 | @param Timer 41 | @type boolean 42 | @text タイマー 43 | @desc タイマーのセーブデータを保存するか 44 | @on 保存する 45 | @off 保存しない 46 | @default true 47 | 48 | @param Switches 49 | @type boolean 50 | @text スイッチ 51 | @desc スイッチのセーブデータを保存するか 52 | @on 保存する 53 | @off 保存しない 54 | @default true 55 | 56 | @param Variables 57 | @type boolean 58 | @text 変数 59 | @desc 変数のセーブデータを保存するか 60 | @on 保存する 61 | @off 保存しない 62 | @default true 63 | 64 | @param SelfSwitches 65 | @type boolean 66 | @text セルフスイッチ 67 | @desc セルフスイッチのセーブデータを保存するか 68 | @on 保存する 69 | @off 保存しない 70 | @default true 71 | 72 | @param Actor 73 | @type boolean 74 | @text アクター 75 | @desc アクターのセーブデータを保存するか 76 | @on 保存する 77 | @off 保存しない 78 | @default true 79 | 80 | @param Party 81 | @type boolean 82 | @text パーティー 83 | @desc パーティーのセーブデータを保存するか 84 | @on 保存する 85 | @off 保存しない 86 | @default true 87 | 88 | @param Map 89 | @type boolean 90 | @text マップ 91 | @desc マップのセーブデータを保存するか 92 | @on 保存する 93 | @off 保存しない 94 | @default true 95 | 96 | @param Player 97 | @type boolean 98 | @text プレイヤー 99 | @desc プレイヤーのセーブデータを保存するか 100 | @on 保存する 101 | @off 保存しない 102 | @default true 103 | */ 104 | (() => { 105 | 'use strict'; 106 | 107 | // ベースプラグインの処理 108 | function Potadra_getPluginName(extension = 'js') { 109 | const reg = new RegExp(".+\/(.+)\." + extension); 110 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 111 | } 112 | function Potadra_convertBool(bool) { 113 | if (bool === "false" || bool === '' || bool === undefined) { 114 | return false; 115 | } else { 116 | return true; 117 | } 118 | } 119 | 120 | // パラメータ用定数 121 | const plugin_name = Potadra_getPluginName(); 122 | const params = PluginManager.parameters(plugin_name); 123 | 124 | // 各パラメータ用定数 125 | const System = Potadra_convertBool(params.System); 126 | const Screen = Potadra_convertBool(params.Screen); 127 | const Timer = Potadra_convertBool(params.Timer); 128 | const Switches = Potadra_convertBool(params.Switches); 129 | const Variables = Potadra_convertBool(params.Variables); 130 | const SelfSwitches = Potadra_convertBool(params.SelfSwitches); 131 | const Actor = Potadra_convertBool(params.Actor); 132 | const Party = Potadra_convertBool(params.Party); 133 | const Map = Potadra_convertBool(params.Map); 134 | const Player = Potadra_convertBool(params.Player); 135 | 136 | /** 137 | * 138 | * 139 | * @param {} saveName - 140 | * @param {} object - 141 | */ 142 | const _StorageManager_saveObject = StorageManager.saveObject; 143 | StorageManager.saveObject = function(saveName, object) { 144 | // system 145 | if (!System) { 146 | delete object.system; 147 | } else { 148 | // 子要素の削除 149 | } 150 | 151 | // screen 152 | if (!Screen) { 153 | delete object.screen; 154 | } else { 155 | // 子要素の削除 156 | } 157 | 158 | // タイマー 159 | if (!Timer) { 160 | delete object.timer; 161 | } else { 162 | // 子要素の削除 163 | } 164 | 165 | // スイッチ 166 | if (!Switches) { 167 | delete object.switches; 168 | } 169 | 170 | // 変数 171 | if (!Variables) { 172 | delete object.variables; 173 | } 174 | 175 | // セルフスイッチ 176 | if (!SelfSwitches) { 177 | delete object.selfSwitches; 178 | } 179 | 180 | // アクター 181 | if (!Actor) { 182 | delete object.actors; 183 | } else { 184 | // 子要素の削除 185 | } 186 | 187 | // パーティー 188 | if (!Party) { 189 | delete object.party; 190 | } else { 191 | // 子要素の削除 192 | } 193 | 194 | // マップ 195 | if (!Map) { 196 | delete object.map; 197 | } else { 198 | // 子要素の削除 199 | } 200 | 201 | // プレイヤー 202 | if (!Player) { 203 | delete object.player; 204 | } else { 205 | // 子要素の削除 206 | } 207 | 208 | return _StorageManager_saveObject.apply(this, arguments); 209 | }; 210 | })(); 211 | -------------------------------------------------------------------------------- /plugins/Config/Max/MaxPrice.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 価格の最大値変更 Ver1.1.6(2024/6/12) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Config/Max/MaxPrice.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.1.6: NoSale.js との競合対応 11 | * Ver1.1.5 12 | - ShopRate.js と CurrencyUnit.js の競合を解消 13 | - ヘルプ追加 14 | 15 | Copyright (c) 2025 ポテトードラゴン 16 | Released under the MIT License. 17 | https://opensource.org/license/mit 18 | 19 | @help 20 | ## 概要 21 | 価格が 999999 を超えるアイテム・武器・防具のメモ設定を追加します 22 | 23 | ## 使い方 24 | 1. アイテム・武器・防具のメモに以下のようにタグを指定します 25 | <価格:1000000> 26 | 27 | 2. ショップの処理で呼び出すとそのアイテムが価格タグで指定した金額になります 28 | 29 | @param PriceMetaName 30 | @text 価格タグ 31 | @desc メモ欄のタグ名 32 | 空文字の場合は、 "価格" になります 33 | @default 価格 34 | */ 35 | (() => { 36 | 'use strict'; 37 | 38 | // ベースプラグインの処理 39 | const common_max_price_params = Potadra_getPluginParams('MaxPrice'); 40 | const CommonPriceMetaName = common_max_price_params ? String(common_max_price_params.PriceMetaName || '価格') : false; 41 | const common_shop_rate_params = Potadra_getPluginParams('ShopRate'); 42 | let CommonBuyRate = common_shop_rate_params ? Number(common_shop_rate_params.BuyRate || 1) : 1; 43 | let CommonSellRate = common_shop_rate_params ? Number(common_shop_rate_params.SellRate || 0.5) : 0.5; 44 | const common_currency_unit_params = Potadra_getPluginParams('CurrencyUnit'); 45 | const CommonCurrencyUnitSwitch = Number(common_currency_unit_params.CurrencyUnitSwitch || 25); 46 | const CommonSecondBuyRate = Number(common_currency_unit_params.SecondBuyRate || 1); 47 | const CommonSecondSellRate = Number(common_currency_unit_params.SecondSellRate || 0.5); 48 | if (common_currency_unit_params) { 49 | CommonBuyRate = Number(common_currency_unit_params.BuyRate || 1); 50 | CommonSellRate = Number(common_currency_unit_params.SellRate || 0.5); 51 | } 52 | Window_ShopBuy.prototype.makeItemList = function() { 53 | this._data = []; 54 | this._price = []; 55 | for (const goods of this._shopGoods) { 56 | const item = this.goodsToItem(goods); 57 | if (item) { 58 | this._data.push(item); 59 | if (common_currency_unit_params && Potadra_isSecound(CommonCurrencyUnitSwitch)) { 60 | this._price.push(goods[2] === 0 ? Potadra_MetaPrice(item, CommonPriceMetaName, CommonSecondBuyRate) : goods[3]); 61 | } else { 62 | this._price.push(goods[2] === 0 ? Potadra_MetaPrice(item, CommonPriceMetaName, CommonBuyRate) : goods[3]); 63 | } 64 | } 65 | } 66 | }; 67 | Scene_Shop.prototype.sellingPrice = function() { 68 | if (common_currency_unit_params && Potadra_isSecound(CommonCurrencyUnitSwitch)) { 69 | return Math.floor(Potadra_MetaPrice(this._item, CommonPriceMetaName, CommonSecondSellRate)); 70 | } else { 71 | return Math.floor(Potadra_MetaPrice(this._item, CommonPriceMetaName, CommonSellRate)); 72 | } 73 | }; 74 | const window_shop_shell_no_sale_params = Potadra_getPluginParams('NoSale'); 75 | const Window_ShopSell_NoSaleMetaName = String(window_shop_shell_no_sale_params.NoSaleMetaName || '売却不可'); 76 | const window_shop_shell_max_price_params = Potadra_getPluginParams('MaxPrice'); 77 | const Window_ShopSell_PriceMetaName = String(window_shop_shell_max_price_params.PriceMetaName || '価格'); 78 | const window_shop_shell_shop_rate_params = Potadra_getPluginParams('ShopRate'); 79 | const Window_ShopSell_BuyRate = window_shop_shell_shop_rate_params ? Number(window_shop_shell_shop_rate_params.BuyRate || 1) : 1; 80 | if (window_shop_shell_no_sale_params || window_shop_shell_max_price_params) { 81 | Window_ShopSell.prototype.isEnabled = function(item) { 82 | if (!item) return false; 83 | if (window_shop_shell_no_sale_params && Potadra_meta(item.meta, Window_ShopSell_NoSaleMetaName)) { 84 | return false; 85 | } 86 | if (window_shop_shell_max_price_params) { 87 | return Potadra_MetaPrice(item, Window_ShopSell_PriceMetaName, Window_ShopSell_BuyRate) > 0; 88 | } else { 89 | return item && item.price > 0; 90 | } 91 | }; 92 | } 93 | function Potadra_meta(meta, tag) { 94 | if (meta) { 95 | const data = meta[tag]; 96 | if (data) { 97 | if (data !== true) { 98 | return data.trim(); 99 | } else { 100 | return true; 101 | } 102 | } 103 | } 104 | return false; 105 | } 106 | function Potadra_MetaPrice(item, price_meta_name, rate = 1) { 107 | const meta_price = Potadra_meta(item.meta, price_meta_name); 108 | return (meta_price ? Number(meta_price) : item.price) * rate; 109 | } 110 | function Potadra_isSecound(switch_no) { 111 | return $gameSwitches && $gameSwitches.value(switch_no) === true; 112 | } 113 | function Potadra_isPlugin(plugin_name) { 114 | return PluginManager._scripts.includes(plugin_name); 115 | } 116 | function Potadra_getPluginParams(plugin_name) { 117 | return Potadra_isPlugin(plugin_name) ? PluginManager.parameters(plugin_name) : false; 118 | } 119 | 120 | })(); 121 | -------------------------------------------------------------------------------- /plugins/Game/Map/EternalName.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 常時マップ名表示 Ver1.4.5(2025/7/22) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Game/Map/EternalName.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.4.5: ヘルプ更新 11 | * Ver1.4.4: 他プラグイン導入時の convertBool が無条件で true を返すバグ修正 12 | 13 | Copyright (c) 2025 ポテトードラゴン 14 | Released under the MIT License. 15 | https://opensource.org/license/mit 16 | 17 | @help 18 | ## 概要 19 | マップ名を画面上に常に表示します 20 | 21 | ## 使い方 22 | プラグインを導入するだけで、マップ移動時に表示されるマップ名が 23 | 常に表示されるようになります 24 | 25 | ### マップ名を非表示にしたい場合 26 | プラグインパラメータ「非表示スイッチ」に任意のスイッチを設定します 27 | ゲーム中にそのスイッチをONにすると、マップ名表示が消えます 28 | 特定のマップやイベントシーンでのみ非表示にしたい場合に使用します 29 | 30 | ### 階層を表示したい場合 31 | ダンジョンなどで「森 1F」「地下洞窟 B2F」のように階層を表示できます 32 | 33 | 1. プラグインパラメータ「階層変数」に、階層を管理するための変数を設定します 34 | 2. イベントコマンド「変数の操作」で、設定した変数の値を変更します 35 | 36 | - 変数の値が `1` の場合: マップ名1F 37 | - 変数の値が `-2` の場合: マップ名B2F 38 | 39 | のように表示されます 40 | 地下を表す文字(デフォルト: `B`)や階層を表す文字(デフォルト: `F`)は 41 | プラグインパラメータで自由に変更できます 42 | 43 | ### 表示名がないマップでの挙動 44 | マップのプロパティで「表示名」が空の場合、通常は何も表示されません 45 | 「表示名」がなくてもマップの「名前」を代わりに表示したい場合は 46 | プラグインパラメータ「マップ名前表示」をONにしてください 47 | 48 | @param DisableMapNameSwitch 49 | @type switch 50 | @text 非表示スイッチ 51 | @desc ONのときマップ名を非表示にするスイッチ 52 | @default 0 53 | 54 | @param EnableMapName 55 | @type boolean 56 | @text マップ名前表示 57 | @desc 表示名がないとき、マップの名前を表示するか 58 | @default false 59 | @on 表示する 60 | @off 表示しない 61 | 62 | @param FloorVariable 63 | @type variable 64 | @text 階層変数 65 | @desc 階層を管理する変数 66 | @default 0 67 | 68 | @param PrefixUnderground 69 | @text 地下名称 70 | @desc 地下表示の文字 71 | @default B 72 | 73 | @param SuffixFloor 74 | @text 階層名称 75 | @desc 階層の後ろに表記する文字 76 | @default F 77 | */ 78 | (() => { 79 | 'use strict'; 80 | 81 | // ベースプラグインの処理 82 | function Potadra_getPluginName(extension = 'js') { 83 | const reg = new RegExp(".+\/(.+)\." + extension); 84 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 85 | } 86 | function Potadra_convertBool(bool) { 87 | if (bool === "false" || bool === '' || bool === undefined) { 88 | return false; 89 | } else { 90 | return true; 91 | } 92 | } 93 | 94 | // パラメータ用変数 95 | const plugin_name = Potadra_getPluginName(); 96 | const params = PluginManager.parameters(plugin_name); 97 | 98 | // 各パラメータ用変数 99 | const DisableMapNameSwitch = Number(params.DisableMapNameSwitch || 0); 100 | const EnableMapName = Potadra_convertBool(params.EnableMapName); 101 | const FloorVariable = Number(params.FloorVariable || 0); 102 | const PrefixUnderground = String(params.PrefixUnderground || 'B'); 103 | const SuffixFloor = String(params.SuffixFloor || 'F'); 104 | 105 | /** 106 | * マップ名を表示するウィンドウです。 107 | * 108 | * @class 109 | */ 110 | 111 | /** 112 | * オブジェクト初期化 113 | * 114 | * @param {} rect - 115 | */ 116 | Window_MapName.prototype.initialize = function(rect) { 117 | Window_Base.prototype.initialize.call(this, rect); 118 | this.opacity = 0; 119 | this.contentsOpacity = 0; 120 | 121 | // 削除 122 | // this._showCount = 0; 123 | 124 | this.refresh(); 125 | }; 126 | 127 | /** 128 | * フレーム更新 129 | */ 130 | Window_MapName.prototype.update = function() { 131 | Window_Base.prototype.update.call(this); 132 | 133 | // 変更 134 | // if (this._showCount > 0 && $gameMap.isNameDisplayEnabled()) { 135 | if ($gameMap.isNameDisplayEnabled()) { 136 | this.updateFadeIn(); 137 | 138 | // 削除 139 | // this._showCount--; 140 | } else { 141 | this.updateFadeOut(); 142 | } 143 | }; 144 | 145 | /** 146 | * ウィンドウを開く 147 | */ 148 | Window_MapName.prototype.open = function() { 149 | this.refresh(); 150 | 151 | // 削除 152 | // this._showCount = 150; 153 | }; 154 | 155 | /** 156 | * ウィンドウを閉じる 157 | */ 158 | Window_MapName.prototype.close = function() { 159 | // 削除 160 | // this._showCount = 0; 161 | }; 162 | 163 | /** 164 | * リフレッシュ 165 | * 166 | * @returns {} 167 | */ 168 | Window_MapName.prototype.refresh = function() { 169 | const MapInfo = $dataMapInfos[$gameMap._mapId]; 170 | this.contents.clear(); 171 | if (!MapInfo) { 172 | return false; 173 | } 174 | 175 | // 表示名を格納 176 | let MapName = $gameMap.displayName(); 177 | 178 | // 表示名がなく、名前表示が有効のとき名前を格納 179 | if (EnableMapName && !MapName) { 180 | MapName = String(MapInfo.name); 181 | } 182 | 183 | if (MapName && (DisableMapNameSwitch === 0 || $gameSwitches.value(DisableMapNameSwitch) === false)) { 184 | const width = this.contentsWidth(); 185 | this.drawBackground(0, 0, width, this.lineHeight()); 186 | if (FloorVariable !== 0 && $gameVariables.value(FloorVariable) >= 1) { 187 | this.drawText(MapName + $gameVariables.value(FloorVariable) + SuffixFloor, 0, 0, width, 'center'); 188 | } else if (FloorVariable !== 0 && $gameVariables.value(FloorVariable) <= -1) { 189 | this.drawText(MapName + PrefixUnderground + -$gameVariables.value(FloorVariable) + SuffixFloor, 0, 0, width, 'center'); 190 | } else { 191 | this.drawText(MapName, 0, 0, width, 'center'); 192 | } 193 | } 194 | }; 195 | })(); 196 | -------------------------------------------------------------------------------- /plugins/Game/Event/Quiz.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | クイズ Ver1.0.3(2022/4/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Game/Event/Quiz.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.3: コピーライト更新 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | イベントコマンド「選択肢の表示」をクイズ形式っぽくします 19 | 20 | ## 使い方 21 | 1. プラグインコマンド「クイズ選択肢」を選択 22 | 2. イベントコマンド「文章の表示」で、問題を記載 23 | 3. イベントコマンド「選択肢の表示」で、選択肢を作成 24 | 4. 選択肢の正解かどうかで後続処理を自由に実装してください 25 | 5. プラグインコマンド「クイズ終了」を選択 26 | 27 | @command quiz_choices 28 | @text クイズ選択肢 29 | @desc イベントコマンド「選択肢の表示」をクイズ形式に変更します 30 | 「選択肢の表示」を実施した次の「選択肢の表示」は通常になります 31 | 32 | @command quiz_end 33 | @text クイズ終了 34 | @desc イベントコマンド「選択肢の表示」を通常に戻します 35 | */ 36 | (() => { 37 | 'use strict'; 38 | 39 | // ベースプラグインの処理 40 | function Potadra_getPluginName(extension = 'js') { 41 | const reg = new RegExp(".+\/(.+)\." + extension); 42 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 43 | } 44 | 45 | // パラメータ用変数 46 | const plugin_name = Potadra_getPluginName(); 47 | 48 | // クイズ選択肢の実行有無 49 | let QuizChoices = false; 50 | 51 | // プラグインコマンド(クイズ選択肢) 52 | PluginManager.registerCommand(plugin_name, "quiz_choices", args => { 53 | QuizChoices = true; 54 | }); 55 | 56 | // プラグインコマンド(クイズ終了) 57 | PluginManager.registerCommand(plugin_name, "quiz_end", args => { 58 | QuizChoices = false; 59 | }); 60 | 61 | /** 62 | * 選択肢の表示 63 | * 64 | * @param {} params - 65 | * @returns {} 66 | */ 67 | const _Game_Interpreter_command102 = Game_Interpreter.prototype.command102; 68 | Game_Interpreter.prototype.command102 = function(params) { 69 | const bool = _Game_Interpreter_command102.apply(this, arguments); 70 | QuizChoices = false; 71 | return bool; 72 | }; 73 | 74 | /** 75 | * 76 | */ 77 | const _Window_Message_updatePlacement = Window_Message.prototype.updatePlacement; 78 | Window_Message.prototype.updatePlacement = function() { 79 | if (QuizChoices) { 80 | const goldWindow = this._goldWindow; 81 | this._positionType = $gameMessage.positionType(); 82 | if (this._positionType == 0) { 83 | this.y = 0; 84 | } else if (this._positionType == 1) { 85 | this.y = (this._positionType * (Graphics.boxHeight - this.height)) / 2; 86 | } else { 87 | this.y = Graphics.boxHeight - (this.height + this.fittingHeight($gameMessage.choices().length / 2) + 16); 88 | } 89 | if (goldWindow) { 90 | goldWindow.y = this.y > 0 ? 0 : Graphics.boxHeight - goldWindow.height; 91 | } 92 | } else { 93 | _Window_Message_updatePlacement.apply(this, arguments); 94 | } 95 | }; 96 | 97 | /** 98 | * ウィンドウ幅の取得 99 | * 100 | * @returns {} 101 | */ 102 | const _Window_ChoiceList_windowWidth = Window_ChoiceList.prototype.windowWidth; 103 | Window_ChoiceList.prototype.windowWidth = function() { 104 | if (QuizChoices) { 105 | return Graphics.boxWidth; 106 | } else { 107 | return _Window_ChoiceList_windowWidth.apply(this, arguments); 108 | } 109 | }; 110 | 111 | /** 112 | * 表示行数の取得 113 | * 114 | * @returns {} 115 | */ 116 | const _Window_ChoiceList_numVisibleRows = Window_ChoiceList.prototype.numVisibleRows; 117 | Window_ChoiceList.prototype.numVisibleRows = function() { 118 | if (QuizChoices) { 119 | const choices = $gameMessage.choices(); 120 | return Math.min(choices.length / 2, this.maxLines()); 121 | } else { 122 | return _Window_ChoiceList_numVisibleRows.apply(this, arguments); 123 | } 124 | }; 125 | 126 | /** 127 | * 128 | * 129 | * @returns {} 130 | */ 131 | const _Window_ChoiceList_maxLines = Window_ChoiceList.prototype.maxLines; 132 | Window_ChoiceList.prototype.maxLines = function() { 133 | if (QuizChoices) { 134 | const messageWindow = this._messageWindow; 135 | const messageY = messageWindow ? messageWindow.y : 0; 136 | const messageHeight = messageWindow ? messageWindow.height : 0; 137 | const centerY = Graphics.boxHeight / 2; 138 | if (messageY < centerY && messageY + messageHeight > centerY) { 139 | return 2; 140 | } else { 141 | return 4; 142 | } 143 | } else { 144 | return _Window_ChoiceList_maxLines.apply(this, arguments); 145 | } 146 | }; 147 | 148 | /** 149 | * 150 | * 151 | * @returns {} 152 | */ 153 | const _Window_ChoiceList_windowY = Window_ChoiceList.prototype.windowY; 154 | Window_ChoiceList.prototype.windowY = function() { 155 | if (QuizChoices) { 156 | return Graphics.boxHeight - this.windowHeight(); 157 | } else { 158 | return _Window_ChoiceList_windowY.apply(this, arguments); 159 | } 160 | }; 161 | 162 | /** 163 | * 桁数の取得 164 | * 165 | * @returns {number} 桁数 166 | */ 167 | const _Window_ChoiceList_maxCols = Window_ChoiceList.prototype.maxCols; 168 | Window_ChoiceList.prototype.maxCols = function() { 169 | if (QuizChoices) { 170 | return 2; 171 | } else { 172 | return _Window_ChoiceList_maxCols.apply(this, arguments); 173 | } 174 | }; 175 | })(); 176 | -------------------------------------------------------------------------------- /plugins/Data/State/AngryState.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 怒りステート Ver1.0.0(2025/1/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Data/State/AngryState.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: 初期版完成 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 特定のキャラクターが倒れた時に指定したステートにかけます 19 | 20 | ## 使い方 21 | 1. 怒り状態時に付加するステートを作成 22 | このとき、「戦闘終了時に解除」にチェックを入れてください 23 | 2. プラグインパラメータの「怒りステート」に 1. で作成したステートを設定 24 | 3. プラグインパラメータの「怒りアクター」でアクターの怒り設定を追加 25 | 4. プラグインパラメータの「怒り敵キャラ」で敵キャラの怒り設定を追加 26 | 5. 戦闘で設定した内容に従って、怒りステートが付与されます 27 | 28 | @param AngryState 29 | @type state 30 | @text 怒りステート 31 | @desc 怒り状態時に付加するステート 32 | @default 0 33 | 34 | @param AngryActors 35 | @type struct[] 36 | @text 怒りアクター 37 | @desc アクターの怒り設定 38 | @default [] 39 | 40 | @param AngryEnemies 41 | @type struct[] 42 | @text 怒り敵キャラ 43 | @desc 敵キャラの怒り設定 44 | @default [] 45 | */ 46 | 47 | /*~struct~FriendActors: 48 | @param angry_actor 49 | @type actor 50 | @text 怒りアクター 51 | @desc 怒りの設定をするアクターを指定します 52 | @default 1 53 | 54 | @param friend_actors 55 | @type actor[] 56 | @text 友好アクター 57 | @desc 指定したアクターが倒されたときに怒り状態となります 58 | @default [] 59 | */ 60 | 61 | /*~struct~FriendEnemies: 62 | @param angry_enemy 63 | @type enemy 64 | @text 怒り敵キャラ 65 | @desc 怒りの設定をする敵キャラを指定します 66 | @default 1 67 | 68 | @param friend_enemies 69 | @type enemy[] 70 | @text 友好敵キャラ 71 | @desc 指定した敵キャラが倒されたときに怒り状態となります 72 | @default [] 73 | */ 74 | (() => { 75 | 'use strict'; 76 | 77 | // ベースプラグインの処理 78 | function Potadra_getPluginName(extension = 'js') { 79 | const reg = new RegExp(".+\/(.+)\." + extension); 80 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 81 | } 82 | function Potadra_numberArray(data) { 83 | return data ? JSON.parse(data).map(Number) : []; 84 | } 85 | 86 | // パラメータ用定数 87 | const plugin_name = Potadra_getPluginName(); 88 | const params = PluginManager.parameters(plugin_name); 89 | 90 | // 各パラメータ用定数 91 | const AngryState = Number(params.AngryState || 0); 92 | 93 | let AngryActors, AngryEnemies; 94 | if (params.AngryActors) AngryActors = JSON.parse(params.AngryActors); 95 | if (params.AngryEnemies) AngryEnemies = JSON.parse(params.AngryEnemies); 96 | 97 | // 怒り判定: アクター 98 | function angryActors() { 99 | if (!AngryActors) return true; 100 | 101 | for (const a of AngryActors) { 102 | const actor = JSON.parse(a); 103 | 104 | const angry_actor_id = Number(actor.angry_actor || 1); 105 | const angry_actor = $gameActors.actor(angry_actor_id); 106 | 107 | // 怒るアクターが存在する & 戦闘に参加しているか 108 | if (angry_actor && angry_actor.isBattleMember()) { 109 | const friend_actors = Potadra_numberArray(actor.friend_actors); 110 | 111 | // 怒りステート付与確認 112 | for (const friend_actor_id of friend_actors) { 113 | const friend_actor = $gameActors.actor(friend_actor_id); 114 | 115 | // 友好アクターが存在するか & 戦闘に参加しているか & 死んでいるか 116 | if (friend_actor && friend_actor.isBattleMember() && friend_actor.isDead()) { 117 | // 怒りステートを付与してループ終了 118 | if (!angry_actor.isStateAffected(AngryState)) angry_actor.addState(AngryState); 119 | break; 120 | } 121 | 122 | // 怒りの判定を満たさなかったら、怒りを解除 123 | angry_actor.eraseState(AngryState); 124 | } 125 | } 126 | } 127 | } 128 | 129 | // 怒り判定: 敵キャラ 130 | function angryEnemies() { 131 | if (!AngryEnemies) return true; 132 | 133 | for (const e of AngryEnemies) { 134 | const enemy = JSON.parse(e); 135 | 136 | const angry_enemy_id = Number(enemy.angry_enemy || 1); 137 | for (const angry_enemy of $gameTroop.members()) { 138 | // 怒る敵キャラが戦闘に参加しているか 139 | if (angry_enemy.enemyId() === angry_enemy_id) { 140 | 141 | const friend_enemies = Potadra_numberArray(enemy.friend_enemies); 142 | const angry = angryEnemy(friend_enemies); 143 | if (angry) { 144 | // 怒りステートを付与 145 | if (!angry_enemy.isStateAffected(AngryState)) angry_enemy.addState(AngryState); 146 | } else { 147 | // 怒りの判定を満たさなかったら、怒りを解除 148 | angry_enemy.eraseState(AngryState); 149 | } 150 | } 151 | } 152 | } 153 | } 154 | 155 | function angryEnemy(friend_enemies) { 156 | // 怒りステート付与確認 157 | for (const friend_enemy_id of friend_enemies) { 158 | for (const friend_enemy of $gameTroop.members()) { 159 | // 友好敵キャラが存在するか & 死んでいるか 160 | if (friend_enemy.enemyId() === friend_enemy_id && friend_enemy.isDead()) { 161 | return true; 162 | } 163 | } 164 | } 165 | return false; 166 | } 167 | 168 | /** 169 | * アクション実行 170 | * 171 | * @param {} target - 172 | */ 173 | const _Game_Action_apply = Game_Action.prototype.apply; 174 | Game_Action.prototype.apply = function(target) { 175 | _Game_Action_apply.apply(this, arguments); 176 | 177 | // 怒り判定: アクター 178 | angryActors(); 179 | 180 | // 怒り判定: 敵キャラ 181 | angryEnemies(); 182 | }; 183 | })(); 184 | -------------------------------------------------------------------------------- /plugins/Game/Map/EncountAirShip.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 飛行船エンカウント Ver1.0.0(2025/1/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Game/Map/EncountAirShip.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: 初期版完成 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 飛行船でエンカウントするようになります 19 | 20 | ## 使い方 21 | 1. マップのエンカウント設定で 22 | 飛行船用のリージョン(初期設定では 255 )の設定を実施します 23 | 24 | 2. 飛行船の戦闘背景をパラメータの 飛行船戦闘背景1 25 | 飛行船戦闘背景2 で必要に応じて変更します 26 | 27 | 3. 飛行船に乗るとエンカウントするようになります 28 | 29 | @param Region 30 | @type number 31 | @text エンカウントリージョン 32 | @desc 飛行船でエンカウントする場合に使用するリージョン番号 33 | マップ上では、このリージョン番号を設定する必要はありません 34 | @default 255 35 | 36 | @param AirShipBattleback1Name 37 | @type combo 38 | @text 飛行船戦闘背景1 39 | @desc 飛行船の戦闘背景1(battlebacks1) を指定 40 | @default Clouds 41 | @option Castle1 42 | @option Castle2 43 | @option Castle3 44 | @option Clouds 45 | @option Cobblestones1 46 | @option Cobblestones2 47 | @option Cobblestones3 48 | @option Cobblestones4 49 | @option Cobblestones5 50 | @option Colosseum 51 | @option Crystal 52 | @option Cyberspace 53 | @option DecorativeTile1 54 | @option DecorativeTile2 55 | @option DemonCastle1 56 | @option DemonCastle2 57 | @option DemonCastle3 58 | @option DemonicWorld 59 | @option Desert 60 | @option Dirt 61 | @option DirtCave 62 | @option DirtField 63 | @option Fort1 64 | @option Fort2 65 | @option Grassland 66 | @option GrassMaze 67 | @option Ground1 68 | @option Ground2 69 | @option IceCave 70 | @option IceMaze 71 | @option Lava1 72 | @option Lava2 73 | @option LavaCave 74 | @option PoisonSwamp 75 | @option Road1 76 | @option Road2 77 | @option Road3 78 | @option RockCave 79 | @option Sand 80 | @option Ship 81 | @option Smoke 82 | @option Snowfield 83 | @option Space 84 | @option Stone1 85 | @option Stone2 86 | @option Stone3 87 | @option Temple 88 | @option Tent 89 | @option Wasteland 90 | @option Wood1 91 | @option Wood2 92 | 93 | @param AirShipBattleback2Name 94 | @type combo 95 | @text 飛行船戦闘背景2 96 | @desc 飛行船の戦闘背景2(battlebacks1) を指定 97 | @default Clouds 98 | @option Brick 99 | @option Bridge 100 | @option Castle1 101 | @option Castle2 102 | @option Castle3 103 | @option Cliff 104 | @option Clouds 105 | @option Colosseum 106 | @option Crystal 107 | @option DarkSpace 108 | @option DemonCastle1 109 | @option DemonCastle2 110 | @option DemonCastle3 111 | @option DemonicWorld 112 | @option Desert 113 | @option DirtCave 114 | @option Forest 115 | @option Fort1 116 | @option Fort2 117 | @option Grassland 118 | @option GrassMaze 119 | @option IceCave 120 | @option IceMaze 121 | @option Lava 122 | @option LavaCave 123 | @option PoisonSwamp 124 | @option Port 125 | @option RockCave 126 | @option Room1 127 | @option Room2 128 | @option Room3 129 | @option Ruins1 130 | @option Ruins2 131 | @option Ruins3 132 | @option Ship 133 | @option Smoke 134 | @option Snowfield 135 | @option Stone1 136 | @option Stone2 137 | @option Stone3 138 | @option Temple 139 | @option Tent 140 | @option Tower 141 | @option Town1 142 | @option Town2 143 | @option Town3 144 | @option Town4 145 | @option Town5 146 | @option Wasteland 147 | */ 148 | (() => { 149 | 'use strict'; 150 | 151 | // ベースプラグインの処理 152 | function Potadra_getPluginName(extension = 'js') { 153 | const reg = new RegExp(".+\/(.+)\." + extension); 154 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 155 | } 156 | 157 | // パラメータ用定数 158 | const plugin_name = Potadra_getPluginName(); 159 | const params = PluginManager.parameters(plugin_name); 160 | 161 | // 各パラメータ用定数 162 | const Region = Number(params.Region || 255); 163 | const AirShipBattleback1Name = String(params.AirShipBattleback1Name || 'Clouds'); 164 | const AirShipBattleback2Name = String(params.AirShipBattleback2Name || 'Clouds'); 165 | 166 | /** 167 | * エンカウント項目の採用可能判定 168 | * 169 | * @returns {} 170 | */ 171 | Game_Player.prototype.canEncounter = function() { 172 | return ( 173 | !$gameParty.hasEncounterNone() && 174 | $gameSystem.isEncounterEnabled() && 175 | !this.isMoveRouteForcing() && 176 | !this.isDebugThrough() 177 | ); 178 | }; 179 | 180 | /** 181 | * フィールドの戦闘背景1 182 | * 183 | * @returns {} 184 | */ 185 | const _Sprite_Battleback_overworldBattleback1Name = Sprite_Battleback.prototype.overworldBattleback1Name; 186 | Sprite_Battleback.prototype.overworldBattleback1Name = function() { 187 | if ($gamePlayer.isInAirship()) { 188 | return AirShipBattleback1Name; 189 | } else { 190 | return _Sprite_Battleback_overworldBattleback1Name.apply(this, arguments); 191 | } 192 | }; 193 | 194 | /** 195 | * フィールドの戦闘背景2 196 | * 197 | * @returns {} 198 | */ 199 | const _Sprite_Battleback_overworldBattleback2Name = Sprite_Battleback.prototype.overworldBattleback2Name; 200 | Sprite_Battleback.prototype.overworldBattleback2Name = function() { 201 | if ($gamePlayer.isInAirship()) { 202 | return AirShipBattleback2Name; 203 | } else { 204 | return _Sprite_Battleback_overworldBattleback2Name.apply(this, arguments); 205 | } 206 | }; 207 | 208 | /** 209 | * エンカウント判定 210 | * 211 | * @param {} encounter - エンカウント設定 212 | */ 213 | const _Game_Player_meetsEncounterConditions = Game_Player.prototype.meetsEncounterConditions; 214 | Game_Player.prototype.meetsEncounterConditions = function(encounter) { 215 | if (this.isInAirship()) { 216 | return encounter.regionSet.includes(Region); 217 | } else { 218 | return _Game_Player_meetsEncounterConditions.apply(this, arguments); 219 | } 220 | }; 221 | })(); 222 | -------------------------------------------------------------------------------- /plugins/Data/Skill/GuardSkill.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 防御スキル Ver1.0.0(2025/1/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Data/Skill/GuardSkill.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: コマンド名変更を制御出来る機能追加 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | 防御スキルを変更できるメモタグを追加します 19 | 20 | ## 使い方 21 | 1. 防御スキルにしたいスキルを作成 22 | 2. メモに <防御スキル: 回避> のように記載。(防御が回避に変更される。) 23 | 3. 戦闘を開始すると防御が回避に切り替わります 24 | ※ アイテムも同じように設定できます 25 | 26 | 防御スキルは、スキル名 OR スキルIDを指定することが出来ます 27 | また、おまけとして <攻撃スキル: ファイア> のようにすると 28 | 攻撃スキルを変更することもできます 29 | 30 | @param AttackSkillMetaName 31 | @text 攻撃スキルタグ 32 | @desc 攻撃スキルに使うメモ欄タグの名称 33 | デフォルトは 攻撃スキル 34 | @default 攻撃スキル 35 | 36 | @param GuardSkillMetaName 37 | @text 防御スキルタグ 38 | @desc 防御スキルに使うメモ欄タグの名称 39 | デフォルトは 防御スキル 40 | @default 防御スキル 41 | 42 | @param ChangeAttackCommand 43 | @type boolean 44 | @text 通常攻撃コマンド名変更 45 | @desc 通常攻撃のコマンド名を変更するか 46 | @on 変更する 47 | @off 変更しない 48 | @default true 49 | 50 | @param ChangeGuardCommand 51 | @type boolean 52 | @text 防御コマンド名変更 53 | @desc 防御のコマンド名を変更するか 54 | @on 変更する 55 | @off 変更しない 56 | @default true 57 | */ 58 | (() => { 59 | 'use strict'; 60 | 61 | // ベースプラグインの処理 62 | function Potadra_getPluginName(extension = 'js') { 63 | const reg = new RegExp(".+\/(.+)\." + extension); 64 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 65 | } 66 | function Potadra_convertBool(bool) { 67 | if (bool === "false" || bool === '' || bool === undefined) { 68 | return false; 69 | } else { 70 | return true; 71 | } 72 | } 73 | function Potadra_meta(meta, tag) { 74 | if (meta) { 75 | const data = meta[tag]; 76 | if (data) { 77 | if (data !== true) { 78 | return data.trim(); 79 | } else { 80 | return true; 81 | } 82 | } 83 | } 84 | return false; 85 | } 86 | function Potadra_search(data, id, column = "name", search_column = "id", val = "", initial = 1) { 87 | if (!id) return val; 88 | for (let i = initial; i < data.length; i++) { 89 | if (!data[i]) continue; 90 | if (search_column && data[i][search_column] == id) { 91 | val = column ? data[i][column] : data[i]; 92 | break; 93 | } else if (i == id) { 94 | val = data[i]; 95 | break; 96 | } 97 | } 98 | return val; 99 | } 100 | function Potadra_nameSearch(data, name, column = "id", search_column = "name", val = "", initial = 1) { 101 | return Potadra_search(data, name, column, search_column, val, initial); 102 | } 103 | function Potadra_checkName(data, name, val = false) { 104 | if (isNaN(name)) { 105 | return Potadra_nameSearch(data, name.trim(), "id", "name", val); 106 | } 107 | return Number(name || val); 108 | } 109 | function Potadra_checkMeta(meta, tag, data) { 110 | const name = Potadra_meta(meta, tag); 111 | return name ? Potadra_checkName(data, name) : false; 112 | } 113 | function Potadra_checkMetas(battler, tag, data) { 114 | const ids = []; 115 | const b = battler.isActor() ? battler.actor() : battler.enemy(); 116 | let id = Potadra_checkMeta(b.meta, tag, data); 117 | if (id) ids.push(id); 118 | if (battler.isActor()) { 119 | id = Potadra_checkMeta(battler.currentClass().meta, tag, data); 120 | if (id) ids.push(id); 121 | for (const item of battler.equips()) { 122 | if (item) { 123 | id = Potadra_checkMeta(item.meta, tag, data); 124 | if (id) ids.push(id); 125 | } 126 | } 127 | } 128 | for (const state of battler.states()) { 129 | id = Potadra_checkMeta(state.meta, tag, data); 130 | if (id) ids.push(id); 131 | } 132 | if (ids.length === 0) return false; 133 | return Math.max(...ids); 134 | } 135 | 136 | // パラメータ用定数 137 | const plugin_name = Potadra_getPluginName(); 138 | const params = PluginManager.parameters(plugin_name); 139 | 140 | // 各パラメータ用定数 141 | const AttackSkillMetaName = String(params.AttackSkillMetaName || '攻撃スキル'); 142 | const GuardSkillMetaName = String(params.GuardSkillMetaName || '防御スキル'); 143 | const ChangeAttackCommand = Potadra_convertBool(params.ChangeAttackCommand); 144 | const ChangeGuardCommand = Potadra_convertBool(params.ChangeGuardCommand); 145 | 146 | /** 147 | * 通常攻撃のスキル ID を取得 148 | * 149 | * @returns {} 150 | */ 151 | Game_Actor.prototype.attackSkillId = function() { 152 | const set = this.traitsSet(Game_BattlerBase.TRAIT_ATTACK_SKILL); 153 | let skill_id = set.length > 0 ? Math.max(...set) : 1; 154 | return Potadra_checkMetas(this, AttackSkillMetaName, $dataSkills) || skill_id; 155 | }; 156 | 157 | /** 158 | * 防御のスキル ID を取得 159 | * 160 | * @returns {} 161 | */ 162 | Game_Actor.prototype.guardSkillId = function() { 163 | return Potadra_checkMetas(this, GuardSkillMetaName, $dataSkills) || 2; 164 | }; 165 | 166 | /** 167 | * 攻撃コマンドをリストに追加 168 | */ 169 | const _Window_ActorCommand_addAttackCommand = Window_ActorCommand.prototype.addAttackCommand; 170 | Window_ActorCommand.prototype.addAttackCommand = function() { 171 | if (ChangeAttackCommand) { 172 | this.addCommand($dataSkills[this._actor.attackSkillId()].name, "attack", this._actor.canAttack()); 173 | } else { 174 | _Window_ActorCommand_addAttackCommand.apply(this, arguments); 175 | } 176 | }; 177 | 178 | /** 179 | * 防御コマンドをリストに追加 180 | */ 181 | const _Window_ActorCommand_addGuardCommand = Window_ActorCommand.prototype.addGuardCommand; 182 | Window_ActorCommand.prototype.addGuardCommand = function() { 183 | if (ChangeGuardCommand) { 184 | this.addCommand($dataSkills[this._actor.guardSkillId()].name, "guard", this._actor.canGuard()); 185 | } else { 186 | _Window_ActorCommand_addGuardCommand.apply(this, arguments); 187 | } 188 | }; 189 | })(); 190 | -------------------------------------------------------------------------------- /plugins/Data/State/MemberState.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | メンバーステート Ver1.0.0(2025/1/1) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Data/State/MemberState.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.0.0: 初期版完成 11 | 12 | Copyright (c) 2025 ポテトードラゴン 13 | Released under the MIT License. 14 | https://opensource.org/license/mit 15 | 16 | @help 17 | ## 概要 18 | メンバーの人数ごとに効果を発揮するメンバーステートを作成します 19 | 20 | ## 使い方 21 | 1. メンバーの人数ごとに効果を発揮するメンバーステートを作成 22 | このとき、「戦闘終了時に解除」にチェックを入れてください 23 | 2. プラグインパラメータにて、メンバーステートの設定を実施 24 | 3. 戦闘でメンバーの人数ごとにメンバーステートが付与されます 25 | 26 | @param MemberStates 27 | @type struct[] 28 | @text メンバーステート 29 | @desc メンバーステート設定 30 | @default [] 31 | */ 32 | 33 | /*~struct~MemberStates: 34 | @param count 35 | @type number 36 | @text 人数 37 | @desc メンバーステートを反映する人数 38 | @default 1 39 | @min 1 40 | @max 999999999999999 41 | 42 | @param member_state 43 | @type state 44 | @text メンバーステート 45 | @desc メンバー状態時に付加するステート 46 | @default 0 47 | 48 | @param actor 49 | @type boolean 50 | @text アクター有効/無効設定 51 | @desc アクターのメンバーステートの有効/無効設定 52 | @on 有効 53 | @off 無効 54 | @default true 55 | 56 | @param member_state_actors 57 | @parent actor 58 | @type actor[] 59 | @text メンバーステートアクター 60 | @desc 指定したアクターのみメンバーステートを反映します 61 | @default [] 62 | 63 | @param enemy 64 | @type boolean 65 | @text 敵キャラ有効/無効設定 66 | @desc 敵キャラのメンバーステートの有効/無効設定 67 | @on 有効 68 | @off 無効 69 | @default true 70 | 71 | @param member_state_enemies 72 | @parent enemy 73 | @type enemy[] 74 | @text メンバーステート敵キャラ 75 | @desc 指定した敵キャラのみメンバーステートを反映します 76 | @default [] 77 | */ 78 | (() => { 79 | 'use strict'; 80 | 81 | // ベースプラグインの処理 82 | function Potadra_getPluginName(extension = 'js') { 83 | const reg = new RegExp(".+\/(.+)\." + extension); 84 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 85 | } 86 | function Potadra_convertBool(bool) { 87 | if (bool === "false" || bool === '' || bool === undefined) { 88 | return false; 89 | } else { 90 | return true; 91 | } 92 | } 93 | function Potadra_numberArray(data) { 94 | return data ? JSON.parse(data).map(Number) : []; 95 | } 96 | 97 | // パラメータ用定数 98 | const plugin_name = Potadra_getPluginName(); 99 | const params = PluginManager.parameters(plugin_name); 100 | 101 | // 各パラメータ用定数 102 | let MemberStates; 103 | if (params.MemberStates) MemberStates = JSON.parse(params.MemberStates); 104 | 105 | // メンバーステート判定: アクター 106 | function memberActorState() { 107 | const alive_members = $gameParty.aliveMembers(); 108 | for (const s of MemberStates) { 109 | const state = JSON.parse(s); 110 | 111 | const count = Number(state.count || 1); 112 | const member_state = Number(state.member_state || 0); 113 | const actor = Potadra_convertBool(state.actor); 114 | const member_state_actors = Potadra_numberArray(state.member_state_actors); 115 | 116 | if (!actor) continue; 117 | 118 | // メンバーステート判定: アクター 119 | if (alive_members.length === count) { 120 | for (const member of alive_members) { 121 | // メンバーステートID指定 122 | if (member_state_actors.length >= 1) { 123 | const member_id = member.actorId(); 124 | 125 | for (const id of member_state_actors) { 126 | if (id === member_id && !member.isStateAffected(member_state)) { 127 | member.addState(member_state); 128 | return true; 129 | } 130 | } 131 | } else { 132 | // メンバーステートを付与 133 | if (!member.isStateAffected(member_state)) member.addState(member_state); 134 | } 135 | } 136 | } else { 137 | for (const member of alive_members) { 138 | // メンバーの判定を満たさなかったら、メンバーを解除 139 | member.eraseState(member_state); 140 | } 141 | } 142 | } 143 | } 144 | 145 | // メンバーステート判定: 敵キャラ 146 | function memberEnemyState() { 147 | const alive_members = $gameTroop.aliveMembers(); 148 | for (const s of MemberStates) { 149 | const state = JSON.parse(s); 150 | 151 | const count = Number(state.count || 1); 152 | const member_state = Number(state.member_state || 0); 153 | const enemy = Potadra_convertBool(state.enemy); 154 | const member_state_enemies = Potadra_numberArray(state.member_state_enemies); 155 | 156 | if (!enemy) continue; 157 | 158 | // メンバーステート判定: 敵キャラ 159 | if (alive_members.length === count) { 160 | for (const member of alive_members) { 161 | // メンバーステートID指定 162 | if (member_state_enemies.length >= 1) { 163 | const member_id = member.enemyId(); 164 | 165 | for (const id of member_state_enemies) { 166 | if (id === member_id && !member.isStateAffected(member_state)) { 167 | member.addState(member_state); 168 | return true; 169 | } 170 | } 171 | } else { 172 | // メンバーステートを付与 173 | if (!member.isStateAffected(member_state)) member.addState(member_state); 174 | } 175 | } 176 | } else { 177 | for (const member of alive_members) { 178 | // メンバーの判定を満たさなかったら、メンバーを解除 179 | member.eraseState(member_state); 180 | } 181 | } 182 | } 183 | } 184 | 185 | /** 186 | * 戦闘開始処理 187 | * 188 | * @param {} advantageous - 189 | */ 190 | const _Game_Battler_onBattleStart = Game_Battler.prototype.onBattleStart; 191 | Game_Battler.prototype.onBattleStart = function(advantageous) { 192 | // メンバーステート判定: アクター 193 | memberActorState(); 194 | 195 | // メンバーステート判定: 敵キャラ 196 | memberEnemyState(); 197 | 198 | _Game_Battler_onBattleStart.apply(this, arguments); 199 | }; 200 | 201 | /** 202 | * アクション実行 203 | * 204 | * @param {} target - 205 | */ 206 | const _Game_Action_apply = Game_Action.prototype.apply; 207 | Game_Action.prototype.apply = function(target) { 208 | _Game_Action_apply.apply(this, arguments); 209 | 210 | // メンバーステート判定: アクター 211 | memberActorState(); 212 | 213 | // メンバーステート判定: 敵キャラ 214 | memberEnemyState(); 215 | }; 216 | })(); 217 | -------------------------------------------------------------------------------- /plugins/Game/Bgm/RandomBgm.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | BGMランダム再生 Ver2.0.0(2025/1/18) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Game/Bgm/RandomBgm.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver2.0.0 11 | - BGM設定をstructに変更(再設定が必要になります) 12 | - エラーが発生していた問題修正 13 | - URLを修正 14 | 15 | Copyright (c) 2025 ポテトードラゴン 16 | Released under the MIT License. 17 | https://opensource.org/license/mit 18 | 19 | @help 20 | ## 概要 21 | プラグインコマンド指定したBGMの中からランダムにBGMを再生します 22 | 23 | ## 使い方 24 | 1. プラグインコマンドを呼び出します 25 | 2. プラグインコマンドからランダムに再生したいBGMのリストを作成します 26 | 3. プラグインコマンドを指定したイベントが呼び出されると 27 | BGMのリストからランダムにBGMが再生されます 28 | 29 | タイトルと戦闘のランダムBGMは、パラメータから同様の設定を行ってください 30 | 31 | @param TitleRandom 32 | @type boolean 33 | @text タイトルランダム再生 34 | @desc タイトルでランダム再生をするか 35 | @on ランダム再生する 36 | @off ランダム再生しない 37 | @default false 38 | 39 | @param title_bgms 40 | @parent TitleRandom 41 | @text タイトルBGM一覧 42 | @type struct[] 43 | @desc タイトルでランダム再生するBGMの一覧 44 | 45 | @param BattleRandom 46 | @type boolean 47 | @text 戦闘ランダム再生 48 | @desc 戦闘でランダム再生をするか 49 | @on ランダム再生する 50 | @off ランダム再生しない 51 | @default false 52 | 53 | @param battle_bgms 54 | @parent BattleRandom 55 | @text 戦闘BGM一覧 56 | @type struct[] 57 | @desc 戦闘中にランダム再生するBGMの一覧 58 | 59 | @command random_bgm 60 | @text BGMランダム再生 61 | @desc 指定したBGMの中からランダムにBGMを再生します 62 | 63 | @arg bgms 64 | @text BGM一覧 65 | @type struct[] 66 | @desc ランダムに再生するBGMの一覧 67 | */ 68 | 69 | /*~struct~BGM: 70 | @param name 71 | @type file 72 | @dir audio/bgm 73 | @text ファイル名 74 | @desc 再生するBGMのファイル名 75 | 76 | @param volume 77 | @type number 78 | @text 音量 79 | @desc 再生するBGMの音量 80 | @min 0 81 | @max 100 82 | @default 90 83 | 84 | @param pitch 85 | @type number 86 | @text ピッチ 87 | @desc 再生するBGMのピッチ 88 | @min 50 89 | @max 150 90 | @default 100 91 | 92 | @param pan 93 | @type number 94 | @text 位相 95 | @desc 再生するBGMの位相 96 | @min -100 97 | @max 100 98 | @default 0 99 | */ 100 | (() => { 101 | 'use strict'; 102 | 103 | // ベースプラグインの処理 104 | function Potadra_getPluginName(extension = 'js') { 105 | const reg = new RegExp(".+\/(.+)\." + extension); 106 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 107 | } 108 | function Potadra_convertBool(bool) { 109 | if (bool === "false" || bool === '' || bool === undefined) { 110 | return false; 111 | } else { 112 | return true; 113 | } 114 | } 115 | function Potadra_isExist(file_path) { 116 | if (StorageManager.isLocalMode()) { 117 | const path = require('path'); 118 | const file = path.dirname(process.mainModule.filename) + file_path; 119 | const fs = require('fs'); 120 | return fs.existsSync(file); 121 | } else { 122 | const xhr = new XMLHttpRequest(); 123 | try { 124 | xhr.open('GET', file_path, false); 125 | xhr.send(); 126 | return true; 127 | } catch (e) { 128 | return false; 129 | } 130 | } 131 | } 132 | function Potadra_convertAudio(struct_audio, audio_name) { 133 | if (!struct_audio) return false; 134 | let audio; 135 | try { 136 | audio = JSON.parse(struct_audio); 137 | } catch(e){ 138 | return false; 139 | } 140 | const name = audio_name ? String(audio.name || audio_name) : String(audio.name); 141 | const volume = Number(audio.volume || 90); 142 | const pitch = Number(audio.pitch || 100); 143 | const pan = Number(audio.pan || 0); 144 | return {"name": name, "volume": volume, "pitch": pitch, "pan": pan}; 145 | } 146 | 147 | // パラメータ用変数 148 | const plugin_name = Potadra_getPluginName(); 149 | const params = PluginManager.parameters(plugin_name); 150 | const TitleRandom = Potadra_convertBool(params.TitleRandom); 151 | const BattleRandom = Potadra_convertBool(params.BattleRandom); 152 | 153 | /** 154 | * BGM の存在判定 155 | */ 156 | function BgmIsExist(name) { 157 | return Potadra_isExist('audio/bgm/' + name + '.ogg'); 158 | } 159 | 160 | function PlayRandomBgm(bgm_lists) { 161 | const i = Math.randomInt(bgm_lists.length); 162 | let bgm_info = JSON.parse(bgm_lists[i]); 163 | let bgm = Potadra_convertAudio(bgm_info); 164 | 165 | if (!bgm) return false; 166 | 167 | // bgmが存在するか判定 168 | if (BgmIsExist(bgm.name)) { 169 | // 存在する場合、BGM判定 170 | AudioManager.playBgm(bgm); 171 | } else { 172 | // 存在しない場合、再判定 173 | const exist_bgm_lists = []; 174 | 175 | for (const bgm_list of bgm_lists) { 176 | bgm_info = JSON.parse(bgm_list); 177 | bgm = Potadra_convertAudio(bgm_info); 178 | if (BgmIsExist(bgm.name)) { 179 | exist_bgm_lists.push(bgm_info); 180 | } 181 | } 182 | 183 | // 一つも再生可能なBGMがない場合は、BGMを再生しない 184 | if (exist_bgm_lists.length > 0) { 185 | i = Math.randomInt(exist_bgm_lists.length); 186 | AudioManager.playBgm(exist_bgm_lists[i]); 187 | } 188 | } 189 | } 190 | 191 | // プラグインコマンド(BGMランダム再生) 192 | PluginManager.registerCommand(plugin_name, "random_bgm", args => { 193 | const bgm_lists = JSON.parse(args.bgms); 194 | PlayRandomBgm(bgm_lists); 195 | }); 196 | 197 | /** 198 | * タイトル画面の処理を行うクラスです。 199 | * 200 | * @class 201 | */ 202 | 203 | /** 204 | * タイトル画面の音楽演奏 205 | */ 206 | const _Scene_Title_playTitleMusic = Scene_Title.prototype.playTitleMusic; 207 | Scene_Title.prototype.playTitleMusic = function() { 208 | if (TitleRandom && params.title_bgms) { 209 | const title_bgm_lists = JSON.parse(params.title_bgms); 210 | PlayRandomBgm(title_bgm_lists); 211 | AudioManager.stopBgs(); 212 | AudioManager.stopMe(); 213 | } else { 214 | _Scene_Title_playTitleMusic.apply(this, arguments); 215 | } 216 | }; 217 | 218 | 219 | /** 220 | * 開始処理 221 | */ 222 | Scene_Battle.prototype.start = function() { 223 | Scene_Message.prototype.start.call(this); 224 | // BattleManager.playBattleBgm(); 225 | BattleManager.startBattle(); 226 | this._statusWindow.refresh(); 227 | this.startFadeIn(this.fadeSpeed(), false); 228 | }; 229 | 230 | /** 231 | * 戦闘の進行を管理する静的クラスです。 232 | * 233 | * @namespace 234 | */ 235 | 236 | /** 237 | * 戦闘 BGM の演奏 238 | */ 239 | const _BattleManager_playBattleBgm = BattleManager.playBattleBgm; 240 | BattleManager.playBattleBgm = function() { 241 | if (BattleRandom && params.battle_bgms) { 242 | const battle_bgm_lists = JSON.parse(params.battle_bgms); 243 | PlayRandomBgm(battle_bgm_lists); 244 | AudioManager.stopBgs(); 245 | } else { 246 | _BattleManager_playBattleBgm.apply(this, arguments); 247 | } 248 | }; 249 | })(); 250 | -------------------------------------------------------------------------------- /plugins/Scene/Title/Title.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | タイトル処理 Ver1.4.1(2025/1/18) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Scene/Title/Title.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.4.1 11 | - バージョンIDの非表示設定が正しく動作していないバグ修正 12 | - ヘルプ更新 13 | * Ver1.4.0 14 | - 固定タイトルとサブタイトルの設定を簡易化 15 | - タイトルの文字色がタイトル固定表示しか有効になっていなかったのを修正 16 | 17 | Copyright (c) 2025 ポテトードラゴン 18 | Released under the MIT License. 19 | https://opensource.org/license/mit 20 | 21 | @help 22 | ## 概要 23 | タイトルの表示を色々変更します 24 | 25 | ## 使い方 26 | プラグインのパラメータを変更することで、タイトルの機能を制御できます 27 | 28 | ### パラメータ説明 29 | 30 | #### タイトル文字色(TitleColor) 31 | タイトルの文字色を変更できます 32 | 33 | #### 常にニューゲーム(SelectOnlyNewGame) 34 | セーブデータの有無にかかわらず、常にニューゲームから開始するようになります 35 | 36 | #### 固定タイトル(FixedTitle) 37 | システム1のゲームタイトルではなく、こちらのタイトルを表示するようにします 38 | ゲームタイトルにバージョンを入れたときに 39 | タイトルにはバージョンを表示しないための機能です 40 | 41 | #### サブタイトル(SubTitle) 42 | タイトルの直下に表示できるサブタイトルを追加します 43 | 空文字でサブタイトルは表示しません 44 | 45 | #### バージョン表示(Version) 46 | バージョン番号をタイトル左下に表示します 47 | 48 | ##### バージョン名(VersionName) 49 | ゲームタイトルに Project ver1.0.0 のように記載したとき 50 | ここに記載した文字以降をバージョン番号とするか 51 | 52 | ##### バージョン分割位置(VersionPos) 53 | ゲームタイトルのどこをバージョンとして扱うか 54 | Project ver1.0.0 の場合、指定する数値は以下のようになる 55 | 56 | * 0: Project 57 | * 1: ver1.0.0 58 | 59 | ##### バージョンID表示(VersionId) 60 | 保存するたびに変更される $dataSystem["versionId"] を表示するか 61 | 62 | ###### バージョンID区切り文字(VersionIdName) 63 | $dataSystem["versionId"]とバージョンIDの区切り文字 64 | デフォルトは . 65 | 66 | @param TitleColor 67 | @type color 68 | @text タイトル文字色 69 | @desc タイトルの文字色 70 | @default 0 71 | 72 | @param SelectOnlyNewGame 73 | @type boolean 74 | @text 常にニューゲーム 75 | @desc 常にニューゲームを選択するかの設定 76 | @on 選択する 77 | @off 選択しない 78 | @default false 79 | 80 | @param FixedTitle 81 | @text 固定タイトル 82 | @desc 固定タイトルの表示内容 83 | 空文字で固定タイトルは使用しません 84 | 85 | @param SubTitle 86 | @text サブタイトル 87 | @desc サブタイトルの表示内容 88 | 空文字でサブタイトルは表示しません 89 | 90 | @param Version 91 | @type boolean 92 | @text バージョン表示 93 | @desc バージョン番号をタイトル左下に表示するか 94 | @on 表示する 95 | @off 表示しない 96 | @default true 97 | 98 | @param VersionName 99 | @parent Version 100 | @text バージョン名 101 | @desc この文字以降のタイトルをバージョンとして扱います 102 | @default ver 103 | 104 | @param VersionPos 105 | @parent Version 106 | @type number 107 | @text バージョン分割位置 108 | @desc バージョン名で分割したタイトルの 109 | どこをバージョンとして使うかの設定 110 | @default 1 111 | 112 | @param VersionId 113 | @parent Version 114 | @type boolean 115 | @text バージョンID表示 116 | @desc $dataSystem["versionId"]を表示するかの設定 117 | @on 表示する 118 | @off 表示しない 119 | @default false 120 | 121 | @param VersionIdName 122 | @parent VersionId 123 | @text バージョンID区切り文字 124 | @desc バージョンIDの区切りとして使う文字 125 | @default . 126 | */ 127 | (() => { 128 | 'use strict'; 129 | 130 | // ベースプラグインの処理 131 | function Potadra_getPluginName(extension = 'js') { 132 | const reg = new RegExp(".+\/(.+)\." + extension); 133 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 134 | } 135 | function Potadra_convertBool(bool) { 136 | if (bool === "false" || bool === '' || bool === undefined) { 137 | return false; 138 | } else { 139 | return true; 140 | } 141 | } 142 | 143 | // パラメータ用変数 144 | const plugin_name = Potadra_getPluginName(); 145 | const params = PluginManager.parameters(plugin_name); 146 | 147 | // 各パラメータ用変数 148 | const TitleColor = Number(params.TitleColor || 0); 149 | const SelectOnlyNewGame = Potadra_convertBool(params.SelectOnlyNewGame); 150 | const FixedTitle = String(params.FixedTitle); 151 | const SubTitle = String(params.SubTitle); 152 | const Version = Potadra_convertBool(params.Version); 153 | const VersionName = String(params.VersionName || 'ver'); 154 | const VersionIdName = String(params.VersionIdName); 155 | const VersionPos = Number(params.VersionPos || 1); 156 | const VersionId = Potadra_convertBool(params.VersionId); 157 | 158 | /** 159 | * タイトル画面で、ニューゲーム/コンティニューを選択するウィンドウです。 160 | * 161 | * @class 162 | */ 163 | if (SelectOnlyNewGame) { 164 | Window_TitleCommand.prototype.selectLast = function() { 165 | this.selectSymbol('newGame'); 166 | }; 167 | } 168 | 169 | 170 | /** 171 | * タイトル画面の処理を行うクラスです。 172 | * 173 | * @class 174 | */ 175 | if (FixedTitle) { 176 | /** 177 | * ゲームタイトルの描画 178 | */ 179 | Scene_Title.prototype.drawGameTitle = function() { 180 | const x = 20; 181 | const y = Graphics.height / 4; 182 | const maxWidth = Graphics.width - x * 2; 183 | const text = FixedTitle; 184 | const bitmap = this._gameTitleSprite.bitmap; 185 | bitmap.fontFace = $gameSystem.mainFontFace(); 186 | bitmap.outlineColor = "black"; 187 | bitmap.outlineWidth = 8; 188 | bitmap.fontSize = 72; 189 | 190 | if (TitleColor !== 0) { 191 | bitmap.textColor = ColorManager.textColor(TitleColor); 192 | } 193 | 194 | bitmap.drawText(text, x, y, maxWidth, 48, "center"); 195 | }; 196 | } else { 197 | /** 198 | * ゲームタイトルの描画 199 | */ 200 | Scene_Title.prototype.drawGameTitle = function() { 201 | const x = 20; 202 | const y = Graphics.height / 4; 203 | const maxWidth = Graphics.width - x * 2; 204 | const text = $dataSystem.gameTitle; 205 | const bitmap = this._gameTitleSprite.bitmap; 206 | bitmap.fontFace = $gameSystem.mainFontFace(); 207 | bitmap.outlineColor = "black"; 208 | bitmap.outlineWidth = 8; 209 | bitmap.fontSize = 72; 210 | 211 | if (TitleColor !== 0) { 212 | bitmap.textColor = ColorManager.textColor(TitleColor); 213 | } 214 | 215 | bitmap.drawText(text, x, y, maxWidth, 48, "center"); 216 | }; 217 | } 218 | 219 | /** 220 | * 前景の作成 221 | */ 222 | const _Scene_Title_createForeground = Scene_Title.prototype.createForeground; 223 | Scene_Title.prototype.createForeground = function() { 224 | _Scene_Title_createForeground.apply(this, arguments); 225 | 226 | // サブタイトルの描画 227 | if (SubTitle) { 228 | this.drawSubTitle(); 229 | } 230 | 231 | // バージョンの描画 232 | if (Version) { 233 | this.drawVersion(); 234 | } 235 | }; 236 | 237 | /** 238 | * サブタイトルの描画 239 | */ 240 | Scene_Title.prototype.drawSubTitle = function() { 241 | const x = 20; 242 | const y = Graphics.height / 4 + 70; 243 | const maxWidth = Graphics.width - x * 2; 244 | const text = SubTitle; 245 | const bitmap = this._gameTitleSprite.bitmap; 246 | bitmap.outlineColor = 'black'; 247 | bitmap.outlineWidth = 8; 248 | bitmap.fontSize = 36; 249 | bitmap.textColor = ColorManager.normalColor(); 250 | bitmap.drawText(text, x, y, maxWidth, 48, 'center'); 251 | }; 252 | 253 | /** 254 | * バージョンの描画 255 | */ 256 | Scene_Title.prototype.drawVersion = function() { 257 | const x = 12; 258 | const y = Graphics.height - 48; 259 | const maxWidth = Graphics.width - x * 2; 260 | 261 | let text = VersionName; 262 | if ($dataSystem.gameTitle.includes(VersionName)) { 263 | text += $dataSystem.gameTitle.split(VersionName)[VersionPos]; 264 | } 265 | if (VersionId) { 266 | text += VersionIdName + $dataSystem.versionId; 267 | } 268 | 269 | const bitmap = this._gameTitleSprite.bitmap; 270 | bitmap.outlineColor = 'black'; 271 | bitmap.outlineWidth = 8; 272 | bitmap.fontSize = 24; 273 | bitmap.textColor = ColorManager.normalColor(); 274 | bitmap.drawText(text, x, y, maxWidth, 48); 275 | }; 276 | })(); 277 | -------------------------------------------------------------------------------- /plugins/Scene/Shop/CurrencyUnit.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 通貨単位切り替え Ver1.3.7(2023/9/11) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Scene/Shop/CurrencyUnit.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.3.7 11 | - MaxPrice.js と ShopRate.js の競合を解消 12 | - レート系のプラグインパラメータの桁数を変更 13 | 14 | Copyright (c) 2025 ポテトードラゴン 15 | Released under the MIT License. 16 | https://opensource.org/license/mit 17 | 18 | @help 19 | ## 概要 20 | 2つの通貨単位をプラグインコマンドで切り替えます 21 | プラグインコマンドで 通貨切り替え を行った場合に通貨単位が切り替わります 22 | 23 | ## 使い方 24 | 25 | ### 使用例1(景品交換所) 26 | 27 | 導入時はこちらの処理を想定しています 28 | イベントの実行内容を以下のように設定することで 29 | 景品交換所を実現出来ます 30 | 31 | ◆プラグインコマンド:CurrencyUnit, 通貨切り替え 32 | ◆ショップの処理:ポーション 33 | ◆プラグインコマンド:CurrencyUnit, 通貨切り替え 34 | 35 | 景品の内容はショップの処理で変更してください 36 | また、ショップの処理を購入のみとすることで、景品交換所らしさが出ます 37 | 38 | ### 使用例2(2つ目の通貨) 39 | 40 | パラメータを以下のように変更し 41 | イベントの実行内容を以下のように設定することで 42 | 円などの2つ目の世界の通貨を設定出来ます 43 | 44 | 場所移動を設定していますが、なしでも大丈夫です 45 | プラグインを呼び出す時に通貨が切り替わります 46 | 47 | パラメータ 48 | 購入コマンド名 購入する 49 | 2つ目の通貨名 円 50 | 51 | ● G → 円(イベントの組み方) 52 | 53 | ◆プラグインコマンド:CurrencyUnit, 通貨切り替え 54 | ◆場所移動:日本(0,0) 55 | 56 | ● 円 → G(イベントの組み方) 57 | 58 | ◆プラグインコマンド:CurrencyUnit, 通貨切り替え 59 | ◆場所移動:ファンタジーの世界(0,0) 60 | 61 | @param CurrencyUnitSwitch 62 | @type switch 63 | @text 通貨切り替えスイッチ 64 | @desc ONのとき2つ目の通貨に切り替え 65 | @default 25 66 | 67 | @param CurrencyVariable 68 | @type variable 69 | @text 通貨切り替え変数 70 | @desc 一時的に通貨を管理する変数ID 71 | @default 30 72 | 73 | @param BuyName 74 | @text 購入コマンド名 75 | @desc 2つ目の通貨の購入コマンド名 76 | @default 交換する 77 | 78 | @param SecondCurrencyUnitName 79 | @text 2つ目の通貨名 80 | @desc 2つ目の通貨名 81 | @default 枚 82 | 83 | @param BuyRate 84 | @type number 85 | @text 購入レート 86 | @desc 購入倍率 87 | @min 0 88 | @decimals 2 89 | @default 1.00 90 | 91 | @param SecondBuyRate 92 | @type number 93 | @text 2つ目の通貨購入レート 94 | @desc 2つ目の通貨購入倍率 95 | @min 0 96 | @decimals 2 97 | @default 1.00 98 | 99 | @param SellRate 100 | @type number 101 | @text 売却レート 102 | @desc 売却倍率 103 | @min 0 104 | @decimals 2 105 | @default 0.50 106 | 107 | @param SecondSellRate 108 | @type number 109 | @text 2つ目の通貨売却レート 110 | @desc 2つ目の通貨売却倍率 111 | @min 0 112 | @decimals 2 113 | @default 0.50 114 | 115 | @command change_currency_unit 116 | @text 通貨切り替え 117 | @desc 通貨単位を切り替え 118 | */ 119 | (() => { 120 | 'use strict'; 121 | 122 | // ベースプラグインの処理 123 | const common_max_price_params = Potadra_getPluginParams('MaxPrice'); 124 | const CommonPriceMetaName = common_max_price_params ? String(common_max_price_params.PriceMetaName || '価格') : false; 125 | const common_shop_rate_params = Potadra_getPluginParams('ShopRate'); 126 | let CommonBuyRate = common_shop_rate_params ? Number(common_shop_rate_params.BuyRate || 1) : 1; 127 | let CommonSellRate = common_shop_rate_params ? Number(common_shop_rate_params.SellRate || 0.5) : 0.5; 128 | const common_currency_unit_params = Potadra_getPluginParams('CurrencyUnit'); 129 | const CommonCurrencyUnitSwitch = Number(common_currency_unit_params.CurrencyUnitSwitch || 25); 130 | const CommonSecondBuyRate = Number(common_currency_unit_params.SecondBuyRate || 1); 131 | const CommonSecondSellRate = Number(common_currency_unit_params.SecondSellRate || 0.5); 132 | if (common_currency_unit_params) { 133 | CommonBuyRate = Number(common_currency_unit_params.BuyRate || 1); 134 | CommonSellRate = Number(common_currency_unit_params.SellRate || 0.5); 135 | } 136 | Window_ShopBuy.prototype.makeItemList = function() { 137 | this._data = []; 138 | this._price = []; 139 | for (const goods of this._shopGoods) { 140 | const item = this.goodsToItem(goods); 141 | if (item) { 142 | this._data.push(item); 143 | if (common_currency_unit_params && Potadra_isSecound(CommonCurrencyUnitSwitch)) { 144 | this._price.push(goods[2] === 0 ? Potadra_MetaPrice(item, CommonPriceMetaName, CommonSecondBuyRate) : goods[3]); 145 | } else { 146 | this._price.push(goods[2] === 0 ? Potadra_MetaPrice(item, CommonPriceMetaName, CommonBuyRate) : goods[3]); 147 | } 148 | } 149 | } 150 | }; 151 | Scene_Shop.prototype.sellingPrice = function() { 152 | if (common_currency_unit_params && Potadra_isSecound(CommonCurrencyUnitSwitch)) { 153 | return Math.floor(Potadra_MetaPrice(this._item, CommonPriceMetaName, CommonSecondSellRate)); 154 | } else { 155 | return Math.floor(Potadra_MetaPrice(this._item, CommonPriceMetaName, CommonSellRate)); 156 | } 157 | }; 158 | function Potadra_meta(meta, tag) { 159 | if (meta) { 160 | const data = meta[tag]; 161 | if (data) { 162 | if (data !== true) { 163 | return data.trim(); 164 | } else { 165 | return true; 166 | } 167 | } 168 | } 169 | return false; 170 | } 171 | function Potadra_MetaPrice(item, price_meta_name, rate = 1) { 172 | const meta_price = Potadra_meta(item.meta, price_meta_name); 173 | return (meta_price ? Number(meta_price) : item.price) * rate; 174 | } 175 | function Potadra_isPlugin(plugin_name) { 176 | return PluginManager._scripts.includes(plugin_name); 177 | } 178 | function Potadra_getPluginParams(plugin_name) { 179 | return Potadra_isPlugin(plugin_name) ? PluginManager.parameters(plugin_name) : false; 180 | } 181 | function Potadra_getPluginName(extension = 'js') { 182 | const reg = new RegExp(".+\/(.+)\." + extension); 183 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 184 | } 185 | function Potadra_isSecound(switch_no) { 186 | return $gameSwitches && $gameSwitches.value(switch_no) === true; 187 | } 188 | 189 | 190 | // パラメータ用変数 191 | const plugin_name = Potadra_getPluginName(); 192 | const params = PluginManager.parameters(plugin_name); 193 | 194 | // 各パラメータ用変数 195 | const CurrencyUnitSwitch = Number(params.CurrencyUnitSwitch || 25); 196 | const CurrencyVariable = Number(params.CurrencyVariable || 30); 197 | const BuyName = String(params.BuyName || '交換する'); 198 | const SecondCurrencyUnitName = String(params.SecondCurrencyUnitName || '枚'); 199 | 200 | /** 201 | * 所持金の設定 202 | * 203 | * @param {number} amount - 所持金 204 | */ 205 | function setGold(amount) { 206 | $gameParty._gold = amount; 207 | } 208 | 209 | // プラグインコマンド(通貨切り替え) 210 | PluginManager.registerCommand(plugin_name, "change_currency_unit", args => { 211 | $gameVariables.setValue(CurrencyVariable, $gameParty.gold()); 212 | setGold($gameVariables.value(CurrencyVariable)); 213 | 214 | if (Potadra_isSecound(CurrencyUnitSwitch)) { 215 | $gameSwitches.setValue(CurrencyUnitSwitch, false); 216 | } else { 217 | $gameSwitches.setValue(CurrencyUnitSwitch, true); 218 | } 219 | }); 220 | 221 | // 通貨の表示切り替え 222 | Object.defineProperty(TextManager, 'currencyUnit', { 223 | get: function() { 224 | if (Potadra_isSecound(CurrencyUnitSwitch)) { 225 | return SecondCurrencyUnitName; 226 | } else { 227 | return $dataSystem.currencyUnit; 228 | } 229 | }, 230 | configurable: true 231 | }); 232 | 233 | 234 | /** 235 | * ショップ画面で、購入/売却を選択するウィンドウです。 236 | * 237 | * @class 238 | */ 239 | 240 | /** 241 | * コマンドリストの作成 242 | */ 243 | const _Window_ShopCommand_makeCommandList = Window_ShopCommand.prototype.makeCommandList; 244 | Window_ShopCommand.prototype.makeCommandList = function() { 245 | if ($gameSwitches.value(CurrencyUnitSwitch) === true) { 246 | this.addCommand(BuyName, "buy"); 247 | this.addCommand(TextManager.sell, "sell", !this._purchaseOnly); 248 | this.addCommand(TextManager.cancel, "cancel"); 249 | } else { 250 | _Window_ShopCommand_makeCommandList.apply(this, arguments); 251 | } 252 | }; 253 | })(); 254 | -------------------------------------------------------------------------------- /plugins/Battle/Troop/RandomTroop.js: -------------------------------------------------------------------------------- 1 | /*: 2 | @plugindesc 3 | 敵グループランダム決定 Ver1.5.2(2025/1/20) 4 | 5 | @url https://raw.githubusercontent.com/pota-gon/RPGMakerMZ/refs/heads/main/plugins/Battle/Troop/RandomTroop.js 6 | @target MZ 7 | @author ポテトードラゴン 8 | 9 | ・アップデート情報 10 | * Ver1.5.2: ヘルプ更新 11 | * Ver1.5.1 12 | - 自動整列の判定が正しくなかったバグ修正 13 | - <空中>タグにY座標を指定できるように修正 14 | - ヘルプ更新 15 | - リファクタリング 16 | * Ver1.5.0 17 | - 自動整列の有効をサイドビューではなく、プラグインパラメータで設定できるように変更 18 | - 自動整列タグの説明追加 19 | - タグの説明が分かりづらかったので、一部修正 20 | * Ver1.4.1: 自動整列を無効にする機能を追加 21 | 22 | Copyright (c) 2025 ポテトードラゴン 23 | Released under the MIT License. 24 | https://opensource.org/license/mit 25 | 26 | @help 27 | ## 概要 28 | 任意の敵グループにて、ランダムに敵キャラを決定できる機能を追加します 29 | 30 | ## 使い方 31 | 1. 任意の敵グループを選択します 32 | 33 | 2. ランダム出現させたい敵キャラを追加します 34 | 同じ敵キャラを追加した場合は、出現率が上がります 35 | 36 | 3. 敵グループ名にタグを記載します 37 | タグの記載方法は、下記手順を参考にしてください 38 | 39 | 4. マップやイベントの設定で敵グループを呼び出すと 40 | ランダムに敵キャラが出現します 41 | 42 | ### タグ(敵グループ) 43 | 敵グループ名に下記タグを指定することで 44 | 敵グループをランダムに決定します 45 | 46 | タグを指定しない場合は、 通常の敵グループとして扱われます 47 | 48 | #### 必須のタグ 49 | 必ず記載するようにしてください 50 | 片方しか設定しない場合は、出現数は固定となります 51 | 52 | 53 | 敵キャラの最低出現数を1~8で指定します 54 | 55 | 56 | 敵キャラの最大出現数を1~8で指定します 57 | 58 | #### 任意のタグ 59 | 必要に応じて記載してください 60 | 61 | 62 | 固定する敵キャラを1~8で指定します 63 | 1~8の順番は敵グループに追加した順番です 64 | 最初に追加したものが、1番になります 65 | また、と , で区切ることで、複数の敵キャラを固定することができます 66 | 67 | <自動整列ON> 68 | 人数による自動整列を有効にします 69 | 70 | <自動整列OFF> 71 | 人数による自動整列を無効にします 72 | 73 | ### メモ(敵キャラ) 74 | 75 | <空中> 76 | こうもりなどの空中に飛んでいる敵を上部に表示します 77 | タグ名はパラメータで変更可能です 78 | 79 | <空中: Y> 80 | <空中> を指定したときは、Y座標を -100 しますが 81 | 敵キャラごとに、Y座標を指定することで微調整することが可能です 82 | 83 | ・設定例 84 | <空中: 150> 85 | Y座標を -200 します。<空中>を指定したときより高い位置に移動します 86 | 87 | <空中: 50> 88 | Y座標を -50 します。<空中>を指定したときより低い位置に移動します 89 | 90 | ### サイドビューでの設定について 91 | フロントビュー用のプラグインであるため 92 | サイドビューの整列機能は実装の予定はありません 93 | 94 | 砂川さんの NRP_TroopRandomFormation.js を使用することで 95 | サイドビューでも配置を整列出来るため、そちらをご利用ください 96 | https://newrpg.seesaa.net/article/475049887.html 97 | 98 | ※ 注意 99 | 敵グループで設定したモンスター数より、で指定したXの値が大きい場合 100 | 超過したモンスターについては、フロントビュー用の整列で配置が決定します 101 | 102 | @param SkyName 103 | @type string 104 | @text 空中名称 105 | @desc 敵キャラのメモに記載するメタデータ(<空中>)の名称 106 | こうもりなどの空中に飛んでいる敵を上部に表示します 107 | @default 空中 108 | 109 | @param Alignment 110 | @type boolean 111 | @text 自動整列 112 | @desc 自動整列を有効にするか 113 | @on 有効にする 114 | @off 有効にしない 115 | @default true 116 | 117 | @param EnableAlignmentMetaName 118 | @parent Alignment 119 | @text 自動整列ONタグ 120 | @desc 自動整列ONに使うタグの名称 121 | デフォルトは 自動整列ON 122 | @default 自動整列ON 123 | 124 | @param DisableAlignmentMetaName 125 | @parent Alignment 126 | @text 自動整列OFFタグ 127 | @desc 自動整列OFFに使うタグの名称 128 | デフォルトは 自動整列OFF 129 | @default 自動整列OFF 130 | */ 131 | (() => { 132 | 'use strict'; 133 | 134 | // ベースプラグインの処理 135 | function Potadra_getPluginName(extension = 'js') { 136 | const reg = new RegExp(".+\/(.+)\." + extension); 137 | return decodeURIComponent(document.currentScript.src).replace(reg, '$1'); 138 | } 139 | function Potadra_convertBool(bool) { 140 | if (bool === "false" || bool === '' || bool === undefined) { 141 | return false; 142 | } else { 143 | return true; 144 | } 145 | } 146 | function Potadra_isPlugin(plugin_name) { 147 | return PluginManager._scripts.includes(plugin_name); 148 | } 149 | function Potadra_getPluginParams(plugin_name) { 150 | return Potadra_isPlugin(plugin_name) ? PluginManager.parameters(plugin_name) : false; 151 | } 152 | 153 | // パラメータ用変数 154 | const plugin_name = Potadra_getPluginName(); 155 | const params = PluginManager.parameters(plugin_name); 156 | 157 | // 各パラメータ用変数 158 | const SkyName = String(params.SkyName || '空中'); 159 | const Alignment = Potadra_convertBool(params.Alignment); 160 | const EnableAlignmentMetaName = String(params.EnableAlignmentMetaName || '自動整列ON'); 161 | const DisableAlignmentMetaName = String(params.DisableAlignmentMetaName || '自動整列OFF'); 162 | 163 | // 他プラグイン連携(パラメータ取得) 164 | const debug_params = Potadra_getPluginParams('Debug'); 165 | const EnableResolution = Potadra_convertBool(debug_params.EnableResolution); 166 | const ResolutionWidth = debug_params ? Number(debug_params.ResolutionWidth || 816) : 816; 167 | const ResolutionHeight = debug_params ? Number(debug_params.ResolutionHeight || 624) : 624; 168 | 169 | /** 170 | * セットアップ 171 | * 172 | * @param {} troopId - 173 | */ 174 | const _Game_Troop_setup = Game_Troop.prototype.setup; 175 | Game_Troop.prototype.setup = function(troopId) { 176 | // 通常処理呼び出し 177 | _Game_Troop_setup.apply(this, arguments); 178 | 179 | const max_pattern = //i; 180 | const min_pattern = //i; 181 | const fix_pattern = //i; 182 | const name = this.troop().name; 183 | const max_match = name.match(max_pattern); 184 | const min_match = name.match(min_pattern); 185 | const fix_match = name.match(fix_pattern); 186 | 187 | if (max_match || min_match) { 188 | this.clear(); 189 | this._troopId = troopId; 190 | this._enemies = []; 191 | 192 | const members = this.troop().members; 193 | let max = members.length; 194 | let min = 1; 195 | if (max_match) { 196 | max = Number(max_match[1]); 197 | } 198 | if (min_match) { 199 | min = Number(min_match[1]); 200 | } 201 | 202 | // 敵キャラの出現数を算出 203 | max = Math.randomInt(max) + 1; 204 | if (max < min) { 205 | max = min; 206 | } 207 | 208 | // 抽選する敵キャラのIDを配列に格納 209 | let ary = []; 210 | let ary_x = []; 211 | let ary_y = []; 212 | for (const member of members) { 213 | if ($dataEnemies[member.enemyId]) { 214 | ary.push(member.enemyId); 215 | ary_x.push(member.x); 216 | ary_y.push(member.y); 217 | } 218 | } 219 | 220 | // 固定敵キャラの設定 221 | let fix = []; 222 | if (fix_match) { 223 | fix = fix_match[1].split(','); 224 | } 225 | 226 | // 敵キャラを抽選 227 | let width = Graphics.width; 228 | let height = Graphics.height; 229 | if (debug_params && EnableResolution) { 230 | if (!width) width = ResolutionWidth; 231 | if (!height) height = ResolutionHeight; 232 | } else { 233 | if (!width) width = $dataSystem.advanced.screenWidth; 234 | if (!height) height = $dataSystem.advanced.screenHeight; 235 | } 236 | let first = (width / max) / 2; 237 | let y = height - 180 - 8; // 180 はメニューサイズ、 8 は余白 238 | 239 | for (let i = 0; i < max; i++) { 240 | let enemyId; 241 | let index = fix[i]; 242 | if (index) { 243 | index -= 1; 244 | enemyId = ary[index]; 245 | } else { 246 | enemyId = ary[Math.floor(Math.random() * ary.length)]; 247 | } 248 | let x = first + (first * i) * 2; 249 | if ((!Alignment || name.includes(DisableAlignmentMetaName)) && !name.includes(EnableAlignmentMetaName)) { 250 | if (ary_x[i]) x = ary_x[i]; 251 | if (ary_y[i]) y = ary_y[i]; 252 | } 253 | const enemy = new Game_Enemy(enemyId, x, y); 254 | 255 | // Y座標指定 256 | const sky = enemy.enemy().meta[SkyName]; 257 | let sky_y = 100; 258 | if (sky) { 259 | if (sky !== true) sky_y = Number(sky.trim()); 260 | enemy._screenY -= sky_y; 261 | } 262 | this._enemies.push(enemy); 263 | } 264 | 265 | // 同名の敵キャラに ABC などの文字を付加 266 | this.makeUniqueNames(); 267 | } 268 | }; 269 | })(); 270 | --------------------------------------------------------------------------------