What is the name for the window that holds the status icons?

I am trying to find the window that in the battle scene that holds the states that are inflicted onto the actors for my *map* based battle system, using this
65d10090d0c39048a34d76afbfe2d582.png

I can call any window to the map, but the problem is finding that window in particular (and no, that "window_status" thing is not the name of the window I am looking for, it was just what I was trying when I first started looking.)

(alternatively, if anyone knows another way to show the statuses on the map screen i would be happy to be told how to do that as well.)
Window_BattleStatus
Window_BattleStatus
are you sure? because when i initialized the window it seems like nothing showed up...
There's an easy way to verify. Go to mv's dlc/rpgmakerweb freebies/ plugins or how it is called/Yami folder.
Inside that you'll find a Window identifier plugin. Copy it inside your project and follow its instructions.
To confirm Poryg's assertion, if you hit F8 to bring up the developer console, go into a battle (or use battle test), and execute:
Code:
SceneManager._scene._statusWindow
You'll see that it's an instance of Window_BattleStatus.

You can also quickly confirm it's the Window that shows state icons in a default project by executing the following in a battle test:
Code:
$gameParty.battleMembers()[0].addState(4); // Poisons the Actor, displays the animation, but the icon doesn't display yet
SceneManager._scene._statusWindow.refresh(); // Now the poison state icon displays
To confirm Poryg's assertion, if you hit F8 to bring up the developer console, go into a battle (or use battle test), and execute:
Code:
SceneManager._scene._statusWindow
You'll see that it's an instance of Window_BattleStatus.

You can also quickly confirm it's the Window that shows state icons in a default project by executing the following in a battle test:
Code:
$gameParty.battleMembers()[0].addState(4); // Poisons the Actor, displays the animation, but the icon doesn't display yet
SceneManager._scene._statusWindow.refresh(); // Now the poison state icon displays
alright, how would i go about creating and instance of the window in the map? i am able to pull up most windows (just tried window_options) and it worked, but when i try doing it with that window it doesn't show anything.
That's because windows need to be initialized, resized and drawn and not every window does it for you. Check the game code.
Moved to: Learning Javascript
alright, how would i go about creating and instance of the window in the map? i am able to pull up most windows (just tried window_options) and it worked, but when i try doing it with that window it doesn't show anything.

You could try:
Code:
var statusWindow = new Window_BattleStatus();
SceneManager._scene.addWindow(statusWindow); // edited from addChild on suggestion from Poryg
SceneManager._scene._statusWindow = statusWindow; // optional step, but makes referencing the statusWindow later easier
statusWindow.open(); // probably the important part here - it's closed on initialization

Spoiler: Example Screenshot
0inLGff.png
That's a suicide to use addChild for windows 😛 The reason is simple, addChild automatically adds it above every layer, including error/fps meter layer. MV has a special addWindow method for adding windows to scenes:
Code:
SceneManager._scene._statusWindow = new Window_BattleStatus();
SceneManager._scene.addWindow(SceneManager._scene._statusWindow);
You could try:
Code:
var statusWindow = new Window_BattleStatus();
SceneManager._scene.addWindow(statusWindow); // edited from addChild on suggestion from Poryg
SceneManager._scene._statusWindow = statusWindow; // optional step, but makes referencing the statusWindow later easier
statusWindow.open(); // probably the important part here - it's closed on initialization

Spoiler: Example Screenshot
0inLGff.png
oh, that did work, but i see now that the whole window is dragged along, i just want this part of it however:
7609a5240c84ccf76e80d646df267d11.png
Welp, for that you'd need a custom window.
MV has a special addWindow method for adding windows to scenes:

Duly noted - and good to know. I'm still picking up what methods are already available. I looked for a "hasState" method on Game_BattlerBase, Game_Actor and Game_Enemy the other day, implemented my own, then later discovered what I wanted is "isStateAffected".

I guess you could also just do SceneManager._scene._windowLayer.addChild, but that's what addWindow does, anyhow.

i just want this part of it however:
7609a5240c84ccf76e80d646df267d11.png

Do you literally just want the icons displayed in a column, or would you want the names next to them, too?
Welp, for that you'd need a custom window.
well, at least i know where to start looking now, any suggestions on how i can do that? what i want is this:
23321faca80e53bda6405efc0661ad09.png


Duly noted - and good to know. I'm still picking up what methods are already available. I looked for a "hasState" method on Game_BattlerBase, Game_Actor and Game_Enemy the other day, implemented my own, then later discovered what I wanted is "isStateAffected".

