...
To have a <cXXX> code in a conversation/journal/description you can't input it directly. Instead you need to wrap it in a <CUSTOMXXX> token. To do this have a script like this in the OnModuleLoad:
| Code Block |
|---|
const string COLOR_TOKEN = " ##################$%&'()*+,-./0123456789:;;==?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[]^_`abcdefghijklmnopqrstuvwxyz{|}~~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ¡¡¢£¤¥¦§¨©ª«¬¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþþ";
string GetRGBCToken(int nRed=255, int nGreen=255, int nBlue=255)
{
return "<c" + GetSubString(COLOR_TOKEN, nRed, 1) + GetSubString(COLOR_TOKEN, nGreen, 1) + GetSubString(COLOR_TOKEN, nBlue, 1) + ">";
}
void main()
{
SetCustomToken(1000, "</c>");
SetCustomToken(1001, GetRGBCToken(255, 0, 0));
SetCustomToken(1002, GetRGBCToken(0, 255, 0));
SetCustomToken(1003, GetRGBCToken(0, 0, 255));
} |
...
| Code Block |
|---|
<CUSTOM1001>Hello in red.<CUSTOM1000> Normal text. <CUSTOM1002>Hello in green.<CUSTOM1000> Normal text. <CUSTOM1003>Hello in blue.<CUSTOM1000> Normal Text. <CUSTOM1004>Hello in black.<CUSTOM1000> Normal Text. <CUSTOM1005>Hello in white.<CUSTOM1000> |
Ending up like this:
This can be some good code to use for manually doing it (to be updated with a better code when newer patch comes out + some idea about default colours is obtained)Alternatively setting a handful manually may be more reliable:
| Code Block |
|---|
// OnModuleLoad
void main()
{
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(1017, "<cŒŒŒ>"); // dark grey
SetCustomToken(1015, "<cþ¥ >"); // orange
SetCustomToken(1016, "<cþŒ >"); // dark orange
SetCustomToken(1017, "<cÚ¥#>"); // brown
SetCustomToken(1018, "<c† >"); // dark brown
} |
...
