/*: * @target MZ * @plugindesc 戦闘高速化・ウェイト削除・アニメーション早送り * @author Antigravity * * @help * このプラグインは、ウェイトの削除、テキスト速度の向上、アニメーションの早送りにより、 * ゲームのバトルを劇的に高速化します。 * * 変更点: * - Window_BattleLog のテキストを即時表示。 * - Window_BattleLog のウェイトを削除。 * - BattleManager のウェイトを可能な限り無視。 * - アニメーションを倍速(またはそれ以上)で再生。 */ (() => { // ------------------------------------------------------------------------- // Window_BattleLog のオーバーライド // ------------------------------------------------------------------------- // メッセージ表示速度を即時に設定 Window_BattleLog.prototype.messageSpeed = function() { return 0; }; // 基本的なウェイトを削除 Window_BattleLog.prototype.wait = function() { this._waitCount = 0; }; // エフェクト(振動/フラッシュなど)のウェイトを削除 Window_BattleLog.prototype.waitForEffect = function() { this._waitCount = 0; }; // 移動ウェイトを削除 Window_BattleLog.prototype.waitForMovement = function() { this._waitCount = 0; }; // 改行ウェイトを削除 Window_BattleLog.prototype.waitForNewLine = function() { this._waitCount = 0; }; // 常に早送りを有効化 Window_BattleLog.prototype.isFastForward = function() { return true; }; // 念のため、updateWaitCount をオーバーライドしてウェイトを即座に消費させる const _Window_BattleLog_updateWaitCount = Window_BattleLog.prototype.updateWaitCount; Window_BattleLog.prototype.updateWaitCount = function() { if (this._waitCount > 0) { this._waitCount = 0; // 0に強制 return true; } return false; }; // ------------------------------------------------------------------------- // Sprite_Animation のオーバーライド (アニメーションの高速化) // ------------------------------------------------------------------------- // MZでは、アニメーションはEffekseerかSprite_Animationによって処理されます。 // Effekseerの場合、速度を上げてみます。 // Sprite_AnimationMVのロジックが存在する場合、オーバーライド(レガシー) if (Sprite_Animation.prototype.update) { const _Sprite_Animation_update = Sprite_Animation.prototype.update; Sprite_Animation.prototype.update = function() { // フレームごとの更新回数を増やして高速化 _Sprite_Animation_update.call(this); if (this.isPlaying()) _Sprite_Animation_update.call(this); if (this.isPlaying()) _Sprite_Animation_update.call(this); if (this.isPlaying()) _Sprite_Animation_update.call(this); }; } // ------------------------------------------------------------------------- // Scene_Battle のオーバーライド // ------------------------------------------------------------------------- // バトルシーンでの早送りを強制 Scene_Battle.prototype.isFastForward = function() { return true; }; // ------------------------------------------------------------------------- // Scene_Base のオーバーライド (トランジションの高速化) // ------------------------------------------------------------------------- // 標準フェードの高速化 Scene_Base.prototype.fadeSpeed = function() { return 1; }; // 低速フェードの高速化 Scene_Base.prototype.slowFadeSpeed = function() { return 5; }; // ------------------------------------------------------------------------- // SceneManager のオーバーライド (Effekseerの高速化) // ------------------------------------------------------------------------- // Effekseerアニメーション(MZのバトルで使用)の高速化 if (SceneManager.updateEffekseer) { SceneManager.updateEffekseer = function() { if (Graphics.effekseer && this.isGameActive()) { // フレームごとに3回更新して3倍速にする Graphics.effekseer.update(); // バトル中かどうかを確認して、追加の速度を適用 if (this._scene && this._scene.constructor.name === "Scene_Battle") { Graphics.effekseer.update(); Graphics.effekseer.update(); Graphics.effekseer.update(); Graphics.effekseer.update(); Graphics.effekseer.update(); } } }; } // ------------------------------------------------------------------------- // Game_CharacterBase のオーバーライド (移動の高速化) // ------------------------------------------------------------------------- // const _Game_CharacterBase_initMembers = Game_CharacterBase.prototype.initMembers; // Game_CharacterBase.prototype.initMembers = function() { // _Game_CharacterBase_initMembers.call(this); // // デフォルトは通常4です。5または6に増やすと大幅に速くなります。 // // 5は4の2倍速、6は4の4倍速です。 // // バランスの良い5(2倍速)に設定します。 // // プレイヤーにのみ高速化を適用したい場合でも、ここで適用するとデフォルトですべてのキャラクターに影響します。 // // プレイヤーのみに適用するには、Game_Player.prototype.initMembersなどをオーバーライドしてください。 // }; // // // プレイヤーの速度を上げるためにrealMoveSpeedをオーバーライド // Game_Player.prototype.realMoveSpeed = function() { // // 標準移動速度 + 3(超高速) // return this._moveSpeed + 2; // }; // ------------------------------------------------------------------------- // Window_Message のオーバーライド (テキスト即時表示) // ------------------------------------------------------------------------- // メッセージ更新時に常に高速表示を強制 const _Window_Message_updateMessage = Window_Message.prototype.updateMessage; Window_Message.prototype.updateMessage = function() { this._showFast = true; // 常時高速 this._lineShowFast = true; // 行待ちをスキップ // this._pauseSkip = true; // テキスト後の入力待ちを許可するために削除 return _Window_Message_updateMessage.call(this); }; // メッセージ内のウェイト(\.や\|など)を無視するようにstartWaitをオーバーライド Window_Message.prototype.startWait = function(count) { // ウェイトを無視 this._waitCount = 0; }; // ------------------------------------------------------------------------- // Scene_Battle のオーバーライド (自動戦闘 & 自動開始) // ------------------------------------------------------------------------- // バトル開始メッセージをスキップ BattleManager.displayStartMessages = function() { // 何もしない }; // // パーティーコマンド(戦う/逃げる)をスキップ -> 「戦う」をデフォルトに // Scene_Battle.prototype.startPartyCommandSelection = function() { // this.commandFight(); // }; // // アクターコマンドをスキップ -> 全員「攻撃」を実行 // Scene_Battle.prototype.startActorCommandSelection = function() { // const actor = BattleManager.actor(); // if (actor) { // // アクターの持つすべてのアクションスロットに対して「攻撃」を設定 // for (let i = 0; i < actor.numActions(); i++) { // const action = actor.action(i); // if (action) { // action.setAttack(); // 通常攻撃をセット // action.decideRandomTarget(); // ターゲットをランダムに決定 // } // } // // 次のコマンドへ進む(UI操作をスキップ) // this.selectNextCommand(); // } // }; // ------------------------------------------------------------------------- // Window_Message のオーバーライド (バトル結果の自動スキップ) // ------------------------------------------------------------------------- // バトル終了時(勝利メッセージ)に自動的に「OK」をトリガー const _Window_Message_isTriggered = Window_Message.prototype.isTriggered; Window_Message.prototype.isTriggered = function() { if (SceneManager._scene instanceof Scene_Battle && BattleManager.isBattleEnd()) { return true; // OKボタン押下をシミュレート } return _Window_Message_isTriggered.call(this); }; })();