Palette

From SRB2 Wiki
Jump to: navigation, search
Image:ToDoIcon.png To Do
Show the reader how to save pictures with the SRB2 palette. The wad editor method is done, but we still need the graphics editor way.
SRB2's palette as of v2.0, used for Flats, Patches, Sprites, and other graphics.

The SRB2 Palette is the total set of 256 colors used by the game engine. Every graphic used in the game must adhere to these 256 colors, and each must also be saved in this palette, as well. Otherwise, the game will SIGSEGV upon trying to display the graphic. This doesn't apply to MD2 model textures, being OpenGL-exclusive.

Note that index 247 is understood as "transparent". This is shown as cyan because when a graphic with cyan pixels is imported into XWE, cyan pixels will be given index 247 when the graphic is converted. Those pixels will be invisible in SRB2 itself.

Contents

Setting up the Palette

Regular images can't be uploaded right off the bat into a wad file as they are, or else their colors won't be displayed properly, thanks to SRB2's new palette. Luckily, the wad editors can change the image's palette for us, and here's how:

With XWE

Whenever you open XWE, it uses whatever palette that is used in its config. So, what you need to do is tell XWE to use SRB2 V2's palette, and from there on, every image you upload/see in a wad file will be correctly displayed. You can do this in three ways. The first way is to simply open srb2.srb and use that. The advantage is that you don't have to save anything, but the disadvantage is the time it takes to load srb2.srb. The second way is to save srb2's palette file in the XWE folder so that we can use it. The advantage of this is that you can easily convert v1.09.4's images to v2.0.x quite easily. The disadvantage is that you have to set the palette everytime you open XWE if you want to use the v2.0.x palette. The second way is to simply change XWE's IWAD so that it will load the v2.0.x palette automatically. You can also combine the last two options so you can have the srb2 palette in the XWE folder AND have it load the srb2 palette every time.

Using srb2.srb

  • Open XWE and make sure its options are set up correctly.
  • Go to the View menu and select Options
  • Make sure the Preform Clean Up on Exit is unchecked. This is important if you don't want to corrupt SRB2's IWAD.
  • Opening v2.0.x's srb2.srb is generally the best way to reach the palette lump. Other users might export the lump and open it every time instead of opening srb2.srb, which normally takes around 10 seconds to load.
  • Choose the PLAYPAL lump located in srb2.srb. If you opened the lump as a file, then it'll be select by default, obviously.
  • Go to the Palette menu, and choose Use current.
  • Close srb2.srb (or the lump) without closing XWE (File menu, choose Close). Open the files in which you need to operate, and everything should be displayed properly. Obviously, it won't be right if you used an old version of SRB2's palette.

Saving the SRB2 palette in the XWE folder

  • Open XWE and make sure its options are set up correctly.
  • Go to the View menu and select Options
  • Make sure the Preform Clean Up on Exit is unchecked. This is important if you don't want to corrupt SRB2's IWAD.
  • Open srb2.srb
  • Choose the PLAYPAL lump located in srb2.srb.
  • Go to the Palette menu, and choose Save As.
  • Find where you put your XWE folder and in there find the PALETTES folder.
  • Rename the file to something you can remember. (SRB2v2.act for example)
  • Close srb2.srb (or the lump) without closing XWE (File menu, choose Close).

Changing XWE's IWAD

  • Find xwe.ini in your XWE folder
  • Go to the edit menu and choose Find...
  • Search for MainWAD
  • The first time you see MainWAD, change text to be something like MainWAD,C:\Folder\Folder with spaces\SRB2\,srb2.srb. Make sure you put the commas in the correct places.

With SLumpEd

There are fewer options to setting up the palette with SlumpED. The only way to change the palette is to set it to v2.0.x's IWAD. All files will show with the v2.0.x palette after setting that up.

  • Go to file and choose options
  • Set the Game IWAD to v2.0.x's srb2.srb

Converting Images from v1.09.4 to v2.0.x

With XWE

You first must have the srb2 palette in your XWE folder. (See Saving the SRB2 palette in the XWE folder). After you done that follow these steps.

  • Open the file with the image that you need to be converted.
  • If you have v2.0.x srb2.srb set as your IWAD then go to the Images menu and select Choose palette and select doom and click okay.
  • Go to the Entry menu and click Save As...
  • After saving all the images you want converted,go to the Images menu and select Choose palette and select SRB2v2 and click okay.
  • Go to the Entry menu and click Load...
  • Open the images that you saved and it will convert them.

With SLumpEd

  • Open the file with IWAD set to v1.09.4's srb2.srb
  • Export the images as PNG.
  • Open the file with IWAD set to v2.0.x's srb2.srb
  • Import each PNGs
  • Right click the lumps and convert to Doom Gfx.

See Also

Personal tools