• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 05:19
CEST 11:19
KST 18:19
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
uThermal's 2v2 Tour: $15,000 Main Event5Serral wins EWC 202543Tournament Spotlight: FEL Cracow 202510Power Rank - Esports World Cup 202580RSL Season 1 - Final Week9
Community News
SC2's Safe House 2 - October 18 & 193Weekly Cups (Jul 28-Aug 3): herO doubles up6LiuLi Cup - August 2025 Tournaments5[BSL 2025] H2 - Team Wars, Weeklies & SB Ladder10EWC 2025 - Replay Pack4
StarCraft 2
General
Rogue Talks: "Koreans could dominate again" uThermal's 2v2 Tour: $15,000 Main Event The GOAT ranking of GOAT rankings RSL Revival patreon money discussion thread Official Ladder Map Pool Update (April 28, 2025)
Tourneys
SC2's Safe House 2 - October 18 & 19 LiuLi Cup - August 2025 Tournaments $5,100+ SEL Season 2 Championship (SC: Evo) WardiTV Mondays RSL Season 2 Qualifier Links and Dates
Strategy
Custom Maps
External Content
Mutation # 485 Death from Below Mutation # 484 Magnetic Pull Mutation #239 Bad Weather Mutation # 483 Kill Bot Wars
Brood War
General
ASL Season 20 Ro24 Groups Player “Jedi” cheat on CSL BGH Auto Balance -> http://bghmmr.eu/ StarCraft player reflex TE scores BW General Discussion
Tourneys
KCM 2025 Season 3 Small VOD Thread 2.0 [Megathread] Daily Proleagues [ASL20] Online Qualifiers Day 2
Strategy
Fighting Spirit mining rates [G] Mineral Boosting Simple Questions, Simple Answers Muta micro map competition
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Total Annihilation Server - TAForever Beyond All Reason [MMORPG] Tree of Savior (Successor of Ragnarok)
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine The Games Industry And ATVI European Politico-economics QA Mega-thread
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Anime Discussion Thread [\m/] Heavy Metal Thread [Manga] One Piece Movie Discussion! Korean Music Discussion
Sports
2024 - 2025 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Gtx660 graphics card replacement Installation of Windows 10 suck at "just a moment" Computer Build, Upgrade & Buying Resource Thread
TL Community
TeamLiquid Team Shirt On Sale The Automated Ban List
Blogs
Gaming After Dark: Poor Slee…
TrAiDoS
[Girl blog} My fema…
artosisisthebest
Sharpening the Filtration…
frozenclaw
ASL S20 English Commentary…
namkraft
momentary artworks from des…
tankgirl
from making sc maps to makin…
Husyelt
Customize Sidebar...

Website Feedback

Closed Threads



Active: 602 users

s2prot: Command line app to parse SC2Replay files

Forum Index > SC2 General
Post a Reply
Dakota_Fanning *
Profile Joined January 2008
Hungary2349 Posts
Last Edited: 2017-05-22 15:05:31
May 22 2017 14:29 GMT
#1
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
https://repmastered.icza.net
feardragon
Profile Blog Joined October 2010
United States972 Posts
May 22 2017 15:30 GMT
#2
Yessss! Thank you for this. This is the push I needed to start playing around with replays more.
Ok Starcraft 2 Commentator
loginn
Profile Blog Joined January 2011
France815 Posts
May 22 2017 17:58 GMT
#3
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
Stephano, Taking skill to the bank since IPL3. Also Lucifron and FBH
Dakota_Fanning *
Profile Joined January 2008
Hungary2349 Posts
Last Edited: 2017-05-22 18:04:37
May 22 2017 18:02 GMT
#4
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
https://repmastered.icza.net
Haighstrom
Profile Joined March 2011
United Kingdom200 Posts
May 22 2017 18:27 GMT
#5
Is the format spec for the replay files publicly available? I'm interested in developing my own parsing tool in C#.
Dakota_Fanning *
Profile Joined January 2008
Hungary2349 Posts
May 22 2017 19:33 GMT
#6
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.
https://repmastered.icza.net
FightingFrog
Profile Blog Joined September 2013
Sweden29 Posts
July 18 2017 15:29 GMT
#7
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 *
Profile Joined January 2008
Hungary2349 Posts
July 19 2017 08:22 GMT
#8
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.
https://repmastered.icza.net
Dakota_Fanning *
Profile Joined January 2008
Hungary2349 Posts
July 19 2017 08:38 GMT
#9
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
https://repmastered.icza.net
Please log in or register to reply.
Live Events Refresh
Next event in 41m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Crank 39
StarCraft: Brood War
firebathero 788
Barracks 733
Larva 610
Flash 554
BeSt 302
Stork 246
EffOrt 192
ggaemo 181
hero 172
Killer 164
[ Show more ]
Dewaltoss 118
JulyZerg 71
Soma 70
yabsab 17
IntoTheRainbow 14
Noble 14
Dota 2
XcaliburYe1135
XaKoH 632
Fuzer 194
League of Legends
JimRising 500
Counter-Strike
Stewie2K756
allub400
Super Smash Bros
Westballz46
Heroes of the Storm
Khaldor173
Other Games
summit1g9857
singsing325
SortOf162
EmSc Tv 17
ArmadaUGS17
Organizations
Other Games
gamesdonequick863
BasetradeTV33
EmSc Tv 17
StarCraft 2
EmSc2Tv 17
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 11 non-featured ]
StarCraft 2
• davetesta24
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Upcoming Events
RSL Revival
41m
SC Evo League
2h 41m
uThermal 2v2 Circuit
5h 41m
CSO Cup
6h 41m
Sparkling Tuna Cup
1d
uThermal 2v2 Circuit
1d 5h
Wardi Open
2 days
RotterdaM Event
2 days
Replay Cast
2 days
WardiTV Summer Champion…
3 days
[ Show More ]
RSL Revival
3 days
PiGosaur Monday
3 days
WardiTV Summer Champion…
4 days
The PondCast
5 days
WardiTV Summer Champion…
5 days
Replay Cast
5 days
LiuLi Cup
6 days
Liquipedia Results

Completed

ASL Season 20: Qualifier #2
FEL Cracow 2025
CC Div. A S7

Ongoing

Copa Latinoamericana 4
Jiahua Invitational
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
uThermal 2v2 Main Event
HCC Europe
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

ASL Season 20
CSLPRO Chat StarLAN 3
BSL Season 21
BSL 21 Team A
RSL Revival: Season 2
Maestros of the Game
SEL Season 2 Championship
WardiTV Summer 2025
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
Roobet Cup 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.