|
Dakota_Fanning
Hungary2332 Posts
I've created and open-sourced a command line StarCraft II replay parser tool called s2prot here:
https://github.com/icza/s2prot
What it is
It's a standalone app with no GUI, and it can be used from the command line to pass a StarCraft II replay file to it (.SC2Replay), and it will parse the file and display low-level information from the replay in textual, JSON representation.
Target audience
While anyone may download it and use it, the information it presents is quite low level. It is human readable (JSON), but it's primarily intended for developers and web sites that wish to extract data from replays.
Supported platforms
Pre-built binary releases are provided for Windows, Linux and MAC OS X, both for 32 and 64-bit architectures.
Note that the project is written using the Go language, which supports a lot more platforms. Should you need to use it on other platforms, you can checkout the source code and compile it on your platform.
Requirements
Nothing is required. s2prot is shipped as a single, self-contained executable binary. It has no dependency. You do not need anything installed on your system. You just download the binary for your platform, extract it and use it.
Supported replay versions
Parses all versions (up to 3.14) that were written with retail versions of StarCraft II (and some beta versions too).
Download
Pre-built binaries can be downloaded from:
https://github.com/icza/s2prot/releases
Feedback / Bug report
Feedback and bug report is welcome. Feedback may be posted here, bugs and issues should be reported at:
https://github.com/icza/s2prot/issues
Star / Follow the project
If you like the project, please star it / watch it / follow me on github. Thanks.
Also check out the sister project to parse StarCraft: Brood War replays: screp
|
Yessss! Thank you for this. This is the push I needed to start playing around with replays more.
|
Is this mainly a port of the s2protocol in Go ? Loading a bunch of replays and processing them concurrently is very nice in any case. Nice job
|
Dakota_Fanning
Hungary2332 Posts
On May 23 2017 02:58 loginn wrote:Is this mainly a port of the s2protocol in Go ? Loading a bunch of replays and processing them concurrently is very nice in any case. Nice job Yes, it is based on s2protocol, but everything is written in Go (s2protocol requires python). I also wrote the MPQ parser required by s2protocol in Go, made available as a separate open-source project: https://github.com/icza/mpq
|
Is the format spec for the replay files publicly available? I'm interested in developing my own parsing tool in C#.
|
Dakota_Fanning
Hungary2332 Posts
On May 23 2017 03:27 Haighstrom wrote: Is the format spec for the replay files publicly available? I'm interested in developing my own parsing tool in C#. There is no public doc available, the closest you can get is the s2protocol reference implementation.
|
Hi again,
Thank you for redirecting me here from Scelight thread, this is exactly what I wanted!
I have a few questions:
1. Is there any information that that will allow me to distinguish between two players with identical name? If not, do you know if that information even exist in the replay?
2. Is it possible to see when units take damage/use spells/location at a given time? (other than when they are created/destroyed)
|
Dakota_Fanning
Hungary2332 Posts
On July 19 2017 00:29 FightingFrog wrote: Hi again,
Thank you for redirecting me here from Scelight thread, this is exactly what I wanted!
I have a few questions:
1. Is there any information that that will allow me to distinguish between two players with identical name? If not, do you know if that information even exist in the replay?
2. Is it possible to see when units take damage/use spells/location at a given time? (other than when they are created/destroyed) 1. There is a universally unique identifier for all players, this is called the toon. The toon is recorded in multiple parts of the replay, for example in the Details section, Players array, Toon field. It contains the program ID ("S2" for StarCraft II), region ID, realm ID, and player ID.
2. Units taking damage is not recorded. Spell usage and location is recorded, this is in the Game events section.
|
Dakota_Fanning
Hungary2332 Posts
Btw I just released a new version v1.1.0 of s2prot, please do download the new version if you plan to play / experiment with it. It also adds support for replays up to 3.16.
New v1.1.0 version available for downloading here:
https://github.com/icza/s2prot/releases/tag/v1.1.0
|
|
|
|