Neverwinter Nights > NwN Building

Chat Color

(1/1)

Mercy:
I'm working on conversations in a mod right now and for some reason when I enter in color codes its not working.

Like, <cÿ•> (which is not right on the board, compared to the toolset.) is not showing up in the conversation. It's saying UNRECOGNIZED TOKEN. :( Any ideas as to what's up or what I can do?

420:
Add this code in your OnModuleLoad event:

--- Code: ---    SetCustomToken(1000, "</c>"); // CLOSE tag
    SetCustomToken(1001, "<cþ  >"); // red
    SetCustomToken(1002, "<c þ >"); // green
    SetCustomToken(1003, "<c  þ>"); // blue
    SetCustomToken(1004, "<c þþ>"); // cyan
    SetCustomToken(1005, "<cþ þ>"); // magenta
    SetCustomToken(1006, "<cþþ >"); // yellow
    SetCustomToken(1007, "<c   >"); // black
    SetCustomToken(1008, "<c¥  >"); // dark red
    SetCustomToken(1009, "<c ¥ >"); // dark green
    SetCustomToken(1010, "<c  ¥>"); // dark blue
    SetCustomToken(1011, "<c ¥¥>"); // dark cyan
    SetCustomToken(1012, "<c¥ ¥>"); // dark magenta
    SetCustomToken(1013, "<c¥¥ >"); // dark yellow
    SetCustomToken(1014, "<c¥¥¥>"); // grey
    SetCustomToken(1015, "<cŒŒŒ>"); // dark grey
    SetCustomToken(1016, "<cþ¥ >"); // orange
    SetCustomToken(1017, "<cþŒ >"); // dark orange
    SetCustomToken(1018, "<cÚ¥#>"); // brown
    SetCustomToken(1019, "<c† >"); // dark brown

--- End code ---

Then use custom tokens in your conversation. For instance, if you wanted to make the text orange you would do this in conversation:

--- Code: ---<CUSTOM1016>This conversation text is orange.<CUSTOM1000>

--- End code ---

These numbers can be set to anything you want and you can add more colors. There are charts and tutorials about color shades and whatnot. I'll see if I can find some and post the links.

-420

EDIT: I got this from here: The Hitchhiker's Guide to Color Tokens by gaoneng

Mercy:
Sweet! Thanks 420!

Navigation

[0] Message Index

Go to full version