MV Help with text color.

Hi everyone. I need some help changing the color of the commands during battle. I’ll post some images so you can see exactly what I mean.

ComandiJune.png

ComandiMasio.png


As you can see, I had no problems changing the color of the various commands using the appropriate plugins. The only thing I can’t figure out is how to change the “Items” command based on the character being used. Is there a way to do this? I would need to change the color for each character and, of course, also the color that appears in the standard game menu.
Well, here's code to control the item command color per character, but don't know if your plugins already affect this method. If yes, you might need to modify the plugin codes:

EDIT: Copy paste to notepad, save as .js file in your plugin folder and add as a plugin.

Window_ActorCommand.prototype.drawItem = function(index) {
var rect = this.itemRectForText(index);
var align = this.itemTextAlign();
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
if (this.commandName(index) === "Item") {
switch (this._actor.actorId()) {
case 1:
this.changeTextColor(this.textColor(10));
break;
case 2:
this.changeTextColor(this.textColor(11));
break;
case 3:
this.changeTextColor(this.textColor(12));
break;
case 4:
this.changeTextColor(this.textColor(13));
break;
}
}
this.drawText(this.commandName(index), rect.x, rect.y, rect.width, align);
};
use TSR_TextColorAddon which can use colors everywhere.
for window message, items, commands, skills, pretty much anywhere.
Well, here's code to control the item command color per character, but don't know if your plugins already affect this method. If yes, you might need to modify the plugin codes:

EDIT: Copy paste to notepad, save as .js file in your plugin folder and add as a plugin.

Window_ActorCommand.prototype.drawItem = function(index) {
var rect = this.itemRectForText(index);
var align = this.itemTextAlign();
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
if (this.commandName(index) === "Item") {
switch (this._actor.actorId()) {
case 1:
this.changeTextColor(this.textColor(10));
break;
case 2:
this.changeTextColor(this.textColor(11));
break;
case 3:
this.changeTextColor(this.textColor(12));
break;
case 4:
this.changeTextColor(this.textColor(13));
break;
}
}
this.drawText(this.commandName(index), rect.x, rect.y, rect.width, align);
};

First of all, thank you very much for the replies. Since I’m a bit of a newbie, which value should I change in order to actually change the color? As for plugins that might interfere, I only have Yanfly Message Core and TSR TextColorAddOn.

I tried changing the number at the end of:

case 1:
this.changeTextColor(this.textColor(10));

but it didn’t work.
Hmmm, I tested it and it seemed to work for me (for the battle actor command window item command colors for different characters). And yeah, you just change the number (you can google rpg maker colors). Did you check if it works if you turn those other plugins off?

EDIT: The case number is the actor id
First of all, thank you very much for the replies. Since I’m a bit of a newbie, which value should I change in order to actually change the color? As for plugins that might interfere, I only have Yanfly Message Core and TSR TextColorAddOn.

I tried changing the number at the end of:

case 1:
this.changeTextColor(this.textColor(10));

but it didn’t work.
if TSR_TextColorAddon is installed, use the system command or skills
in the database: \C[5]yourSkill

yourSkill = the skill name, or command name, or item name.
depending where you are using it.

if you have custom colors added, you can even use \C[333] or even
with gradient colors (read helpfile how too use that)
But they wanted different command colors for different actors, if I understood it correctly? Can that plugin do that?
if for each actor is different, there should be a way to extend that.
if there are 5 commands, and 2 commands has different color,
there need to be more modifications to it.

each color would be simple, but it is also on the status menu as it
target the bitmap.

so battle is included, if separated, than it require a different approach.
so it may be note tag target to control "actor + command color"
so there would be more ways for this.
I tried disabling both of them, but if I disable TSR TextColorAddOn I lose the rest of the colors for the other commands.

My goal is to have the “Items” command be a different color for each party member. For example, first character: purple, second character: yellow, and so on.
Yeah but that's what my code does 😀 (if you're talking about the normal "Item" command)

So when you disabled the other plugins, did it work then? Like I said, it seemed to work for me. I don't mean that you should leave them disabled, but if they do interfere then you probably need to edit their code in a similar fashion.
I tried disabling any plugin related to text, but the situation doesn’t change—the color of the “Items” text remains white. Other than Yanfly’s Message Core and TSR TextColorAddOn, I don’t have anything else, except for a plugin called MechPen_SharpText, but I doubt that’s the cause.

Could it be that some battle-related plugin is causing the issue?
Yeah, like you seem to have some plugin that changes the actor command window to horizontal. And other layout changes. Though I don't think that would necessary need a change to drawItem, but anyway, it's possible some of your battle plugins are affecting it.

EDIT: Oh, now I think I got it LOL. You've changed the name of the Item command in terms, that seems to affect it, I didn't realize that. So change in the line the "Item" to exactly what you've renamed it (leave the quotations marks):
if (this.commandName(index) === "Item") {
Yep, it works now! Thanks so much for your patience and the help! 🙂
Ok cool!
You can report it as solved then.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-text-color.182045/