• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:48
CEST 15:48
KST 22:48
  • 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
Classic wins Code S Season 2 (2025)12Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy5Code S RO8 Preview: herO, Zoun, Bunny, Classic7Code S RO8 Preview: Rogue, GuMiho, Solar, Maru3
Community News
Weekly Cups (June 9-15): herO doubles on GSL week2Firefly suspended by EWC, replaced by Lancer12Classic & herO RO8 Interviews: "I think it’s time to teach [Rogue] a lesson."2Rogue & GuMiho RO8 interviews: "Lifting that trophy would be a testament to all I’ve had to overcome over the years and how far I’ve come on this journey.8Code S RO8 Results + RO4 Bracket (2025 Season 2)14
StarCraft 2
General
The SCII GOAT: A statistical Evaluation Classic wins Code S Season 2 (2025) TL Team Map Contest #5: Presented by Monster Energy Weekly Cups (June 9-15): herO doubles on GSL week The Memories We Share - Facing the Final(?) GSL
Tourneys
EWC 2025 Regional Qualifiers (May 28-June 1) SOOPer7s Showmatches 2025 RSL: Revival, a new crowdfunded tournament series Sparkling Tuna Cup - Weekly Open Tournament $5,100+ SEL Season 2 Championship (SC: Evo)
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers [G] Darkgrid Layout
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 478 Instant Karma Mutation # 477 Slow and Steady Mutation # 476 Charnel House Mutation # 475 Hard Target
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ ASL20 Preliminary Maps StarCraft & BroodWar Campaign Speedrun Quest BW General Discussion FlaSh Witnesses SCV Pull Off the Impossible vs Shu
Tourneys
The Casual Games of the Week Thread [BSL 2v2] ProLeague Season 3 - Friday 21:00 CET Small VOD Thread 2.0 [BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do. [G] How to get started on ladder as a new Z player
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile Beyond All Reason What do you want from future RTS games?
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
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread US Politics Mega-thread UK Politics Mega-thread Echoes of Revolution and Separation
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
[Manga] One Piece Korean Music Discussion
Sports
2024 - 2025 Football Thread TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024 Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
How Pro Gamers Cope with Str…
TrAiDoS
StarCraft improvement
iopq
Heero Yuy & the Tax…
KrillinFromwales
I was completely wrong ab…
jameswatts
Need Your Help/Advice
Glider
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 35516 users

s2prot: Command line app to parse SC2Replay files

Forum Index > SC2 General
Post a Reply
Dakota_Fanning *
Profile Joined January 2008
Hungary2347 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 States970 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
Hungary2347 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 Kingdom196 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
Hungary2347 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
Hungary2347 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
Hungary2347 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
SC Evo League
12:00
#14
BRAT_OK 108
MindelVK48
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Hui .164
Rex 122
BRAT_OK 108
ProTech94
MindelVK 48
StarCraft: Brood War
Britney 38965
Rain 4970
Calm 3711
Horang2 2382
Bisu 1075
Flash 596
Zeus 437
EffOrt 413
Hyuk 407
Mini 295
[ Show more ]
PianO 287
BeSt 262
Mind 249
Last 169
Soulkey 122
[sc1f]eonzerg 68
ToSsGirL 50
Mong 49
sSak 31
Yoon 24
soO 18
SilentControl 10
IntoTheRainbow 9
Dota 2
Gorgc5956
qojqva1365
XcaliburYe341
canceldota63
LuMiX1
Other Games
singsing2236
B2W.Neo1528
DeMusliM604
C9.Mang0402
Lowko392
SortOf71
Mew2King47
Trikslyr34
Organizations
Dota 2
PGL Dota 2 - Main Stream15125
PGL Dota 2 - Secondary Stream4729
Other Games
BasetradeTV43
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• Berry_CruncH307
• Adnapsc2 29
• Dystopia_ 1
• Migwel
• AfreecaTV YouTube
• intothetv
• sooper7s
• Kozan
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• Nemesis15634
• Jankos4584
Upcoming Events
Road to EWC
12m
ewc_black226
Rex122
WardiTV54
CranKy Ducklings0
3DClanTV 0
SOOP Global
1h 12m
FuturE vs MaNa
Harstem vs Cham
BSL: ProLeague
4h 12m
Sziky vs JDConan
Cross vs MadiNho
Hawk vs Bonyth
Circuito Brasileiro de…
6h 12m
Sparkling Tuna Cup
20h 12m
Road to EWC
1d
BSL: ProLeague
1d 4h
UltrA vs TBD
Dewalt vs TBD
Replay Cast
2 days
Replay Cast
4 days
The PondCast
4 days
[ Show More ]
Replay Cast
5 days
Liquipedia Results

Completed

Acropolis #3 - GSC
2025 GSL S2
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
NPSL S3
Rose Open S1
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
NPSL Lushan
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025
PGL Bucharest 2025

Upcoming

CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
Esports World Cup 2025
HSC XXVII
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
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.