Blizzard / s2protocol

Python library to decode StarCraft II replay protocols
MIT License
622 stars 111 forks source link

Time of units start training #81

Open hypatiasf opened 6 years ago

hypatiasf commented 6 years ago

Which file in the archive can we find when a unit start training? (not the time finish training)

I found something in file 'replay.tracker.events' which is close to the aim I think, they're about:

but none of them are suitable.

amartin916 commented 6 years ago

I don't believe the info is in the replay file, how I go about it is I keep track of the build times for the units so the finished time - build time.

hypatiasf commented 6 years ago

@amartin916 Thank you for your advice, I think that would be useful in most conditions. But ... what if a protoss player used a chrono boost?

amartin916 commented 6 years ago

You would have to account for it, by finding what building the chrono was used on, and also linking the unit to the building. "Might be able to link the unit back to the building with m_creatorUnitTagIndex and m_creatorUnitTagRecycle I have never looked. I know that for zerg everything links back to the larva".

I personally don't worry about the chrono but I also lean more on the complete time than the starting. And where I lean on the started time you would be hard press to notice the difference since I only record things in 7 second intervals

hypatiasf commented 6 years ago

@amartin916 It should be the solution, thank you!