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

some more infos/flags in fast header parser and AI compatibility #98

Merged
merged 4 commits into from
May 28, 2023

Conversation

Skazu
Copy link
Contributor

@Skazu Skazu commented May 24, 2023

Hey,
we're just making our way to the fast header parser.
I have added some flags that we need, is it possible to include them upstream?

Attention: I dived into the binary data a bit and noticed that there seems to be a discrepancy in the player data (where I skip 42 bytes), I thought it was due to RoR, but it seems to be more of a difference between rated and non-rated matches, at least with the skip I can only parse non-rated matches and without the skip only rated matches.

So the PR shouldn't be merged like that, maybe you have an idea how to solve the problem?

@Skazu Skazu marked this pull request as draft May 24, 2023 21:41
@happyleavesaoc
Copy link
Owner

Happy to merge updates to the fast parser.

I'm not sure about the 42 bytes after the players. I'm currently parsing rated and unrated matches successfully with 1.8.20 (latest version). I am seeing a few parse failures, I can check if it is these bytes and go from there.

@happyleavesaoc
Copy link
Owner

I forgot to mention, 1.8.20 should already have complete RoR functionality including reference data.

@Skazu
Copy link
Contributor Author

Skazu commented May 25, 2023

You are right, it seems to have nothing to do with rated or unrated.

But e.g. this record is parseable with the skip, but not without:
https://aoe.ms/replay/?gameId=235478040&profileId=720137

I had a few more but i have no clue whats the reason behind those bytes. And i can't see any dependence on any game settings.

@happyleavesaoc
Copy link
Owner

FWIW, it's the 42 bytes before it reads the 26 for version 37. You could do a lookahead and optionally skip those bytes if all else fails.

@Skazu Skazu changed the title ror compatibility + some more infos/flags in fast header parser some more infos/flags in fast header parser and AI compatibility May 28, 2023
@Skazu
Copy link
Contributor Author

Skazu commented May 28, 2023

@happyleavesaoc
Current status:
I am parsing some additional flags and have made the fast parser "AI compatible" in the sense that by default the AI part is skipped if present. (As was already the case in the Full Parser).

Still not all savegames can be parsed, we still have two typical error cases:

All these matches cannot be parsed even with the unmodified version, so in my opinion the status is not getting worse.

We have been using this version live for two days now and have already parsed thousands of matches.

I would continue to work on the open error cases separately and submit this status now for the merge, if you still have suggestions for improvement, please give me feedback.

Best regards!

@Skazu Skazu marked this pull request as ready for review May 28, 2023 15:58
@happyleavesaoc
Copy link
Owner

Great, I will merge and bump the version then. Thanks!

@happyleavesaoc happyleavesaoc merged commit 20baa52 into happyleavesaoc:master May 28, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants