Console
From Liquipedia Dota 2 Wiki
The console is a command line user interface that allows the user to modify, customize or interact with Dota 2 using lines of text (commands), as well as view anything the game prints into the console (i.e. error messages or other warning messages, current state of the game, loading results, etc.). It is hidden from players by default, but can be activated in the Steam Launch Options.
When enabled, the hotkey can be used to toggle the console, which appears as a separate window within the game that can be moved around and resized.
Access
[edit]The console can be enabled within the game options, under advanced options in the "game" section.
Alternatively, the console can be enabled the following way in any game created by Valve:
- Open the Steam client
- Navigate to Library tab
- Right click Dota 2
- Select Properties
- Navigate to General tab
- Click Set Launch Options...
- Enter -console in the text field
- Run Dota 2
- Hit the console hotkey (Default is \)
Using the console
[edit]The console can be used to view any message the game prints out. Usually, these messages are loading-success messages and error messages. When creating custom games, print functions used in any custom script will print their message here.
Besides this, the console can also be used to enter console commands, which are various strings that allow the user to interact with the game beyond of what the settings, the UI, or the buttons within an active match allow. However, note that a lot of these commands are considered Cheats and will not work on public servers; They can only be used on local private servers that specifially have cheats enabled. Console command actions include, but are not limited to:
- Access advanced game settings that are not listed in the settings menu.
- Dumb specific kind of data into the console (i.e. list of active particle effects).
- Toggle specific values to be displayed on the screen (i.e. FPS).
- Manipulate the game state, game mechanics, and units, though these type of commands are completely restricted in public lobbies.
A of all console commands can be found here.
autoexec file
[edit]A lot of edits done with console commands will not get saved, and get reset once the game is launched again. In order to save these settings, an autoexec.cfg can be created.
Steps to create an autoexec.cfg file:
- Create a text editable file using Notepad or similar software
- Type in the desired commands per line, including the desired values for variables
- Save as
autoexec.cfgand make sure the file ending is.cfgand not.txtor any other file extension - Place the file in the game's install directory, under
...\Steam\steamapps\common\dota 2 beta\game\dota\cfg
Once done, these commands will then automatically be executed whenever the game is launched.
Notes can be added to the cfg file as well. Starting a line with // causes that line to be ignored, allowing the user to add some structure to the cfg file.
Useful Console Commands
[edit]Main Article: List of Console Commands
A short list of usefull commands that are used commonly.
| 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. |