MZ Battle Scene Windows [UPDATED 6/30/23]

Hey everyone!
I added a "new" window to my battle scene and it functions great. (its a new enemy window since Battlecore blocks the original one) My problem is when combat ends the status widow and the actor command window close for the victory/defeat message but the new window doesn't. I cannot figure out which Scene_Battle to add it into. Does anyone happen to know?

Also Im trying to increase the height of the Actor command window to be equal to the commands an actor has but I'm not sure how to call the actors command amounts. Right now I have it set to 5.

Scene_Battle.prototype.actorCommandWindowRect = function() { const ww = 192; const wh = this.calcWindowHeight(5, true); const wx = Graphics.boxWidth - 60 //this.isRightInputMode() ? Graphics.boxWidth - 192 : 0; const wy = Graphics.boxHeight; return new Rectangle(wx, wy, ww, wh); };
I cannot figure out which Scene_Battle to add it into. Does anyone happen to know?
Should be Scene_Battle.prototype.stop - see how it calls the close() methods for the other windows?

Also Im trying to increase the height of the Actor command window to be equal to the commands an actor has but I'm not sure how to call the actors command amounts. Right now I have it set to 5.
I take it you're giving them a different number of commands via Battle Core notetags?

Unfortunately, I don't see anyplace in the documentation that provides you with the script call for that, and we can't just look it up in obfuscated plugins. So that part of it we'll have to see if someone else has gotten the info from VisuStella (or you can contact their support).
@ATT_Turan
I'll work with the stop section.

As for the command list, no everyone has access to the same commands, however some are only available if you have an item equipped otherwise they are hidden.
That's really the same thing - there's not a functional difference between "this actor doesn't have this command" and "this actor has this command but can't see it". That's still stored in whatever method VisuStella came up with in the plugin.
Ah ok.

The stop code didn't actually work for me. I found a different option that seems to work. I put the command in the window visability code.
Scene_Battle.prototype.updateStatusWindowVisibility = function() { if ($gameMessage.isBusy()) { this._statusWindow.close(); this._enemyWindow2.close(); } else if (this.shouldOpenStatusWindow()) { this._statusWindow.open(); this._enemyWindow2.open(); } this.updateStatusWindowPosition(); };
So I was looking my commands and they are not actually hidden. I misspoke. All my commands are added via the trait add skill type. The code I was going to use to extend columns of the command window to 2 when the list was greater than 4 worked but is no longer needed. But it makes me think that I should be able to call the list length. So I thought i would check the code more.

I found the options code and it calls the window height as a variable:

EDIT:
So I started a different approach. It works for readjusting the window size but I cannot get the calls right. What Im doing is a round about way of increasing the command window by checking if the active battler/actor has a specific skill type or types. I can build the group of if statments no problem but im hafing trouble calling the actor and hasSkillType in the numVisiableRows. This is my test code:
(() => { const _Window_ActorCommand__refreshAllParts = Window_ActorCommand.prototype._refreshAllParts; Window_ActorCommand.prototype._refreshAllParts = function() { _Window_ActorCommand__refreshAllParts.call(this); this.updateHeight(); }; Window_ActorCommand.prototype.updateHeight = function() { const lineHeight = this.lineHeight(); const numVisibleRows = this.numVisibleRows(); const windowHeight = lineHeight * numVisibleRows + 30; if (this.height !== windowHeight) { this.height = windowHeight; this.createContents(); } }; Window_ActorCommand.prototype.numVisibleRows = function() { const actor = ; if(actor && actor.hasSkillType(2)) { return 100; } else { return 6; } }; })();

I know I'm missing something dumb but I just cannot find it. Any help would be appreciated.

Original thread: https://forums.rpgmakerweb.com/threads/battle-scene-windows-updated-6-30-23.158646/