Dota 2
251 ratings
Dota 2 Combat Log Parser Guide
By Cyborgmatt
This is a starter guide to the new combat log parsing feature in Dota 2.
   
Award
Favorite
Favorited
Unfavorite
Introduction
The combat log is a numerical record of all actions taken by players and units. After the Dota 2 Techies update the feature to write the combat log directly to a file is now possible providing for an effective way to parse the current game's live data.

Writing the combat log to a file is only available to spectators and broadcasters.

Commands
Setting The File

The first command you need to use is to set the filename to write to. This needs to set before initialising the write test.

  • dota_combatlog_file - A file you want to write combatlog events to as they happen.

For example: dota_combatlog_file "combatlog.txt"

This file will write to your root Dota directory which is "Steam\SteamApps\common\dota 2 test\dota" for the Dota 2 test client and "Steam\SteamApps\common\dota 2 beta\dota" for the main Dota 2 client.

Writing To The File

The file you define with the dota_combatlog_file command above will automatically start writing once you join a game as a spectator/broadcaster.

Extra Commands
  • dota_combatlog_write_test - Writes combatlog to disk if you have dota_combatlog_file set. (Useful for dumping an entire replay's combat log straight away)
  • dota_combatlog_size - Calculates the total allocations for a combatlog.
  • dota_combatlog_summary - Prints a summary of the combat log into your console.
Handling The Data
The data will be broke up into twelve different data types. You can see an example of these below.
Combat Log Data Types
  • 0: "DOTA_COMBATLOG_DAMAGE"
  • 1: "DOTA_COMBATLOG_HEAL"
  • 2: "DOTA_COMBATLOG_MODIFIER_ADD"
  • 3: "DOTA_COMBATLOG_MODIFIER_REMOVE"
  • 4: "DOTA_COMBATLOG_DEATH"
  • 5: "DOTA_COMBATLOG_ABILITY"
  • 6: "DOTA_COMBATLOG_ITEM"
  • 7: "DOTA_COMBATLOG_LOCATION"
  • 8: "DOTA_COMBATLOG_GOLD"
  • 9: "DOTA_COMBATLOG_GAME_STATE"
  • 10: "DOTA_COMBATLOG_XP"
  • 11: "DOTA_COMBATLOG_PURCHASE"
  • 12: "DOTA_COMBATLOG_BUYBACK"
Type 0
An example of type 0, damage:
{ type: 0 target: npc_dota_hero_vengefulspirit target_source: npc_dota_hero_juggernaut attacker_name: npc_dota_hero_juggernaut inflictor: juggernaut_omni_slash is_attacker_hero: 1 is_target_hero: 1 value: 129 timestamp: 1290.373 }
Breakdown Of The Example Data
  • type: 0 - This is the data type, see the list above.
  • target: npc_dota_hero_vengefulspirit - This is the targeted hero that will receive the damage.
  • target_source: npc_dota_hero_juggernaut - Source of the target's damage.
  • attacker_name: npc_dota_hero_juggernaut - Name of the attacking unit.
  • inflictor: juggernaut_omni_slash - The ability that is being used to apply the damage.
  • is_attacker_hero: 1 - Checking if the attacker is a hero.
  • is_target_hero: 1 - Checking if the target is a hero.
  • value: 129 - The amount of damage.
  • timestamp: 1290.373 - The timestamp in game of when this damage occurred (in seconds).
Known Issues
  • The type 7 data (DOTA_COMBATLOG_LOCATION) is currently not tracked in the combat log.
  • The type 11 data (DOTA_COMBATLOG_PURCHASE) is currently not tracked in the combat log.
110 Comments
andinua Nov 2, 2019 @ 6:50am 
Hi Matt, do you know if the "The type 11 data (DOTA_COMBATLOG_PURCHASE) is currently not tracked in the combat log" has been fixed in the meanwhile? Is it possible now to identify item purchases in the combatlog? Thanks.
Inno (Pat) Aug 19, 2017 @ 11:41am 
Anyone looking for this these days, the file is currently writing to this location:

SteamLibrary\steamapps\common\dota 2 beta\game\dota
Aphos Jan 8, 2016 @ 3:52pm 
Perfect
76561198135204472 Sep 27, 2014 @ 9:20pm 
SAD

Xabq Sep 11, 2014 @ 10:32pm 
хуй
WhiteZombie Sep 11, 2014 @ 2:31pm 
хуй
Губанов Prime Sep 10, 2014 @ 11:48pm 
хуй
пернатый чеченец Sep 10, 2014 @ 11:11pm 
хуй :d2invoker:
Vanchello Sep 10, 2014 @ 10:17pm 
хуй
76561198125915429 Sep 10, 2014 @ 9:52pm 
хйу