MAP files store worlds saved by the world editor of the sequel of deadlock.
The known instances are not compressed.
Every known MAP file is little endian.
Header contains a magic number which is the same as Deadlock II save games.
Offset (hex) | Size (bytes) | Type | Name | Constant Value |
---|---|---|---|---|
0 | 10 | Constant Length ANSI String | magic number | "Deadlock 2" |
Following the magic number, there is a copyright notice.
The header also contains the following attributes:
Offset (hex) | Size (bytes) | Type | Name |
---|---|---|---|
30x0C | 1 | Integer | Number of Territories |
30x0E | 1 | Integer | World Width |
30x0F | 1 | Integer | World Height |
31x00 | 1 | Enumeration | World Type |
Code (integer) | Name |
---|---|
00 | Earth-like |
01 | Tropical |
02 | Martian |
03 | Icy |
04 | Dry |
05 | Volcanic |
06 | Alien |
Territory data begins 8 bytes after world type value, number of
territories equal to value in 30x0C.
Size (bytes) | Type | Name |
---|---|---|
25 | Null Terminated String | Territory Name |
1 | Enumeration | Territory Type |
4 * 36 | Structure | Tile Data |
Territory name is first 25 bytes null terminated string, which is followed by garbage
Following the territory name, the next byte stores the territory type.
Code (integer) | Name |
---|---|
00 | Ocean |
01 | Plains |
02 | Forest |
03 | Swamp |
04 | Mountains |
05 | Wasteland |
The territory type is followed by 4-byte data on the 36 grid tiles, one
after the other. The tiles start from top-left and are laid sequentially until bottom right, row by row.
Size (bytes) | Type | Name |
---|---|---|
1 | Enumeration | Tile Type |
1 | Padding | Not Important |
1 | Enumeration | Bonus Type |
1 | Padding | Not Important |
Code (integer) | Name |
---|---|
00 | Clear |
01 | Rough |
02 | Lightly Wooded |
03 | Densely Wooded |
04 | Rocky |
05 | Worthless |
0F | Wet |
Code (integer) | Name |
---|---|
00 | No Bonus |
01 | Food |
02 | Energy |
03 | Wood |
04 | Iron |
05 | Steel |
06 | Green Ore |
07 | Yellow Alloy |
08 | Electronic Parts |
09 | Anti-Matter Pod |
Right after the territory data, the map block data is stored. Each block in the game world is represented by a 10 byte set.
Size (bytes) | Type | Name |
---|---|---|
1 | Integer | X-Position in world |
1 | Integer | Y-Position in world |
1 | Integer | Territory ID |
7 | Padding | Not Important or unknown |
The ID of the territory to whom the tile belongs (starts from 1 for the first territory whose data is stored in the map file and so on).
The next seven bytes are unknown, but when replaced with NULLs have no ill
effect, so they can be considered unimportant, at least for now.