MZ Adding color to text when seeing compared stats with VisuStella ItemsEquipCore

Using this plugin lets you see the before and after stats so you know what the stat difference is going to be. However it isn't immediately apparent what is an upgrade and downgrade, as all the font for this is still in white like the base stats. Is there a way to make the font say green when the stat is increasing, and red when it's decreasing?
I'm not super familiar with VisuStella's plugins, but I just tested my copy of their sample project, and I see the colour changes there, just like it is in the core engine with no plugins. 😅

If you turn off all plugins, save your project to apply Plugin Manager changes, then test, do you see colour-coded stat changes in the equip menu? If not, check your window skin: img/system/Window.png. By default the "up/down" colours are 24 & 25 respectively, i.e. the first 2 squares on the 4th row of the coloured squares in the bottom-right of the image.
I do see color change in the VisuStella sample project, but not when I have my project set to use only the VisuStella Core plugin. According to my window skin, it should be showing green for increase and brown for decrease. Do you know where I would edit what colors the plugin is referencing? Maybe for some reason it is choosing the white square of the window skin for some reason.

I see this code under color settings for parameter changes, but if I put a number in the () it doesn't change a color ingame. I do not really know javascript...
1744554773329.png
Okay, got it sorted. And it seems the first square of the window.png in the bottom right with the colors doesn't count when counting for what color to use, so the 4th entry that I wanted actually counted as the 3rd.

Go into CoreEngine - Color Settings then look for Power Up and Power Down. I edited these and now I see color changes for stat changes ingame.

1744555534033.png
So I have another question regarding color with VisuStella, now that I've found this settings page. And hopefully a triple post is OK.

I want numerical stat values to be their own color. I found this setting on the Color Settings page:

1744557274677.png


If I change the value for "Normal" to a square in window.png with a color, it *does* change the numerical stat values to that color. However, it also affects a lot of other font in the game, like menu font - so ie. the option "Status" will be in that same color, when I want that to have its own color (so for now staying white). Is there a way to get this setting to *only* affect stat # values?
And hopefully a triple post is OK.
We ask users to avoid posting multiple times in a row within 24 hours (general rule 4):
  • double/multi posting (posting two or more times in row)
  • bumping threads (before 24 hours have passed)
In future, you can use the Edit button where necessary~

I want numerical stat values to be their own color.
VisuStella Core Engine has a parameter called "JS: Parameter Change", seen in your screenshot in post #3. (It's found under "Color Settings".) I assume it only applies to "change" values, though. Here's the default:
Spoiler: JS: Parameter Change
JavaScript:
// Set the variables used in this function.
let change = arguments[0];

// If a positive change, use power up color.
if (change > 0) {
    return this.powerUpColor();

// If a negative change, use power down color.
} else if (change < 0) {
    return this.powerDownColor();

// Otherwise, return the normal color.
} else {
    return this.normalColor();
}
This line decides the colour of neutral changes:
JavaScript:
    return this.normalColor();
You could change it to reference a colour from the window skin, e.g.
JavaScript:
    return this.textColor(7);
...or to return a specific colour in CSS Color format, e.g.
JavaScript:
    return "#ff00ff";

In general, though, to change the colour of specific text requires access to the code responsible for drawing that text, so you can tell it what colour to use. You'd be looking for code with something like this.drawText in it, so you can call this.changeTextColor(index) beforehand. As I said, I'm not really familiar with VisuStella, but I quickly skimmed the core plugin parameters and didn't spot anything promising.

Original thread: https://forums.rpgmakerweb.com/threads/adding-color-to-text-when-seeing-compared-stats-with-visustella-itemsequipcore.176928/