I guess you could also just do SceneManager._scene._windowLayer.addChild, but that's what addWindow does, anyhow.



Do you literally just want the icons displayed in a column, or would you want the names next to them, too?
since i have the names all set up and whatnot, yes i do want just the icons
rpg_windows, line 5504
Code:
Window_BattleStatus.prototype.drawBasicArea = function(rect, actor) {
    this.drawActorName(actor, rect.x + 0, rect.y, 150);
    this.drawActorIcons(actor, rect.x + 156, rect.y, rect.width - 156);
};
Here's a plugin that provides you with a Window_StatusIconList. It'll work for both Enemies and Actors and is configurable in terms of icon sizes, number of rows of icons to display, window padding, and whether or not to show the base window skin. You'll still have to pass a battler in and specify the x and y coordinates as well as the window width.

Make sure it's saved as "StateIconWindow.js". You can also download it from this post.
Code:
/*:
* @plugindesc This is a tool that can be used by developers to create a window that just
* contains state icons for a given battler (Actors or Enemies).
* @author Zevia
*
* @help Create a new Zevia.Window_StatusIconList, passing in the battler whose state
* icons you want to display, the x-coordinate of the window, the y-coordinate, and
* the width of the window.
*
* For the number of rows specified in configuration, an icon will be drawn as long
* as it will fit on the row. If it won't, it will go to the next row, until the
* number of rows has been filled. At that point, no more icons will be drawn.
*
* Example:
* var harold = $gameParty.battleMembers()[0];
* var haroldIcons = new Zevia.Window_StatusIconList(harold, 0, 0, 150);
* SceneManager._scene.addWindow(haroldIcons);
*
* To refresh the window, call the refresh() method.

* @param iconWidth
* @text Icon width
* @type number
* @desc The width of the icons you want to display, in pixels.
* @default 28
*
* @param iconHeight
* @text Icon height
* @type number
* @desc The height of the icons you want to display, in pixels.
* @default 28

* @param maxRows
* @text Number of rows
* @type number
* @desc The number of rows of icons you want to display.
* @default 1
*
* @param padding
* @text Window padding
* @type number
* @desc The amount of extra space you want from the edges of the window to where the icons are drawn
* @default 0
*
* @param hasBackground
* @text Show Windowskin
* @type boolean
* @desc Whether or not the icons should use the base Windowskin or be transparent
* @default false
*/

(function(module) {
    'use strict';

    // Polyfill for older versions of RPG Maker MV
    Array.prototype.find = Array.prototype.find || function(finderFunction) {
        for (var i = 0; i < this.length; i++) {
            var element = this[i];
            if (finderFunction(element, i, this)) { return element; }
        }
    };

    module.Zevia = module.Zevia || {};
    var parameters = PluginManager.parameters('StateIconWindow');
    var iconWidth = parseInt(parameters.iconWidth);
    var iconHeight = parseInt(parameters.iconHeight);
    var maxRows = parseInt(parameters.maxRows);
    var padding = parseInt(parameters.padding);
    var hasBackground = !!parameters.hasBackground.match(/true/i);

    if (isNaN(iconWidth)) { iconWidth = 28; }
    if (isNaN(iconHeight)) { iconHeight = 28; }
    if (isNaN(maxRows)) { maxRows = 1; }
    if (isNaN(padding)) { padding = 8; }

    var Window_StatusIconList = module.Zevia.Window_StatusIconList = function() {
        this.initialize.apply(this, arguments);
    };

    Window_StatusIconList.prototype = Object.create(Window_Base.prototype);
    Window_StatusIconList.prototype.constructor = Window_StatusIconList;

    Window_StatusIconList.prototype.initialize = function(battler, x, y, width) {
        var height = (this.lineHeight() * maxRows) + (this.standardPadding() * 2);
        Window_Base.prototype.initialize.call(this, x, y, width, height);
        this._battler = battler;
        this.opacity = hasBackground ? 255 : 0;
        this.deactivate();
        this.refresh();
    };

    Window_StatusIconList.prototype.standardPadding = function() {
        return padding;
    };

    Window_StatusIconList.prototype.canFitIcon = function(row) {
        return ((row.length + 1) * iconWidth) < this.contentsWidth();
    };

    Window_StatusIconList.prototype.setDisplayedIcons = function() {
        this._displayedIcons = this._battler.allIcons().reduce(function(iconRows, icon) {
            var availableRow = iconRows.find(function(row) {
                return this.canFitIcon(row);
            }.bind(this));
            if (availableRow) { availableRow.push(icon); }
            else {
                if (iconRows.length === maxRows) { return iconRows; }
                iconRows.push([icon]);
            }
            return iconRows;
        }.bind(this), []);
    };

    Window_StatusIconList.prototype.drawStateIcon = function(iconIndex, x, y, width, height) {
        this.contents.blt(
            ImageManager.loadSystem('IconSet'),
            iconIndex % 16 * Window_Base._iconWidth,
            Math.floor(iconIndex / 16) * Window_Base._iconHeight,
            Window_Base._iconWidth,
            Window_Base._iconHeight,
            x,
            y,
            width,
            height
        );
    };

    Window_StatusIconList.prototype.drawStateIcons = function() {
        this._displayedIcons.forEach(function(iconRow, row) {
            iconRow.forEach(function(icon, column) {
                this.drawStateIcon(
                    icon,
                    iconWidth * column,
                    iconHeight * row,
                    iconWidth,
                    iconHeight
                );
            }.bind(this));
        }.bind(this));
    };

    Window_StatusIconList.prototype.refresh = function() {
        this.setDisplayedIcons();
        this.contents.clear();
        this.drawStateIcons();
    };
})(window);

