goto-bus-stop / recanalyst

Analyzes Age of Empires 2 recorded game files.
https://goto-bus-stop.github.io/recanalyst/doc/v4.2.0
GNU General Public License v3.0
77 stars 11 forks source link

Improved trigger system reading #46

Open yvan-burrie opened 7 years ago

yvan-burrie commented 7 years ago

Improved the reading for the triggers system with version and data length used correctly. Although, I do not know where the triggers version is read and whether HD Edition still uses version 1.6. I did not test my code, so I hope it works!

goto-bus-stop commented 7 years ago

Thanks! The scenery version identifier is definitely useful information.

There do seem to be a few issues. If you clone the repository, you can test your changes locally using composer run-script test. That'll try to run the code on a few dozen recorded game files from different AoE2 versions.

yvan-burrie commented 7 years ago

Cool, I will have to try testing next time.

There's a lot more data that uses the scenery version, which needs to expanded on.

I believe the 64 bit float for the triggers version is used to detect the position for skipping huge amounts of unknown data? I will try to clarify some of those unknowns later, as HD Edition will maybe add things.

yvan-burrie commented 7 years ago

I just realised I forgot to include the 16 bit integer known as "timelineAvailableId" which should be read between the timeline entries counter and the timeline entry structures, line 472.