Author Topic: SC2 Replay Parser online  (Read 8623 times)

0 Members and 1 Guest are viewing this topic.

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
SC2 Replay Parser online
« on: November 03, 2010, 04:03:53 am »
Check it out - http://robpaveza.net/sc2rep/

Written in C# and uses MBNCSUtil for things like loading the replay file MPQ and parsing the bitstream.

I will be releasing the source code soon.

As of right now, the parsing is only complete for version 1.1.x replays.  I had implemented 1.0.x, then they changed it and my updated code only supports 1.1.x.  So, I have to go back and back-port my 1.0.x code into this.
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: SC2 Replay Parser online
« Reply #1 on: November 03, 2010, 04:21:15 am »
Nice!  That's cool.  Good work :)

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: SC2 Replay Parser online
« Reply #2 on: November 03, 2010, 09:31:23 am »
Nifty!  I'm looking forward to a finished version.

Feedback, btw, from TL: http://www.teamliquid.net/forum/viewmessage.php?topic_id=165986
« Last Edit: November 03, 2010, 09:45:51 am by rabbit »

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: SC2 Replay Parser online
« Reply #3 on: November 03, 2010, 11:54:40 am »
Holy shit, lots of activity at Team Liquid.

Winner detection is tough - it's not stored in the replay so you kinda have to guess.

I'm working on adding in the list of actions the PHP version did.  As far as actually parsing the replays, I'm at about parity with the PHP version, which is good.  Now it's just a matter of mapping action IDs to the actual action types.

I'm also planning on making a replay database that stores all that parsed info, but right now it's not built-in.
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline deadly7

  • 42
  • x86
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Re: SC2 Replay Parser online
« Reply #4 on: November 03, 2010, 03:56:06 pm »
Winner detection is tough - it's not stored in the replay so you kinda have to guess.
I don't/haven't played SC2 so I don't know hwo this works, but doesn't Starcraft 2 eliminate players when they lose? So you can pick out players/teams based on their elimination times.

Also: I now await Blizzard/Activision to sue you for violating their IP'z.
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
 [17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: SC2 Replay Parser online
« Reply #5 on: November 03, 2010, 09:05:25 pm »
Added some new functionality - specifically, the complete build and activity order (basically, a complete list of all the events that happened in the game).

deadly: No.  I can only detect if they leave.  If their team is completely eliminated then they leave but that's not reliable.
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Chavo

  • x86
  • Hero Member
  • *****
  • Posts: 2219
  • no u
    • View Profile
    • Chavoland
Re: SC2 Replay Parser online
« Reply #6 on: November 04, 2010, 03:26:54 pm »
I haven't even glanced at a Starcraft 2 replay, but the Warcraft 3 win mechanism relied 100% on the player actually staying long enough to get a victory/defeat screen (via all opponents leaving or actually destroying their bases).  I assume that Starcraft 2 suffers the same limitation that it is hard to figure out who won a game that was not "over" when you left the game.  Custom maps have solved this problem by basically injecting custom variables into the replay actions with their own standardized meanings.  Obviously that isn't a solution for generic Starcraft 2 ladder play.