-
Notifications
You must be signed in to change notification settings - Fork 16
Diving into the Data
Spawningtool consumes a sc2 replay file and converts it into a json data feed to use in your application. The feed contains player build orders, abilities, units lost, and other general details about the game.
This is an example of the json object which contains these properties at the root:
baseBuild: 28667
build: 30508
buildOrderExtracted: true
category: "Private"
expansion: "HotS"
frames: 19150
game_type: "1v1"
include_map_details: false
map: "Frost LE"
map_hash: "bb12240d1748afb6b728a7c6ebd716f4ce5bf3cb49bbb8062c33e3b4938c617d"
message: ""
players: Object
unix_timestamp: 1404604126
The players object contains sub objects for each player. In this case, its a 1v1 match so it contains 2 players.
clock_position: null
color: "B4141E"
handicap: 100
is_human: true
is_winner: true
league: 8
level: 33
name: "AxAlicia"
pick_race: "Protoss"
race: "Protoss"
region: "us"
result: "Win"
supply: Array[122]
team: 1
uid: 4174681
unitsLost: Array[121]
The supply array contains objects each with two properties. The mapping is [FRAME, SUPPLY], so at frame 0, the supply for the player is 1, and at frame 1 (basically the beginning of the game), it's at 6. StarCraft does 16 frames per second, so that's how you can map it back to reality to double-check.
0: 1
1: 6
The abilities array contains object with the following properties:
abilities:
frame: 1489
name: "ChronoBoost"
time: "1:33"
The unitsLost array contains object with the following properties:
unitsLost:
clock_position: null
frame: 14226
killer: 2 <-- the id for the player who killed the unit unfortunately we don't know what unit did the killing
name: "HighTemplar"
time: "14:49"
The buildOrder array contains object with the following properties:
buildOrder:
clock_position: null
frame: 18
is_worker: true
name: "Probe"
supply: 6
time: "0:01"