SRB2 Message Board  

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

Thread Tools Search this Thread
Old 4 Weeks Ago   #1
Zipper's Avatar
Default Custom Skin Colors : Starter Guide

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.


Make a text file, and add the following code into it.

    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. 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. 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. 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 follows a very similar format. Make a new text file, and paste the following code to it:


NAME = CustomNameThatIsVisibleOnPlayerSetup
RAMP = 146,147,148,149,150,151,152,153,154,155,156,157,158,159,253,254
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.
<Rob> Thok is not malaria
Zipper is online now   Reply With Quote
Old 4 Weeks Ago   #2
Katmint's Avatar

It's also possible to make custom supercolors. To do so, you'll need to create 5 new colors, each with the name value set to "Super Color 1" through "Super Color 5". These are typically ordered from brightest to darkest.

After that, set the supercolor in your character's S_SKIN or P_SKIN to the same color you defined previously.

If done correctly, the results should look like this:

Last edited by Katmint; 4 Weeks Ago at 10:37 PM.
Katmint is offline   Reply With Quote
Old 4 Weeks Ago   #3
Aquatic Akito
The Super Mystic Guardian
Aquatic Akito's Avatar

For the ramp option, I use a tool on the internet where you can pick your own palette and find the ramp numbers there.
A person who tries to be cool all the time.
Aquatic Akito is offline   Reply With Quote
Old 4 Weeks Ago   #4
RDS's Avatar

When i tried to load my supercolor it said that the first was not found
One more shot at redemption!
Run it back, we ain't done yet.
RDS is offline   Reply With Quote
Old 4 Weeks Ago   #5
Your local lua dumbass
RainbowTH's Avatar

Have you made sure the name parameter on the first supercolor ramp is set to "Super <color> 1"?

If not, that's probably your issue. If you need any more help on this matter, just say so.
<Rainbow> REEEEEE
RainbowTH is offline   Reply With Quote
Old 3 Weeks Ago   #6
The Ghost
ThatAzazelFire's Avatar

Please keep in mind that Animated Custom Colors have a tendency to cause Memory leaks in the current Version of SRB2 (2.2.6) i advise not using mods with them until this is fixed.
Just the funny Plant Person

My Twitter Account
ThatAzazelFire is offline   Reply With Quote

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 02:41 PM.

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