MZ Need help to create custom Actor Command Window

I'm using VisuMZ Core Engine and Battle Core. I want to make my own Actor Command Window that should look something like this (5 buttons made of default windows in my game with text and icons on them)
I also have HUD Maker Pro Edition, and I used it to create most of the user interface. But now I'm stuck. I did not find in the plugin settings how to customize the AСW the way I need it (battle core makes its own version of acw where there is a window with a column of buttons, and I need a row), do I need to write my own plugin? How do I find the necessary functions in the engine to figure out how to do this? Maybe there is a guide or something? right now, my buttons are programmed to do this on click reaction:

SceneManager._scene._actorCommandWindow.callHandler('attack');
SceneManager._scene._actorCommandWindow.callHandler('guard');
SceneManager._scene._actorCommandWindow.callHandler('skill');
SceneManager._scene._actorCommandWindow.callHandler('item');
SceneManager._scene._actorCommandWindow.callHandler('escape');

but as far as I understand, due to the fact that they are not initialized as buttons that are part of the ACW, they break the logic and nothing works. I'm very vague about how engine and ACW operates, but I want to figure it out, so maybe someone can show me where to start

1760360519537.png
If you already programmed the buttons to run code (and if I understood correctly need for them to only work on clicks), you can just set the actor command window dimensions to 0, like this below VS:

Scene_Battle.prototype.actorCommandWindowRect = function() {
const ww = 0;
const wh = 0;
const wx = 0;
const wy = 0;
return new Rectangle(wx, wy, ww, wh);
};

Then if you have the "hidden" actor command window have the same commands like your pictures, your button codes can be (index is 0 for attack, 1 for guard etc):

SceneManager._scene._actorCommandWindow.forceSelect(index);
SceneManager._scene._actorCommandWindow.processOk();

Then you just need to make your button only be visible/clickable when
SceneManager._scene._actorCommandWindow.active === true

And you can disable keyboard action button input there:
Window_ActorCommand.prototype.isOkTriggered = function() {
return false;
};


EDIT:
If you need it to work with keyboard also, don't add that last method override, but instead add to the cursorUp and cursorDown methods to highlight your button pics depending on the index.
I'm using VisuMZ Core Engine and Battle Core. I want to make my own Actor Command Window that should look something like this (5 buttons made of default windows in my game with text and icons on them)
I also have HUD Maker Pro Edition, and I used it to create most of the user interface. But now I'm stuck. I did not find in the plugin settings how to customize the AСW the way I need it (battle core makes its own version of acw where there is a window with a column of buttons, and I need a row), do I need to write my own plugin? How do I find the necessary functions in the engine to figure out how to do this? Maybe there is a guide or something? right now, my buttons are programmed to do this on click reaction:

SceneManager._scene._actorCommandWindow.callHandler('attack');
SceneManager._scene._actorCommandWindow.callHandler('guard');
SceneManager._scene._actorCommandWindow.callHandler('skill');
SceneManager._scene._actorCommandWindow.callHandler('item');
SceneManager._scene._actorCommandWindow.callHandler('escape');

but as far as I understand, due to the fact that they are not initialized as buttons that are part of the ACW, they break the logic and nothing works. I'm very vague about how engine and ACW operates, but I want to figure it out, so maybe someone can show me where to start

View attachment 351198
Hi, @ZhirTres
It seems to me that it is entirely possible to customize the appearance of the actor's command window directly in the VSBattleCore settings, if you wish.
I am not at home right now, so I cannot provide further details, but I will edit this message in a few hours as soon as I can give you a more precise answer.
If you already programmed the buttons to run code (and if I understood correctly need for them to only work on clicks), you can just set the actor command window dimensions to 0, like this below VS:

Scene_Battle.prototype.actorCommandWindowRect = function() {
const ww = 0;
const wh = 0;
const wx = 0;
const wy = 0;
return new Rectangle(wx, wy, ww, wh);
};

Then if you have the "hidden" actor command window have the same commands like your pictures, your button codes can be (index is 0 for attack, 1 for guard etc):

SceneManager._scene._actorCommandWindow.forceSelect(index);
SceneManager._scene._actorCommandWindow.processOk();

Then you just need to make your button only be visible/clickable when
SceneManager._scene._actorCommandWindow.active === true

And you can disable keyboard action button input there:
Window_ActorCommand.prototype.isOkTriggered = function() {
return false;
};


EDIT:
If you need it to work with keyboard also, don't add that last method override, but instead add to the cursorUp and cursorDown methods to highlight your button pics depending on the index.
Thanks for answer! Actually yes, I also need keyboards inputs, the problem is that I have and encoded the buttons on Hud Maker (On Click Addon). I would like to know if I can make the same menu using the code if I make a plugin. I know basic js, but I do not know which built-in functions are responsible for rendering and positioning the ACW. (on Hud Maker I did it manually without coding)

1760372314422.png
Hi, @ZhirTres
It seems to me that it is entirely possible to customize the appearance of the actor's command window directly in the VSBattleCore settings, if you wish.
I am not at home right now, so I cannot provide further details, but I will edit this message in a few hours as soon as I can give you a more precise answer.
Thanks, I'd like to know!
Can't you just put the codes I posted in the HUD Maker 'on click'? And then in the display condition the active condition I posted.

If you need the keyboard, check my edit in the post and since you want to use left/right, you can add:

Window_ActorCommand.prototype.cursorLeft = function() {
Input.virtualClick("up");
};

Window_ActorCommand.prototype.cursorRight = function() {
Input.virtualClick("down");
};

You can also make highlight borders to appear there with that plugin (with another pic, or if it has some highlight options) when the index is selected.
Thanks, I'd like to know!
I finally looked at it and the VS settings in the actor command window are limited,
The @rpgLord69 's solution seems the most relevant to me.
Have you tested it?
I'd also like to note that I was going with you wanting to use those "pics". If a window is ok with you (and you always have those 5 commands), I think you can just do something like this:

Window_ActorCommand.prototype.maxCols = function() {
return 5;
};

And then use the rectangle giving function to make your window wider and shorter.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-to-create-custom-actor-command-window.180542/