Spoiler: Simple Example
91JpETn.png
Here's a plugin that provides you with a Window_StatusIconList. It'll work for both Enemies and Actors and is configurable in terms of icon sizes, number of rows of icons to display, window padding, and whether or not to show the base window skin. You'll still have to pass a battler in and specify the x and y coordinates as well as the window width.

Make sure it's saved as "StateIconWindow.js". You can also download it from this post.
Code:
/*:
* @plugindesc This is a tool that can be used by developers to create a window that just
* contains state icons for a given battler (Actors or Enemies).
* @author Zevia
*
* @help Create a new Zevia.Window_StatusIconList, passing in the battler whose state
* icons you want to display, the x-coordinate of the window, the y-coordinate, and
* the width of the window.
*
* For the number of rows specified in configuration, an icon will be drawn as long
* as it will fit on the row. If it won't, it will go to the next row, until the
* number of rows has been filled. At that point, no more icons will be drawn.
*
* Example:
* var harold = $gameParty.battleMembers()[0];
* var haroldIcons = new Zevia.Window_StatusIconList(harold, 0, 0, 150);
* SceneManager._scene.addWindow(haroldIcons);
*
* To refresh the window, call the refresh() method.

* @param iconWidth
* @text Icon width
* @type number
* @desc The width of the icons you want to display, in pixels.
* @default 28
*
* @param iconHeight
* @text Icon height
* @type number
* @desc The height of the icons you want to display, in pixels.
* @default 28

* @param maxRows
* @text Number of rows
* @type number
* @desc The number of rows of icons you want to display.
* @default 1
*
* @param padding
* @text Window padding
* @type number
* @desc The amount of extra space you want from the edges of the window to where the icons are drawn
* @default 0
*
* @param hasBackground
* @text Show Windowskin
* @type boolean
* @desc Whether or not the icons should use the base Windowskin or be transparent
* @default false
*/

