PAL (Dark Reign)
m |
m |
||
| Line 6: | Line 6: | ||
A '''.pal''' is a palette format used by the real-time strategy game [https://en.wikipedia.org/wiki/Dark_Reign:_The_Future_of_War Dark Reign]. | A '''.pal''' is a palette format used by the real-time strategy game [https://en.wikipedia.org/wiki/Dark_Reign:_The_Future_of_War Dark Reign]. | ||
| − | Each of the game's [[TIL (Dark Reign)|terrains]] has an associated '''.pal''' file. Dark Reign comes with the following terrains: | + | Each of the game's [[TIL (Dark Reign)|terrains]] has an associated '''.pal''' file. |
| + | |||
| + | = Terrains = | ||
| + | |||
| + | Dark Reign comes with the following terrains: | ||
* BARREN | * BARREN | ||
Latest revision as of 12:11, 2 August 2023
A .pal is a palette format used by the real-time strategy game Dark Reign.
Each of the game's terrains has an associated .pal file.
Contents |
[edit] Terrains
Dark Reign comes with the following terrains:
- BARREN
- SNOW
- JUNGLE
- ASTEROID1
- AUSTRALIA1
- VOLCANIC1
- ALIEN2
- These terrains were add-ons released by the developer, Auran, after the game launch.
- This terrain was included in the expansion Dark Reign: Rise of the Shadowhand but also released separately after the game launch.
[edit] Structure
| Variable | Type | Notes |
|---|---|---|
| Signature | "PALS"
|
|
| Version | 0x0102
|
|
| Primary palette | bytes[768]
|
Stored as RGB planes |
| Dimmed palette | bytes[768]
|
Stored as RGB planes. The purpose of this palette is unknown, but assumed to be the dimmed palette that is used when the game is running but left idle. |
| Unknown chunks (1) | bytes[32768]
|
|
| Unknown data (2) | All remaining bytes up until the shading tables (last 147,456 bytes of the file) | |
| Shading tables | bytes[147456]
|
[edit] Primary and dimmed palettes
The palette entries in the primary and dimmed palettes are store as red, green, and blue planes:
- The first 256 bytes are the red components in order, the next 256 are the green components, etc.
- Each component is stored in 6-bits (0-63) and will need to be multiplied by 4 to map to the range 0-255.
- Index 0 is always transparent.
The index of the colors within the palettes are important:
| Purpose | Range |
|---|---|
| Unit palette | 0-159 and 255 |
| Terrain palette | 160-254 |
| Team remapping colors (for game units) | 32-39 |
| Team 0 | 48-55 |
| Team 1 | 40-47 |
| Team 2 | 64-71 |
| Team 3 | 56-63 |
| Team 4 | 72-79 |
| Team 5 | 80-87 |
| Team 6 | 88-95 |
| Team 7 | 32-39 |
| User definable | 96-159 |
[edit] Unknown chunks (1)
- The Unknown chunks appears to be 32 (or 33) chunks of 1,024 bytes, representing what appears to be a non-looping animation of 32x32 pixel images.
- These chunks do not appear to use the palettes.
- These chunks are different for each palette.
[edit] Unknown data (2)
The Unknown data is all of the data from the end of the Unknown chunks up until the start of the Shading tables.
- The purpose of this data is not known, but might be compressed using the same RLE method used by the game's sprites.
[edit] Shading tables
The shading tables comprise 192 chunks each of 768 bytes totaling 14,7456 bytes.
Each chunk appears to be the primary palette mixed 50% with another color, and each byte is an index back to the original palette of a color which most closely matches the color after the blend. It is not know what colors are being blended, or their purpose.