-
Notifications
You must be signed in to change notification settings - Fork 38
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
How to find the initial tick that corresponds to the game start? #53
Comments
Read this comment (and the whole thread): |
Thank you for the link. I have read it, but I'm confused, I'll try to describe why. I made a dump with the clarity example "dump" and I found that timestamp seems to be the variable that tracks the time. Now from your link I found that there's another time to take into account, which is paused time, which might be what timestamp_raw is. So, to summarize, I thought I could use timestamp and timestamp_raw in a dump file to calculate clock time and sync game events that way. Is it possible? Is it the wrong approach? What am I doing if I do it that way? As an example, take the combatlog parser from clarity-examples. It kind of does it, because it syncs timestamps and actions, and would need to convert the times into clock times, like the thread you posted shows how it is possible to do it. Thanks. o/ |
First of all, dumping the replay is raw data, you shouldn't use it. Clarity provides access to entities through a processor (Entities.class), and several Annotations (for example @OnEntityUpdated), where you can get a callback if a property for an entity changes. This example code (skadistats/clarity#106 (comment)) shows you how to get access to the CDOTAGamerulesProxy entity, and read poperties from them. Here is an example that uses entities in another way: https://github.com/skadistats/clarity-examples/blob/master/src/main/java/skadistats/clarity/examples/dumpmana/Main.java It dumps current mana and max mana for all heroes. |
I'll see what I can do with these two. Thank you. I will post something here when I can get it to work. |
spheenik, I don't understand...
from which to retrieve these properties
and you used these strings and properties
to retrieve mana and max mana.. I have searched those strings in Protobufs and in clarity, but I have not found them. Are mana and game time networked entities? Or the networked entities are "CDOTA_Unit_Hero..." and "CDOTAGamerulesProxy"? One more thing I noticed: you used I'm getting clarity a little bit more after some time, but I still have confusion. Cheers! |
Hi spheenik, I think I begin to understand a bit better what I'm looking at/for. |
"m_FlMana" is a property of an entity. I invite you to use clarity analyzer to inspect the plethora of entities and their properties. I concise example on how to get to specific entities and their properties by yourself is the dumpmana example. Hope that clears it up. Good luck on your journey. |
Hi! I wanted to learn to convert timestamp and timestamp_raw into clock time. Is there a fixed offset that can be used to translate those two values into clock time? Or is there an event in the replay that refers to the switch from strategy time to match start?
The text was updated successfully, but these errors were encountered: