sc2reader icon indicating copy to clipboard operation
sc2reader copied to clipboard

Slot-Player mappings incorrect for non-standard teams

Open dsjoerg opened this issue 12 years ago • 13 comments

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.

arid wastes sc2replay atlas station sc2replay shadow reactor sc2replay

dsjoerg avatar May 13 '13 15:05 dsjoerg

These are 1v2 AI and 1v3 AI according to the sender.

dsjoerg avatar May 13 '13 17:05 dsjoerg

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?

GraylinKim avatar May 13 '13 17:05 GraylinKim

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

dsjoerg avatar May 13 '13 18:05 dsjoerg

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.

GraylinKim avatar May 13 '13 19:05 GraylinKim

No idea what SC2Gears does here. Hopefully there is a more foolproof way to get pids that perhaps Blizzard can share.

dsjoerg avatar May 13 '13 19:05 dsjoerg

Progress on this issue can be tracked at Blizzard/s2protocol#8

GraylinKim avatar May 13 '13 20:05 GraylinKim

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.

GraylinKim avatar May 13 '13 20:05 GraylinKim

Correct, not urgent.

dsjoerg avatar May 13 '13 20:05 dsjoerg

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.

GraylinKim avatar Jul 23 '13 01:07 GraylinKim

Noting to self that David's game (http://drop.sc/341365/d) is another test case for this issue.

GraylinKim avatar Jul 23 '13 01:07 GraylinKim

Bumping this to 0.6.1 because it is unlikely that Blizzard will help resolve this before release.

GraylinKim avatar Jul 29 '13 17:07 GraylinKim

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.

GraylinKim avatar Sep 22 '13 19:09 GraylinKim

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.

GraylinKim avatar Jan 03 '14 02:01 GraylinKim