MZ Changing In Battle Status Text and Rectangle Color

Hello,
I'm using VisuStella's Battle Core and ItemsEquips Core, and in the latter plugin there's an option for me to change the back rectangle of the status window stats to an #rgb code. That made polishing my UI super easy, but the battle status window wasn't changed. What's more, the text for System text that I set through Engine Core didn't apply to the in battle status either!
Looking through Battle Core's in battle status parameters didn't have any cosmetic options. I was wondering if there's any way to make the status window look like the first image color-wise.
1778591554455.png

1778591440762.png
Pretty sure the battle status window uses a separate layout from the normal menu status window, so the color/text settings from ItemsEquips Core and Engine Core don’t fully carry over there.
You’ll probably need eithe
  • custom CSS/JS edits in Battle Core
  • or a compatibility addon/plugin that specifically targets the battle UI
A lot of VisuStella plugins separate “menu UI” and “battle UI” styling unfortunately.
You could also check if there’s a Window_BattleStatus section/script override in the plugin parameters or help file. That’s usually where those colors are handled.
Pretty sure the battle status window uses a separate layout from the normal menu status window, so the color/text settings from ItemsEquips Core and Engine Core don’t fully carry over there.
You’ll probably need eithe
  • custom CSS/JS edits in Battle Core
  • or a compatibility addon/plugin that specifically targets the battle UI
A lot of VisuStella plugins separate “menu UI” and “battle UI” styling unfortunately.
You could also check if there’s a Window_BattleStatus section/script override in the plugin parameters or help file. That’s usually where those colors are handled.
There's a place for the draw data JS inside the params, and after tinkering for a bit I found that I could change the color of the rectangles by using

this.drawDarkRect.color = this.systemColor(); //replace with whatever color you want

But no matter how I try to look there doesn't seem to be a way to change the text color of just the param variable in:

this.drawParamData(param, px, py, pw);

A nuclear option I saw was changing the windowskin system color, but I'd rather not do that if possible. If anyone knows any way to change the param text color please let me know.
Hmmm, strange if you managed to change the rectangle color like that, since in the method drawDarkRect it references ColorManager.gaugeBackColor() which you could change to affect it.

For the params you can try to go to console and write the method and click on it to go to sources and select pretty print and then make a plugin with that where you try to replace what color it uses. Like if you see it changing the color, replace that with your own. Or just slap the this.changeTextColor("#FFFF00") (change that color code to one you want) in the method and see what's the correct place. But it's not clear to me what are the commas in the obfuscated code, so unless you know that it can be hard to find the correct place. And it could also be that it calls another method to actually draw the value where it sets the color so you would then have to change that instead.

Or you can go and cry to VisuStella in their discord that the window should use same colors as others or ask AI LOL.
Hmmm, strange if you managed to change the rectangle color like that, since in the method drawDarkRect it references ColorManager.gaugeBackColor() which you could change to affect it.

For the params you can try to go to console and write the method and click on it to go to sources and select pretty print and then make a plugin with that where you try to replace what color it uses. Like if you see it changing the color, replace that with your own. Or just slap the this.changeTextColor("#FFFF00") (change that color code to one you want) in the method and see what's the correct place. But it's not clear to me what are the commas in the obfuscated code, so unless you know that it can be hard to find the correct place. And it could also be that it calls another method to actually draw the value where it sets the color so you would then have to change that instead.

Or you can go and cry to VisuStella in their discord that the window should use same colors as others or ask AI LOL.
Yeah turns out what I tried in fact didn't work and it was placebo cuz I changed the gauge color right before for a different fix lol. That's pretty unfortunate that it's tied so closely lol but it's no biggie. I'm no programmer so diving into obfuscated code is a little bit above my skill level. I'll just have to deal with a darker gauge background. Thanks!
No but changing that background is easier. Changing the text color is harder (at least for me).

For the background you can go to the console with F8 and then write there (in the console tab):
Window_InBattleStatus.prototype.drawDarkRect
and click enter, then click on the function that appears and you go to sources tab.
There press "pretty print" and then copy paste the function (one with yellow highlight name) to a notepad. For me it looks like (bit different for you):

