Late 2025 edit: He's the current version I wrote:
I'm trying to get the battle status window to display more states at once, rather than having them cycle through one-by-one. Visustella doesn't seem to be interested in adding this, so I tried writing my own mini-plugin for this functionality. I'm totally stuck, however. I can't figure out how to actually draw something--I'm not very familiar with the UI side of MZ's code base. It also seems like VS overwrites (and of course obfuscates) pretty much everything related to drawing buff and state icons.
This is the closest I've gotten. Nothing actually gets drawn, but I know that the code is getting called and is getting the icon indexes:
Can anyone give me some advice? If I could figure out how to at least get the icons to draw that would be a start.
JavaScript:
//=============================================================================
// More Buff and State Icons
// AL_MoreBuffStateIcons.js
//=============================================================================
/*:
* @target MZ
* @plugindesc More buff and state icons.
* @author Antilurker77
*
* @help AL_MoreBuffStateIcons.js
*
* This plugin increases the number of buffs and states viewable on the battle
* status window. This is designed only for the list layout style with the
* Visustella battle core.
*
* It does not provide plugin commands.
*
* @param OffsetX
* @text X Offset
* @desc Sets the X offset.
* @default 700
* @type number
*
* @param OffsetY
* @text Y Offset
* @desc Sets the Y offset.
* @default 6
* @type number
*
* @param Margin
* @text Margin
* @desc Space between each icon.
* @default 4
* @type number
*
* @param RowHeight
* @text Row Height
* @desc Height per row.
* @default 44
* @type number
*
* @param MaxStates
* @text Max States
* @desc Maximum number of states to display. Buffs and debuffs always display.
* @default 9
* @type number
*
*/
const antilurkerIconXOffset = parseInt(PluginManager.parameters('DoS_MoreBuffStateIcons')['OffsetX']);
const antilurkerIconYOffset = parseInt(PluginManager.parameters('DoS_MoreBuffStateIcons')['OffsetY']);
const antilurkerIconMargin = parseInt(PluginManager.parameters('DoS_MoreBuffStateIcons')['Margin']);
const antilurkerIconRowHeight = parseInt(PluginManager.parameters('DoS_MoreBuffStateIcons')['RowHeight']);
const antilurkerIconMaxStates = parseInt(PluginManager.parameters('DoS_MoreBuffStateIcons')['MaxStates']);
Window_BattleStatus.prototype.changeTextColor = function(color) {
this.contents.textColor = color;
}
Window_BattleStatus.prototype.drawActorIconsEX = function(actor, x, y, maxStates) {
const iconWidth = ImageManager.iconWidth + antilurkerIconMargin;
let xPos = x;
for (let i = 0; i < 8; i++) {
if (actor.buff(i) !== 0) {
buffIcon = actor.buffIconIndex(actor.buff(i), i);
this.drawIcon(buffIcon, xPos, y);
this.drawActorBuffTurns(actor, i, xPos, y);
this.drawActorBuffRates(actor, i, xPos, y);
xPos += iconWidth;
}
}
for (const state of actor.states().slice(0, maxStates)) {
if (state.iconIndex > 0) {
this.drawIcon(state.iconIndex, xPos, y);
this.drawActorStateTurns(actor, state, xPos, y);
this.drawActorStateData(actor, state, xPos, y);
xPos += iconWidth;
}
}
};
var OldBattleStatusUpdate = Window_BattleStatus.prototype.update;
Window_BattleStatus.prototype.update = function() {
OldBattleStatusUpdate.call(this);
this.refresh();
let yIcons = antilurkerIconYOffset;
for (const actor of $gameParty.members()) {
this.drawActorIconsEX(actor, antilurkerIconXOffset, yIcons, antilurkerIconMaxStates);
yIcons += antilurkerIconRowHeight;
}
}
I'm trying to get the battle status window to display more states at once, rather than having them cycle through one-by-one. Visustella doesn't seem to be interested in adding this, so I tried writing my own mini-plugin for this functionality. I'm totally stuck, however. I can't figure out how to actually draw something--I'm not very familiar with the UI side of MZ's code base. It also seems like VS overwrites (and of course obfuscates) pretty much everything related to drawing buff and state icons.
This is the closest I've gotten. Nothing actually gets drawn, but I know that the code is getting called and is getting the icon indexes:
JavaScript:
Window_Base.prototype.drawActorIconsEX = function(actor, x, y, width) {
//console.log('inside drawActorIcons');
width = width || 144;
const iconWidth = ImageManager.iconWidth;
const icons = actor.allIcons().slice(0, Math.floor(width / iconWidth));
let iconX = x;
let count = 0;
for (const icon of icons) {
//const key = "actor%1-stateIcon%2".format(actor.actorId(), count);
//const sprite = this.createInnerSprite(key, Sprite_StateIcon);
//sprite.setup(actor);
//sprite.move(iconX, y);
//sprite.show();
//console.log('state icon: ' + iconX + ', ' + y);
this.drawIcon(icon, iconX, y + 2);
iconX += iconWidth;
count++;
}
};
var OldBattleStatusRefresh = Window_BattleStatus.prototype.updateRefresh;
Window_BattleStatus.prototype.updateRefresh = function() {
OldBattleStatusRefresh.call(this);
for (const actor of $gameParty.members()) {
this.drawActorIconsEX(actor, 0, 0, 500);
}
}
Can anyone give me some advice? If I could figure out how to at least get the icons to draw that would be a start.