Just to potentially cull the many, MANY "how do I make custom color" questions that I'm sure we'll be receiving, here's a really fast tour on what to do.
You can approach this in two ways : Lua or SOC. SOC is faster and doesn't initialize the Lua interface, but Lua is much more flexible, and allows for fun stuff like animated skin colors. Personally, I'd always go with Lua.
Lua:
Make a text file, and add the following code into it.
Here, "freeslot" allows you to register the variable name of your skincolor, so you can define it below, and perhaps even modify it using Lua code. The "CUSTOMNAME" part can be your name of choice. Ensure that it's in all caps for visual consistency.
The "name" field is what will be seen in the Player Setup menu, and what you will use in the console to switch to that color (e.g. "color red").
The "ramp" field is the most complex part. It represents the range of colors you want to use for your skincolor, going from lightest to darkest. All of these numbers may seem intimidating, but they're simply the values corresponding to the colours in the SRB2 palette.
Here are the values that you can pick from. Try to avoid picking 255, as it's the color used for transparency most of the time.
https://wiki.srb2.org/wiki/Palette The wiki page itself, in case you want more information about Translucency values or the PLAYPAL.
The "invcolor" field is the desired "opposite" color to your own skincolor. You might want to keep a color wheel nearby, to easily find the color opposite of your own. This is important for Goal Signs and Save Game backdrops.
https://wiki.srb2.org/wiki/List_of_skin_colors This page allows you to see all skin colors in the vanilla game. You MUST pick a SKINCOLOR_ constant.
The "invshade" field is the number deciding WHICH value of the invcolor's ramp you should take from. As seen by the above example, each skincolor has 16 color values assigned to it in its ramp. The "invshade" field chooses a specific one to be used for Goal Signs/Save Games. Ranges from 0-15, NOT 1-16.
The "chatcolor" field decides what video flag to assign to your name when speaking in Multiplayer. There are a list of constants for this, so you can't just invent a new text color all willy-nilly.
https://wiki.srb2.org/wiki/Video_flags#Color This link will give you the possible options.
The "accessible" field determines whether the player can access this color from the Player Setup menu, or from the console. By default, you should always want this to be true.
Lastly, rename the file's extension to ".lua". If you can't see the file's extension, look at the top of your file explorer, click the "View" tab, and press "Show File Extensions" near the top right of the window. Once you have successfully renamed your .txt to .lua, you're set.
SOC:
SOC follows a very similar format. Make a new text file, and paste the following code to it:
The main difference is the lack of quotes, and using capitalizations.
Rename this file's extension to .soc. Follow the same procedure I mentioned above if you cannot see the ".txt" extension at first.
Some notes:
-You can freeslot/define multiple colors.
Both of these are perfectly acceptable. Make sure to put a comma after each skincolor in Lua, except the last one. You can then define them individually in the same file.
-If you have Lua knowledge, custom skincolors are editable in real time. By making use of a ThinkFrame hook, it's possible to modify a custom skincolor's ramp values constantly, giving it an animated look. SOC does not allow you to do this.
The invcolor field can be one of your own custom skincolors.
That's all for now, I'll update this page with more info if necessary.
You can approach this in two ways : Lua or SOC. SOC is faster and doesn't initialize the Lua interface, but Lua is much more flexible, and allows for fun stuff like animated skin colors. Personally, I'd always go with Lua.
Lua:
Make a text file, and add the following code into it.
Code:
freeslot("SKINCOLOR_CUSTOMNAME")
skincolors[SKINCOLOR_CUSTOMNAME] = {
name = "CustomNameThatIsVisibleOnPlayerSetup",
ramp = {146,147,148,149,150,151,152,153,154,155,156,157,158,159,253,254},
invcolor = SKINCOLOR_ORANGE,
invshade = 9,
chatcolor = V_BLUEMAP,
accessible = true
}
Here, "freeslot" allows you to register the variable name of your skincolor, so you can define it below, and perhaps even modify it using Lua code. The "CUSTOMNAME" part can be your name of choice. Ensure that it's in all caps for visual consistency.
The "name" field is what will be seen in the Player Setup menu, and what you will use in the console to switch to that color (e.g. "color red").
The "ramp" field is the most complex part. It represents the range of colors you want to use for your skincolor, going from lightest to darkest. All of these numbers may seem intimidating, but they're simply the values corresponding to the colours in the SRB2 palette.
Here are the values that you can pick from. Try to avoid picking 255, as it's the color used for transparency most of the time.
https://wiki.srb2.org/wiki/Palette The wiki page itself, in case you want more information about Translucency values or the PLAYPAL.
The "invcolor" field is the desired "opposite" color to your own skincolor. You might want to keep a color wheel nearby, to easily find the color opposite of your own. This is important for Goal Signs and Save Game backdrops.
https://wiki.srb2.org/wiki/List_of_skin_colors This page allows you to see all skin colors in the vanilla game. You MUST pick a SKINCOLOR_ constant.
The "invshade" field is the number deciding WHICH value of the invcolor's ramp you should take from. As seen by the above example, each skincolor has 16 color values assigned to it in its ramp. The "invshade" field chooses a specific one to be used for Goal Signs/Save Games. Ranges from 0-15, NOT 1-16.
The "chatcolor" field decides what video flag to assign to your name when speaking in Multiplayer. There are a list of constants for this, so you can't just invent a new text color all willy-nilly.
https://wiki.srb2.org/wiki/Video_flags#Color This link will give you the possible options.
The "accessible" field determines whether the player can access this color from the Player Setup menu, or from the console. By default, you should always want this to be true.
Lastly, rename the file's extension to ".lua". If you can't see the file's extension, look at the top of your file explorer, click the "View" tab, and press "Show File Extensions" near the top right of the window. Once you have successfully renamed your .txt to .lua, you're set.
SOC:
SOC follows a very similar format. Make a new text file, and paste the following code to it:
Code:
FREESLOT
SKINCOLOR_CUSTOMNAME
SKINCOLOR SKINCOLOR_CUSTOMNAME
NAME = CustomNameThatIsVisibleOnPlayerSetup
RAMP = 146,147,148,149,150,151,152,153,154,155,156,157,158,159,253,254
INVCOLOR = SKINCOLOR_ORANGE
INVSHADE = 9
CHATCOLOR = V_BLUEMAP
ACCESSIBLE = TRUE
The main difference is the lack of quotes, and using capitalizations.
Rename this file's extension to .soc. Follow the same procedure I mentioned above if you cannot see the ".txt" extension at first.
Some notes:
-You can freeslot/define multiple colors.
Code:
freeslot(
"SKINCOLOR_CUSTOMNAME1",
"SKINCOLOR_CUSTOMNAME2"
)
FREESLOT
SKINCOLOR_CUSTOMNAME1
SKINCOLOR_CUSTOMNAME2
Both of these are perfectly acceptable. Make sure to put a comma after each skincolor in Lua, except the last one. You can then define them individually in the same file.
-If you have Lua knowledge, custom skincolors are editable in real time. By making use of a ThinkFrame hook, it's possible to modify a custom skincolor's ramp values constantly, giving it an animated look. SOC does not allow you to do this.
The invcolor field can be one of your own custom skincolors.
That's all for now, I'll update this page with more info if necessary.