The developer console is a text window where you type commands and change settings that have no menu of their own. Hosts and server operators also use it to run their server.
Opening the console
Press F1 to open or close it. The key can be rebound as Open Console in Settings > Controls.
- Type a command and press Enter.
- Tab cycles through suggestions. Suggestions appear as you type, each with a short description.
- Up and Down step through commands you typed earlier this session.
clear_history forgets them, and clear empties the window.
- Separate words with spaces. Put text with spaces in double quotes, for example
bind k "say hi". Put several commands on one line with ; between them.
help lists every command. help <name> shows a command's arguments and current value, and stat <name> prints just the value.
Most variables are set by typing the name and a value, such as voice_mode 1. For on/off variables, 1 is on and 0 is off.
Who can use what
- Anyone can use the commands that only affect their own game.
- Operator commands (marked Op below) change the game for others or are cheats. You are an operator when you are playing offline or hosting the game yourself. On someone else's server you are an operator only if that server lists you as one.
- Server commands (the ones starting with
sv_, marked Server below) run on the server. Typed by the host or on a dedicated server they run directly; typed by a player on someone else's server they are sent to that server, which runs them only if the player is one of its operators.
General
| Command |
Arguments |
What it does
|
help |
[command] |
Lists every command, or describes one.
|
stat |
<variable> |
Prints a variable's current value.
|
quit |
|
Quits the game.
|
map |
<map> |
Starts an offline game on a map. It opens no network port.
|
die |
|
Kills your character. The normal respawn timer follows.
|
ragdoll |
|
Ragdolls your character.
|
thirdperson / firstperson |
|
Switches your camera to third or first person.
|
spectate |
<player id> |
Spectates a player by their id (see get_peers).
|
say |
<message> |
Sends a message to everyone in the match chat. No quotes needed.
|
notify_clear |
|
Dismisses every notification.
|
reset_settings |
|
Resets all your settings to the defaults.
|
inv_list |
|
Lists every item in the game and marks the ones you own.
|
inv_refresh |
|
Reloads your items from Steam.
|
perfmon |
|
Opens the performance monitor: players, memory, frame rate and network charts.
|
debug |
|
Shows debug information and your frame rate on the HUD.
|
Key binds
You can bind a key to a game action or to any console command.
| Command |
Arguments |
What it does
|
bind |
<key> <action or command> |
Binds a key, for example bind w forward or bind k "say hi". Keys can have modifiers (Shift+W, Ctrl+Alt+F1) and mouse buttons are mouse1, mwheelup and so on.
|
unbind |
<key> |
Removes a key's binding.
|
unbindall |
|
Removes all your bindings and restores the default keys.
|
binds |
|
Lists every bound key.
|
Video and view
| Variable |
Values |
Default |
What it does
|
viewmodel_fov |
field of view |
your setting |
The field of view your arms and weapon are drawn at, separate from the world's. Saved with your settings.
|
cl_drawviewmodel |
0 or 1 |
your setting |
0 hides your arms and weapon, for screenshots. Same as Draw Viewmodel in Settings. Saved.
|
cl_self_shadow |
0 or 1 |
your setting |
0 stops your own body casting a shadow in first person. Same as Own Shadow in Settings. Saved.
|
use_occlusion_culling |
0 or 1 |
your setting |
Turns occlusion culling on or off, on maps that support it.
|
set_lod |
number |
|
Sets how soon distant objects switch to their simpler versions.
|
cl_shadow_mode |
0, 1 or 2 |
the map's |
Sun shadow quality: 0 one pass, 1 two splits, 2 four splits. Lower is faster.
|
cl_shadow_distance |
meters |
the map's |
How far sun shadows reach.
|
cl_decal_spacing |
fraction |
0.2 |
How far apart bullet holes and scorch marks are kept, as a fraction of a mark's width.
|
cl_flame_lights |
count |
8 |
How many lights flamethrower flames can cast. 0 turns flame lighting off.
|
cl_full_length_tracers |
0 or 1 |
0 |
1 draws bullet tracers as a full line from muzzle to impact instead of a moving streak.
|
cl_garment_sim_distance |
meters |
20 |
How close to the camera worn cosmetics swing and sway. 0 turns it off.
|
show_weapon_ranges |
0 or 1 |
0 |
Shows rings for your weapon's ranges.
|
Chat
| Variable |
Values |
Default |
What it does
|
cl_chat_show_duration |
seconds |
5 |
How long chat stays on screen after a message arrives while the chat box is closed.
|
cl_chat_fade_duration |
seconds |
1 |
How long chat takes to fade out.
|
Voice chat
These match the options on Voice chat, plus a few more.
| Command or variable |
Values |
What it does
|
voice_enable |
0 or 1 |
Turns voice chat on or off.
|
voice_mode |
0 or 1 |
0 push to talk, 1 open mic.
|
voice_transmit |
0 or 1 |
Who hears you: 0 your team, 1 the whole match.
|
voice_listen |
<channel> <0 or 1> |
Joins or leaves a voice channel as a listener: 0 team, 1 match, 2 party.
|
voice_input_gain |
0.5 to 4 |
Boosts your microphone. Aim for an input level of about 0.1 to 0.3 in voice_stats while talking.
|
voice_auto_gain |
0 or 1 |
Levels your microphone's loudness automatically.
|
voice_denoise |
0 or 1 |
Noise suppression on your microphone.
|
voice_gate |
0 to 0.95 |
Mutes your microphone when it is not sure you are speaking. Cuts keyboard noise between sentences; lower it if your words get cut off. 0 is off.
|
voice_ducker |
0 to 1 |
Softens sharp keyboard clicks while you talk. 0 is off.
|
voice_loopback |
0 or 1 |
Plays your own voice back to you, to test your microphone. Works offline.
|
voice_mute / voice_unmute |
<name> |
Mutes or unmutes a player for this session.
|
voice_player_volume |
<name> <0 to 200> |
Sets a player's voice volume in percent for this session.
|
voice_stats |
|
Prints voice chat statistics.
|
Connection
See Netcode for what these mean.
| Command or variable |
Arguments |
What it does
|
cl_updaterate |
60, 30 or 20 |
The most updates a second you ask the server for. Lower it on a connection that cannot keep up with 60. The server also lowers it by itself when your connection struggles.
|
host_transport |
enet or steam |
How the next game you host accepts players: enet by direct address (playing over the internet needs port forwarding), or steam through Steam's relay network (no port forwarding; players join through the Server browser or your friends list). See Hosting a game.
|
connect_steam |
<server id> |
Joins a game hosted through Steam by its server id, which the host's console prints when it starts.
|
sdr_pops |
|
Lists Steam's relay locations, nearest first, with your ping to each. Ask again if it says the data is still being gathered.
|
sdr_force_cluster |
<code> or off |
Makes your connections use one relay location from sdr_pops (for example fra). Helps when you and the server are in the same region and Steam picked a relay outside it. Saved, and used from your next connection.
|
net_fakelag |
<ms> |
Op. Adds pretend latency to your own connection, for testing.
|
net_fakeloss |
0 to 100 |
Op. Drops this percentage of your packets, for testing.
|
net_fakejitter |
<ms> |
Op. Adds a random delay of up to this much to each packet, on top of net_fakelag.
|
get_peers |
|
Lists everyone connected to the server.
|
log_playerpeer_lists |
|
Prints which players are on which team.
|
log_playerpeer_pings |
|
Prints every player's ping.
|
debug_netlog |
0 or 1 |
On by default. Prints a short summary line about your connection.
|
Quickplay
| Command |
Arguments |
What it does
|
quickplay |
[maps] |
Starts a Quickplay search without the map picker. With no maps it plays any; with a comma-separated list (quickplay darkcove,soulhouse) only those.
|
quickplay_status |
|
Shows your queue state and position, your party and the maps on offer.
|
quickplay_cancel |
|
Leaves the queue.
|
Replays
| Variable |
Values |
Default |
What it does
|
replay_record |
0 or 1 |
|
Starts (1) or stops and saves (0) a recording, the same as F10. Only works when you are hosting.
|
replay_auto_record |
0 or 1 |
1 |
Records every game you host automatically. 0 leaves it to F10.
|
See Replays.
Cheats
All of these are Op: you can use them offline or on your own game, and on another server only as its operator.
| Command |
Arguments |
What it does
|
noclip |
|
Turns collision off for your character so you can fly through anything. Again to turn it back on.
|
host_timescale |
<scale> |
Speeds up or slows down time. 1 is normal.
|
cl_set_pos |
<x> <y> <z> |
Moves your character to a position.
|
cl_apply_impulse |
<x> <y> <z> |
Gives your character a push.
|
cl_set_speed |
<speed> |
Sets your movement speed.
|
cl_set_maxjumps |
<count> |
Sets how many jumps you can make in the air.
|
cl_set_scale |
0.1 to 10 |
Makes your character bigger or smaller, hitboxes included. 1 is normal. Everyone sees it.
|
Bots
Bot commands work on the game you are hosting. See Bots.
| Command or variable |
Arguments |
Default |
What it does
|
bot_add |
[count] [items] |
1 |
Adds bots. With no items, each bot gets a kit of its own. To choose, list item names by slot, separated by commas: primary, secondary, melee, accessory. Leave an entry empty to leave that slot empty. Names ignore case and spaces. Spec points are spread to pay for the items, and a set no class can pay for is refused. Examples: bot_add 3, bot_add 1 shotgun,,castironpan, bot_add 1 flamethrower,smg,castironpan,baubleofcondensedair.
|
list_bots |
|
|
Lists the bots with their ids and teams.
|
bot_kick |
<id> |
|
Removes one bot.
|
bot_kick_all |
|
|
Removes every bot.
|
bot_control |
[0 or 1] |
|
1 hands your own character to the bot AI and 0 takes it back. It keeps its team, loadout and score. With no argument, says which is on.
|
sv_bot_skill |
0 to 1, or -1 |
-1 |
Server. Every bot's skill, from 0 (easy) to 1 (expert); about 0.33 is normal and 0.67 hard. -1 uses the map's own setting.
|
sv_bot_reaction_scale |
0.25 to 4 |
1 |
Server. Multiplies how long bots take to react. Higher is slower.
|
sv_bot_aim_error_scale |
0 to 5 |
1 |
Server. Multiplies how far off bots aim. 0 is perfect aim.
|
Server
These are Server commands. Use them when hosting, on a dedicated server, or as an operator of someone else's server.
Running the match
| Command |
Arguments |
What it does
|
sv_start |
<port> <map> |
Starts a server on a port with a map.
|
sv_status |
|
Shows the map, the players and the server's settings.
|
sv_map |
<map> |
Changes map without dropping anyone. Everyone rejoins on the new map.
|
sv_endmatch |
[team] |
Ends the match with that team as the winner, then the results and the Map vote follow. 0 (the default) is a draw.
|
sv_kick |
<player id> |
Kicks a player.
|
sv_maxplayers |
[count] |
Shows or sets the most players allowed. 0 is unlimited.
|
Pausing
| Command |
Arguments |
What it does
|
sv_pause |
|
Pauses the match for everyone until sv_unpause.
|
sv_unpause |
|
Lifts every pause.
|
sv_pause_countdown |
[seconds] |
How long everyone sees a countdown before a paused match resumes. 0 resumes at once.
|
sv_captain |
<team> <Steam id> |
Names a team's captain, who may pause for the team.
|
sv_pause_team_limit |
[count] |
How many pauses each captain may call per match. -1 (the default) is unlimited, 0 none.
|
pause / unpause |
|
Used by a team captain: pauses the match for your team, or lifts your team's pause.
|
Rules
| Variable |
Values |
Default |
What it does
|
sv_regen_delay |
0 to 60 seconds |
3 |
How long a character must go without taking damage before Support regeneration starts. Any damage restarts the wait. See Classes#The spec triangle.
|
sv_sentry_range |
5 to 500 meters |
60 |
How far sentries built with the Struction Console see and shoot.
|
sv_max_rewind_ms |
0 to 1000 ms |
300 |
How far back the server will rewind to check a shot against what the shooter saw. See Netcode.
|
sv_snapshot_rate_auto |
0 or 1 |
1 |
1 lets the server lower a struggling player's update rate to 30 or 20 a second. 0 always sends what each player asks for.
|
Operators
Run on the server itself. An operator can use Op and Server commands from their own console while playing on it.
| Command |
Arguments |
What it does
|
op |
<Steam id> |
Makes a player an operator of this server. The list is kept between restarts.
|
unop |
<Steam id> |
Takes a player off the operator list.
|
ops |
|
Lists this server's operators.
|
reloadops |
|
Reloads the operator list after it was edited by hand.
|
See also