Improved Support for Color Tokens and Tags in the Toolset
shadguy
Member Posts: 154
x3_inc_string has some basic support for RGB color codes (tags) - there are similar bits and pieces on the vault that let you do/build/learn to work with colorized names. So, for example, if desired, we can colorize merchant NPC names one color, and quest givers names another color, and bosses and champions another color, and so on. Same goes for placeables, doors, area names, etc.
You can also colorize journal entries by setting up custom tokens that reference these codes.
The codes can be a little awkward to work with for some applications. See screenshot below - the colros can look great in game (see DM Client), but the codes themselves can be awkward and either require extra work to setup (See journal editor), or are hard to read and work with (see Area Names in toolset listing).
I'll suggest adding some native support for easier to use color codes and tokens. I think these features would be more accessible to more builders if they were easier to use. Being able to use some standard built in color tags like [colorRed], [colorGreen], [colorSystemGrey], or some other thing in ObjectNames, Descriptions, Conversation, Journal Entries, and string variables in scripts is useful.
I'm not sussed about this too much as I've got my stuff working for me, but I thought the idea might interest others.
-Dave
You can also colorize journal entries by setting up custom tokens that reference these codes.
The codes can be a little awkward to work with for some applications. See screenshot below - the colros can look great in game (see DM Client), but the codes themselves can be awkward and either require extra work to setup (See journal editor), or are hard to read and work with (see Area Names in toolset listing).
I'll suggest adding some native support for easier to use color codes and tokens. I think these features would be more accessible to more builders if they were easier to use. Being able to use some standard built in color tags like [colorRed], [colorGreen], [colorSystemGrey], or some other thing in ObjectNames, Descriptions, Conversation, Journal Entries, and string variables in scripts is useful.
I'm not sussed about this too much as I've got my stuff working for me, but I thought the idea might interest others.
-Dave
3
Comments
Personally I just made colors_lib where I setup custom tokens and color codes and then use simple script to read Color local variable from object and set it on spawn with SetName().
I've looked at using moneo to apply color codes globally within in the mod to reduce the amount of code running in the initialization scripts, but moneo is choking on many of the color codes in the 128-255 range. So, I suppose having person-friendly color codes available could provide a friendlier path for moneo to go revisit that project someday, too.
-Dave
https://neverwintervault.org/project/nwn1/hakpak/original-hakpak/named-color-token-system
There are issues with some of the assets only working out of the override folder, and not working in HAKs, based on the author's comments.
Still, it adds some very nice color token features.
-Dave