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);