Skip to content

Improved Support for Color Tokens and Tags in the Toolset

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

Comments

  • PhenomenPhenomen Member Posts: 33
    With new SetName() it became really easy to add colored names to creatures, items and placeables and even change it dynamically.
    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().
  • shadguyshadguy Member Posts: 154
    Yeah, I do the same - most of our colors are applied dynamically OnSpawn or OnAreaEnter. The noteable exceptions are area names, some plot items, and stuff dealing with custom tokens for Journals. ie things wherein only a handleful of resources are colorized or things (journal) wherein extra hoops need to be jumped thorugh anyway.

    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
  • shadguyshadguy Member Posts: 154
    NWShacker released a related project over here last week:

    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
Sign In or Register to comment.