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

Support Resume from Replay #91

Open
GraylinKim opened this issue Feb 11, 2013 · 7 comments
Open

Support Resume from Replay #91

GraylinKim opened this issue Feb 11, 2013 · 7 comments
Assignees

Comments

@GraylinKim
Copy link
Owner

Totally failing right now.

@ghost ghost assigned GraylinKim Feb 11, 2013
GraylinKim added a commit that referenced this issue Feb 11, 2013
@GraylinKim
Copy link
Owner Author

We can parse these replays now but the fact that new players took control part way through the game is completely ignored. We need a good way to make this information available.

@GraylinKim
Copy link
Owner Author

The information is exposed in a very basic way now with the following added to the replay:

#: True of the game was resumed from a replay
resume_from_replay = False

#: A flag marking which method was used to resume from replay. Unknown interpretation.
resume_method = None

#: Lists info for each user that is resuming from replay.
resume_user_info = None

The user info can't really be applied at this point because it is incomplete. Specifically, the user's toon_id, region, and subregion are missing. Without this information we can't really tell who the new user really is. Putting on hold for now, hopefully Blizzard can add this information in the future.

@GraylinKim
Copy link
Owner Author

This toon, region, and subregion information can be extracted from the toon_handle for each user:

Example 1-S2-1-390979:

  • Region = 1
  • Game = S2
  • Subregion = 1
  • Toon Id = 390979

This information could be extracted and packaged to create new Player/Observer objects for the game. How exactly to expose this isn't settled yet.

@DeltaVelocity
Copy link

The resume_from_replay flag doesn't seem to work for me. It's always false. Is it meant to be working yet?

@GraylinKim
Copy link
Owner Author

Please attach an example replay and state your sc2reader version when reporting issues. If the replay is private you can email it to me.

@DeltaVelocity
Copy link

Sorry I figured out it was because I had load_level=3. I didn't realise that this information required the game events to be loaded :)

@nibalizer
Copy link

I found this issue with resumed replays. Haven't dug into it much but here is a stacktrace and its pretty obvious what file it blew up on:

 (master * u=)$: python sc2analyzer.py '../WCS 2015 Season 1/SSL/Challenge/Roundof32_Classic_Cure_1Set(After Recover).SC2Replay'
Traceback (most recent call last):
  File "sc2analyzer.py", line 48, in <module>
    main()
  File "sc2analyzer.py", line 32, in main
    replay = sc2reader.load_replay(filename, debug=True)
  File "/home/nibz/projects/sc2replay_proc/venv/local/lib/python2.7/site-packages/sc2reader/factories/sc2factory.py", line 85, in load_replay
    return self.load(Replay, source, options, **new_options)
  File "/home/nibz/projects/sc2replay_proc/venv/local/lib/python2.7/site-packages/sc2reader/factories/sc2factory.py", line 137, in load
    return self._load(cls, resource, filename=filename, options=options)
  File "/home/nibz/projects/sc2replay_proc/venv/local/lib/python2.7/site-packages/sc2reader/factories/sc2factory.py", line 146, in _load
    obj = cls(resource, filename=filename, factory=self, **options)
  File "/home/nibz/projects/sc2replay_proc/venv/local/lib/python2.7/site-packages/sc2reader/resources.py", line 309, in __init__
    engine.run(self)
  File "/home/nibz/projects/sc2replay_proc/venv/local/lib/python2.7/site-packages/sc2reader/engine/engine.py", line 174, in run
    for new_event in (event_handler(event, replay) or []):
  File "/home/nibz/projects/sc2replay_proc/venv/local/lib/python2.7/site-packages/sc2reader/engine/plugins/context.py", line 228, in handleUnitDoneEvent
    self.logger.error("Unit {0} done at {1} [{2}] before it was started!".format(event.killer_pid, Length(seconds=event.second), event.frame))
AttributeError: 'UnitDoneEvent' object has no attribute 'killer_pid'

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

3 participants