This document describes the format of PAL files. Information about them was obtained by analyzing relevant functions in Mapper2.exe and Fallout2.exe, as well as trying to implement a simple FRM display in a program.

PAL files contains a palette used when opening FRM files. It has a table transforming RGB values into an index in the palette used for extracting fonts(?), and also has several tables at the end whose use is not clear.

Format of PAL Files
Offset Size Type Value Description
0x00000000 1 unsigned byte 0..63 Red000 Palette

Colors in the palette are in the range 0..63. The first element (index 0) is always considered transparent (actual color is ignored). If the value of one color component is not in the range 0..63, in a special table the index is marked as unused, and all components of the color are set to 0.

Elements from 229 to 254 are used as 'animation colors' and Fallout sets their values itself. 229 to 232 are animated green (for radioactive waste), 238 to 247 are orange, red and yellow (for fires), and the rest are bright blue (computer screens).

Since normal RGB goes from 0..255, using palette colors (0..63) directly to draw the image will make it very dark. The easiest way to get correct colors is to multiply the value by 4, so that a palette entry of "1,2,3" actually becomes "4,8,12" in RGB.

0x00000001 1 --"-- --"-- Green000
0x00000002 1 --"-- --"-- Blue000
0x00000003 1 --"-- --"-- Red001
0x00000004 1 --"-- --"-- Green001
0x00000005 1 --"-- --"-- Blue001
... ... ... ... ...
0x000002FD 1 --"-- --"-- Red255
0x000002FE 1 --"-- --"-- Green255
0x000002FF 1 --"-- --"-- Blue255
0x00000300 1 unsigned byte 0..255 Element00000 Table for converting RGB values => to index in the palette.
... ... ... ... ...
0x000082FF 1 unsigned byte 0..255 Element32767
0x00008300 4 char[4] 'NEWC' Tag for the availability of additional tables.?
0x00008304 65536 byte[65536] Additional table 1
0x00018304 65536 byte[65536] Additional table 2
0x00028304 65536 byte[65536] Additional table 3

'Palette' and 'Table for converting RGB values => to index in the palette' are required elements in PAL files, the others are optional. The purpose of 'Additional tables' at the end is not clear. When loading PAL files, if these tables don't exist Fallout will generate them itself. Also note that the values in the palette taken from FRM files are subject to certain changes.

External LinksEdit

Original document at (in russian)

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.