TSR_TextColorAddOn by The Northern Frog

Hello,
the plugin is compatible with most Yanfly plugin including save core, but for all that other plugins, I don't know. I can see in the background of the screen shot that it happened in yep save scene, but doesn't mean it's not compatible with it, beside it is not refered to in the bug report.

Does the save scene have color/gradient codes in the save core parameters or something?

Also my plugin and ShadowDragon_TF use the exact same gradient functions. Maybe you could start by disabling that one (which is refered in the bug report) and see if it change something.
In honesty I am not sure I when on I different projects and it was fine changing 1 but until I copied my plugin into the new project and the error comes back so honestly I have no Idea I disabled something of the other plugin it was still doing the same thing ^^
my plugin has a part of code that TSR used, but I got also other function inside.
so you can basicly rule out the gradient sections.

so far I know, the plugin below will overwrite the one above, so it shouldn't colide.

also, try to keep YEP_EngineCore above all other plugins, unless specified otherwise.
my plugin has a part of code that TSR used, but I got also other function inside.
so you can basicly rule out the gradient sections.

so far I know, the plugin below will overwrite the one above, so it shouldn't colide.

also, try to keep YEP_EngineCore above all other plugins, unless specified otherwise.
I tried that but it was having none of it but I will use TSR save plugin ^-^
Hello everyone!
So I gave this plugin a go and it worked because I wanted to replace the Parameter Text in all menus with Icons like so...

BEFORE
Item Scene Example (Text).PNG


AFTER
Item Scene Example (Images).PNG


And it worked exactly as I needed BUT...
It seems to be conflicting with YEP Message Core and having this plugin turned on has made the \fi & \fr font commands from YEP Message Core (and possibly others too) stop working entirely in all text boxes ://
Hoping I can find a solution here to have my cake and eat it too.
I don't want to give up italics or font commands as I use them all the time, but also don't want to give up these icons either cause they work so well 🙁

Any suggestions?
I don't use this script for text colouring, only putting Icons in menus where RPG Maker wouldn't normally allow (as I couldn't really find another script that did that).
I'm using basically all of Yanfly's menu plugins btw if that helps.

Edit: I've now also realized that the TSR plugin is causing a new problem where on some seemingly random occasions that I can't seem to replicate, icons that I'm drawing in standard text boxes using \I[ ] (which YEP Message Core allows) just don't show up at all.
Sometimes I'll load a test map and open some text boxes and it'll be fine, other times it won't be.
There doesn't seem to be a pattern to it, and I have never experienced this bug before so I'm pretty certain it's caused by this TSR plugin.
Hello, font commands like \fi, \fb and \fr does work when I test it. And I've never experience the bug you reported about icon not showing in regular text messages.

Note that my plugin must be bellow YEP_coreEngine, but above YEP_messageCore in the plugin manager, otherwise most text commands will be broken.
Thank you @TSR for your response! ^_^
Bizarrely I can't seem to reliably replicate this anymore...
How weird, it could be caused by something else, or possibly even just a weird rpg maker glitch idk.

Anyway, I've got your plugin listed where you instructed, and I just have one more problem.
When using the plugin, all icons that are drawn seem to have an extra amount of space to the right of them where they wouldn't otherwise normally be, which is pushing some text over the edge (barely or by a more noticeable amount).

As a large amount of text & dialogue for my game is already done, it would be an extraordinary pain in the butt to go back and re-do every text box to accommodate this.

Normal (Without Plugin)
Without Plugin.PNG


With Plugin
WithPlugin.PNG


I've underlined the last few words, as you can see the full stop is pushed over the edge of the text box due to the extra space between the HP Icon and 'Health Points', and the Death icon and 'Unconscious'.
This is a less dramatic example, but you can see how this could really mess up text boxes that have more icons in them.

Here are my current plugin settings
Settings.PNG


Originally I wasn't using a custom icon sheet, but the Plugin increased the size of all icons for some reason if I didn't use a custom one (Disabling Icons Auto Scale didn't fix it), so I just copy-pasted icon sheet into the pictures folder and referenced it here in the plugin parameters.
That fixed the scaling issue, but its still creating this weird extra space to the right of every icon that's drawn.

Any idea what I should do here?
Sorry for being a nuisance ><
@TSR I've also noticed one other thing that I figured i'd point out.
One of Yanfly's Text Codes in the Message Core plugin (which as I mentioned I do have below your text plugin in the load order) is \{ (or \}) which increase and decrease the font size respectively

YEP Message Core
3.PNG

4.PNG


So I want the Class Text to be smaller than the Character's name and their BP, cause I'm actually going to put their pronouns there and I want that text to slightly smaller (cause it looks cleaner).
But when I try to use \} in the Class tab of the database to decrease the font size, it doesn't seem to do anything :/
(I checked it in a normal message box and it does work there)

I've shown an example below, and made an Icon appear in the 2nd class name so you can see that part of the plugin functions (though as mentioned in my previous post there is still the issue of there being the extra amount of space to the right of the icon messing up all my other textboxes but anyway)

Example Images
1.PNG
2.PNG


Thought I'd just bring this to your attention.
This is such a cool plugin and it's really nice to see you actively responding here and helping people like me out! ^_^

As someone that can't program in JS, I am very grateful to all helpful programmers on this site.
Thank you in advance for your assistance!
Hello @LunaFamiliar, sorry for the late response.

But when I try to use \} in the Class tab of the database to decrease the font size, it doesn't seem to do anything :/
Because you can't use these code in the database. As explained in the plugin instructions, the codes that you can use in the database are \i, \v, \n and \g...

