Skip to content
Jeff Desaulniers edited this page Aug 24, 2014 · 2 revisions

replay.details

The replay.details file is just one massive serialized data structure following the format specified on the serialized-data page.

Parsing the serialized data returns the following data structure which has been split into two pieces for convenience::

data = {
	0: [ Players ],
	1: Map Name,
	2: ??,
	3: { 0: 'Minimap.tga' }
	4: ??,
	5: datetime of game,
	6: timezone offset,
	7: ??,
	8: ??,
	9: ??,
	10: [ ??, ??, ??, ?? ],
	11: ??,
	12: ??,
	13: ??
}

player = {
	0: Player Name,
	1: {0: ??, 1: "S2", 2: ??, 4: realId},
	2: Player Race,
	3: {0: alpha,
		1: red,
		2: green,
		3: blue},
	4: ??,
	5: Team,
	6: Handicap,
	7: ??,
	8: outcome (1 = win, 2 = loss, 0 = unknown)
}

Notes

DateTime of game is expressed in Windows nano time (10^-7) and can be converted into a unix timestamp (seconds since the epoch) by applying the following manipulation which subtracts the magic conversion number (the number of 100 nanosecond periods from 1601 to 1970) and divides to get whole seconds:

( datetime-116444735995904000 ) / 10^7

Map Name and Player Name must be decoded to ascii.

Example

Here is a full example with the player's Battle.net ID's obfuscated from a 2v2.:

[[['Dan',
   [6, 21298, 1, None, 000000],
   'Protoss',
   [255, 180, 20, 30],
   2,
   0,
   100,
   0,
   0],
  ['Joe',
   [6, 21298, 1, None, 00000],
   'Protoss',
   [255, 0, 66, 255],
   2,
   1,
   100,
   0,
   0],
  ['Bob',
   [6, 21298, 1, None, 00000],
   'Terran',
   [255, 28, 167, 234],
   2,
   1,
   100,
   0,
   0],
  ['Shane',
   [6, 21298, 1, None, 00000],
   'Terran',
   [255, 84, 0, 129],
   1,
   0,
   100,
   1,
   0]],
 'Gutterhulk',
 '',
 ['Minimap.tga'],
 1,
 129495847458296856,
 360000000000,
 '',
 '',
 '',
 ['s2ma\x00\x00SGm\xe4\x15\x03\xba\xcc\xd0VV6\x0bo\x02}\xb8\x81i\xfa\x19\x89\xbbcW\xb1\xb2\x15\xa2Ty9\xf5\xfb',
  's2ma\x00\x00SGB\x1c\x8a\xa0\xf3a\x9be-#\xa2s]\xfe\xe8\x12\xabdB(#^zy~\xde\xcf\xe8\xb6}\xa3\x0e',
  's2ma\x00\x00SG\\g>l\xd2\xf1\xbfn\x06\x8f\xa5\x9e/\x94!\xf5\xde\xbb\x91\xcbQj\xca27\xd3\xb0_\xe7\xc7\xe9\xfa',
  's2ma\x00\x00SGe\x8eR\n\xa5\xde\xb4\x88f\xdc+!\xb0#\xda\xa9\xa2\x91\xbeL\xf2/\xd9\xd7\x85\xcag\xf1x\x13*\x87',
  's2ma\x00\x00SG2\xa86mQ\x84[\xad{\x19$\xe0c\\L\x84\xf1\x87\x16\xb1Y\xcf\xef)\xd0\x7f_\xa7@\xd3\x88\xe4'],
 0,
 4,
 2]