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

  • #16
    Originally posted by Tharuler View Post
    Except for conio.h, __cdecl, __declspec( noreturn ) and some other windows only functions?

    I know there's a workaround for most of em, (and you can just delete the conio reference if you remove the interrupt at the bottom of demofiledump) but just saying the port took longer than expected
    Did you already port it to linux? If so, would you mind tossing it up somewhere?

    Comment


    • #17
      Its pretty straight forward to get it up and running on OSX.

      Snappy and Protobuff will both compile and install using standard ./configure, make, make install steps. Then simply run the protoc script for each proto file to generate the parsers.

      Then just drag all the generated source into a command line tool project along with the 3 .h and .cpp files with the demo app and setup your linker/includes properly. The only modifications i made to the valve source was updating the _int32/64/uint/etc typedefs to point at the OSX definitions and I removed the conio stuff previously mentioned.

      If there is demand I can probably zip up my directory structure and toss it on a dropbox.

      Comment


      • #18
        Originally posted by Lounges View Post
        Its pretty straight forward to get it up and running on OSX.

        Snappy and Protobuff will both compile and install using standard ./configure, make, make install steps. Then simply run the protoc script for each proto file to generate the parsers.

        Then just drag all the generated source into a command line tool project along with the 3 .h and .cpp files with the demo app and setup your linker/includes properly. The only modifications i made to the valve source was updating the _int32/64/uint/etc typedefs to point at the OSX definitions and I removed the conio stuff previously mentioned.

        If there is demand I can probably zip up my directory structure and toss it on a dropbox.
        Or throw it on github/bitbucket.

        I'd be interested in this if you're doing it, it's been like ... 5 years since I did any C work, it will probably take me fumbling around a bit to fix the stuff you already did.

        Comment


        • #19
          This is pretty neat.
          CPU: Intel i7 2630QM
          GPU: nVidia GeForce GT 525M ( 1GB )
          RAM: 6 GB DDR3 @ 1333 MHz
          OS: Windows 7 Professional 64-bit

          Comment


          • #20
            Originally posted by Lounges View Post
            Its pretty straight forward to get it up and running on OSX.

            Snappy and Protobuff will both compile and install using standard ./configure, make, make install steps. Then simply run the protoc script for each proto file to generate the parsers.

            Then just drag all the generated source into a command line tool project along with the 3 .h and .cpp files with the demo app and setup your linker/includes properly. The only modifications i made to the valve source was updating the _int32/64/uint/etc typedefs to point at the OSX definitions and I removed the conio stuff previously mentioned.

            If there is demand I can probably zip up my directory structure and toss it on a dropbox.
            Yea had to change the typedefs aswell to run on linux.

            I'll see if I can throw it online soon.

            Comment


            • #21
              Originally posted by Tharuler View Post
              Yea had to change the typedefs aswell to run on linux.

              I'll see if I can throw it online soon.
              That would be appreciated.

              Comment


              • #22
                Ok, made a version that has a slight edit to it, to make it easier to see what we have to work with. Rather then print the stuff to a console, it dumps it all into a text file the name of the demo file. The program don't have anything to update you on its progress, but it should be working working fine. Can take a good minute or two to work with larger replays. The changed files are included in the zip file, along with a rebuilt version of the executable for Windows.

                http://dl.dropbox.com/u/3496710/Game...nfo2Update.zip

                Comment


                • #23
                  You realize you can just do "demoinfo2.exe 12345.dem > output.txt" right?

                  Comment


                  • #24
                    No, no I did not.

                    Comment


                    • #25
                      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?
                      The documentation contains details of how to build something that will run on other systems. I'm looking into it, but I'm sure someone will beat me to it.

                      Comment


                      • #26
                        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.

                        Comment


                        • #27
                          Originally posted by Tharuler View Post
                          You realize you can just do "demoinfo2.exe 12345.dem > output.txt" right?
                          http://screensnapr.com/v/qUh10t.png It trashes 100% of disk IO and you can barely review the output. Without recompiling it into only useful output this is pointless, 10x 100MB = 1GB upload per 10 replays. I hope some smart coders will be kind enough to share there final parser for other leagues, not being a coder and giving this mess to paid programmers would cost a fortune to make a decent parser.

                          Also if only greed runs you, send me a PM after you are done with your final work, maybe we will be able to negotiate on some donation for your work that I would be interested in purchasing.

                          Comment


                          • #28
                            Just some questions on what the parser can do, as I am a noob with these kind of things.

                            -Can it parse GPM/XPM values for a specific minute in the game? If yes, there could be charts for which hero has which GPM/XPM at which point in the game, which should be interesting.
                            -Does it parse how much gold someone lost when using buyback/on death? Would be nice to know how much the total Gold Lost is for a really long game with several buybacks. (This should be in the ingame Observer/replay interface too by the way)

                            Comment


                            • #29
                              Originally posted by BLABLAFU View Post
                              Just some questions on what the parser can do, as I am a noob with these kind of things.

                              -Can it parse GPM/XPM values for a specific minute in the game? If yes, there could be charts for which hero has which GPM/XPM at which point in the game, which should be interesting.
                              -Does it parse how much gold someone lost when using buyback/on death? Would be nice to know how much the total Gold Lost is for a really long game with several buybacks. (This should be in the ingame Observer/replay interface too by the way)
                              Looks like it includes absolutely everything. As a result it's pretty verbose, but yeah, people should be able to pull this sort of thing out of the data!

                              Comment


                              • #30
                                I took a look at it and it looks like its dumping information about every tick in the game. For example,

                                Code:
                                ==== #38040: Tick:75968 'DEM_Packet' Size:951 UncompressedSize:1149 ====
                                So far I've only been able to get the match details like player names and their heroes and game mode/winner etc. This is found at the end of the replay file that I dumped for anyone that is interested. I've not been able to dump end game data other than the winner so far. If anyone else can figure out how to dump out data like cs/kd/gpm/xpm it'd be nice.

                                And a 25 something mb replay file when dumped will be like 125 mb so its a bit inconvenient imo, atleast for parsers that only want to get end game info.

                                Comment

                                Working...
                                X