Party window skip

akukoa

Warper
Member
Joined
Jun 1, 2019
Messages
4
Reaction score
1
First Language
English
Primarily Uses
N/A
Hi,

I am looking for a way to skip the party window ( fight / escape window )

I know that Yanfly's BattleEngineCore has that feature, but with other plugins that I am using it is causing problems so I can't use that battle engine core as I really want the other plugins.

I have tried to see what part of the BEC it the part that allows that to be skipped but with no luck, each time I try, it either does nothing at all or crashes my game.

I also found the script posted by somebody else to remove it entirely and that works, but I would like the players to still be able to go back to it for when they wish to not fight enemies and just run away.

The js script to fully remove it is
Scene_Battle.prototype.startPartyCommandSelection = function() {
this.commandFight();
};
Does anyone know what modification I can do to the above script, or what entirely different script I need to get a battle to start with the selecting of skills ( attack, magic, items, defend, etc ) but still be able to go back to the party window, just like it is in the battle engine core.

I also have a partial work around right now, of having the option disabled with the above script and giving the chars a skill that allows to escape, but with that I still need to give a command to everyone of the characters before it takes effect.

Thanks in advance.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
350
First Language
English
Primarily Uses
RMMV
I wrote one that you can download from here, or copy-paste from below into a file called "SkipPartyMenu.js":

Code:
/*:
* @plugindesc Skips the fight/escape menu at the start of each turn.
* @author Zevia
*
* @help This plugin will cause the party menu where you choose fight or escape
* to be skipped at the start of each turn. The Escape command will be moved
* to the end of the command menu. The Escape command can be removed altogether
* by changing the "Add Escape Command" parameter in the configuration.
*
* @param isEscapeEnabled
* @text Add Escape Command
* @type boolean
* @desc Whether the Escape command will be added to the actor's command list or not
* @default true
*
* @param shouldDisablePartyMenu
* @text Disable Party Menu
* @type boolean
* @desc Prevent the User from going back to the Fight/Escape menu by hitting the escape key.
* @default true
*/

(function(module) {
    'use strict';

    module.Zevia = module.Zevia || {};
    const SkipPartyMenu = module.Zevia.SkipPartyMenu = {};
    const ESCAPE_SYMBOL = 'escape';
    const parameters = PluginManager.parameters('SkipPartyMenu');
    const isEscapeEnabled = !!parameters.isEscapeEnabled.match(/true/i);
    const shouldDisablePartyMenu = !!parameters.shouldDisablePartyMenu.match(/true/i);

    SkipPartyMenu.shouldPreventCancelMenu = function() {
        return shouldDisablePartyMenu &&
            (
                BattleManager._actorIndex < 1 ||
                (BattleManager.isSTB && BattleManager.isSTB()) ||
                (BattleManager.isATB && BattleManager.isATB())
            );
    };

    SkipPartyMenu.startBattlerInput = BattleManager.startInput;
    BattleManager.startInput = function() {
        SkipPartyMenu.startBattlerInput.call(this);
        if (BattleManager.isSTB && BattleManager.isSTB()) { return; }

        BattleManager.selectNextCommand();
    };

    SkipPartyMenu.createActorCommandWindow = Scene_Battle.prototype.createActorCommandWindow;
    Scene_Battle.prototype.createActorCommandWindow = function() {
        SkipPartyMenu.createActorCommandWindow.call(this);
        if (!isEscapeEnabled) { return; }

        this._actorCommandWindow.setHandler(ESCAPE_SYMBOL, function() {
            BattleManager.actor()._actionState = '';
            if (!BattleManager.processEscape() && BattleManager.isATB && BattleManager.isATB()) {
                BattleManager._phase = 'atb';
                SceneManager._scene._actorCommandWindow.deactivate();
            }
        });
    };

    SkipPartyMenu.changeInputWindow = Scene_Battle.prototype.changeInputWindow;
    Scene_Battle.prototype.changeInputWindow = function() {
        if (!shouldDisablePartyMenu) {
            SkipPartyMenu.changeInputWindow.call(this);
            return;
        }

        if (BattleManager.isInputting()) {
            if (!BattleManager.actor()) {
                BattleManager._actorIndex = 0;
                BattleManager.actor().setActionState('inputting');
            }
            this.startActorCommandSelection();
        } else {
            this.endCommandSelection();
        }
    };

    SkipPartyMenu.makeCommandList = Window_ActorCommand.prototype.makeCommandList;
    Window_ActorCommand.prototype.makeCommandList = function() {
        SkipPartyMenu.makeCommandList.call(this);
        if (this._actor && isEscapeEnabled) {
            this.addCommand(TextManager.escape, ESCAPE_SYMBOL, BattleManager.canEscape());
        }
    };

    SkipPartyMenu.processCancel = Window_ActorCommand.prototype.processCancel;
    Window_ActorCommand.prototype.processCancel = function() {
        if (SkipPartyMenu.shouldPreventCancelMenu()) { return; }
        SkipPartyMenu.processCancel.call(this);
    };
})(window);
By default, it moves the escape command into a command that each Actor has, but you can disable that in the Plugin parameters.

