Alien Trilogy MAP
MAP
- Format Type : File container/MAP File
- Extensions: .MAP
- Platforms: PC/PS1/Sega Saturn
- Endian Order : Little Endian/Big Endian
MAP Format specifics
This article will be quite extensive, since the format of the map is large enough.
The format is in many ways similar to BND, it also has "sections" with "names" in its set, with its own peculiarities.
The file with the map is also accompanied by a file with a texture and a texture mesh (for 3D geometry).
The following sections are found in this file:
MAP0 - a section with a description of the map itself (geometry, logic, collision)
D000 (0,1,2 ....) - Dynamic objects on the map, such as doors \ elevators \ other objects
Despite the fact that the file has few sections, however, the section with information about the map itself has many "blocks" that are not marked with anything and information about them is only in the header of the section itself. This article will describe all the blocks that have been found empirically, as well as their structure and formulas by which they are calculated.
MAP Format Description
Current format description at the moment. Description of each block below.
// Alien Trilogy
// MAP File format
Size Comment
--------------------------------------------------
0x04 46 4F 52 4D FORM
0x04 - file data size in bytes, BIG-ENDIAN
0x04 - the number of maps in the file with text.(zero, text)
- then there is information about the geometry of the map and its content, namely:
Size Comment
--------------------------------------------------
0x04 - Map name, text
0x04 - Map data size, BIG-ENDIAN
0x02 - Number of vertices? LITTLE-ENDIAN
Formula - multiply the value of these two bytes by 8
(6 bytes for 3 points + 2 bytes zeros)
0x02 - Number of quads (rectangles) .LITTLE-ENDIAN
Formula - the value of these 2 bytes multiply by 20
(16 bytes dot indices and 4 bytes info)
0x02 - The length of the "rectangle" of the mini-map
(physics engine)(Little-Endian)
0x02 - The width of the "rectangle" of the mini-map
(physics engine)(Little-Endian)
Formula for these bytes = multiply length by width and
multiply the resulting value by 16
(16 bytes describe one cell.)
0x02 - The starting position of the player along the X-axis
0x02 - Player's starting position along the Y axis
A small correction about the X and Y positions.
When walking, the "X / Y numbers" of the square
are written in the positions
collisions, not fixed coordinates like vertices.
0x02 - Unknown bytes.
0x02 - Field describing monsters that simply spawn.
Formula = number of elements multiplied by 20
(20 bytes per monster)
0x02 - Pickup description field
Formula = number of elements multiplied by 8
(8 bytes per pickup)
0x02 - Description field for "boxes" and
similar objects (switches, barrels)
Formula = number of elements multiplied by 16
(16 bytes per box)
0x02 - Number of all doors on the map.
Formula = value multiplied by 8
(8 bytes one element)
0x02 - Unknown bytes.
0x02 - Player's Start Angle
0x06 - Unknown bytes
0x04 - Unknown value, somehow affects
on monsters at the level. If there are monsters on the level
and set zeros, then rendering is disabled for monsters
sprites, but they themselves do not disappear
One vertex format
Size Comment -------------------------------------------------- -------------------------------------------------- --------------------- 0x02 - X coordinate (signed, LITTLE-ENDIAN, short) 0x02 - Y coordinate 0x02 - Z coordinate 0x02 - unknown value, it seems to be always 0