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

  • #46
    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.
    Thanks a lot for this! I've been working on my own a bit (https://github.com/veryhappythings/pydota2demo) but you've nailed it. Great work!

    Comment


    • #47
      I can definitely see this being useful for statisticians or economists like myself. The only problem I see is that the output is directly in console. I wish there was a readable text file that it would print off too, and I'm not talking about that > name.txt extension that trashes the disk IO.
      Last edited by Rosenzweig; 04-27-2012, 01:59 PM.

      Comment


      • #48
        Originally posted by Rosenzweig View Post
        I can definitely see this being useful for statisticians or economists like myself. The only problem I see is that the output is directly in console. I wish there was a readable text file that it would print off too, and I'm not taling about that > name.txt extension that trashes the disk IO.
        This should do what you're asking:

        Originally posted by Drkirby View Post
        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


        • #49
          Originally posted by snevets View Post
          This should do what you're asking:
          That's 100 megabytes of BLAH and I guess that's okay, but eh.

          Comment


          • #50
            Originally posted by Rosenzweig View Post
            That's 100 megabytes of BLAH and I guess that's okay, but eh.
            Well I think once it's figured out what exact pieces are useful, we'll be able to only output those selected sections, but until then I think that's all we have.

            Comment


            • #51
              Originally posted by snevets View Post
              Well I think once it's figured out what exact pieces are useful, we'll be able to only output those selected sections, but until then I think that's all we have.
              Yeah, but it's still yucky. However, this is a strong step towards the right direction for Valve. Open source software that helps third parties do work involved in Valve's games.

              Comment


              • #52
                Only thing I made out last night looking though the files was how the combat log messages are stored, and where they kept the info for what the IDs represent.

                For example, here is how the combat log messages looks:
                Code:
                ---- CDOTAUserMsg_ParticleManager (4 bytes) -----------------
                type: DOTA_PARTICLE_MANAGER_EVENT_RELEASE
                index: 25
                dota_combatlog eventid:168 
                 type: 0 
                 sourcename: 6 
                 targetname: 9 
                 attackername: 6 
                 inflictorname: 0 
                 attackerillusion: 0 
                 targetillusion: 0 
                 value: 45 
                 health: 608 
                 timestamp: 249.524338
                And here is where it lists what the IDs for things like "targetname" mean:
                Code:
                #2 CombatLogNames flags:0x1 (109 Items) 3239 bytes
                    #0 'dota_unknown' (0 bytes)
                    #1 'npc_dota_creep_badguys_melee' (0 bytes)
                    #2 'npc_dota_hero_viper' (0 bytes)
                    #3 'npc_dota_creep_goodguys_melee' (0 bytes)
                    #4 'npc_dota_hero_ancient_apparition' (0 bytes)
                    #5 'npc_dota_hero_bounty_hunter' (0 bytes)
                    #6 'npc_dota_hero_drow_ranger' (0 bytes)
                    #7 'npc_dota_hero_huskar' (0 bytes)
                    #8 'npc_dota_creep_goodguys_ranged' (0 bytes)
                    #9 'npc_dota_hero_sven' (0 bytes)
                    #10 'npc_dota_hero_dazzle' (0 bytes)
                    #11 'modifier_bounty_hunter_jinada_slow' (0 bytes)
                    #12 'modifier_drow_ranger_frost_arrows_slow' (0 bytes)
                    #13 'npc_dota_creep_badguys_ranged' (0 bytes)
                    #14 'npc_dota_hero_leshrac' (0 bytes)
                    #15 'sven_storm_bolt' (0 bytes)
                    #16 'modifier_stunned' (0 bytes)
                    #17 'npc_dota_hero_sniper' (0 bytes)
                    #18 'npc_dota_hero_sand_king' (0 bytes)
                    #19 'leshrac_split_earth' (0 bytes)
                    #20 'modifier_tango_heal' (0 bytes)
                    #21 'huskar_burning_spear' (0 bytes)
                    #22 'modifier_huskar_burning_spear_debuff' (0 bytes)
                    #23 'modifier_drow_ranger_trueshot' (0 bytes)
                    #24 'dazzle_shadow_wave' (0 bytes)
                    #25 'npc_dota_neutral_mud_golem' (0 bytes)
                    #26 'leshrac_lightning_storm' (0 bytes)
                    #27 'modifier_viper_poison_attack_slow' (0 bytes)
                    #28 'viper_poison_attack' (0 bytes)
                    #29 'modifier_cold_feet' (0 bytes)
                    #30 'ancient_apparition_cold_feet' (0 bytes)
                    #31 'modifier_ancientapparition_coldfeet_freeze' (0 bytes)
                    #32 'modifier_sandking_impale' (0 bytes)
                    #33 'sandking_burrowstrike' (0 bytes)
                    #34 'modifier_sven_warcry' (0 bytes)
                    #35 'modifier_flask_healing' (0 bytes)
                    #36 'modifier_ice_vortex' (0 bytes)
                    #37 'modifier_clarity_potion' (0 bytes)
                    #38 'leshrac_diabolic_edict' (0 bytes)
                    #39 'modifier_leshrac_diabolic_edict' (0 bytes)
                    #40 'npc_dota_goodguys_tower1_top' (0 bytes)
                    #41 'npc_dota_neutral_polar_furbolg_ursa_warrior' (0 bytes)
                    #42 'npc_dota_neutral_polar_furbolg_champion' (0 bytes)
                    #43 'npc_dota_neutral_centaur_outrunner' (0 bytes)
                    #44 'npc_dota_badguys_siege' (0 bytes)
                    #45 'npc_dota_neutral_centaur_khan' (0 bytes)
                    #46 'centaur_khan_war_stomp' (0 bytes)
                    #47 'npc_dota_goodguys_siege' (0 bytes)
                    #48 'modifier_bounty_hunter_wind_walk' (0 bytes)
                    #49 'modifier_sand_king_caustic_finale_orb' (0 bytes)
                    #50 'bounty_hunter_wind_walk' (0 bytes)
                    #51 'sven_great_cleave' (0 bytes)
                    #52 'npc_dota_badguys_tower1_bot' (0 bytes)
                    #53 'bounty_hunter_shuriken_toss' (0 bytes)
                    #54 'sandking_caustic_finale' (0 bytes)
                    #55 'modifier_teleporting' (0 bytes)
                    #56 'npc_dota_neutral_giant_wolf' (0 bytes)
                    #57 'modifier_dazzle_shallow_grave' (0 bytes)
                    #58 'npc_dota_neutral_alpha_wolf' (0 bytes)
                    #59 'modifier_item_soul_ring_buff' (0 bytes)
                    #60 'item_magic_stick' (0 bytes)
                    #61 'modifier_rune_doubledamage' (0 bytes)
                    #62 'huskar_life_break' (0 bytes)
                    #63 'modifier_huskar_life_break_slow' (0 bytes)
                    #64 'modifier_dazzle_weave_armor' (0 bytes)
                    #65 'modifier_viper_viper_strike_slow' (0 bytes)
                    #66 'viper_viper_strike' (0 bytes)
                    #67 'npc_dota_badguys_tower1_top' (0 bytes)
                    #68 'modifier_bounty_hunter_track_effect' (0 bytes)
                    #69 'modifier_bounty_hunter_track' (0 bytes)
                    #70 'modifier_sand_king_epicenter' (0 bytes)
                    #71 'sandking_epicenter' (0 bytes)
                    #72 'modifier_sand_king_epicenter_slow' (0 bytes)
                    #73 'npc_dota_neutral_satyr_trickster' (0 bytes)
                    #74 'npc_dota_neutral_satyr_hellcaller' (0 bytes)
                    #75 'npc_dota_neutral_satyr_soulstealer' (0 bytes)
                    #76 'npc_dota_goodguys_tower1_mid' (0 bytes)
                    #77 'item_lifesteal' (0 bytes)
                    #78 'modifier_ice_blast' (0 bytes)
                    #79 'ancient_apparition_ice_blast' (0 bytes)
                    #80 'modifier_item_urn_heal' (0 bytes)
                    #81 'item_urn_of_shadows' (0 bytes)
                    #82 'modifier_rune_invis' (0 bytes)
                    #83 'npc_dota_badguys_tower2_bot' (0 bytes)
                    #84 'modifier_item_medallion_of_courage_armor_reduction' (0 bytes)
                    #85 'modifier_rune_haste' (0 bytes)
                    #86 'modifier_huskar_inner_vitality' (0 bytes)
                    #87 'modifier_viper_corrosive_skin_slow' (0 bytes)
                    #88 'viper_corrosive_skin' (0 bytes)
                    #89 'modifier_dazzle_poison_touch' (0 bytes)
                    #90 'modifier_illusion' (0 bytes)
                    #91 'modifier_invulnerable' (0 bytes)
                    #92 'item_magic_wand' (0 bytes)
                    #93 'npc_dota_badguys_tower2_top' (0 bytes)
                    #94 'npc_dota_badguys_tower3_bot' (0 bytes)
                    #95 'modifier_sandking_sand_storm' (0 bytes)
                    #96 'modifier_sandking_sand_storm_invis' (0 bytes)
                    #97 'sandking_sand_storm' (0 bytes)
                    #98 'item_helm_of_the_dominator' (0 bytes)
                    #99 'npc_dota_badguys_range_rax_bot' (0 bytes)
                    #100 'npc_dota_badguys_melee_rax_bot' (0 bytes)
                    #101 'npc_dota_badguys_tower1_mid' (0 bytes)
                    #102 'npc_dota_badguys_fillers' (0 bytes)
                    #103 'npc_dota_badguys_tower4' (0 bytes)
                    #104 'npc_dota_badguys_tower3_top' (0 bytes)
                    #105 'npc_dota_badguys_fort' (0 bytes)
                    #106 'modifier_cyclone' (0 bytes)
                    #107 'npc_dota_creep_goodguys_ranged_upgraded' (0 bytes)
                    #108 'modifier_knockback' (0 bytes)
                With this kind of stuff, you should be able to do things like find out how many times a skill is used, and maybe make some fun things which spells get used the most for each part of the game.


                Next thing I want to figure out is how the info for items bought is stored, since I think that would be really cool info to get access too, you could analyze the data in a large number of ways. I really want to be able to find out where the location for placed Wards is kept, so a heatmap could be made.

                Comment


                • #53
                  I started a thread here:

                  http://dev.dota2.com/showthread.php?t=32968

                  to talk about the specifics of parsing out useful information and talked about the stuff you posted there ^^ if you want to add it to that thread as well.

                  Comment


                  • #54
                    Am I missing something, or are none of the EDotaUserMessages ever printed?

                    Code:
                    DOTA_UM_AddUnitToSelection = 		   64;
                    	DOTA_UM_AIDebugLine =				   65;
                    	DOTA_UM_ChatEvent =  				   66;
                    	DOTA_UM_CombatHeroPositions =		   67;
                    	DOTA_UM_CombatLogData =  			   68;
                    	DOTA_UM_CombatLogShowDeath = 		   70;
                    	DOTA_UM_CreateLinearProjectile =	   71;
                    	DOTA_UM_DestroyLinearProjectile =	   72;
                    	DOTA_UM_DodgeTrackingProjectiles =	   73;
                    	DOTA_UM_GlobalLightColor =   		   74;
                    	DOTA_UM_GlobalLightDirection =   	   75;
                    	DOTA_UM_InvalidCommand = 			   76;
                    	DOTA_UM_LocationPing =   			   77;
                    	DOTA_UM_MapLine =					   78;
                    	DOTA_UM_MiniKillCamInfo =			   79;
                    	DOTA_UM_MinimapDebugPoint =  		   80;
                    	DOTA_UM_MinimapEvent =   			   81;
                    	DOTA_UM_NevermoreRequiem =   		   82;
                    	DOTA_UM_OverheadEvent =  			   83;
                    	DOTA_UM_SetNextAutobuyItem = 		   84;
                    	DOTA_UM_SharedCooldown = 			   85;
                    	DOTA_UM_SpectatorPlayerClick =   	   86;
                    	DOTA_UM_TutorialTipInfo =			   87;
                    	DOTA_UM_UnitEvent =  				   88;
                    	DOTA_UM_ParticleManager	= 			   89;
                    	DOTA_UM_BotChat =				   	   90;
                    	DOTA_UM_HudError = 					   91;
                    	DOTA_UM_ItemPurchased =				   92;
                    	DOTA_UM_Ping =						   93;
                    	DOTA_UM_ItemFound =					   94;

                    Comment


                    • #55
                      They all definitely aren't, but here is an example of one:

                      Code:
                      ---- CDOTAUserMsg_SpectatorPlayerClick (6 bytes) -----------------
                      entindex: 2
                      order_type: 1
                      target_index: 0
                      I also sent you a PM

                      Edit: Oh you said EDota ... It doesn't appear so.

                      Comment


                      • #56
                        I suggest those who are working on something and would like to collaborate with others (or just share the knowledge), gather in an irc channel?

                        #dota2replay @ Quakenet is waiting for you!

                        Comment


                        • #57
                          I joined.

                          Comment


                          • #58
                            interesting, I'll study how data is compiled so I can filter out the data from the 100mb output per game
                            I hate people that put their Rig specs in the signature. This is not overclock.net!
                            CPU: AMD Trainwrecker AM5+ 12150 hexacontatetra-core 1.65 Thz | RAM: Corsair Revenge 4TB DDR6 (0.24-0.24-0.36) | GPU: Sapphire 9990 128GB GDDR9 Hexa-Fired (0.65/0.95/1.1Thz) | Resolution: @ 20480x12800
                            Connection: - Telus: (70MB/10MB)
                            All Specs shown in the signature are fictitious, any resemblance to real hardware, current or obsolete, is purely coincidental

                            Comment


                            • #59
                              Replay parser for linux

                              First post and first contrib:

                              https://github.com/mvalviar/demoinfo2-lin

                              Enjoy.

                              Comment


                              • #60
                                Hey I'm trying to follow the steps on the page valve put up to build the demo info tool but its giving me errors for snappy. It says error C1083: cannot open snappy.h/snappy.cc no such file. I downloaded the snappy.tar and extracted it into the snappy folder as the page said, what could be the issue? Thanks.

                                Comment

                                Working...
                                X