happyleavesaoc/aoc-mgz

Current Patch DE Game Loading Error

Closed this issue · 8 comments

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

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

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.

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.

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.

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?

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

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!

  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