Page 1 of 1

How to make chat colourful in game?

PostPosted: 19 Mar 2012, 15:51
by ProzacR
How to make chat colourful in game?

Re: How to make chat colourful in game?

PostPosted: 20 Mar 2012, 01:22
by inpersona64
I love that I kept getting this question ingame. Someone finally decided to take my advice and scour the forums. I change my text colour through the use of Extended Compass, courtesy of ZeroKnight. Search for that in the forums.

Re: How to make chat colourful in game?

PostPosted: 20 Mar 2012, 03:53
by ZeroKnight
I don't update it anymore because nobody used it.

Re: How to make chat colourful in game?

PostPosted: 20 Mar 2012, 04:40
by inpersona64
Oh ok. well I still use it. There's a command you type when you want to change the color of your text, but idk what it is because I've never had to use it.

Re: How to make chat colourful in game?

PostPosted: 21 Mar 2012, 01:17
by unixfreak
Use these escape codes for your own text:
{l Code}: {l Select All Code}
^f0 = green
^f1 = blue
^f2 = yellow
^f3 = red
^f4 = grey
^f5 = pink
^f6 = orange
^f7 = white
^f8 = black
^f9 = cyan


I'm not sure about the blinking/flashing modes (or the scrolling pictures i've seen some people use). But you can use the ^f codes for colours like so:
{l Code}: {l Select All Code}
/say "^f9This text is cyan coloured"


You can make it easier in your autoexec.cfg to override the default T bind.
{l Code}: {l Select All Code}
bind "T"  [ saycommand "^f9"]

That would make your text cyan by default when pressing T.

Re: How to make chat colourful in game?

PostPosted: 21 Mar 2012, 03:30
by qreeves
RE also accepts letters in place of the Sauerbraten-oriented numbers:
{l Code}: {l Select All Code}
^f0 = green = ^fg
^f1 = blue = ^fb
^f2 = yellow = ^fy
^f3 = red = ^fr
^f4 = grey = ^fa
^f5 = pink = ^fm (this is actually supposed to be a "magenta" but the colour changed over time)
^f6 = orange  = ^fo
^f7 = white = ^fw
^f8 = black = ^fk
^f9 = cyan = ^fc

I find them easier to remember than the numbers.

Re: How to make chat colourful in game?

PostPosted: 21 Mar 2012, 07:38
by ClassyRain
You can also put hex codes in square brackets:
{l Code}: {l Select All Code}
^f[0xFF0000] = Pure red
^f[0xFFFFFF] = White
^f[0x000000] = Black

And et cetera...
Also, you can use the decimal numbers, but I find that the hex codes are easier. There's a useful tool at http://www.colorpicker.com that lets you pick a color, and it'll display the hex code.
Why do you want to know this?

Re: How to make chat colourful in game?

PostPosted: 21 Mar 2012, 08:30
by TheLastProject
ClassyRain {l Wrote}:Why do you want to know this?

Probably so he can have flashy text with letters of all colours of the rainbow to impress and annoy people :P

Re: How to make chat colourful in game?

PostPosted: 21 Mar 2012, 21:40
by inpersona64
I don't mind color text but i took the liberty of disabling flashing text because thats definitely annoying. The one thing I like about color text is that people actually know its me when I enter a server (because I always use red text :P)

Re: How to make chat colourful in game?

PostPosted: 22 Mar 2012, 02:20
by Dratz-_C
I wonder why the dialog no longer sounds when I talk with an icon and colored text.
Cheers [Edit: sorry if this was off-topic.]

Re: How to make chat colourful in game?

PostPosted: 23 Mar 2012, 01:22
by ClassyRain
Dratz-_C {l Wrote}:I wonder why the dialog no longer sounds when I talk with an icon and colored text.
Cheers

Maybe RE doesn't do a search for the text.

Re: How to make chat colourful in game?

PostPosted: 23 Mar 2012, 03:33
by qreeves
Dratz-_C {l Wrote}:I wonder why the dialog no longer sounds when I talk with an icon and colored text.
Cheers [Edit: sorry if this was off-topic.]

