GameMap.dat

This file is loaded when the client starts. It maps the Map IDs to either the DMap or, in later clients, its compressed archive equivalent (.7z files).

Table of Contents

Patch 5517

File Header

OffsetSizeTypeDescription
04UInt32Number of records in the file

Record Structure

OffsetSizeTypeDescriptionExample
04UInt32Map ID1000
44UInt32Length of the filepath17
8[Length]StringMap path (Ascii Unterminated)map/map/desert.7z
8 + Length4UInt32Puzzle Size256

Example Entries

Map IDMap PathPuzzle Size
1000map/map/desert.7z256
1001map/map/d_antre01.7z256
1002map/map/newplain.7z256
1003map/map/mine01.7z256
.........

Parsing Script

The following is a simple python script which reads and parses the GameMap.dat. Pass the filepath as the first arg & it will output each map ID alongside its path. Example: python3 gamemap_decode.py GameMap.dat

import struct, sys

with open(sys.argv[1], "rb") as f:
    count, = struct.unpack("<I", f.read(4)) # Little-Endian uint32 - Header (Record Count)
    for idx in range(count):
        map_id, name_len = struct.unpack("<II", f.read(8)) # Read ID & Length of Map Name
        name = f.read(name_len).decode("ascii") # Read the map name
        f.read(4) # Puzzle Size (value always 256), don't need to print it
        print(f"{map_id}: {name}")