MZ COMPLETELY remove the party command window?

Hey all,

I'm looking for a plugin that absolutely, without a chance of showing it's ugly face, obliterates and REMOVES the party command window from battle. Pow pow.

I've got some plugins that for the most part 'remove' it, even making it inaccessible by pressing the cancel button, but under bizarre circumstances that I can't consistently repeat, it'll show up.

I did try my hand and copying all of the code involved and commenting out specific lines in a new .js file, but it did some weird things like making the actor command window blank. BUT I DIGRESS.

If anyone knows of a plugin or is willing to write one up, I, and likely many others, would be grateful.

Thanks!
There is a slight problem with your idea - which is also the reason why most plugins just hide the party menu, displaying it again if the player cancel the hide at the beginning of the selection phase.

And that is that without the party menu, you'll have problems with the player/party escaping battle.

The Skill "Escape" is NOT supposed to be used by the player, it was originally intended for enemies only. It works for an actor, but since it is only for a single actor, there is a chance that the remaining actors are quickly overwhelmed by the full troop.
But more importantly, the escape skill does not automatically end battle.
And as a result there have been cases where the combat continued with all actors gone.
Which would look like a crash to the player, even if it is just the screen without any commands...

If you don't want the player to have the option not to escape ever then you could do this - but if you want to focus on an escape-type skill, then the plugin for handling the party command window would also have to change the escape skill behaviour.

But sorry, I never worked with MZ and don't know where the plugins for that are.
There is a slight problem with your idea - which is also the reason why most plugins just hide the party menu, displaying it again if the player cancel the hide at the beginning of the selection phase.

And that is that without the party menu, you'll have problems with the player/party escaping battle.

The Skill "Escape" is NOT supposed to be used by the player, it was originally intended for enemies only. It works for an actor, but since it is only for a single actor, there is a chance that the remaining actors are quickly overwhelmed by the full troop.
But more importantly, the escape skill does not automatically end battle.
And as a result there have been cases where the combat continued with all actors gone.
Which would look like a crash to the player, even if it is just the screen without any commands...

If you don't want the player to have the option not to escape ever then you could do this - but if you want to focus on an escape-type skill, then the plugin for handling the party command window would also have to change the escape skill behaviour.

But sorry, I never worked with MZ and don't know where the plugins for that are.
Makes sense! I do have a plugin that adds the Escape command to my characters. I've been thinking about perhaps just making escaping not a thing at all in my project, but overall I don't like that idea.

On a side note, I AM looking for a plugin that adds a charge time to escaping, rather than doing it immediately. If I set the invocation to a negative, that doesn't seem to matter.

I'm sure there's gotta be a way to remove the Party Command window completely, though.
I'm sure there's gotta be a way to remove the Party Command window completely, though.
There are multiple ways to design and code the appearance of "no party window". Removing it completely would require reprogramming the scene's flow, and patching any core or plugin methods that reference the now-absent window. By contrast, a typical solution is to just tell the window to auto-OK itself whenever it is given focus.

I've written plugins for this before, in case you want to try those (and haven't already):
If they don't work, you can try turning off all other plugins, save your project, then test again. If that helps, and you want help figuring out which plugin(s) are causing the problem, then you can share screenshots of the Plugin Manager so we can check for conflicts, load order issues, etc.

On a side note, I AM looking for a plugin that adds a charge time to escaping, rather than doing it immediately. If I set the invocation to a negative, that doesn't seem to matter.
The skill's Speed is added to the user's AGI to decide the action's speed. In the TPB system the casting time for an action (Game_Battler#tpbRequiredCastTime) is based on the square root of the delay (i.e. sum of negative speed values) divided by the battler's AGI-only speed. For a test, I suggest setting the battler's AGI very low and the skill's Speed to -2000.

But more importantly, the escape skill does not automatically end battle.
MZ introduced a specific check for "all party members Escaped" (BattleManager.checkBattleEnd -> Game_Party#isEscaped) so as far as I'm aware that should be OK.
There are multiple ways to design and code the appearance of "no party window". Removing it completely would require reprogramming the scene's flow, and patching any core or plugin methods that reference the now-absent window. By contrast, a typical solution is to just tell the window to auto-OK itself whenever it is given focus.

I've written plugins for this before, in case you want to try those (and haven't already):
If they don't work, you can try turning off all other plugins, save your project, then test again. If that helps, and you want help figuring out which plugin(s) are causing the problem, then you can share screenshots of the Plugin Manager so we can check for conflicts, load order issues, etc.


The skill's Speed is added to the user's AGI to decide the action's speed. In the TPB system the casting time for an action (Game_Battler#tpbRequiredCastTime) is based on the square root of the delay (i.e. sum of negative speed values) divided by the battler's AGI-only speed. For a test, I suggest setting the battler's AGI very low and the skill's Speed to -2000.


