Creating new entry for combat menu

Hi,
I'm starting to handle the customization of the menus for the game I'm working on and I'm mostly oblivious to this part of MV.
I tried to add an entry in the combat menu called "tactic" which contains 4 commands (2 for changing actor row, 1 for changing weapon and one to pass turn).
The problem is that once the menu opens I can move the selector on entries but it moves also for the combat menu and when I press enter it runs the code bound the combat menu instead of the tactic newly open window.
I tried putting a few lines in the function that opens the tactics menu trying to disable the combat one but nothing worked so far.
Code:
Scene_Battle.prototype.commandTactic = function() {
    this._tacticWindow._actor = BattleManager.actor();
    this._tacticWindow.refresh();
    this._tacticWindow.show();
    this._tacticWindow.activate();
    this._tacticWindow.open();
    this._actorCommandWindow.hide();
    this._actorCommandWindow.close();
    this._actorCommandWindow.deactivate();
};

As you can see I tried hide, close and deactivate, but it still selects its entries
Thank you in advance
original_window.deactivate()
original_window.close()
original_window.hide()
your_window.open()
your_window.activate()

in that order.


not sure about this, but I think if you leave both windows open, both would activate and both would update at the same time (or actually, one inmediately after the other) as they're both still watching the key presses.
the old window should stop updating if you deactivate it first.
mind you, the original functions are written a bit more openly and designed to be modifiable by plugins, so it can be difficult to follow the code up and down.
try making sure your window works by itself first, and then look into how to integrate it into the game.
if the code for your window checks out, and it plugs into the same variables as the original window, the program won't notice the difference.

you can also just redefine the code for the original window with your code, and the program will treat it like it is it's own thing.
instead of creating a new one, just progressively overwrite the original, if they're not completely different.
My window works by itself, I managed to bug the combat menu so while it gives error becaus all the entres aare blank, so the commands of my sutom window pass through instead of (i guess) getting beaten on time by the combat menu.
I truied your solution tho and they dont' work .-. , but I have to admit I'm not sure to have tired correctly the second possible solution you gave me.

EDIT: Solved it, i just add to create and add the window before the combat one for it to have priority, I think because i created my window from the Window_Command class intead the class of the skills or items
you tried the sequencial close and activate and it didnt work? 0o
impossible.

there must be another window messing things up then.

take the window object out into another clean project and run it there, isolated from the whole thing.
if the sequencial change doesn't work, try a hard re-wire..... go into the scene's own definition of the window, and change it to load up your window directly.
it can't not-work that way, because the original window wouldn't be loading up at all.

Code:
Scene_Battle.prototype.createActorCommandWindow = function() {
    this._actorCommandWindow = new Window_ActorCommand();
...
...
    this.selectPreviousCommand.bind(this));
    this.addWindow(this._actorCommandWindow);
};

replace
Code:
this._actorCommandWindow = new Window_ActorCommand();
to
this._actorCommandWindow = new your_window_class();

the game would still call up actorCommandWindow, but it'll be your window, responding to the same default triggers (no other command would work tho, but it should load up on it's own)
I'll try thanks!

EDIT: Finally found the problem!
Needed to add my newly created windows in this method, otherwise the game automatically resets the windows configuration
Code:
Scene_Battle.prototype.isAnyInputWindowActive = function() {
    return (this._partyCommandWindow.active ||
            this._actorCommandWindow.active ||
            this._skillWindow.active ||
            this._itemWindow.active ||
            this._actorWindow.active ||
            this._enemyWindow.active);
};

Original thread: https://forums.rpgmakerweb.com/threads/creating-new-entry-for-combat-menu.79645/