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,832
Reaction score
2,165
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,832
Reaction score
2,165
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 Profile Posts

It's always a good idea to refresh yourself on what your plugins do. I'm working on a map with opening walls, and I was about to tear my hair out over how much image editing and hand-constructing of autotiles I'd have to do, when I looked again and saw @Shaz 's Tile Changer could copy areas from another map.
"sorry it took me so long to respond" - can we please agree not to say that anymore unless it actually took a long time?! (Like 36hrs at least) I mean, I'm running out of funny responses here xD
Ugh... 4:53AM over here and I can't sleep so why not just game make.
I just love the MV feature that allows you to create your own animations!

Forum statistics

Threads
115,914
Messages
1,093,977
Members
151,171
Latest member
5eb37
Top