MZ introduced a specific check for "all party members Escaped" (BattleManager.checkBattleEnd -> Game_Party#isEscaped) so as far as I'm aware that should be OK.
Thanks for the response, @caethyril ! I think I had the turn-based plugin, so I'm trying the TPB one instead since that's the battle system I'm using. Didn't realize you made one for that! So hopefully that all goes well. I'll pay attention to it as I test my project out.

Unfortunately for Escape, it happens immediately even with a -2000 invocation. I'll keep looking to see what I find.

Thanks again!
Fingers crossed!

Unfortunately for Escape, it happens immediately even with a -2000 invocation.
😅 Not sure why that would happen. Is it only the skill with an Escape effect that has the problem? If so, is there something special about how/when you're using that skill?

I just tested without plugins and it seemed to be OK for me. I selected a skill with scope User, effect Escape, and speed -2000 in TPB-Wait mode: after a notable cast time, the actor (AGI 55) used that skill and then disappeared as expected. 😮‍💨

By default most effects are applied when the action hits the target, which shouldn't happen until the cast time (if any) is finished. The only exception is the Common Event effect, which reserves immediately before the action starts. So if you've tested with low AGI (e.g. 10) and high delay (-2000) then I suggest you check your plugins.
Fingers crossed!


😅 Not sure why that would happen. Is it only the skill with an Escape effect that has the problem? If so, is there something special about how/when you're using that skill?

I just tested without plugins and it seemed to be OK for me. I selected a skill with scope User, effect Escape, and speed -2000 in TPB-Wait mode: after a notable cast time, the actor (AGI 55) used that skill and then disappeared as expected. 😮‍💨

By default most effects are applied when the action hits the target, which shouldn't happen until the cast time (if any) is finished. The only exception is the Common Event effect, which reserves immediately before the action starts. So if you've tested with low AGI (e.g. 10) and high delay (-2000) then I suggest you check your plugins.
Aha! That was my mistake! I assumed the Escape skill was like the Attack skill where it affects the actual command, but I had to use a plugin to add the Escape skill as a command (which I had targeting all allies), and comment out the addition of the actual Escape command.

So the invocation speed worked! However it didn't function as the escape command and all the player sprites immediately disappeared and the battle scene continued on, similarly to what @Andar mentioned. So that's... progress? haha

EDIT: I can make the command call a common event to Abort Battle instead, which is cool. Using some plugins I'm sure I can have the players animate to run away. Just working on all that to see how it goes!

EDIT #2: OK! So! I've got the skill (with a success rate %) as a command which runs a common event to check if the skill 'hits'/is successful. If not, then it pushes a message to the battle log saying so. If it DOES, then I have it Force Action another skill that contains the battler animation note tags to animate the little guys running away and pushing a battle log message saying so, followed by a 2 sec wait time and then running Abort Battle. At least that's the theory I have set up. I'm having a hard time figuring out how to check if the Flee command is successful, lol.

EDIT #3: Looks like the Party Command window popped up again. It happened so fast that I think it was because I was inputting commands real quick during active mode TPB.
So the invocation speed worked! However it didn't function as the escape command and all the player sprites immediately disappeared and the battle scene continued on, similarly to what @Andar mentioned.
Yes, by default the Escape effect doesn't force any motions/movements on actor targets. However, for me, in MZ, without plugins, the battle ends when all actors in the battle party are either dead or Escaped (via the effect). So, again, I think that's something to do with whatever plugins you're using.

Using some plugins I'm sure I can have the players animate to run away.
...
I'm having a hard time figuring out how to check if the Flee command is successful, lol.
If you basically want the actor escape command to work identically to the party command, I think the most straightforward solution would be a plugin like this (untested):
Spoiler: plugin code
JavaScript:
/*:
 * @target MV MZ
 * @plugindesc Adds the Escape party command to the actor command window.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/176186/
 * @help Free to use and/or modify for any project, no credit required.
 */
// Patch - add Escape command to actor command window.
;void (alias => {
  Window_ActorCommand.prototype.makeCommandList = function() {
    alias.apply(this, arguments);
    if (this._actor)
      this.addCommand(TextManager.escape, "escape", BattleManager.canEscape());
  };
})(Window_ActorCommand.prototype.makeCommandList);

// Patch - assign handler to new actor command.
void (alias => {
  Scene_Battle.prototype.createActorCommandWindow = function() {
    alias.apply(this, arguments);
    this._actorCommandWindow.setHandler("escape", this.commandEscape.bind(this));
  };
})(Scene_Battle.prototype.createActorCommandWindow);
This assigns the core handler for the party Escape command to the new actor command, so it should behave identically: checking escape chance, making the sprites retreat, etc.

Looks like the Party Command window popped up again.
It's possible for a plugin to bypass the usual core methods that activate the party command window. My plugin (for TPB) prevents cancelling from the actor command window to the party one:
JavaScript:
// Remove "cancel" handler from actor command window.
void (alias => {
    Scene_Battle.prototype.createActorCommandWindow = function() {
        alias.apply(this, arguments);
        delete this._actorCommandWindow._handlers.cancel;
    };
})(Scene_Battle.prototype.createActorCommandWindow);
Along with suppressing the core "always show party command on first input" mechanic, I believe this is sufficient for the core scripts? Maybe I missed something.

For a more aggressive approach, possibly with a better chance of compatibility with other plugins, you could try replacing that entire chunk of code with this (untested):
[Edit: this doesn't work, see follow-up posts.]
JavaScript:
// OK "fight" immediately after party command window setup.
void (alias => {
  Window_PartyCommand.prototype.setup = function() {
    alias.apply(this, arguments);
    this.selectSymbol("fight");  // jic
    this.processOk();
  };
})(Window_PartyCommand.prototype.setup);
Yes, by default the Escape effect doesn't force any motions/movements on actor targets. However, for me, in MZ, without plugins, the battle ends when all actors in the battle party are either dead or Escaped (via the effect). So, again, I think that's something to do with whatever plugins you're using.


If you basically want the actor escape command to work identically to the party command, I think the most straightforward solution would be a plugin like this (untested):
Spoiler: plugin code
JavaScript:
/*:
 * @target MV MZ
 * @plugindesc Adds the Escape party command to the actor command window.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/176186/
 * @help Free to use and/or modify for any project, no credit required.
 */
// Patch - add Escape command to actor command window.
;void (alias => {
  Window_ActorCommand.prototype.makeCommandList = function() {
    alias.apply(this, arguments);
    if (this._actor)
      this.addCommand(TextManager.escape, "escape", BattleManager.canEscape());
  };
})(Window_ActorCommand.prototype.makeCommandList);

// Patch - assign handler to new actor command.
void (alias => {
  Scene_Battle.prototype.createActorCommandWindow = function() {
    alias.apply(this, arguments);
    this._actorCommandWindow.setHandler("escape", this.commandEscape.bind(this));
  };
})(Scene_Battle.prototype.createActorCommandWindow);
This assigns the core handler for the party Escape command to the new actor command, so it should behave identically: checking escape chance, making the sprites retreat, etc.


It's possible for a plugin to bypass the usual core methods that activate the party command window. My plugin (for TPB) prevents cancelling from the actor command window to the party one:
JavaScript:
// Remove "cancel" handler from actor command window.
void (alias => {
    Scene_Battle.prototype.createActorCommandWindow = function() {
        alias.apply(this, arguments);
        delete this._actorCommandWindow._handlers.cancel;
    };
})(Scene_Battle.prototype.createActorCommandWindow);
Along with suppressing the core "always show party command on first input" mechanic, I believe this is sufficient for the core scripts? Maybe I missed something.

For a more aggressive approach, possibly with a better chance of compatibility with other plugins, you could try replacing that entire chunk of code with this (untested):
JavaScript:
// OK "fight" immediately after party command window setup.
void (alias => {
  Window_PartyCommand.prototype.setup = function() {
    alias.apply(this, arguments);
    this.selectSymbol("fight");  // jic
    this.processOk();
  };
})(Window_PartyCommand.prototype.setup);

I did have the Escape Command added to the Actor Command, but when selected it would execute immediately, as opposed to the Escape skill added as a command (I've got a plugin for that) where I can adjust the invocation speed.

I'll try out your aggressive code snippet! Thanks, @caethyril!

Depending on how things go, I may just have an item like a smoke bomb that's required to escape instead, but it would be nice to see if I can get this working, especially in Active TPB mode since that seems to throw the most wrenches!

EDIT: Looks like the aggressive code snippet errors out with a Maximum Call Stack exceeded as soon as I select the Attack command for me with a few other plugins I've got, all log entries pointing to a line in their coding that has "Alias.Window_Base_drawText.call(this, text, x, y, maxWidth, align)", just so you know!
Oops, confirmed. Without plugins it locks up the game, something to do with the flow of the battle scene and inputting phase. 😴
In case it helps, I recently came up with a slightly different implementation here:
OK, try this one instead~
Spoiler: plugin code
JavaScript:
/*:
 * @target MZ
 * @plugindesc No party command (Fight, Escape) for TPB system.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/176490/
 * @help Free to use and/or modify for any project, no credit required.
 */
// Patch - cycle actors, skipping party command.
void (alias => {
    BattleManager.selectPreviousCommand = function() {
        alias.apply(this, arguments);
        if (this._inputting && !this.actor())
            this.changeCurrentActor(true);
    };
})(BattleManager.selectPreviousCommand);

// Patch - reset flag to false to block turn-0 party command.
void (alias => {
    BattleManager.initMembers = function() {
        alias.apply(this, arguments);
        this._tpbNeedsPartyCommand = false;
    };
})(BattleManager.initMembers);

// Override - in TPB-Wait mode, allow multiple actors to be charged at once.
Game_Actor.prototype.shouldDelayTpbCharge = function() { return false; };
I did some very basic tests and it seemed OK for me. 👋
Today is your lucky day. I've actually already done this for a custom battle system i've been working on. So i basically just stripped mine down to do what you need. It skips the party command window, and adds Escape to each characters commands.
In case it helps, I recently came up with a slightly different implementation here:
Right on! That seems to work so far! Thanks once again @caethyril !

Original thread: https://forums.rpgmakerweb.com/threads/completely-remove-the-party-command-window.176186/