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

Current Patch DE Game Loading Error #71

Closed
ghost opened this issue Oct 20, 2021 · 8 comments
Closed

Current Patch DE Game Loading Error #71

ghost opened this issue Oct 20, 2021 · 8 comments

Comments

@ghost
Copy link

ghost commented Oct 20, 2021

Im working on a data analytics site for a league. Im trying to analyze games with your library but can't seem to get games to load from the newest patch. Your info says that the library works for version 25.02 and earlier. How do these version correspond to game version? Ex. Current version is: 101.101.54684 7486483.

The error I am getting:
`Exception has occurred: RuntimeError (note: full exception trace is shown but execution is paused at: setUpClass)
could not parse
File "C:\Users\Owner\Git Repos\aoc-mgz\mgz\fast\header.py", line 418, in parse
de = parse_de(header, version, save)
File "C:\Users\Owner\Git Repos\aoc-mgz\mgz\fast\header.py", line 296, in parse_de
lobby = de_string(data)
File "C:\Users\Owner\Git Repos\aoc-mgz\mgz\fast\header.py", line 47, in de_string
assert data.read(2) == b'\x60\x0a'

During handling of the above exception, another exception occurred:

File "C:\Users\Owner\Git Repos\aoc-mgz\mgz\fast\header.py", line 47, in de_string
assert data.read(2) == b'\x60\x0a'
File "C:\Users\Owner\Git Repos\aoc-mgz\mgz\fast\header.py", line 296, in parse_de
lobby = de_string(data)
File "C:\Users\Owner\Git Repos\aoc-mgz\mgz\fast\header.py", line 418, in parse
de = parse_de(header, version, save)
File "C:\Users\Owner\Git Repos\aoc-mgz\mgz\fast\header.py", line 426, in parse
raise RuntimeError("could not parse")
File "C:\Users\Owner\Git Repos\aoc-mgz\tests\test_fast.py", line 60, in setUpClass (Current frame)
cls.data = parse(handle)`

Let me know if what I'm doing wrong or if the current version of games is not supported.

Test_Game.zip
.0

@happyleavesaoc
Copy link
Owner

There's a bug in fast parsing for DE. I will push a fix soon!

@ghost
Copy link
Author

ghost commented Oct 20, 2021

Awesome. With a quick glance it looks like that fast parsing is utilized by model as well so Im assuming all my errors will resolve when that parse is fixed.

@happyleavesaoc
Copy link
Owner

I just pushed a commit that should fix your issue. If you aren't already, I recommend you work from a git clone since this project updates fairly frequently but I don't always cut new versions for pypi.

@happyleavesaoc
Copy link
Owner

Oh, and to answer your version question, 25.02 is the internal rec version. It is not 1-to-1 with the user-facing version, aka the "build" (54684). Sometimes the build can increment but the rec format is the same.

@ghost
Copy link
Author

ghost commented Oct 20, 2021

The PR resolved my issue. Thank you! I have been operating off of the repo. So no worries there. Thanks for clarifying the version. Is there a place where documentation lives about the rec format?

@happyleavesaoc
Copy link
Owner

No, unfortunately not. I'm happy to answer questions though.

@ghost
Copy link
Author

ghost commented Oct 22, 2021

I appreciate that! I have two questions:

  1. Can you explain why an Unqueue event does not have a player defined? Also, how are you supposed to know what was unqueued?
  2. I'm trying to calculate idle TC time, and I'm noticing in a couple recordings that there are more villager queue events than villagers that actually get queued. The recording I originally posted is one of them. Im assuming the player tried to queue another villager but did not have the food, are events filtered in some way from the original recording?

If there is a better location to ask questions or if you want me to start another thread, let me know! Thanks!

@happyleavesaoc
Copy link
Owner

happyleavesaoc commented Oct 23, 2021

  1. It has the object ID. The game doesn't care what player issued the command. It just removes from the queue in that building.
  2. A fast player can spam input before the UI blocks them (which only happens per turn, ~200ms, not instantly). Inputs are not filtered.

If you are a Discord user, stop by #rec-analysis here: https://discord.gg/YXMYDjT

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

1 participant