Skip to content

Custom game for dumping dota map entity coordinate data

Notifications You must be signed in to change notification settings

leamare/dota-map-coordinates

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dota-map-coordinates

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.

Usage

Step 1 Copy the latest map meta data

Run copymap.bat to get the latest dota map files. Also creates an empty mapdata.txt output file.

Step 2 Create the custom game

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.

docs_guide1.png

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.

Step 3 Process the data

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.

Additional scripts

  • process_mapdata.py - generates mapdata.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 as process_spawner.py, doesn't record any files
  • process_neutrals.py - same as neutrals part of process_mapdata.py, doesn't record any files

Output

JSON data

  • 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 by process_spawner.py.
  • path_corner.json - Lane routes. Generated by process_spawner.py.
  • spawnerdata.json
  • tools_no_wards.json - Zones which don't allow ward placement. Generated by process_data.py.

Images

The following images are created:

  • gridnav.png - Generated from gridnavdata.json.

gridnav.png

  • elevation.png - Generated from elevationdata.json.

elevation.png

  • tree_elevation.png - Generated from mapdata.json.

tree_elevation.png

  • ent_fow_blocker_node.png - Generated from text versions of map prefab files, dota_pvp_prefab.vmap and dota_custom_default_000.vmap.

ent_fow_blocker_node.png

  • map_data.png - All the above images stitched together horizontally into one image.

About

Custom game for dumping dota map entity coordinate data

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lua 58.9%
  • Python 33.8%
  • Yacc 3.2%
  • Batchfile 2.2%
  • Other 1.9%