Changing Y Location of Window_Help for Battle Only!

Hey everyone!

Been dabbling a lot in customizing my menu appearances and it is going well.  With one exception... I haven't been able to get my Window_Help where I want it in battle without effecting all of the other Window_Help locations outside of battle.

Is there any way to change the y value of the Window_Help for ONLY the battle scene?

Here is the block of code I'm working with:

    Window_Help.prototype.initialize = function(numLines) {
        var width = Graphics.boxWidth;
        var height = this.fittingHeight(1);
        Window_Base.prototype.initialize.call(this, 0, 0, width, height);
        this._text = '';

Changing the y value in the Window_Base.prototype.initialize.call function changes it for every Window_Help.

HELP!!!
There are a number of ways of accomplishing that, but here's how I did it on my CTB script that needed the same thing:

            Window_Help.prototype.initialize = function(numLines) {                var width = Graphics.boxWidth;                var height = this.fittingHeight(numLines || 2);                var y = ($gameParty.inBattle()) ? ctb_window_height : 0;                Window_Base.prototype.initialize.call(this, 0, y, width, height);                this._text = '';            };Of course, in this case "ctb_window_height" corresponds to the y offset that I wanted.

$gameParty.inBattle() is what you want to look at, in this example. It returns true or false depending on whether the player is currently in a battle.

Edit: Oh, there's something else that I did that is important for this. Normally, $gameParty.inBattle only starts returning true a little bit after the Battle_Scene starts (once it gets to the BattleManager start up) - and that's too late for the window to be created properly, since they are initialized before that. So I added:

$gameParty._inBattle = true;to the following method (you could instead add it to the initialization of the Scene_Battle since it makes more sense overall):

Code:
Scene_Battle.prototype.createDisplayObjects
Awesome! Got it to work with the following:

            Window_Help.prototype.initialize = function(numLines) {
                var width = Graphics.boxWidth;
                var height = this.fittingHeight(1);
                if ($gameParty.inBattle())
                {
                var y = 340
                }
                Window_Base.prototype.initialize.call(this, 0, y, width, height);
                this._text = '';
            };

After adding that initialization step you mentioned.

Thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/changing-y-location-of-window_help-for-battle-only.52440/