timkurvers / redota

Revisit past Dota 2 matches in the browser
https://timkurvers.github.io/redota
MIT License
51 stars 7 forks source link

Questions about Parsing Player's Orders #112

Open Orion-Zheng opened 4 months ago

Orion-Zheng commented 4 months ago

Hi, thank you for your work! šŸ˜ƒThis project helps me a lot on extracting hero's positions with game time. I noticed current parser didn't include parsing about player's order info, which is crucial for some Reinforcement Learning scenarios. So I am working on extracting some player's order data based on this project's Parser and Replay class and hope to get some advice. (BTW in the visualization, there are angles about hero's moving directions. I'm curious about how does that workšŸ¤”Because I am a newbie for Javascript, I have little idea about the logics in the React.js frontend code)

Here's what I do so far: First, I refer to the repo MOBA_RL (a repo 2 years ago, cannot run right now) and let the Parser to listen to the CDOTAUserMsg_SpectatorPlayerUnitOrders message when parsing.

image image

Then I can access the content of some player's orders.

image

Then I hope to parse the order's information according to the orderType, which are all listed in a protobuf ENUM here

image

But I didn't find documentations about what does these order types refer to and how to understand fields in these message. The code of MOBA_RL project is buggy for current replay files so it also provides little information. Could anyone give me some suggestions on this?

BTW, when learning the code for these projects, there's a question that has puzzled me for a long time: How do you know which information is in which fields of those packets? Is there some development documentation explaining all these protobuf? or is all this derived from reverse engineering by the Open Source Community?

Any help will be really appreciated!