Concerning the extra space after the icons, I don't know why it's doing that. Beside, It's not something I'm able to reproduce in text messages nor database entries, wether I'm using the default icon sheet or on set with the custom sheet parameters.

When using the default icon sheet, the plugin auto adjust the icon size based on the font size because the icon size of 32 is meant to fit with default font size of 28. Any other font size makes the icons a bit offset compared to the text.

Since, you're using the default 28 font size, try to disable the auto adjust of icon and use the default icon sheet instead of the custom sheet. Maybe that'll help with the extra space.​
Spoiler: Disable icon auto adjust of the default icon sheet
Change line 640 in the plugin file to "let adjust = false", see bellow.
Code:
Bitmap.prototype.processDrawIcon = function(iconIndex, textState) {
    if (!this._iconOff) {
      let pad        = this.fontSize / 4.66;
      let iconwidth  = this.fontSize + pad * 2;
      let sheet      = ImageManager.loadSystem('IconSet');
      let start      = 0;
      let frameH     = Window_Base._iconWidth
      let frameV     = Window_Base._iconWidth
      let perRow     = 16
      let adjust     = true   ///CHANGE TRUE FOR FALSE
      if (TSR.TextColorAddOn.sheet) {
        if (iconIndex >= TSR.TextColorAddOn.index) {
          sheet   = ImageManager.loadPicture(TSR.TextColorAddOn.sheet);
          start   = TSR.TextColorAddOn.index;
          frameH  = TSR.TextColorAddOn.frameH;
          frameV  = TSR.TextColorAddOn.frameV;
          perRow  = TSR.TextColorAddOn.perRow;
          adjust  = TSR.TextColorAddOn.scale;
        }
      }
      this.drawIcon(iconIndex, textState.x + 2, textState.y + 2, iconwidth, pad, sheet, start, frameH, frameV, perRow, adjust);
      textState.x += iconwidth + 4;
    }
};

Hope that could help,
regards
Hi @TSR and thank you for your response!
My apologies for not realizing you can't use \} in the database, that's regrettable but I'll make do.

As for the weird Icon spacing issue, I tried your fix but it didn't seem to make a difference unfortunately...
I modified that line of the code you specified to read 'false', removed the custom icon sheet, and set the starting index back to its default to make sure that wasn't doing anything.
Capture.PNG


But as you can see here the issue is still occuring...
Capture3.PNG

Capture2.PNG


Capture5.5.PNG
Capture4.PNG


(Just to note in case of confusion, that second text box example absolutely 100% fits inside the box properly with the plugin disabled.)

A reason you can tell straight away that the plugin is doing something weird to my iconsheet is on the Save Screen shown below...

Plugin Disabled
Capture6.PNG


Plugin Enabled

Capture5.PNG


Bizarrely, it seems to make less space appear on this screen, whereas it's making more space appear on practically every other screen.
I have no idea what's going on here...
It seems to be auto adjusting in certain ways instead of just taking the icon and displaying it normally.

I'm not using this plugin for any text colouring related stuff, I just need something that will let me display Icons in any menu I want (so something that lets me put icons in database entries basically).

I've tried shopping around for other plugins that can do that, but the only one I've had luck with needs to be updated, and the author doesn't have any of the YEP Plugins to make a compatible update. Since those are paid now, they're not willing to buy them just to update their old plugin :/

Any help, or direction to someone else that could help would be super greatly appreciated 🙂
I apologize again for the hassle and am really grateful for your responses!
Hello again @LunaFamiliar
I ran a few tests to put some light on this matter.

This is how the icons looks in default blank project, no plugins.
Capture d’écran, le 2021-09-01 à 11.11.08.png


Adding YEP_CoreEngine doen't change anything, but adding YEP_MessageCore, the icons will looks like this (with or without the CoreEngine):
Capture d’écran, le 2021-09-01 à 11.11.48.png

Icons are bigger and a little offset down right.

