Clan x86

General Forums => Gaming => Topic started by: MyndFyre on November 03, 2010, 04:03:53 am

Title: SC2 Replay Parser online
Post by: MyndFyre 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.
Title: Re: SC2 Replay Parser online
Post by: Sidoh on November 03, 2010, 04:21:15 am
Nice!  That's cool.  Good work :)
Title: Re: SC2 Replay Parser online
Post by: rabbit 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
Title: Re: SC2 Replay Parser online
Post by: MyndFyre 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.
Title: Re: SC2 Replay Parser online
Post by: deadly7 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.
Title: Re: SC2 Replay Parser online
Post by: MyndFyre 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.
Title: Re: SC2 Replay Parser online
Post by: Chavo 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.