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

timestamps of replay.events don't match the times of the actual actions in the replay files #155

Closed
bw-leran opened this issue Sep 8, 2021 · 2 comments

Comments

@bw-leran
Copy link

bw-leran commented Sep 8, 2021

I've tested this out with a couple different files now. I'm printing out each event in replay.events, but when double checking the events against the actual replay file (meaning I'm actually watching a .SC2Replay file and checking what time things are occuring in the replay then comparing that to the timestamps from replay.events) the times aren't exactly matching up. For example, replay.events says that a refinery is built at 17 seconds, but I can clearly see that it is built at 13 seconds. The actions are accurate, but the times seem to be off. Is this normal? Or am I loading the replay file incorrectly?

Here is how I'm loading the replay file:

replay = sc2reader.load_replay(replay_file,engine=sc2reader.engine.GameEngine(plugins=[ContextLoader(),APMTracker(), SelectionTracker()]))

@Andrene
Copy link
Contributor

Andrene commented Sep 9, 2021

It looks like this may be related to #130 as doing (17*16)/22.4 puts it in the correct ballpark (guessing its not closer to 13 due to those times being just seconds and not factoring in decimal values)

@bw-leran
Copy link
Author

bw-leran commented Sep 9, 2021

@Andrene thanks for linking that issue. That solution seems to be much more accurate. I was using general terms with seconds, I'm using the actual frames to get the exact time to include decimal values.

@bw-leran bw-leran closed this as completed Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants