Skip to content

Palettes and Remaps

pchote edited this page Apr 28, 2011 · 15 revisions

OpenRA loads native ra/cnc palettes which are a list of 256 colors in a custom format (TODO: explain the color format).

Certain color indices have hard-coded meanings as transparent or shadow colors. Index 0 is mapped to transparent. If the Transparent flag (explained below) is true, indices 1 and 3 will be mapped to a light shadow color and index 4 to a darker shadow color.

Palettes must be defined with a trait before they can be used ingame. The Name field is used both by internal palette lookups, and by custom palette overrides on unit Render* traits.

The following traits can be added to the World actor:

PaletteFromFile@chrome:
	Name: <string>                    # Internal palette name
	Filename: <string>                # Filename to load
	Tileset: <string, default null>   # If defined, load the palette only for this tileset
	Transparent: <bool, default true> # Map indices 1,3,4 to shadow if true

This is the most basic palette definition. The file temperat.pal is loaded without modifications (aside from the

PaletteFromCurrentTileset:
	Name: terrain

foo

Players ๐ŸŽฒ

Modders โœ๏ธ

Developers ๐Ÿ”ง

Clone this wiki locally