sc2reader
sc2reader copied to clipboard
Slot-Player mappings incorrect for non-standard teams
Three replays attached below.
The fellow who sent the replay says "No resumes, official blizzard maps. The only thing that I could think of that is non standard would be that the teams are lopsided."
11:00:48 python.1 | File "/Users/david/Dropbox/Programming/esdb/esdb/vendor/ggpyjobs/src/sc2reader/sc2reader/factories.py", line 66, in load_replay 11:00:48 python.1 | return self.load(Replay, source, options, *_new_options) 11:00:48 python.1 | File "/Users/david/Dropbox/Programming/esdb/esdb/vendor/ggpyjobs/src/sc2reader/sc2reader/factories.py", line 135, in load 11:00:48 python.1 | return self._load(cls, resource, filename=filename, options=options) 11:00:48 python.1 | File "/Users/david/Dropbox/Programming/esdb/esdb/vendor/ggpyjobs/src/sc2reader/sc2reader/factories.py", line 145, in _load 11:00:48 python.1 | obj = cls(resource, filename=filename, factory=self, *_options) 11:00:48 python.1 | File "/Users/david/Dropbox/Programming/esdb/esdb/vendor/ggpyjobs/src/sc2reader/sc2reader/resources.py", line 308, in init 11:00:48 python.1 | event.load_context(self) 11:00:48 python.1 | File "/Users/david/Dropbox/Programming/esdb/esdb/vendor/ggpyjobs/src/sc2reader/sc2reader/events/tracker.py", line 182, in load_context 11:00:48 python.1 | self.player = replay.player[self.pid] 11:00:48 python.1 | KeyError: 6
Here are the replays, faked as .png files so that github will let me attach them.

These are 1v2 AI and 1v3 AI according to the sender.
We should get lopsided games with human players to verify that this isn't just an AI issue. It appears that the player numbers go:
Team 1:
Player 1 - Tzuqris
Player 2 - None
Team 2:
Player 3 - AI
Player 4 - AI
Likewise for the 3v3. We can fix this for tracker events specifically but we need a lopsided game with Human players to determine if this is also an issue for Game and Message events as well. Do you think you can procure such a game David?
Here you go: http://ggtracker.com/matches/3167851 replay file: http://ggtracker.com/matches/3167851/replay
Some other match IDs: 3167674, 3165698, 3168919, 3168920, 3096144, 3162469
Strangely the human players don't follow the pattern above, they are laid out like this:
Team 1:
Player 1 - A
Team 2:
Player 2 - B
Player 3 - C
Maybe the pid assignment for AI is based on slot numbers? @dsjoerg, does SC2Gears get this done right?
I'll see if I can get Blizzard to clear this question up for us.
No idea what SC2Gears does here. Hopefully there is a more foolproof way to get pids that perhaps Blizzard can share.
Progress on this issue can be tracked at Blizzard/s2protocol#8
Am I safe in assuming that this isn't a issue that requires urgent resolution @dsjoerg? I can try to put together a patch if necessary.
Correct, not urgent.
I implemented the algorithm described in Blizzard/s2protocol#8 but outmatched AI games are still broken. It is possible that AI players are treated differently. I have requested clarification.
Noting to self that David's game (http://drop.sc/341365/d) is another test case for this issue.
Bumping this to 0.6.1 because it is unlikely that Blizzard will help resolve this before release.
Just a status update/summary for future me.
This has been resolved for most cases. Games with AI players, generally in outmatched games, still have this bug though. Its not clear to me how to move forward but Blizzard has suggested that id maps might be provided by replays in future matches.
The upcoming 2.1 patch will have a Tracker event with proper player-slot-user mappings so that this problem goes away. It'll only be fixed for new replays that have tracker events though, so this edge case should be documented somewhere.