Liquipedia Dota 2 needs more help, are you able to? You just have to register an account and then log in to edit our pages. If you have any questions you can join the #dota2 channel on Discord.

Console Commands

From Liquipedia Dota 2 Wiki
As you command it.

Console Commands are options accessible via the Developer Console. The dev console allows the user to create an advanced configuration of game settings, using options not listed within the game's settings menu.

Commands that are listed as cheats will not work within the normal game. Cheat commands will only work in custom lobbies with cheats enabled. For a list of cheats, see here.

How to use Console Commands[edit]

Commands may be typed directly in the developer console to activate the setting, however it is recommended to create an autoexec.cfg file. The file will automatically run the listed commands when a match starts so they will not have to be manually typed every time.

Steps to create an autoexec.cfg file:

  1. Create a text editable file using Notepad or similar software
  2. Type in the desired commands per line, including the desired values for variables
  3. Save as autoexec.cfg and make sure it is .cfg and not a .txt file or any other file extension
  4. Place the file in the \cfg folder found in your install directory, usually C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\game\dota\cfg

Proper Syntax[edit]

When writing a console command, it will normally consist of "blocks" separated by spaces.

Here is an example of a command with each block highlighted for visibility. Block 1 = blue, block 2 = red, and block 3 = green.

bind q "dota_ability_execute 0"

Any command with a third block must encase that block within quotation marks. Placing quotation marks around other blocks may cause errors in which the command will not work.
Code containing only two blocks does not require any quotations.

dota_minimap_ping_duration 8

For an advanced command using incrementvar the proper syntax is as follows:

bind c "incrementvar dota_player_units_auto_attack_mode 1 2 1"

The three numbers are min, max, and delta. In the example 1 2 1 the minimum value is 1, the maximum is 2, and the increment is 1. This effectively acts as a toggle, increasing the value by 1 to switch between 1 and 2.
If the values were 0 2 1 instead, it would toggle between three states with each press. Starting at 0, then increasing to 1, then 2, and then looping back to 0.
If the delta was set to 2 instead, 0 2 2, it would switch from 0 to 2 with each press because the delta would increase 0 by 2 to equal 2.

Adding // in front of a line of code will make the autoexec.cfg ignore that line for input. This allows you to write notes without causing errors.

// Auto attack toggle
bind c "incrementvar dota_player_units_auto_attack_mode 1 2 1"

List of useful Console Commands[edit]

Listed on this page are the most common and useful console commands for Dota 2. Irrelevant or unusable console commands are not listed.

Command Default Variables Details
cl_dota_alt_unit_movetodirection 0 0 = Disabled Alt + Right Click moves with pathfinding disabled. Movement stops on collision.
1 = Enabled
cl_showfps 0 0 = Disabled Displays the fps meter.
1 = Fps
2 = Smooth Fps
3 = Server MS
4 = Show FPS and Log to file
dota_camera_get_lookatpos Prints the camera's position.
dota_camera_set_lookatpos XY Coordinates Sets the camera's position to a pair of coordinates.
dota_disable_showcase_view_button 0 0 = Button enabled Disables the showcase view button, a small triangular symbol on the bottom left corner of the hero portrait.
1 = Button disabled
dota_health_per_vertical_marker 250 # = Health Amount Displays how much health is between each vertical line on health bars.
dota_player_units_auto_attack_mode 0 0 = Always Sets auto attack behavior.
1 = Standard
2 = Never
dota_minimap_disable_rightclick 0 0 = Minimap right click enabled Disables right clicking on the minimap.
1 = Minimap right click disabled
dota_minimap_hero_scalar 0 0 = Disabled Enables minimap hero icon scaling, which will make icons change size depending on the distance between them.
1 = Enabled
dota_minimap_hero_scalar_distance 12 # = Pixels Proximity in pixels to begin scaling.
dota_minimap_hero_scalar_minimum 500 # = Pixels Sets the minimum scale size.
dota_minimap_hero_spread 0 0 = Disabled Spread out hero icons when close together.
1 = Enabled
dota_minimap_hero_spread_distance 2 # = Pixels Distance at which to spread icons.
dota_minimap_ping_duration 3 # = Seconds Makes pings last longer on the minimap before disappearing.
dota_player_smart_multiunit_cast 0 0 = Disabled When multiple identical units are selected, you may cast identical spells from the units without having to directly select each individual.
This command is useful when playing Meepo because it allows an easier way to cast Earthbind.
1 = Enabled
dota_topbar_buyback_time 10 # = Seconds Duration of top bar indicator after buyback is used.
dota_sf_game_end_delay 10 # = Seconds Ending scoreboard popup delay.
fps_max 120 # = Frames Per Second Sets the frame rate limit.
retry Attempts to reconnect to the last server you were connected to.
disconnect Disconnects from the server you were connected to.
incrementvar Used to increment variables. Requires a minimum, maximum, and increment value.

See also[edit]