PMP files store a map's elevation and terrain types for each tile. Each map also has an associated XML file that stores objects on the map (entities and actors) as well as environment information (currently, lighting parameters). PMP file format (version 4), described in something a bit like C: Basic types: * char = 8-bit character * u32 = 32-bit unsigned int * u16 = 16-bit unsigned int All types are stored in little-endian format. Text is always ASCII. {{{ PMP { char magic[4]; // == "PSMP" u32 version; // == 4 u32 data_size; // == filesize-12 u32 map_size; // number of patches (16x16 tiles) per side u16 heightmap[(mapsize*16 + 1)^2]; // (squared, not xor) - vertex heights u32 num_terrain_textures; String terrain_textures[num_terrain_textures]; // filenames (no path), e.g. "cliff1.dds" Patch patches[mapsize^2]; } Patch { Tile tiles[16*16]; } Tile { u16 texture1; // index into terrain_textures[] u16 texture2; // index, or 0xFFFF for 'none' u32 priority; // ??? } String { u32 length; char data[length]; // not NUL-terminated } }}} Other data is stored in XML format (with a filename matching the PMP's, except with ".pmp" replaced by ".xml"), with the following structure: {{{ <!-- range 0..1, though out-of-range values are allowed --> <!-- elevation above horizontal, in radians --> <!-- angle clockwise from positive-z axis (north), in radians --> 1 <!-- 0 = gaia, higher numbers for other players --> ... Name ... }}} (This structure is not rigidly enforced (e.g. by a DTD) - many elements are optional, to preserve backward compatibility with older map formats. However, it should be generated in this latest version of the format whenever possible.)