Increase number of icons shown on Battle Status Window - MV

I've dug into this extensively and have come up with nothing. I'm unable to find where exactly RPGMAKER MV calculates column width for the battle status window. I can find where they allocate the gauges and everything but not the amount of icons available for display. Currently, I'm stuck with it looking like this:

Spoiler
Screenshot (130).png


When really, I'd like it to look like this mockup:

Spoiler
Screenshot (130) - Copy.png

In essence, I am trying to figure out how to resize the width when drawing of the ActorName box and increase the width with which it can show Icons in combat. Many plugins work to change this, but none of them keep this same view without messing anything else up. If I am missing something or if anyone knows how to get around this by editing the base files (most likely rpg_window.js), let me know.

Basically, I would like to know if anyone has found a way to display more icons for states in combat. The characters in my game can have more than two states, but they don't show visually.

Thank you!
JavaScript:
Window_BattleStatus.prototype.drawActorIcons = function(actor, x, y, width) {
    const maxIcons = 6; // max number of icons to display
    width = Window_Base._iconWidth * maxIcons;
    // end changes
    var icons = actor.allIcons().slice(0, Math.floor(width / Window_Base._iconWidth));
    for (var i = 0; i < icons.length; i++) {
        this.drawIcon(icons[i], x + Window_Base._iconWidth * i, y + 2);
    }
};

Install as a plugin. Don't edit the default script files.

game_XiHBSUsZRs.gif
JavaScript:
Window_BattleStatus.prototype.drawActorIcons = function(actor, x, y, width) {
    const maxIcons = 6; // max number of icons to display
    x -= 72; // shift the icons to the left a bit; adjust per your font size / game resolution
    width = Window_Base._iconWidth * maxIcons;
    // end modifications
    var icons = actor.allIcons().slice(0, Math.floor(width / Window_Base._iconWidth));
    for (var i = 0; i < icons.length; i++) {
        this.drawIcon(icons[i], x + Window_Base._iconWidth * i, y + 2);
    }
};

Install as a plugin. Don't edit the default script files.

View attachment 280158

Wow, thank you for the incredibly quick response. Even plugging and playing this worked perfectly.

I would absolutely consider this solved and close the thread, but I would mention that this seems to negate the Yanfly BuffStateCore's "turn counters" that pop up over the icons. It'll show a number to denote the number of turns left per icon, but with this plugin that no longer shows up, no matter whether or not I load it above or below.

Any idea on that or does it get way too complicated to make these things work together? Either way I'm extremely grateful for your help and will be crediting you, of course, when I release my demo in the future.
Wow, thank you for the incredibly quick response. Even plugging and playing this worked perfectly.

I would absolutely consider this solved and close the thread, but I would mention that this seems to negate the Yanfly BuffStateCore's "turn counters" that pop up over the icons. It'll show a number to denote the number of turns left per icon, but with this plugin that no longer shows up, no matter whether or not I load it above or below.

Any idea on that or does it get way too complicated to make these things work together? Either way I'm extremely grateful for your help and will be crediting you, of course, when I release my demo in the future.
Try changing the order of your plugin list. Is this placed under the yanfly stuff? Then try putting it above.
Try changing the order of your plugin list. Is this placed under the yanfly stuff? Then try putting it above.
Yeah, even placing it at the very top of all plugins, I still have nothing on the counter. I've also put it directly below Yanfly Core, Yanfly Battle Core, and then the Buff State Core I mentioned.
Hold up. If you're using the YEP stuff, you shouldn't need any extra plugins. YEP_Core changes the state icon width automatically based on your window dimensions.
Hold up. If you're using the YEP stuff, you shouldn't need any extra plugins. YEP_Core changes the state icon width automatically based on your window dimensions.
It hasn't done that for me, not even when I had it added way back at the beginning of my project. I'll turn things off sequentially and see if something is potentially hampering that functionality.
One of the problems with MV is that the majority (maybe all?) of a windows' contents are drawn directly onto the window during the refresh or drawing methods.

This makes it more difficult to maintain compatibility between plugins that might touch upon various parts of a window. Any other plugin(s) you have that override the drawActorIcons mehtod(s) will likely override what YEP's Core and Buffs & States plugins do.

This was improved in MZ, which shifted to displaying status window contents via individual sprites, making the entire status window much more modular.
One of the problems with MV is that the majority (maybe all?) of a windows' contents are drawn directly onto the window during the refresh or drawing methods.

This makes it more difficult to maintain compatibility between plugins that might touch upon various parts of a window. Any other plugin(s) you have that override the drawActorIcons mehtod(s) will likely override what YEP's Core and Buffs & States plugins do.

This was improved in MZ, which shifted to displaying status window contents via individual sprites, making the entire status window much more modular.

Right, that makes sense. I may look into it further, but it looks like I'll probably be sticking with the code you gave me and not worry about the counters.

Thank you again for the swift and accurate help!
One of the problems with MV is that the majority (maybe all?) of a windows' contents are drawn directly onto the window during the refresh or drawing methods.

This makes it more difficult to maintain compatibility between plugins that might touch upon various parts of a window. Any other plugin(s) you have that override the drawActorIcons mehtod(s) will likely override what YEP's Core and Buffs & States plugins do.

This was improved in MZ, which shifted to displaying status window contents via individual sprites, making the entire status window much more modular.
I should remember this one, the next time there is a sale. New potential buyers will always ask the differences between MV and MZ. This seems like quite an important one.

Original thread: https://forums.rpgmakerweb.com/threads/increase-number-of-icons-shown-on-battle-status-window-mv.162033/