I’m doing a lot of research into how GTA scaleforms work and I keep running into the same problem with the way the colors in strings work on FiveM. I have two concrete examples about this bug.
The first is when I tried to reproduce the robbery end table used in GTA Online. To set the color of the players’ nicknames in the “Platinum, Gold, Silver, Bronze” display, you have to specify as last argument the id of the hud color when calling the “ADD_STAT_TO_TABLE” scaleform function. The problem is that no matter what color is specified, the nicknames will always be displayed in white. It is then mandatory to modify the color by specifying it in the string with ~HUD_COLOUR_PLATINUM~ for example. This shows that the colors defined by FiveM take over the colors defined by the scaleform and even when you specify no color (without any “~COLOR~” in the string)!
There should be an option to prevent FiveM from taking over the colors on the scaleform or simply that it does not force the color when no color is specified!
… huh, but FiveM doesn’t ‘define’ any colors, or do anything else to GFx colors including ‘taking over’ or ‘forcing’? Why should there ‘be an option’ to ‘prevent’ something that shouldn’t be happening in the first place, as there’s no code to do such a thing?
I’m probably not using the right terms but these color issues in scaleforms seem to only appear in FiveM and that’s why I thought it’s related to the color codes of FiveM, but it’s may be related to something else …
To add a bit of a supplement to what I explained, other people encountered the same problem and were forced to stream the scaleforms GFx like here : [Solved / Help] iFruit Scaleform weirdness?
So there are solutions to these color problems but if it works as is in GTA, then there may be a problem with FiveM?
Oh I’m so sorry I’m really using the wrong terms … When I talk about color codes I’m talking about what is referenced on this page: https://www.kronzky.info/fivemwiki/index.php/Text_Colors or any other ~COLOR~ syntax in a string
Right - underlying issue seems to be in GFxEditTextCharacterDef__SetTextValue forcing every text field to be HTML which apparently leads GFx to reset a color value.