(function(module) {
    'use strict';

    module.Zevia = module.Zevia || {};
    var parameters = PluginManager.parameters('StateIconWindow');
    var iconWidth = parseInt(parameters.iconWidth);
    var iconHeight = parseInt(parameters.iconHeight);
    var maxRows = parseInt(parameters.maxRows);
    var padding = parseInt(parameters.padding);
    var hasBackground = !!parameters.hasBackground.match(/true/i);

    if (isNaN(iconWidth)) { iconWidth = 28; }
    if (isNaN(iconHeight)) { iconHeight = 28; }
    if (isNaN(maxRows)) { maxRows = 1; }
    if (isNaN(padding)) { padding = 8; }

    var Window_StatusIconList = module.Zevia.Window_StatusIconList = function() {
        this.initialize.apply(this, arguments);
    };

    Window_StatusIconList.prototype = Object.create(Window_Base.prototype);
    Window_StatusIconList.prototype.constructor = Window_StatusIconList;

    Window_StatusIconList.prototype.initialize = function(battler, x, y, width) {
        var height = (this.lineHeight() * maxRows) + (this.standardPadding() * 2);
        Window_Base.prototype.initialize.call(this, x, y, width, height);
        this._battler = battler;
        this.opacity = hasBackground ? 255 : 0;
        this.deactivate();
        this.refresh();
    };

    Window_StatusIconList.prototype.standardPadding = function() {
        return padding;
    };

    Window_StatusIconList.prototype.canFitIcon = function(row) {
        return ((row.length + 1) * iconWidth) < this.contentsWidth();
    };

    Window_StatusIconList.prototype.setDisplayedIcons = function() {
        this._displayedIcons = this._battler.allIcons().reduce(function(iconRows, icon) {
            var availableRow = iconRows.find(function(row) {
                return this.canFitIcon(row);
            }.bind(this));
            if (availableRow) { availableRow.push(icon); }
            else {
                if (iconRows.length === maxRows) { return iconRows; }
                iconRows.push([icon]);
            }
            return iconRows;
        }.bind(this), []);
    };

    Window_StatusIconList.prototype.drawStateIcon = function(iconIndex, x, y, width, height) {
        this.contents.blt(
            ImageManager.loadSystem('IconSet'),
            iconIndex % 16 * Window_Base._iconWidth,
            Math.floor(iconIndex / 16) * Window_Base._iconHeight,
            Window_Base._iconWidth,
            Window_Base._iconHeight,
            x,
            y,
            width,
            height
        );
    };

    Window_StatusIconList.prototype.drawStateIcons = function() {
        this._displayedIcons.forEach(function(iconRow, row) {
            iconRow.forEach(function(icon, column) {
                this.drawStateIcon(
                    icon,
                    iconWidth * column,
                    iconHeight * row,
                    iconWidth,
                    iconHeight
                );
            }.bind(this));
        }.bind(this));
    };

    Window_StatusIconList.prototype.refresh = function() {
        this.setDisplayedIcons();
        this.contents.clear();
        this.drawStateIcons();
    };
})(window);

Spoiler: Simple Example
91JpETn.png
i have an error, do you know what to do with it?
Spoiler: Stack
"TypeError: undefined is not a function↵ at null.<anonymous> (file:///C:/Users/Poppie/Desktop/Project1/js/plugins/StateIconWindow.js:94:41)↵ at Array.reduce (native)↵ at Window_StatusIconList.setDisplayedIcons (file:///C:/Users/Poppie/Desktop/Project1/js/plugins/StateIconWindow.js:93:57)↵ at Window_StatusIconList.refresh (file:///C:/Users/Poppie/Desktop/Project1/js/plugins/StateIconWindow.js:135:14)↵ at Window_StatusIconList.initialize (file:///C:/Users/Poppie/Desktop/Project1/js/plugins/StateIconWindow.js:81:14)↵ at new module.Zevia.Window_StatusIconList (file:///C:/Users/Poppie/Desktop/Project1/js/plugins/StateIconWindow.js:69:25)↵ at Game_Interpreter.eval (eval at <anonymous> (file:///C:/Users/Poppie/Desktop/Project1/js/plugins/YEP_CoreEngine.js:1740:10), <anonymous>:2:19)↵ at Game_Interpreter.command355 (file:///C:/Users/Poppie/Desktop/Project1/js/plugins/YEP_CoreEngine.js:1740:5)↵ at Game_Interpreter.executeCommand (file:///C:/Users/Poppie/Desktop/Project1/js/rpg_objects.js:8930:34)↵ at Game_Interpreter.update (file:///C:/Users/Poppie/Desktop/Project1/js/rpg_objects.js:8838:19)↵ at Game_Map.updateInterpreter (file:///C:/Users/Poppie/Desktop/Project1/js/rpg_objects.js:6115:27)↵ at Game_Map.update (file:///C:/Users/Poppie/Desktop/Project1/js/rpg_objects.js:6022:14)"
@Poppie360 Can you show me the event/script call/code you're using to create the window?
@Poppie360 Can you show me the event/script call/code you're using to create the window?
df9bd2c8655a7f5a4f0189668c16d9b6.png
I just copied your event into my own project and it works fine, so I suspect it's a conflict with another plugin.

Can you try creating a new project with no plugins in it, installing the plugin there, then copy-pasting that same script call into an event and running it there?

If you get any errors, let me know - if they're the same as what you've already posted, you don't have to paste screenshots again. If you continue getting errors, can you try opening up the dev console with F8, running the following bit of code, then posting the results?

Code:
var harold = $gameParty.battleMembers()[0];
console.log(harold, harold.allIcons, harold.allIcons());
var haroldIcons = new Zevia.Window_StatusIconList(harold, 0, 0, 150);
SceneManager._scene.addWindow(haroldIcons);

I'm wondering if battleMembers() is returning an empty array or something.

Original thread: https://forums.rpgmakerweb.com/threads/what-is-the-name-for-the-window-that-holds-the-status-icons.104320/