[Tutorial] Alternate .SPT colours

View previous topic View next topic Go down

[Tutorial] Alternate .SPT colours

Post by Guest on Wed Aug 03, 2011 3:47 am

I have received a few requests for a tutorial on how to edit a mechs colors by editing the spt file.

So I thought I would write a quick how to guide:

Requirements before you begin:

  • Script.spt
  • WindomXP File Decoder
  • Text editor (for example notepad)

First decode the script.spt in the File Decoder (in this tutorial example I am editing the color of KD-06 Windom VISTA):

Once that is done open the script.spt with your text editor and scroll down to the area that begins with COLORSET:

First let me explain the COLORSET structure in the spt file:

COLORSET(1,3, 1.000000,0.360784,0.023529,0.000000);
COLORSET(Mech Color, Part Color, Transparency,Red,Green,Blue);

All mech color's start with 0 (which is Color 1 in Windom) that is the default defined in the root file if you wish to override the default root colour you would add COLORSET(0,etc in the script file.

All part colors also start with 0 which is the first model group in the root, 1 being the second model group in the root etc.

The transparency goes from 1.000000 (fully visible) to 0.000000 which Invisible. so if you wish to hide a part or make a part semi transparent change this value.

Red Green and Blue go from 0.000000 (No color) to 1.000000 (full color).

So if you wished to change one of the colors of the default mech (mech color 0) to yellow you would:
COLORSET(0,2, 1.000000,1.000000,1.000000,0.000000);
So set Mech color 0, Part 2, non transparent, Full Red, Full Green, No Blue.

An easy way to work out the color values is do a simple bit of math.

First find the RGB values of the color you wish to change it to for example this orange color:

Divide each number by 255 to find the amount you need to set in the spt file.
Red = 255/255 = 1.0
Green = 128/255 = 0.5
Blue = 64/255 = 0.25

COLORSET(0,2, 1.000000,1.000000,0.500000,0.250000);

Once you are happy save the script.spt encode the file and then try it ingame.


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum