This document describes the format of the "gamecache" file found in DotAReplay directory. The file contains information on all replays viewed in the program, replays are also cached when the folder containing them is browsed in the program (and one of the advanced columns was chosen in settings) or "cache replays" button was pressed (the button is found at the bottom left of Settings). Each replay file is presented by a single item in the file, identified by replay path. If you want to track statistics, you might want to count replays with the same modification time as the same game. First, the kinds of values found in the file: Integer: 4 bytes, little endian format (the first byte is the least significant byte, like on most systems). Short: 2 bytes, little endian format Byte: 1 byte, 0-255 Int64: 8 bytes, little endian format String: null-terminated string Wide string: if the first byte is not equal to 1, then the string is a regular null-terminated string, 1 byte per character (and the first byte is a part of it). Otherwise this byte is followed by a null-terminated unicode string, 2 bytes per character. File header: [Integer] Program version (calculated as 200 * major + 2 * minor + build (1 if 'b')) [Integer] Number of items in the cache [Integer] Age of the next item that will be added to the cache (see age field in item format) Item format: [Integer] Item size in bytes (offset from the start of this item including this field to the start of the next item). This field is present but in most cases is incorrect before version 1.05 [Int64] Last modification date (timestamp). Use system function to convert time to int64. [Integer] Flags - which fields are present. It can be a combination of the following values: 0x00000004 Game name is present 0x00000010 Game ratio (number of players in each team) is present 0x00000020 Game length is present 0x00000040 Game mode is present 0x00000080 Player count is present 0x00000100 Map name is present 0x00000200 Warcraft version is present 0x00000400 Player names are present 0x00000800 Player heroes are present 0x00001000 Player stats are present 0x00002000 Player leave times are present 0x00004000 Player gold amounts (total price of all items) are present 0x00008000 Player hero levels are present 0x00010000 Player lanes are present 0x00020000 Player team numbers are present 0x00040000 Winning side is present 0x00080000 Player APMs (actions per minute) are present [Integer] Age - used to find the oldest item in the cache, which will be deleted when the cache is full (currently the maximum number of items in the cache is 2048) [String] Path to the replay file The following fields are present if the corresponding flag was set: [Wide string] Game name [String] Game ratio (e.g. "5v5") [Integer] Game length in milliseconds [String] Game mode (e.g. "-rdsp") [Byte] Number "n" of players for which information is present [Integer] Map version (2600 * major + 26 * minor + build (0 or 1, 2, ... for characters b, c, ...)) [Integer] Warcraft version (2600 + 26 * version) n*[String] Player names (if present), in no specific order (although is usually sorted by color) n*[Byte] Player heroes (if present), same order as names. Hero list is included later n*[4*Short] Player stats (if present), "n" times 4-integer structure. First integer is kills, second is deaths, then creeps and denies n*[Integer] Player leave times (if present), in milliseconds n*[Integer] Player gold amounts (if present) n*[Byte] Player levels (if present) n*[Byte] Player lanes (if present), 0 = roaming/jungle, 1 = top, 2 = mid, 3 = bot, 4 = afk? n*[Byte] Player teams (if present), 0 = sentinel, 1 = scourge n*[Short] Player APMs (if present) [Byte] Winning team (signed, -128..127): 0 = unknown, 1 = sentinel, 2 = scourge, -1 = sentinel (judging by chat), -2 = scourge (judging by chat), -3 = sentinel (judging by position), -4 = scourge (judging by position) HERO LIST: 0 - No Hero 1 - Vengeful Spirit 2 - Lord of Olympia 3 - Enchantress 4 - Morphling 5 - Crystal Maiden 6 - Rogue Knight 7 - Naga Siren 8 - Earthshaker 9 - Stealth Assasin 10 - Lone Druid 11 - Slayer 12 - Juggernaut 13 - Silencer 14 - Treant Protector 15 - Enigma 16 - Keeper of the Light 17 - Ursa Warrior 18 - Ogre Magi 19 - Tinker 20 - Prophet 21 - Phantom Lancer 22 - Stone Giant 23 - Goblin Techies 24 - Holy Knight 25 - Moon Rider 26 - Dwarven Sniper 27 - Troll Warlord 28 - Shadow Shaman 29 - Bristleback 30 - Pandaren Brewmaster 31 - Centaur Warchief 32 - Bounty Hunter 33 - Dragon Knight 34 - Anti-Mage 35 - Drow Ranger 36 - Omniknight 37 - Beastmaster 38 - Twin Head Dragon 39 - Alchemist 40 - Priestess of the Moon 41 - Storm Spirit 42 - Sacred Warrior 43 - Templar Assasin 44 - Faerie Dragon 45 - Soul Keeper 46 - Tormented Soul 47 - Lich 48 - Death Prophet 49 - Demon Witch 50 - Venomancer 51 - Magnataur 52 - Necro'lic 53 - Chaos Knight 54 - Lycanthrope 55 - Broodmother 56 - Phantom Assasin 57 - Gorgon 58 - Night Stalker 59 - Skeleton King 60 - Doom Bringer 61 - Nerubian Assasin 62 - Slithereen Guard 63 - Queen of Pain 64 - Bone Fletcher 65 - Faceless Void 66 - Netherdrake 67 - Lightning Revenant 68 - Lifestealer 69 - Oblivion 70 - Tidehunter 71 - Bane Elemental 72 - Necrolyte 73 - Butcher 74 - Spiritbreaker 75 - Nerubian Weaver 76 - Shadow Fiend 77 - Sand King 78 - Axe 79 - Bloodseeker 80 - Lord of Avernus 81 - Spectre 82 - Witch Doctor 83 - Obsidian Destroyer 84 - Warlock 85 - Geomancer 86 - Shadow Priest 87 - Pit Lord 88 - Undying 89 - Dark Seer 90 - Invoker