scopatz / w3g

Access Warcraft 3 replay files from Python 2 or 3
Creative Commons Zero v1.0 Universal
45 stars 16 forks source link

Player not recognized error with 1.30 replays #6

Closed modmoto closed 4 years ago

modmoto commented 6 years ago

HI,

I wanted to use the scripts for some application but so far I was not use it with 1.30 (I dont have any other replays anymore) I get the error:

  File "C:\Users\Simon\Downloads\w3g-master\w3g-master\w3g.py", line 1310, in from_raw
    raise ValueError("Player not recognized custom or ladder.")
ValueError: Player not recognized custom or ladder.

I can send you the replay if you want to recreate it. I am no python guy, so I am a little bit helpless ;)

Greetings and thanks for this cool project allready =D

jonrosner commented 5 years ago

I wanted to use your library for doing ML research on wc3 replays. Unfortunately I get the following error when trying to open a 2019 replay: Traceback (most recent call last): File "main.py", line 2, in <module> f = w3g.File('replay.w3g') File "/home/.../python/src/wc3/wc3-venv/lib/python3.5/site-packages/w3g.py", line 2220, in __init__ self._read_blocks() File "/home/.../python/src/wc3/wc3-venv/lib/python3.5/site-packages/w3g.py", line 2291, in _read_blocks self._parse_blocks(data) File "/home/.../python/src/wc3/wc3-venv/lib/python3.5/site-packages/w3g.py", line 2313, in _parse_blocks offset = _parsers[blockid](data) KeyError: 195

Also is it possible to get certain player stats for certain timesteps in the game (eg. unit count at 5 minutes and 30 seconds)

scopatz commented 5 years ago

Hi there! Sorry about the errors. PRs defintiely welcome to fix these issues.

As per player stats at given timestamps, I am not sure. It would be great to have that API though.

When I was looking into using this for ML stuff one of the problems I ran into was that the replays don't have enough info to recreate everything of interest because it lacks the game eninge. The game rules would have to be reproduced to some degree for certain pieces of info.

I'd love to have all of that here, of course!