Announcement

Collapse

Forum Rules

  • No flaming or derogatory remarks, directly or through insinuation.
  • No discussion, sharing or referencing illegal software such as hacks, keygen, cracks and pirated software.
  • No offensive contents, including but not limited to, racism, gore or pornography.
  • No excessive spam/meme, i.e. copious one liners in a short period of time, typing with all caps or posting meme responses (text/image).
  • No trolling, including but not limited to, flame incitation, user provocation or false information distribution.
  • No link spamming or signature advertisements for content not specific to Dota 2.
  • No Dota 2 key requests, sell, trade etc.
  • You may not create multiple accounts for any purpose, including ban evasion, unless expressly permitted by a moderator.

  • Please search before posting. One thread per issue. Do not create another thread if there is an existing one already.
  • Before posting anything, make sure you check out all sticky threads (e.g., this). Do not create new threads about closed ones.
  • It is extremely important that you post in correct forum section.

  • Balance discussion only in Misc.
  • All art related (such as hero model) feedbacks go to Art Feedback Forum.
  • All matchmaking feedback should go here: Matchmaking Feedback
  • All report/low priority issues should go here: Commend/Report/Ban Feedback
  • No specific workshop item feedback. These should go to workshop page of that item.
  • When posting in non-bugs section (such as this), use [Bugs], [Discussion] or [Suggestion] prefix in your thread name.



In case you object some action by a moderator, please contact him directly through PM and explain your concerns politely. If you are still unable to resolve the issue, contact an administrator. Do not drag these issues in public.



All rules are meant to augment common sense, please use them when not conflicted with aforementioned policies.
See more
See less

Dota 2 Demo File Format

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by snevets View Post
    Will we need to worry about backwards compatibility at any point, or do you foresee the replay format staying as-is for a really long time? Will the proto files need to be changed at all in the future, requiring a re-compile? This is amazing btw, keep it up!
    One of the reasons we switched to Google's protobuf it allows you to add and remove fields from serialized messages without breaking compatibility. Our goal going forward is to ensure we don't break our demo format unless absolutely necessary.

    I'll definitely update the tool as we add more fields as Dota 2 grows. Mostly its just updating the .proto files as we expand and add messages.

    Note that this parser prints out all the messages except for the entity data. We currently do not provide the individual entity frame information contained in svc_PacketEntities so it will be harder to decode actual player, creep and other positions. This can be done, but its something we are not providing at this time.

    The messages that players will be most interested in are the svc_GameEvent and svc_UserMessage. The provide all the events of the game such as player deaths, combat log data, etc.

    Comment


    • #32
      Originally posted by mitsuhiko View Post
      @Zoid: I also found a bug with the original code. There is a broken printf statement in the code:

      Code:
      'printf( "%s", msg.DebugString() );'
      DebugString() returns a std::string and not a char*, so a .c_str() is necessary there.
      Oops! I'll fix this and upload a new version today. Good catch!

      Comment


      • #33
        Theres libraries for php that will do this aswell.. Just sayin... we dont need a executable file to do this.

        Comment


        • #34
          is there a way which we could download or save or anything possible for a match data statistic in json format?.....json format would be the most convenient way.i would like to have a web format parser if ever..tnx for this nice update anyway..

          Comment


          • #35
            Zoid... are there any plans to expose team chat?

            Comment


            • #36
              Not at present. We actually do not record team chat into the demo at all.

              Comment


              • #37
                Bummer... Thats pretty much the one thing I was digging into replays for. One of those other games has a site that exposes the team chat with the kill times and I always found it highly amusing to read the team chat after a game.

                Comment


                • #38
                  only one thing now is player name and hero they pick ...
                  sorry for my bad English ...

                  From Vietnam with Love - Lagest DOTA 2 Community in Vietnam: DotA-2.Vn

                  Comment


                  • #39
                    Originally posted by KaMiKaZe.PiG View Post
                    So I just got here, and haven't looked into this at all... but it appears this will only run on Windows? Are you serious? How is this going to be useful for web sites?
                    Here you go: https://github.com/mitsuhiko/dota2-demoinfo2
                    // Economy
                    "NotTheStringsYoureLookingFor"

                    Comment


                    • #40
                      Originally posted by mitsuhiko View Post
                      I made some minor changes to make it compile on OS X. Repo is on github: https://github.com/mitsuhiko/dota2-demoinfo2

                      It should also compile on linux. Just make sure that protobuf and snappy are installed. Same goes for OS X. If you have brew just "brew install snappy" and "brew install protobuf". Then compile with "make".

                      @Zoid: I also found a bug with the original code. There is a broken printf statement in the code:

                      Code:
                      'printf( "%s", msg.DebugString() );'
                      DebugString() returns a std::string and not a char*, so a .c_str() is necessary there.
                      Thanks, man.

                      I literally have no time for this until late in the weekend, so this is great.

                      Comment


                      • #41
                        I spent a bit of time and made a python version of the parser. It doesn't do anything more than the C++ version, but I figured I'd probably want to be able to get at the data from Python rather than C++. The code is at https://github.com/andrewsnowden/dota2py

                        I'll probably add another tool to get some more useful data out of the replays over the next few days.

                        Comment


                        • #42
                          I'm not sure what I was thinking this whole time. Granted I only spent about 10 minutes thinking about it, but the fact is: I was going to use Python anyhow. I don't even need the executable. :P


                          EDIT:

                          Originally posted by acidfoo View Post
                          I spent a bit of time and made a python version of the parser. It doesn't do anything more than the C++ version, but I figured I'd probably want to be able to get at the data from Python rather than C++. The code is at https://github.com/andrewsnowden/dota2py

                          I'll probably add another tool to get some more useful data out of the replays over the next few days.
                          Nice work, thanks for doing this. I would have had to wait to Sunday to start on this. Github is a good call, we can send patches.
                          Last edited by KaMiKaZe.PiG; 04-27-2012, 10:28 AM.

                          Comment


                          • #43
                            Originally posted by Zoid View Post
                            Not at present. We actually do not record team chat into the demo at all.
                            Team-chat is one of the best things about the replays, some of them can be really funny. It would be very handy specially if we can enable/disable the team-chat so there won't be any screen clutter for video-makers.

                            It would be awesome if you guys implement it while it's still beta!
                            Fix how reconnection works now!

                            Comment


                            • #44
                              Originally posted by wesai View Post
                              It would be very handy specially if we can enable/disable the team-chat so there won't be any screen clutter for video-makers.
                              dota_sf_hud_chat 0

                              http://www.cyborgmatt.com/2012/02/do...-movie-makers/
                              // Economy
                              "NotTheStringsYoureLookingFor"

                              Comment


                              • #45
                                In a nutshell what does this actually do?

                                Comment

                                Working...
                                X