I added the escape to the ActorCommand, why doesn't it work?

Window_ActorCommand.prototype.makeCommandList = function() {
if (this._actor) {
this.addAttackCommand();
this.addSkillCommands();
this.addGuardCommand();
this.addItemCommand();
this.addCommand(TextManager.escape, 'escape', BattleManager.canEscape());
}
};

What else do I need to modify?
I don't have a whole lot of knowledge with this stuff but I've been modifying the command list myself recently. Take a look at rpg_scenes.
Code:
Scene_Battle.prototype.createPartyCommandWindow = function() {
    this._partyCommandWindow = new Window_PartyCommand();
    this._partyCommandWindow.setHandler('fight',  this.commandFight.bind(this));
    this._partyCommandWindow.setHandler('escape', this.commandEscape.bind(this));
    this._partyCommandWindow.deselect();
    this.addWindow(this._partyCommandWindow);
};

If you modify the 'createActorCommandWindow' in rpg_scenes you should be able to get it working 👍
What does happen? Do you see the command but it does nothing, or do you not see it at all? Based on the above, I'd expect that you see the command, but it may or may not be enabled, depending on whether you did a Battle Processing call and set the Can Escape option, or whether random encounters allow escape by default, and that if it's enabled, it does nothing when you select it. But that's only an assumption, because you haven't said.

Do you have the handler? You've got to set up what shows on the menu, as well as what happens when that option is chosen.
I don't have a whole lot of knowledge with this stuff but I've been modifying the command list myself recently. Take a look at rpg_scenes.
Code:
Scene_Battle.prototype.createPartyCommandWindow = function() {
    this._partyCommandWindow = new Window_PartyCommand();
    this._partyCommandWindow.setHandler('fight',  this.commandFight.bind(this));
    this._partyCommandWindow.setHandler('escape', this.commandEscape.bind(this));
    this._partyCommandWindow.deselect();
    this.addWindow(this._partyCommandWindow);
};

If you modify the 'createActorCommandWindow' in rpg_scenes you should be able to get it working 👍
yes,it work
When making or editing commands, remember that commands have 2 parts, the actual command and the handler. When commands are selected, they run the handler assigned to them.. So if you only add a command to the window but didnt define a handler for it, it wont do anything. 🙂

Also, take note that handlers are usually set in the Scene that will use the command window, while commands are usually added in the command windows themselves.

For example, on the code posted by drifter, it shows you how Scene_Battle registers the handler for the Party Command Window's Fight and Escape commands.

Lastly, the handlers are registered per command window, so if you have two command windows that have the same command, you need to define a handler for that command on both window objects.

In your case, you need to define the handler of "escape" in the actorCommandWindow object.

Original thread: https://forums.rpgmakerweb.com/threads/i-added-the-escape-to-the-actorcommand-why-doesnt-it-work.114079/