• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 04:06
CET 10:06
KST 18:06
  • 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
TL.net Map Contest #21: Winners5Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12[ASL20] Ro4 Preview: Descent11
Community News
Starcraft, SC2, HoTS, WC3, returning to Blizzcon!27$5,000+ WardiTV 2025 Championship5[BSL21] RO32 Group Stage4Weekly Cups (Oct 26-Nov 2): Liquid, Clem, Solar win; LAN in Philly2Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win9
StarCraft 2
General
Starcraft, SC2, HoTS, WC3, returning to Blizzcon! TL.net Map Contest #21: Winners RotterdaM "Serral is the GOAT, and it's not close" Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win 5.0.15 Patch Balance Hotfix (2025-10-8)
Tourneys
- nuked - Constellation Cup - Main Event - Stellar Fest $5,000+ WardiTV 2025 Championship Merivale 8 Open - LAN - Stellar Fest Sea Duckling Open (Global, Bronze-Diamond)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection Mutation # 495 Rest In Peace
Brood War
General
BW General Discussion [ASL20] Ask the mapmakers — Drop your questions [BSL21] RO32 Group Stage BGH Auto Balance -> http://bghmmr.eu/ SnOw's ASL S20 Finals Review
Tourneys
[Megathread] Daily Proleagues [BSL21] RO32 Group B - Sunday 21:00 CET [BSL21] RO32 Group A - Saturday 21:00 CET BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION
Strategy
PvZ map balance Current Meta How to stay on top of macro? Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Stormgate/Frost Giant Megathread Dawn of War IV Nintendo Switch Thread ZeroSpace Megathread General RTS Discussion Thread
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine YouTube Thread Dating: How's your luck?
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Why we need SC3
Hildegard
Career Paths and Skills for …
TrAiDoS
Reality "theory" prov…
perfectspheres
Our Last Hope in th…
KrillinFromwales
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1584 users

s2prot: Command line app to parse SC2Replay files

Forum Index > SC2 General
Post a Reply
Dakota_Fanning *
Profile Joined January 2008
Hungary2357 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 States973 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
Hungary2357 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 Kingdom206 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
Hungary2357 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
Sweden30 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
Hungary2357 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
Hungary2357 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 2h 54m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nina 140
StarCraft: Brood War
Calm 8406
TY 538
BeSt 392
Zeus 320
Jaedong 303
Tasteless 272
PianO 248
Soma 232
Leta 166
soO 103
[ Show more ]
sorry 36
yabsab 19
NotJumperer 12
Bale 10
Noble 7
Dota 2
Gorgc4481
KheZu142
League of Legends
JimRising 504
Reynor72
Counter-Strike
fl0m1762
taco 68
Other Games
summit1g14140
ceh9340
singsing285
XaKoH 74
NeuroSwarm63
crisheroes48
Organizations
Other Games
gamesdonequick576
Counter-Strike
PGL149
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• LUISG 22
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 2
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos3060
• Stunt767
Upcoming Events
OSC
2h 54m
LAN Event
5h 54m
Lambo vs Harstem
FuturE vs Maplez
Scarlett vs FoxeR
Gerald vs Mixu
Zoun vs TBD
Clem vs TBD
ByuN vs TBD
TriGGeR vs TBD
Korean StarCraft League
17h 54m
CranKy Ducklings
1d
LAN Event
1d 5h
IPSL
1d 8h
dxtr13 vs OldBoy
Napoleon vs Doodle
BSL 21
1d 10h
Gosudark vs Kyrie
Gypsy vs Sterling
UltrA vs Radley
Dandy vs Ptak
Replay Cast
1d 13h
Sparkling Tuna Cup
2 days
WardiTV Korean Royale
2 days
[ Show More ]
LAN Event
2 days
IPSL
2 days
JDConan vs WIZARD
WolFix vs Cross
BSL 21
2 days
spx vs rasowy
HBO vs KameZerg
Cross vs Razz
dxtr13 vs ZZZero
Replay Cast
2 days
Wardi Open
3 days
WardiTV Korean Royale
4 days
Replay Cast
4 days
Kung Fu Cup
5 days
Classic vs Solar
herO vs Cure
Reynor vs GuMiho
ByuN vs ShoWTimE
Tenacious Turtle Tussle
5 days
The PondCast
6 days
RSL Revival
6 days
Solar vs Zoun
MaxPax vs Bunny
Kung Fu Cup
6 days
WardiTV Korean Royale
6 days
Liquipedia Results

Completed

BSL 21 Points
SC4ALL: StarCraft II
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
Stellar Fest: Constellation Cup
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual

Upcoming

BSL Season 21
SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
META Madness #9
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals 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.