Window_InBattleStatus[_0x58cf34(0x8ef)]['drawDarkRect'] = function(_0x53a71e, _0x317dd7, _0x3f0265, _0x483b49) {
const _0x316000 = _0x58cf34;
_0x483b49 = _0x483b49 || this[_0x316000(0x7b1)](),
this[_0x316000(0x220)][_0x316000(0x254)] = 0xa0;
const _0x2d733d = ColorManager['gaugeBackColor']();
this[_0x316000(0x220)][_0x316000(0x3d1)](_0x53a71e + 0x1, _0x317dd7 + 0x1, _0x3f0265 - 0x2, _0x483b49 - 0x2, _0x2d733d),
this[_0x316000(0x220)][_0x316000(0x254)] = 0xff;
}

that spot where it says
= ColorManager['gaugeBackColor']();
change it to
= "#FFFF00";
or whatever color code you want.
If you don't see that 'ColorManager' and have it more scrambled, just try to find the correct spot based on what the next and previous lines say in my example.

Then save your notepad file as a .js file to your plugin folder and add it as a plugin below VisuStella.
There's a place for the draw data JS inside the params, and after tinkering for a bit I found that I could change the color of the rectangles by using

this.drawDarkRect.color = this.systemColor(); //replace with whatever color you want

But no matter how I try to look there doesn't seem to be a way to change the text color of just the param variable in:

this.drawParamData(param, px, py, pw);

A nuclear option I saw was changing the windowskin system color, but I'd rather not do that if possible. If anyone knows any way to change the param text color please let me know.
drawParamData() is probably pulling the label color from the default systemColor() internally, which is why changing the rect color worked but the param text didn’t.
Instead of changing the whole windowskin, try overriding the text color right before the draw call, something like:

this.changeTextColor(ColorManager.textColor(X));
this.drawParamData(param, px, py, pw);
this.resetTextColor();

Replace X with the color index you want.
If that doesn’t work, then drawParamData() itself is likely resetting the color internally, meaning you’d need to edit/override that function directly in the plugin/script.
No but changing that background is easier. Changing the text color is harder (at least for me).

For the background you can go to the console with F8 and then write there (in the console tab):
Window_InBattleStatus.prototype.drawDarkRect
and click enter, then click on the function that appears and you go to sources tab.
There press "pretty print" and then copy paste the function (one with yellow highlight name) to a notepad. For me it looks like (bit different for you):

Window_InBattleStatus[_0x58cf34(0x8ef)]['drawDarkRect'] = function(_0x53a71e, _0x317dd7, _0x3f0265, _0x483b49) {
const _0x316000 = _0x58cf34;
_0x483b49 = _0x483b49 || this[_0x316000(0x7b1)](),
this[_0x316000(0x220)][_0x316000(0x254)] = 0xa0;
const _0x2d733d = ColorManager['gaugeBackColor']();
this[_0x316000(0x220)][_0x316000(0x3d1)](_0x53a71e + 0x1, _0x317dd7 + 0x1, _0x3f0265 - 0x2, _0x483b49 - 0x2, _0x2d733d),
this[_0x316000(0x220)][_0x316000(0x254)] = 0xff;
}

that spot where it says
= ColorManager['gaugeBackColor']();
change it to
= "#FFFF00";
or whatever color code you want.
If you don't see that 'ColorManager' and have it more scrambled, just try to find the correct spot based on what the next and previous lines say in my example.

Then save your notepad file as a .js file to your plugin folder and add it as a plugin below VisuStella.
Ended up giving this a shot and it worked for the rectangles, thanks! I tried to take a look at the drawParamData function and it looks like it calls the ResetFontSettings function twice, so I can probably figure out how to use your method to make a plugin that makes the function use the right colors for my text.

Just to clarify for myself, is drawDarkRect and drawParamData used anywhere else? It doesn't seem to change anything in my map view status window so I'm assuming not.
Cool.

If you make that method only for that window then it doesn't affect anything else (as that window isn't used as starting point for anything else). So if you change the functions starting with Window_InBattleStatus.prototype.

For the param name color I tried changing what color that window gets with systemColor and also what color it gets with resetTextColor (which that resetFontSettings uses), but it didn't seem to affect it. And trying to edit the spots in the drawParamData method caused crashes (I think because it uses that comma syntax). Also tried changing color in drawParamText, but that didn't seem to work either. That's why I said it's too difficult for me, unless I would ask AI. But yeah, I didn't try very long and hope you manage to do it.

Original thread: https://forums.rpgmakerweb.com/threads/changing-in-battle-status-text-and-rectangle-color.183587/