Lords of the Realm II PL8
From XentaxWiki
Back to index | Edit this page
Contents |
PL8
Format Type: Archive
Endianness: Little-endian
Date Posted: 08:25, 22 July 2008 (CDT)
Format Specifications
uint16 {2} - File type
uint16 {2} - Chunk count
uint16 {2} - Unknown 3
uint16 {2} - Unknown 4
Chunk headers (16-bytes), repeats 'Chunk count' times
uint16 {2} - Width
uint16 {2} - Height
uint32 {4} - Offset From start of file in bytes to the beginning of this chunk's data
uint16 {2} - Render X offset
uint16 {2} - Render Y offset
char {1} - Chunk type
char {1} - Extension height Can be read blindly, or ignored for chunk types 0 and 1
uint16 {2} - Unknown 2 Probably padding
File Types
1 = Type 1 packed Any other number = Normal packed
Chunk Types
0 = Normal 1 = Isometric packed, no extension 2 = Isometric packed, full width extension 3 = Isometric packed, left side extension 4 = Isometric packed, right side extension
Notes and Comments
The PL8 format is an archive containing only image data.
.256 Palette Files
Pixel data uses 8-bit indexed palettes. Palettes are 18-bit RGB, padded and 24-bit packed in *.256 files. Index 0 is a color key, used to provide 1-bit alpha transparency. Note the game comes with many palettes, typically the file extension .PL8 can be substituted to .256 to find a corresponding palette file, but it is believed palettes are hardcoded to images. BASE1A.256 and LORDS2.256 are identical and can be used as a default palette.
The actual color information is 6-bits and needs bit shifting or multiplying before it can be used:
struct color
{
unsigned char r : 6;
unsigned char padding1 : 2;
unsigned char g : 6;
unsigned char padding2 : 2;
unsigned char b : 6;
unsigned char padding3 : 2;
};
real_r = palette_r << 2;
real_g = palette_g << 2;
real_b = palette_b << 2;
.PL8 Type 1 Files
Type 1 files are mixed pixel data and RLE packed alpha channel information, in this format:
NN P1 P2 .. for i = 1 to NN, put pixel Pi. 00 TT for TT times put a transparent pixel.
Sample:
00 02 03 0a 0b 0c 00 02
This means put 2 transparent pixels, then put the next 3 color indexed pixels 0a, 0b and 0c then put another 2 transparent pixels.
.PL8 Isometric Files
Isometric chunks are rendered isometrically, not as rectangles. The isometric slant is 2 pixels. Isometric chunks can have "extensions" these are areas that extend above the rendered pixel data, such as building roofs. The extension pixel data immediately follows the regular pixel data.
Type 2 isometric sample. Red indicates transparent areas, no pixel data exists for this area. Magenta indicates the transparent area of the extension, using the palette index 0 color key.
Image:Cottage.png
Type 3 isometric sample. Red indicates transparent areas, no pixel data exists for this area. Magenta indicates the transparent area of the extension, using the palette index 0 color key. Note the extension only consumes the left hand side, similarly type 4 chunks only consume the right hand side.
Image:Woodcutter.png
Note for isometric tiles with an extension, the actual height is ChunkHeader.height + ChunkHeader.extensionHeight.
MultiEx BMS Script
None written yet.
Supported by Programs
Unknown
Links
- Lords of the Realm II (wikipedia)
Games
- Lords of the Realm II *.256 *.PL8

