SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > SRB2 Discussion

Reply
 
Thread Tools Search this Thread
Old 01-03-2018   #1
Rapidgame7
lmao
 
Rapidgame7's Avatar
Default Colored server name [Tutorial] (+ chat text transparency)

I'm at least 75% sure that when you first tried to figure out how to do a colored name for your server, you found this 2011 post (among other results but this is the first one).

I thought it should be better to go more in-depth, and update it to recent versions.

Let's start with this from the get-go - You cannot color your player name, nor chat text (yourself). If it was possible in older versions, good, but you cannot do so since around 2.0 I think.

There are two types of text coloring you can use for your server.
One of them is using numbers from 0 to 7 prepended by the ^ symbol (that is, from ^0 to ^7). This is the easiest way to color your server name, but doesn't show on the in-game server list, while it does on the website version of the master server. I don't know why. On top of that, this method uses up two characters which do count for the maximum amount of characters your server name may have.
Because of this, this tutorial will only focus on the classic way to color text: Using symbols.

This is a list of color codes, symbols, you can use:
Code:
<€> White
<> Purple
<‚> Yellow
<ƒ> Green
<„> Blue
<…> Red
<†> Gray
<‡> Orange

Copy the symbol enclosed in between the brackets.
The purple color symbol is a zero-width space, so it will appear as nothing. There is something, don't worry.
If for some reason you don't see even a square in between the brackets and looks like there's nothing, copy the entire line and paste it on an ANSI-encoded file and use the arrow keys to find the character. You'll notice it because the cursor gets stuck near the brackets once.
With Notepad++ you can change the encoding to something incompatible with the symbol to find it. You won't be able to copy it, however.



Spoiler: The tutorial
As many of you know, to add colors to your server you use symbols. Or the ^number thingy.
To do so, you must execute the command from a text file, be it from its own text file or by autoexec.cfg (read below).

Apologies in advance, as my UI is in spanish.

Step 1:
Begin by creating a text file in the SRB2 folder, and call it however you want.

We will execute this file in SRB2, so don't make it too long.
Once you create it, open it.

Step 2:
This is VERY important: Make sure the encoding of the file is ANSI!
If the encoding is not ANSI, the file will interpret those symbols as something else, and the formatting will get screwed up.

In Notepad, select the file menu and click "Save As...", and you'll be given a prompt for a filename. Right next to the save button, you have an "Encoding" drop down menu. Select ANSI, and save the text file.


In Notepad++, there's an "Encoding" tab at the top of the window. Select "Encode in ANSI" from there. Save the file after that.


Step 3:
Now that we have our ANSI text file, it's time to start colouring!
Pick some colours from the list at the top of the post, and as you type your server name, add those symbols behind the text you want to color.
For example, if you want your server name to look like:

(the words "The" and "Of" being gray, while "Sun" is yellow and "Nature" is green)
You would type in your text file:
Code:
servername "†The ‚Sun †Of ƒNature"
"†" represents gray, "‚" represents yellow and "ƒ" represents green.
The symbols will color anything in front of them.

Step 4:
Now that we have our file, save it and start SRB2.
In console, type "exec" followed by a space and the entire file name of the file you created. Done!
Now check the "Host server" menu, your coloring is there!
And that's pretty much it!



If the color doesn't work, make sure your text file is encoded in ANSI.
If the server name truncates, make it shorter. The server name will truncate after 31 characters.


Spoiler: Even shorter tutorial
If you don't feel like reading a huge paragraph here you go:

1) Make a text file
2) Make sure it uses the ANSI encoding
3) Type "servername", add a space then go type your server name, adding the color symbols behind the text you want to color.
3b) Enclose the server name in quotes.
4) Save
5) Execute in SRB2

k there you go


The server name will truncate after 31 characters. Make them count because each color code takes one, obviously.



The following is aimed towards scripting:
Did you know that (in scripts) you can add transparency in chat?

The normal color symbols go from hex 80 to 87. From 88 until 8F it is all white.
If you add F to it, making it start from 90 and end at 97, the text becomes slightly more transparent!
This goes on and on until reaching F0 to F7, with the most transparent text you can get in chat.


In Lua you can escape the hex codes with the backslash, making sure you start with a lowercase x and the hex code, for example /x80 for normal white, or escaping the decimal number, for example /128 for normal white.

Here is a list of all these transparency colors, from opaque (normal) to as transparent as it can get:
Code:
| <€> x80 | <> x90 | <*> xA0 | <> xB0 | <> xC0 | <> xD0 | <> xE0 | <> xF0 |
| <> x81 | <‘> x91 | <> xA1 | <> xB1 | <> xC1 | <> xD1 | <> xE1 | <> xF1 |
| <‚> x82 | <’> x92 | <> xA2 | <> xB2 | <> xC2 | <> xD2 | <> xE2 | <> xF2 |
| <ƒ> x83 | <“> x93 | <> xA3 | <> xB3 | <> xC3 | <> xD3 | <> xE3 | <> xF3 |
| <„> x84 | <”> x94 | <> xA4 | <> xB4 | <> xC4 | <> xD4 | <> xE4 | <> xF4 |
| <…> x85 | <•> x95 | <> xA5 | <> xB5 | <> xC5 | <> xD5 | <> xE5 | <> xF5 |
| <†> x86 | <–> x96 | <> xA6 | <> xB6 | <> xC6 | <> xD6 | <> xE6 | <> xF6 |
| <‡> x87 | <—> x97 | <> xA7 | <> xB7 | <> xC7 | <> xD7 | <> xE7 | <> xF7 |
The symbol you have to use is right in between of two angle brackets.
Again, a blank space means there is a zero-width space.

No, you can't use transparency in server names. I tried, but the website side of the master server reports a blank server name, while the in-game browser reports white text.

You can also put the server name line in your autoexec.cfg file, so it will set the server name everytime you load the game. Dunno why would you want to do that, but you can.



And that's pretty much it. Thanks for reading, have fun, and please make it look good, this isn't acceptable

This hurts the man
__________________
Quote:
<Steel Titanium> so many eggman laughs
<Rapidgame7> hehehe HEHE HEhEhe
<Rapidgame7> AAAAAUUUUGGGGH

Last edited by Rapidgame7; 03-25-2018 at 10:24 PM. Reason: text v1.8 - expanded upon ^ characters
Rapidgame7 is offline   Reply With Quote
Old 01-13-2018   #2
RomioTheBadass
PK3 Fetishist
 
RomioTheBadass's Avatar
Default

It was possible to color your player name in 2.0 and I Believe it's still possible but won't allow you to join Netgames, too bad, I thought it was neat, my guess is they had to remove it For team modes (CTF and TM), but still there are other ways to force players to use the same color for specific game modes.

Regardless Great tutorial, It'll definitely help lot of people who are curious about how to color their Server names.
RomioTheBadass is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:01 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.