Downloads (Python Script for Replay Parsing)
Sections on this Page
Co-op Replay Data Summarizer
This is a Python script which takes a Replays folder and generates a delimited text file summarizing the replay data for co-op games, which can be imported for further data analysis. Below is an example of the output:
Date Played Map Commander Level Ally Commander Ally Level Game Type Result Game Length
2019-02-18 Chain of Ascension Horner 0 Stukov 34 Standard Lose 1552
2019-02-15 Cradle of Death Karax 0 Abathur 25 Standard Win 1359
2019-02-15 Cradle of Death Vorazun 0 Zeratul 0 Standard Win 1538
2019-02-27 Temple of the Past Horner 71 Karax 1000 Mutators Win 1591
2019-02-24 The Vermillion Problem Dehaka 57 Raynor 0 Standard Lose 1536
2019-02-17 Void Launch Swann 0 Fenix 73 Standard Win 1465
- Download raw .py script (2 KB)
- You will require Python 2, as S2Protocol has been written under that version of Python. You can download Python from here. Make sure to select the appropriate installer for your system.
- You will need to have Python's S2Protocol installed in order for this script to work. You can get it from here. If you have Pip, you may use "pip install s2protocol" to install S2Protocol.
- Make sure you specify your replay folder path and player name correctly. An incorrect player name may cause issues in determining which commander you are playing.
- On completion of the script, a file named "output.txt" will be created in the folder the script was run with the summarized data.
- Replay parsing should not take more than a second, as only the simple data is being read.
- You may modify the script to parse Ladder game information as well. However, this script is only provided as-is, and support is only available for Co-op games. Support for advanced parsing of Co-op game data will not be provided.
- Whenever a new version of Starcraft gets released (major or minor patch), you may need to update S2Protocol. You may do so by copying any newly-added protocol files from the Github to the Versions folder of S2Protocol, or if you used Pip, you can use "pip install s2protocol --upgrade".
- Sometimes, S2Protocol may not be updated, which means you can use the last protocol version for the latest build. Simply copy and rename the last protocol file as the last build ID and the parser should work fine. This is because the Protocols are very rarely updated and most are copies of the older versions. The advantage to this is that it is possible that older Protocol versions can work with newer replay files.
- The above issue has occurred before and may occur for older replay files. If you notice that you are missing a protocol version, you may use the steps above to solve the problem.
- Map names will be affected by language localization. That is, the map names will be displayed in the language the game was played in when the replay was created.