Skip to content
ascendedguard edited this page Feb 10, 2011 · 6 revisions

The MPQ file format specification specifies that there is sometime an optional 'shunt' block which is used to store user data for a particular MPQ file. In the case of sc2 replays, this user data block contains many information concerning the version of the replay we are parsing. (Source)

This document requires heavy research. An original source was found here, however the format has since changed. The table below should be correct for the more recent replay format, however the Version and Build numbers have not been determined yet.

Location Meaning Expected Value Data Type
0x00 - 0x03 MPQ Header "MPQ" + 0x1B
0x04 - 0x07 Maximum Size of User Data 512 Int32
0x08 - 0x0B Offset of the MPQ header 1024 Int32
0x0C - 0x0F Size of User Data Header 60 Int32
0x10 DataType of next object 0x05 (Array w/ Keys) Byte
0x11 numElements VLF Number
0x12? Index of the current element 0 VLF Number
0x13? Datatype of the current element 0x02 (Binary Data) Byte
0x15? - 0x27 "Starcraft II replay" Byte[]
Index of the current element 1 VLF Number
Datatype of the current element 0x05 Byte
Number of elements in the following array (Containing Version #) 0x05 Byte
Array containing the version: [0].[1].[2].[3], Build: [4]. [4] matches [5] Version matching the replay version. Build matches the build in the SC2 folders. Array w/ Keys