Now adding my plugin in the correct place:
Capture d’écran, le 2021-09-01 à 11.13.07.png


Icons looks like this:
Capture d’écran, le 2021-09-01 à 11.13.25.png

Capture d’écran, le 2021-09-01 à 11.14.28.png

Big icons but alignement is fixed. And if you have only my plugin installed, it will look the same.

So yeah, there's some adjustment to the icons for better compatibility with the MessageCore. To remove those adjustement, make the change bellow (same as before but removing the small offset too):
Capture d’écran, le 2021-09-01 à 11.16.41.png

The 'adjust' argument is set to false and the right offset correspond to the default icon size of 32px isntead of the adjusted size (last code line).

Now icons should appear at default size without any offset:
Capture d’écran, le 2021-09-01 à 11.15.25.png

Capture d’écran, le 2021-09-01 à 11.15.35.png

Capture d’écran, le 2021-09-01 à 11.15.47.png

*It will look the same with or without MessageCore.

Now, see how it looks on your side.

Regards 🤘
+4 what I tested, was the same, no big cap, so I think if the result stays
the same, there is another plugin she use that messes with either text
or icons in general.

but I hope this will fix @LunaFamiliar issues otherwise, if the space is still
there, the last line with space +4, she can also try space -4 or play with
numbers to make it work for her.
Hi @TSR !
You absolute legend, thank you so much for your help ^_^
With a little bit of tweaking around this line that you mentioned...
Capture.PNG

(I ended up going with - 2) it worked a charm!
It seems to now be universally fine on every menu except the save menu scene by YEP Save Core, but I decided that - since it was the only menu instance where the icons were still wonky - I'd bite the bullet and made duplicate re-sized icons for that screen specifically to use, so now it looks fine 😀

Thank you so much you've been so incredibly understanding and helpful throughout this problem of mine!
And thank you too @ShadowDragon for all of your input and advice as well ^_^
If it's possible I wonder if you could turn the icon spacing number (that I have set as '- 2') into a variable that users of the plugin could customize to their liking?
That might be a good addition from a UX perspective 😀

Thanks again!
So relieved this is finally resolved <3
@LunaFamiliar adding a param is a easy part, but while the code how
it's done works for me.

So I think for most, it would be good, I can make a unofficial version, but
TSR might add it with default "+4" and can be adjust to 0 or -x.
if there is a update and or bug to be fixed.

but if people read this, they can adjust it inside the plugin easely as well.
as for your save scene, it can be an easy fix if you really want it to work
on that scene too.

But I happy that you resolve your issue, so dont hassitate if you have more
questions or issues regarding this plugin.

Join his discord server to get faster help on his plugins and more 🙂
TSR and me (ShadowDragon) will try to help you in any way when possible
and when we got time.
Hello @TSR . Is this plugin compatiable with YEP_MainMenuManager?
I am using custom menu but can't figure out where to put the colour code for custom menu.

As you can see "Quest Log" is a custom menu created using YEP_MainMenuManager. How do I make it coloured ?

(Item is not custom. It was made coloured using the database changed as mentioned in your plugin.)
text error.png
Hello @andy123

Put the color code directly in Yanfly plugin, like this:
Capture d’écran, le 2021-09-03 à 19.21.34.png
Hey there @TSR Thank you for the great plugin, I'm having an issue...

Is there any kind of known issue with changing the database text color during combat? I've tried a VE Plugin as well as yours and gotten the same result. I'm probably messing something up somewhere but nobody responded to my thread and I'm fairly inexperienced.

https://forums.rpgmakerweb.com/inde...color-mid-combat-tried-ve-controltext.141843/ (This is my original post asking about the problem with what I attempted)
@FrozenFacade that is because you are required to code it a bit
differently in the scriptcall part.

\\c[3]Gust\\c[4] is need or \\1xbC[3]Gust\\C[0].

the "1xb" is something I'm not 100% sure off, but you can start with
double "\\" on start.

because scriptcalls read it a bit differently in the part than text code.

there was a similair that has issues on the color part.,
1xb was required for variables though, so see if its working for you.
Thank you! Yeah I just needed to two \\ instead of one. The other bits were not needed.



$dataSkills[41].name = "\\C[21]Gust\\C[0]";
^ That's what ended up working.
@FrozenFacade that is because you are required to code it a bit
differently in the scriptcall part.

\\c[3]Gust\\c[4] is need or \\1xbC[3]Gust\\C[0].

the "1xb" is something I'm not 100% sure off, but you can start with
double "\\" on start.

because scriptcalls read it a bit differently in the part than text code.

there was a similair that has issues on the color part.,
1xb was required for variables though, so see if its working for you.

Original thread: https://forums.rpgmakerweb.com/threads/tsr_textcoloraddon-by-the-northern-frog.121097/