Author Topic: Chat Color  (Read 9212 times)

Offline Mercy

  • Hero Member
  • *****
  • Posts: I am a geek!!
    • View Profile
    • Email
Chat Color
« on: September 13, 2010, 04:22:00 PM »
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?
Elessar: why is the shit coming from his head?
Anheg: cause its japanese?

Offline 420

  • Hero Member
  • *****
  • Posts: 4086
    • View Profile
    • Email
Re: Chat Color
« Reply #1 on: September 13, 2010, 07:57:47 PM »
Add this code in your OnModuleLoad event:
Code: [Select]
   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

Then use custom tokens in your conversation. For instance, if you wanted to make the text orange you would do this in conversation:
Code: [Select]
<CUSTOM1016>This conversation text is orange.<CUSTOM1000>

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
« Last Edit: September 13, 2010, 08:19:20 PM by 420 »

Offline Mercy

  • Hero Member
  • *****
  • Posts: I am a geek!!
    • View Profile
    • Email
Re: Chat Color
« Reply #2 on: September 14, 2010, 05:29:30 AM »
Sweet! Thanks 420!
Elessar: why is the shit coming from his head?
Anheg: cause its japanese?