RMMZ How can i move up the actor command window in battle?

Hura

Villager
Member
Joined
Aug 17, 2021
Messages
11
Reaction score
2
First Language
Hungarian
Primarily Uses
RMMZ
Hy Everyone!

I'm trying to move up a little bit the actor command window but don't know where or how to do it. (I'm using VisuStella Battle core btw.)

1631775007686.png
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,855
Reaction score
2,191
First Language
EN
Primarily Uses
RMMZ
Related:
I just did a couple of quick tests and it looks like both of the following are compatible with VisuStella's Battle Core default layout:
  1. Change the battle window area's height (status + commands) to 5 rows instead of 4:
    JavaScript:
    /*:
     * @plugindesc Change the height of the window area in battle.
     * @help Terms of use: free to use and/or modify for any project.
     */
    
    Scene_Battle.prototype.windowAreaHeight = function() {
        return this.calcWindowHeight(5, true);
    };
  2. Change only the actor command window's height to 5 rows instead of 4:
    JavaScript:
    /*:
     * @target MZ
     * @plugindesc Change the height of the actor command window.
     * @help Terms of use: free to use and/or modify for any project.
     */
    
    (alias => {
        Scene_Battle.prototype.actorCommandWindowRect = function() {
            const rect = alias.apply(this, arguments);
            rect.height = this.calcWindowHeight(5, true);
            return rect;
        };
    })(Scene_Battle.prototype.actorCommandWindowRect);
Pick one, save it as a .js file, import as a plugin (after VisuStella Battle Core, just in case), save your project to apply Plugin Manager changes, then test!
I think you could just add something like this to that plugin:
JavaScript:
(alias => {
    Scene_Battle.prototype.actorCommandWindowRect = function() {
        const rect = alias.apply(this, arguments);   // get the normal rectangle
        rect.y -= 200;   // move up by 200 px
        return rect;
    };
})(Scene_Battle.prototype.actorCommandWindowRect);
actorCommandWindowRect returns a rectangle (x, y, width, height) that decides where the actor command window is placed.
 

Hura

Villager
Member
Joined
Aug 17, 2021
Messages
11
Reaction score
2
First Language
Hungarian
Primarily Uses
RMMZ
Nothing happened. It stayed where it was. But when i change the "y" to "x" it works and moves left.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,855
Reaction score
2,191
First Language
EN
Primarily Uses
RMMZ
Ah, I guess VisuStella Battle Core (or one of your other plugins) is repositioning the window at some point. VisuStella's plugins are obfuscated, i.e. not human-readable, so unless you can find some relevant setting in the Plugin Manager, I'm out of ideas. :kaoslp:

Maybe someone else knows of a solution~
 

Latest Threads

Latest Posts

Latest Profile Posts

A certain person better sell his stock while he still can, because it looks like it's going to take an unrecoverable nose dive.
7 years of trying to plan this project... and it got an official plotline today. 7 years. I really just have no concept of order huh GHJGSJHGVGHASFH.
Doing RPG Maker News for 24th October 2021

I'm not sure how to do this so I'll just ask here, Wheres a good place to post your game (for free) once its done?
I don't know what I'm doing :D

Forum statistics

Threads
116,063
Messages
1,095,438
Members
151,422
Latest member
otwm
Top