Custom game for dumping map entity coordinate data to JSON and scripts for generating elevation and vision related images. See dota vision simulation and dota interactive map for an application of the data.
Run copymap.bat
to get the latest dota map files. Also creates an empty mapdata.txt output file.
Copy both folders dota-map-coordinates/content/
and dota-map-coordinates/game/
to <your_dota2_directory>/steamapps/common/dota 2 beta/
Launch the custom game in Workshop Tools (Right click the Dota 2 Icon and Choose Launch Dota2 - Tools
. Workshop Tools needs to already be installed). You will see a new custom game named dota-map-coordinates
. Select it and launch the game.
Open your console, enter dota_launch_custom_game dota-map-coordinates dota
, and wait for the to game start. Select a hero and enter the game.
Switch your console to VScript mode.
Once the game has loaded completely, data for the following files will be recorded to VConsole:
-
mapdata.json
- Coordinates of all buildings, trees, shops, etc. -
worlddata.json
- Map dimensions. -
gridnavdata.json
- Coordinates of all untraversable 64x64 grid tiles. -
elevationdata.json
- Elevations of each 64x64 grid tile.
Record the VConsole output to data/map_data.log
and run python process_console.py
to generate files from the console output.
Run copydata.bat
to copy the generated files from the dota directory to the data folder in the repository directory.
Run textvmap.bat
to generate the vmap.txt files using dmxconvert. Text vmaps can also be created by opening the prefab files in Hammer and doing Save Copy As Text.
Run process_console.py
to create json files from VConsole output.
Run process_data.py
to generate json and images based on the data. (Only supports python 2.7
and some requirements need to be installed):
pip install pillow
pip install matplotlib
The process_data.py
script also generates tools_no_wards.json
from vmap data.
process_mapdata.py
- generatesmapdata.json
(in the root folder), moving unit stats to "stats" object and addin extra data, e.g. landmarks, neutral camps or second Roshan spawn point.process_lanes.py
- same asprocess_spawner.py
, doesn't record any filesprocess_neutrals.py
- same as neutrals part ofprocess_mapdata.py
, doesn't record any files
mapdata.json
- Coordinates of all buildings, trees, shops, etc. Created from VConsole.worlddata.json
- Map dimensions. Preset in the custom game code, created from VConsole.gridnavdata.json
- Coordinates of all untraversable 64x64 grid tiles. Created from VConsole.elevationdata.json
- Elevations of each 64x64 grid tile. Created from VConsole.lanedata.json
npc_dota_spawner.json
- Lane spawners data. Generated byprocess_spawner.py
.path_corner.json
- Lane routes. Generated byprocess_spawner.py
.spawnerdata.json
tools_no_wards.json
- Zones which don't allow ward placement. Generated byprocess_data.py
.
The following images are created:
gridnav.png
- Generated from gridnavdata.json.
elevation.png
- Generated from elevationdata.json.
tree_elevation.png
- Generated from mapdata.json.
ent_fow_blocker_node.png
- Generated from text versions of map prefab files, dota_pvp_prefab.vmap and dota_custom_default_000.vmap.
map_data.png
- All the above images stitched together horizontally into one image.