The sounds are triggered by matching the text people send, it does not filter out colour before doing these checks so they stop the sounds being emitted.

Re: How to make chat colourful in game?

PostPosted: 07 Apr 2012, 02:56
by ZeroKnight
Replace the existing voice.cfg with this:

{l Code}: {l Select All Code}
// compass/voice actions

voices = 0
addvoice = [
    voices = (+ $voices 1)
    alias (format "voice%1str" $voices) $arg1
    alias (format "voice%1snd" $voices) (registersound $arg2 255 512 8 $arg3)
]

addvoice "argh"         "voice/argh"        2
addvoice "lucky shot"   "voice/luckyshot"   2
addvoice "nice shot"    "voice/niceshot"    2
addvoice "boom"         "voice/boom"        2
addvoice "damn"         "voice/damnit"      2
addvoice "haha"         "voice/haha"        2
addvoice "suck"         "voice/suckit"      2
addvoice "pzap"         "voice/pzap"        2
addvoice "yes~"         "voice/yes"         2
addvoice "sorry"        "voice/sorry"       2
addvoice "sry~"         "voice/sorry"       1 // reuse
addvoice "no problem"   "voice/noproblem"   2
addvoice "np~"          "voice/noproblem"   1 // reuse
addvoice "no~"          "voice/no"          2
addvoice "go go go"     "voice/gogogo"      2
addvoice "gogogo"       "voice/gogogo"      1 // reuse
addvoice "hang on"      "voice/hangon"      2
addvoice "thanks"       "voice/thanks"      2
addvoice "ty~"          "voice/thanks"      1 // reuse

on_text = [
    id = 0
    reg = (format "%1~" (filter $arg4)) // the ~ allows absolute matching, like in yes/no/etc
    loopwhile i $voices [= $id 0] [
        str = (getalias (format "voice%1str" (+ $i 1)))
        if (strncasecmp $str $reg (strlen $str)) [ id = (+ $i 1) ]
    ]
    result (getalias (format "voice%1snd" $id))
]


Quin gave me this hotfix a long while ago when I was working on Extended Compass. The key difference is this line:
{l Code}: {l Select All Code}
reg = (format "%1~" (filter $arg4)) // the ~ allows absolute matching, like in yes/no/etc

Re: How to make chat colourful in game?

PostPosted: 09 Oct 2012, 10:09
by bonifarz
This topic has a clear title with keywords likely to be searched for, thus I'd like to add two things.

First, Zero's updated archives are useful in this context:
viewtopic.php?f=73&t=3592

Second, I like the idea to have your chat colour match your profile colour automatically:
{l Code}: {l Select All Code}
bind "RETURN" [saycommand "^f["(getcolour -1)"]"]

With this simple one liner in your config.cfg, your chat colour is always identical to the playermodel colour you can set conveniently in the main menu's profile section.

Re: How to make chat colourful in game?

PostPosted: 09 Oct 2012, 10:37
by Ulukai
bonifarz {l Wrote}:I like the idea to have your chat colour match your profile colour automatically:
{l Code}: {l Select All Code}
bind "RETURN" [saycommand "^f["(getcolour -1)"]"]

With this simple one liner in your config.cfg, your chat colour is always identical to the playermodel colour you can set conveniently in the main menu's profile section.


Hey, that's a great idea! Would be a cool option in the profile menu to make the chat color match the player color!

Re: How to make chat colourful in game?

PostPosted: 10 Oct 2012, 11:15
by ZeroKnight
Ulukai {l Wrote}:
bonifarz {l Wrote}:I like the idea to have your chat colour match your profile colour automatically:
{l Code}: {l Select All Code}
bind "RETURN" [saycommand "^f["(getcolour -1)"]"]

With this simple one liner in your config.cfg, your chat colour is always identical to the playermodel colour you can set conveniently in the main menu's profile section.


Hey, that's a great idea! Would be a cool option in the profile menu to make the chat color match the player color!


A cool idea indeed :)
I've added this functionality (and more) to my Color Chat GUI :D
Check it out here!