WMAP file format
Applies to:
BG1, BG1: TotS, BG2, BG2: ToB, PST, IWD, IWD:HoW, IWD:TotL, IWD2, BGEE
General Description
This file format describes the top-level map structure of the game. It details the x/y coordinate location of areas, the graphics used to represent the area on the map (both MOS and BAM ) and stores flag information used to decide how the map icon is displayed (visable, reachable, already visited etc.)
Engine specific notes:
NB. A WMP file must have at least one area entry, and one area link to be considered valid.
Engine specific notes:
Areas may be also displayed on the WorldMap in ToB using 2DA files:
- XNEWAREA.2DA (Area entries section of wmp )
- 2DA file specified in XNEWAREA.2DA (Area links section) for example XL3000.2DA
NB. A WMP file must have at least one area entry, and one area link to be considered valid.
Detailed Description
Overall structure
Offset | Size (datatype) | Description |
---|---|---|
0x0000 | 4 (char array) | Signature ('WMAP') |
0x0004 | 4 (char array) | Version ('V1.0') |
0x0008 | 4 (dword) | Count of worldmap entries |
0x000c | 4 (dword) | Offset of worldmap entries |
Offset | Size (datatype) | Description |
---|---|---|
0x0000 | 8 (resref) | Background image MOS file |
0x0008 | 4 (dword) | Width |
0x000c | 4 (dword) | Height |
0x0010 | 4 (dword) | Map number |
0x0014 | 4 (strref) | Area name |
0x0018 | 4 (dword) | Start centered on X |
0x001c | 4 (dword) | Start centered on Y |
0x0020 | 4 (dword) | Count of area entries |
0x0024 | 4 (dword) | Offset to area entries |
0x0028 | 4 (dword) | Offset to area link entries |
0x002c | 4 (dword) | Count of area link entries |
0x0030 | 8 (resref) | Map icons BAM file |
0x0038 | 4 (dword) | Flags (BGEE)
|
0x003c | 124 (bytes) | Unused |
Offset | Size (datatype) | Description |
---|---|---|
0x0000 | 8 (resref) | Area resref |
0x0008 | 8 (resref) | Area name (short) |
0x0010 | 32 (char array) | Area name (long) |
0x0030 | 4 (dword) | Bitmask indicating status of area:
|
0x0034 | 4 (dword) | BAM file sequence (icons) |
0x0038 | 4 (dword) | X coordinate |
0x003c | 4 (dword) | Y coordinate |
0x0040 | 4 (strref) | Name (caption) |
0x0044 | 4 (strref) | Name (tooltips) |
0x0048 | 8 (resref) | Loading screen MOS file |
0x0050 | 4 (dword) | Link index - north |
0x0054 | 4 (dword) | Link count - north |
0x0058 | 4 (dword) | Link index - west |
0x005c | 4 (dword) | Link count - west |
0x0060 | 4 (dword) | Link index - south |
0x0064 | 4 (dword) | Link count - south |
0x0068 | 4 (dword) | Link index - east |
0x006c | 4 (dword) | Link count - east |
0x0070 | 128 (bytes) | Unused |
Offset | Size (datatype) | Description |
---|---|---|
0x0000 | 4 (dword) | Index of destination area |
0x0004 | 32 (char array) | Entry point |
0x0024 | 4 (dword) | Travel time / 4 |
0x0028 | 4 (dword) | Default entry location
0x01 - Move to northern side of target area
0x02 - Move to eastern side of target area 0x04 - Move to southern side of target area 0x08 - Move to western side of target area |
0x002c | 8 (resref) | Random encounter area 1 |
0x0034 | 8 (resref) | Random encounter area 2 |
0x003c | 8 (resref) | Random encounter area 3 |
0x0044 | 8 (resref) | Random encounter area 4 |
0x004c | 8 (resref) | Random encounter area 5 |
0x0054 | 4 (dword) | Random encounter probability |
0x0058 | 128 (bytes) | Unused |