Closed dsjoerg closed 11 years ago
I played this match, and I random'd Zerg (meh) and the first thing I built was a Drone.
This s2gs is from the latest patch
Interesting, the SC2 beta client itself has trouble parsing this s2gs. The graph screens give an error within the SC2 client. Here are the screens it is able to show: http://imgur.com/a/OTezq
Here's a fresh one that is having problems.
summary = sc2reader.load_game_summary("http://xx.depot.battle.net:1119/8f677049dbe3821b51fe15dafd91dff89056dbca370b9a8f8d9945ead60270b8.s2gs")
summary.player[0].build_order[0]
>> BuildEntry(supply=17, total_supply=0, time=0, order='Structures Razed Count', build_index=0)
Here's an s2gs I played in together with Score Summary images: http://xx.depot.battle.net:1119/8f677049dbe3821b51fe15dafd91dff89056dbca370b9a8f8d9945ead60270b8.s2gs http://imgur.com/a/tKQZQ
Imagine the end s2gs file as a giant array of statistics, all with the exact same serialized form. They are ordered by type: summary stats -> graphs -> build order. The issues we are seeing here are because there are now 3 additional summary stats and 2 additional graphs which shift the rest of the entries back.
We've been using fixed indices to identify the start and end of one chunk of stats. I'm going to look and see if there is a way I can code with without fixing the indices. It would be much easier if we were able to identify the version of the file but it isn't clear how we would do that.
@dsjoerg, could you get me an archive of WoL and HotS files? I might be able to find a version identifier by comparing the two.
Here are 1000 WoL s2gs hashes: http://pastebin.com/v00V120J they were retrieved today.
I'll get you some HotS hashes later today. They may be trickier to work with because there may be some older formats mixed in there that nobody cares about any more.
Actually you need gateway and hash in order to work with these. http://pastebin.com/KrswxbtW
Here's some trivial code I wrote for playing with HotS hashes that you can adapt for WoL
import sc2reader
hots_hashes = open('/tmp/hotshash.txt','rb')
for hots_hash in hots_hashes:
url = "http://xx.depot.battle.net:1119/{}.s2gs".format(hots_hash.strip())
print "Getting {}".format(url)
summary = sc2reader.load_game_summary(url)
Sorry for being captain obvious
Here are 245 HotS hashes: http://pastebin.com/CQrawqFE all retrievable from gateway xx of course.
If you need more it's about 5 minutes work to get this many more hashes.
Thanks @dsjoerg, this should be sufficient.
This is fixed by ac1e114a4c3507fb1dfed52feb7ca04bd2429d5f. Holding the issue open for verification (by me).
Have you already verified this @dsjoerg or were you just looking a successful parsing and not the details.
I have not verified this. I know that the code can parse a HotS s2gs without failing, but that's all I know.
I've confirmed that buildorder parsing is failing for at least one HotS and one WoL s2gs. It's getting values like 'Workers Active' and 'Army Value' for the order rather than a legit order such as 'Drone'.
Added a test. Debugging now.
The build order issue is fixed (with test added) in 71638b01e06e0e1097f6774b03fabfb526cacbdf.
Okay, all the s2gs work has been merged back into HotS on the main repo. Time to close this.