Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slot-Player mappings incorrect for non-standard teams #131

Open
dsjoerg opened this issue May 13, 2013 · 13 comments
Open

Slot-Player mappings incorrect for non-standard teams #131

dsjoerg opened this issue May 13, 2013 · 13 comments
Assignees

Comments

@dsjoerg
Copy link
Collaborator

dsjoerg commented May 13, 2013

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

@ghost ghost assigned GraylinKim May 13, 2013
@dsjoerg
Copy link
Collaborator Author

dsjoerg commented May 13, 2013

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

@GraylinKim
Copy link
Owner

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?

@dsjoerg
Copy link
Collaborator Author

dsjoerg commented May 13, 2013

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

@GraylinKim
Copy link
Owner

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.

@dsjoerg
Copy link
Collaborator Author

dsjoerg commented May 13, 2013

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

@GraylinKim
Copy link
Owner

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

@GraylinKim
Copy link
Owner

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.

@dsjoerg
Copy link
Collaborator Author

dsjoerg commented May 13, 2013

Correct, not urgent.

@GraylinKim
Copy link
Owner

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
Copy link
Owner

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

@GraylinKim
Copy link
Owner

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

@GraylinKim
Copy link
Owner

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
Copy link
Owner

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 GraylinKim changed the title tracker event loadcontext dies on some replays Slot to Player mappings incorrect for non-standard team configurations Dec 29, 2014
@GraylinKim GraylinKim changed the title Slot to Player mappings incorrect for non-standard team configurations Slot to Player mappings incorrect for non-standard teams Dec 29, 2014
@GraylinKim GraylinKim changed the title Slot to Player mappings incorrect for non-standard teams Slot-Player mappings incorrect for non-standard teams Dec 29, 2014
StoicLoofah referenced this issue in StoicLoofah/sc2reader Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants