Alien Trilogy MAP

From XentaxWiki
Revision as of 16:48, 24 May 2021 by imported>LexSafonov
Jump to navigation Jump to search

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

// 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.)