# Dota 2 Maps

There are no official tools to create Dota 2 maps, although the community has hacked together a number of tools to compile Dota 2 maps that work.

## Contents

### Configuring Alien Swarm SDK

Follow Steps 1 through 6 in Cyborgmatt's Model Viewer Guide

Go to SteamApps\Common\alien swarm\swarm\ and edit the gameinfo.txt. Add the game content you extracted to the search path (similar to step 6 in cyborgmatt's tutorial).

### Configuring Hammer

To properly build a Dota 2 map, you need the following tools:

Download both of these and extract them into the bin folder from above.

Open Hammer, and select Tools -> Options...

Remove the AlienSwarm .fgd file and add the dota 2 fgd from above.

Create a new map. Select 'Run Map'. Hit 'Expert'. Create a new config 'Dota 2'. For the first command, we want to run BSP, so hit New, then 'cmds' and select 'BSP Program' and copy the BSP parameter line from default. Second command we want to run is 'UpVersion', so hit new 'New' then 'Cmds'. Select 'Executable' and find 'UpVersion.exe' in the directory you put it. Add '$path\$file.bsp' to the parameters. Finally, we want to copy the final .bsp file to the dota 2 maps directory, so hit New, then in Cmds select 'Copy File'. The params are '$path\$file.bsp "path\to\dota2\maps"'

### Mapping notes

• Maps are a much larger scale in Dota 2 than they are in other Source games. Units are around 48 units wide, towers are 128x128x320 units tall.
• If an entity is outside the bounds of the map, it crashes the game with no error.
• AlienSwarm converts all brushwork into func_detail, so you need to seal the map with a func_brush named structure_seal. The brush should be textured nodraw.
• Required entities include: info_player_start_goodguys, info_player_start_badguys, ent_dota_game_events, env_global_light.
• Models require a shader that is not provided in Hammer. In your extracted gamedata, open every .vtf file and replace "GlobalLitSimple" with "VertexLitGeneric". A tool such as Notepad++ can do this quickly.

### Building the NavMesh

Required Tool: GNVTool 1.1 by Penguinwizzard

This tool converts netpbm formats to valve's GNV format. It also converts GNV to pbm files.

netpbms are 1 bit bimap files. The size of your bitmap must be your world size divided by 64. The bitmap deminsions must be divideable by 8 or the navmesh will be sheared. . Dota 2 uses white for walkable, and black for not walkable

Usage: 'GNVtool.exe tognv source.pbm target.gnv offsetx offsety'

Offsetx|y are always negative and 1/2 the demensions of your bitmap.

You can view your navmesh in game by doing 'dota_gridnav_show 1'

### Making a Minimap

Minimaps require a few files in a few places.

You will need VTFEdit to convert an image into a .vtf file

First is the overview screenshot. This can be created in a number of ways (Valve paints theirs, other people have taken screenshots). Once a suitable image is found, Open VTFEdit, select Import, find your image, and save it as MAPNAME.vtf. Also, go to 'Tools' and click 'Create VMT'. In the Options tab, for shader, select UnlitGeneric and check the boxes 'Translucent' and 'Vertex Alpha'. Save it as MAPNAME.vmt.

Put both of these files in a folder named materials/overviews in your dota (or addon) directory.

Next, create a new textfile named MAPNAME.txt. This is a Key Value file denoting where the bounds of the minimap lie. The structure is as follows:

MAPNAME // Change this key to your map's name
{
material "overviews/MAPNAME" //path to the VTF and VMT above.  Note that the file extension is missing here

//Coordinates to the upper left corner of your map
pos_y 2560
pos_x -2560

scale 5.000 //Minimap scale.  Smaller the map, smaller the number.
rotate 0 //Minimap rotation.  This should always be 0.
zoom 1.0000 //Minimap zoom.  This should always be 1 unless your texture is larger than the playable bounds of your map.
}