Page 19 of 19 FirstFirst ... 9 17 18 19
Results 181 to 182 of 182

Thread: Dota 2 Demo File Format

  1. #181
    Hi I'm trying to port demoinfo2 to linux and osx. After minor tweaking I have working executable, but when I try to parse demo file it complains "CDemoFile::Open: demofilestamp doesn't match."

    And indeed demo files I'm try to parse have different PROTODEMO_HEADER_ID, "PBDEMS2" not "PBDEMS" that original demoinfo2 expects(defined in demofile.h).

    I guess this has something to do with dota 2 migrating to source 2 engine? If that's the case where can I get the updated protobuf files to parse demo files from dota 2 reborn clients?

    I found several repositories in GitHub but would like to know if there is any "official" version of protobuf files 3rd party developers can use.

    Thanks
    Last edited by himynameis; 11-23-2016 at 02:07 AM.

  2. #182
    Basic Member
    Join Date
    Feb 2015
    Posts
    4
    Hi,

    It's been more than 3 years since the last reply. I'm currently writing my own Parser in Java, taking advantage of functional interfaces, hash maps, google protobuf library [1] and lombok [2] to read each demo command more quickly and transform them into another format (either XML or JSON). I don't use google's protobuf compiler (protoc) because I think it creates huge files, larger than necessary. I'll probably create a repository so that other developers can have a look.

    As a reference of each structure, I use SteamDatabase Protobufs [3] to create each necessary class to parse. I also got inspiration by other 3rd party projects (i.e. Dotabuff's Manta [4] and Skadistats' Clarity [5]). I'm basically done with all structures according to "demo.proto" and the parser can already read the complete file without any issues (so far).

    Now I reached a point where I'm stuck. The issue is the "data" format of following demo messages:

    * CDemoPacket
    * CDemoSaveGame
    * CDemoSendTables
    * CDemoCustomData
    * CDemoStringTables.items_t
    * CDemoUserCmd

    I got an idea by the other projects, but I'm lacking documentation about those messages, the meaning of their data and how to parse through it. Doesn't Valve have a parsing structure for Source 2 posted on one of there websites (like Valve Developer Community [6])? I'm looking for something documented within the past 2 years (not older).

    [1] https://github.com/protocolbuffers/p...ee/master/java
    [2] https://projectlombok.org/
    [3] https://github.com/SteamDatabase/Pro...e/master/dota2
    [4] https://github.com/dotabuff/manta
    [5] https://github.com/skadistats/clarity
    [6] https://developer.valvesoftware.com/wiki/Main_Page

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •