MZ How to position the y-offset of the actor command?

Hey there! So I need help how to position the y-offset of the actor command. I want to position it upwards, mostly all the way to the top. Here is the script below I used for my actor command:

Scene_Battle.prototype.actorCommandWindowRect = function() {
const ww = 300 * 2;
const wh = this.calcWindowHeight(1, true);
const wx = 60 * 2 + 32;
const wy = Graphics.boxHeight / 2;
return new Rectangle(wx, wy, ww, wh);
};
I messed around with the script's wy but nothing really triggered so I figured I'd put it back to its default.
I also have a picture to show what the current command looks like:
Screenshot_2025-12-30_00302562.png

Any help would be appreciated! 🙂
Hi there!
Well, if you set the wy = 0 and it didn't work, then some other plugin or code is changing his position.
Hi there!
Well, if you set the wy = 0 and it didn't work, then some other plugin or code is changing his position.
Here's my plugins below, I don't often use a bunch of battle plugins
Screenshot (28).png
Screenshot (29).png

For the coding part, I don't really know much. I used the 'WindowSelectRemove' is just to remove the dark select background in the windows, while the 'HorizontalCommand' is to layout the command window but that's basically it, I don't know what could be the cause when you say code.
Even in base code the game changes the actor command window y from what's given in the rect method. It sets the y in createActorCommandWindow method, I think.
Well, your best option is to toggle on/off other plugins until you track down which plugin is causing this behavior.
It's not necessarily a plugin. Here's the base code method:

Scene_Battle.prototype.createActorCommandWindow = function() {
const rect = this.actorCommandWindowRect();
const commandWindow = new Window_ActorCommand(rect);
commandWindow.y = Graphics.boxHeight - commandWindow.height;
commandWindow.setHandler("attack", this.commandAttack.bind(this));
commandWindow.setHandler("skill", this.commandSkill.bind(this));
commandWindow.setHandler("guard", this.commandGuard.bind(this));
commandWindow.setHandler("item", this.commandItem.bind(this));
commandWindow.setHandler("cancel", this.commandCancel.bind(this));
this.addWindow(commandWindow);
this._actorCommandWindow = commandWindow;
};

EDIT: So you can comment out this line: commandWindow.y = Graphics.boxHeight - commandWindow.height;
It's not necessarily a plugin. Here's the base code method:

Scene_Battle.prototype.createActorCommandWindow = function() {
const rect = this.actorCommandWindowRect();
const commandWindow = new Window_ActorCommand(rect);
commandWindow.y = Graphics.boxHeight - commandWindow.height;
commandWindow.setHandler("attack", this.commandAttack.bind(this));
commandWindow.setHandler("skill", this.commandSkill.bind(this));
commandWindow.setHandler("guard", this.commandGuard.bind(this));
commandWindow.setHandler("item", this.commandItem.bind(this));
commandWindow.setHandler("cancel", this.commandCancel.bind(this));
this.addWindow(commandWindow);
this._actorCommandWindow = commandWindow;
};

EDIT: So you can comment out this line: commandWindow.y = Graphics.boxHeight - commandWindow.height;
Crazy. That is really unexpected.

However, playing around in the core code is not a good idea. Instead, write a plugin like this:

Code:
/*: @target MZ
 *
 */

(function() {

Scene_Battle.prototype.actorCommandWindowRect = function() {
    const ww = 300 * 2;
    const wh = this.calcWindowHeight(1, true);
    const wx = 60 * 2 + 32;
    const wy = Graphics.boxHeight / 2;
    return new Rectangle(wx, wy, ww, wh);
}

const _SceneBattle_createActorCommandWindow = Scene_Battle.prototype.createActorCommandWindow;
Scene_Battle.prototype.createActorCommandWindow = function() {
  _SceneBattle_createActorCommandWindow.call(this);

  this._actorCommandWindow.y = 100;
}

})()
Cool yeah that's what I meant, to add it as a plugin file.
Thank you so much! It turned out just how I wanted, very much appreciation from both of you! Again thanks for the help! 🤘:razz:🤘

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-position-the-y-offset-of-the-actor-command.181679/