A quick note is that it's not compatible with versions of RMMV earlier than 1.6, but if that's an issue, let me know and I can add some compatibility fixes.
 

akukoa

Warper
Member
Joined
Jun 1, 2019
Messages
4
Reaction score
1
First Language
English
Primarily Uses
N/A
I wrote one that you can download from here, or copy-paste from below into a file called "SkipPartyMenu.js":

Code:
/*:
* @plugindesc Skips the fight/escape menu at the start of each turn.
* @author Zevia
*
* @help This plugin will cause the party menu where you choose fight or escape
* to be skipped at the start of each turn. The Escape command will be moved
* to the end of the command menu. The Escape command can be removed altogether
* by changing the "Add Escape Command" parameter in the configuration.
*
* @param isEscapeEnabled
* @text Add Escape Command
* @type boolean
* @desc Whether the Escape command will be added to the actor's command list or not
* @default true
*
* @param shouldDisablePartyMenu
* @text Disable Party Menu
* @type boolean
* @desc Prevent the User from going back to the Fight/Escape menu by hitting the escape key.
* @default true
*/

(function(module) {
    'use strict';

    module.Zevia = module.Zevia || {};
    const SkipPartyMenu = module.Zevia.SkipPartyMenu = {};
    const ESCAPE_SYMBOL = 'escape';
    const parameters = PluginManager.parameters('SkipPartyMenu');
    const isEscapeEnabled = !!parameters.isEscapeEnabled.match(/true/i);
    const shouldDisablePartyMenu = !!parameters.shouldDisablePartyMenu.match(/true/i);

    SkipPartyMenu.shouldPreventCancelMenu = function() {
        return shouldDisablePartyMenu &&
            (
                BattleManager._actorIndex < 1 ||
                (BattleManager.isSTB && BattleManager.isSTB()) ||
                (BattleManager.isATB && BattleManager.isATB())
            );
    };

    SkipPartyMenu.startBattlerInput = BattleManager.startInput;
    BattleManager.startInput = function() {
        SkipPartyMenu.startBattlerInput.call(this);
        if (BattleManager.isSTB && BattleManager.isSTB()) { return; }

        BattleManager.selectNextCommand();
    };

    SkipPartyMenu.createActorCommandWindow = Scene_Battle.prototype.createActorCommandWindow;
    Scene_Battle.prototype.createActorCommandWindow = function() {
        SkipPartyMenu.createActorCommandWindow.call(this);
        if (!isEscapeEnabled) { return; }

        this._actorCommandWindow.setHandler(ESCAPE_SYMBOL, function() {
            BattleManager.actor()._actionState = '';
            if (!BattleManager.processEscape() && BattleManager.isATB && BattleManager.isATB()) {
                BattleManager._phase = 'atb';
                SceneManager._scene._actorCommandWindow.deactivate();
            }
        });
    };

    SkipPartyMenu.changeInputWindow = Scene_Battle.prototype.changeInputWindow;
    Scene_Battle.prototype.changeInputWindow = function() {
        if (!shouldDisablePartyMenu) {
            SkipPartyMenu.changeInputWindow.call(this);
            return;
        }

        if (BattleManager.isInputting()) {
            if (!BattleManager.actor()) {
                BattleManager._actorIndex = 0;
                BattleManager.actor().setActionState('inputting');
            }
            this.startActorCommandSelection();
        } else {
            this.endCommandSelection();
        }
    };

    SkipPartyMenu.makeCommandList = Window_ActorCommand.prototype.makeCommandList;
    Window_ActorCommand.prototype.makeCommandList = function() {
        SkipPartyMenu.makeCommandList.call(this);
        if (this._actor && isEscapeEnabled) {
            this.addCommand(TextManager.escape, ESCAPE_SYMBOL, BattleManager.canEscape());
        }
    };

    SkipPartyMenu.processCancel = Window_ActorCommand.prototype.processCancel;
    Window_ActorCommand.prototype.processCancel = function() {
        if (SkipPartyMenu.shouldPreventCancelMenu()) { return; }
        SkipPartyMenu.processCancel.call(this);
    };
})(window);
By default, it moves the escape command into a command that each Actor has, but you can disable that in the Plugin parameters.

A quick note is that it's not compatible with versions of RMMV earlier than 1.6, but if that's an issue, let me know and I can add some compatibility fixes.
It is not 100% what I asked for but this is more than good enough, it actually is even better than what I was originally thinking and it works 100%.

Thank you very much for the help!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Oh man the controls in Mario Sunshine are pretty awful and I haven't even witnessed the controls without FLUDD
Lots of cool changes for Battle Castle in the works! Not just reworked dialogue, but gameplay, combat, and possibly lore changes to make things weightier.
Actor2_2 added!

I started really going in on my project April of last year... I'm just now making starting the actual game... making assets (and not even all of them), whoooo... TIME SINK.


Imagine being a pleb and using --------------------.js :LZSwink:

Forum statistics

Threads
102,947
Messages
996,206
Members
134,411
Latest member
Scop
Top