Difference between revisions of "List of useful console commands"
(Undo edit by Breakin' Benny (Talk) (642554) This does not belong) |
m (Added missing space) |
||
(192 intermediate revisions by 97 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{update|Update sv_cheats/server operator requirements, new commands, outdated commands}} | ||
+ | |||
[[File:Developer Console.png|thumb|400px|right|A screen of the Developer Console found in ''Team Fortress 2'']] | [[File:Developer Console.png|thumb|400px|right|A screen of the Developer Console found in ''Team Fortress 2'']] | ||
− | Using the [ | + | This article has a '''list of console commands''' below. Using the [[vdc:Developer Console|Developer Console]], you can turn specific gameplay and graphic settings on or off, or modify their values. The console can be enabled from the advanced menu in [[Options#Options|options]] or via '''Set launch options'''. Any command put in the autoexec.cfg file will automatically be loaded on game launch. |
These settings can also be put into the class-specific .cfg files in your ''[[Team Fortress 2]]'' folder in order to create class-specific configurations. | These settings can also be put into the class-specific .cfg files in your ''[[Team Fortress 2]]'' folder in order to create class-specific configurations. | ||
+ | |||
+ | For a complete list of Team Fortress 2 console commands and variables, see the [[vdc:List of Team Fortress 2 console commands and variables|Valve Developer Wiki]]. | ||
+ | |||
+ | For more console commands, see [[Cheats]]. | ||
+ | |||
+ | <!-- | ||
+ | Formatting note: | ||
+ | |||
+ | CVars should be added using the cvar template. | ||
+ | > Add parameters in '<>' | ||
+ | >> use slashes ("/") if there are 3 or less parameters or the parameters are non-numerical | ||
+ | >>> Example: cl_showfps <0/1/2> | ||
+ | >> use dashes ("-") if there are more than 3 numerical values | ||
+ | >>> Example: tf_dingaling_pitchmaxdmg <0-255> | ||
+ | >> use tildes ("~") if parameters use decimals | ||
+ | >>> Example: hud_combattext_batching_window <.1~2> | ||
+ | >> use <seconds>, <minutes>, <text>, and <number> where applicable | ||
+ | > Describe the cvar | ||
+ | > Give the default value, if known. | ||
+ | --> | ||
== List of useful console commands == | == List of useful console commands == | ||
+ | === cl_ commands === | ||
+ | * {{cvar|cl_ask_blacklist_opt_out}} <0/1> - Turns question whether to blacklist a server after leaving after a short amount of time off/on (Default: 0) | ||
+ | * {{cvar|cl_ask_favorite_opt_out}} <0/1> - Turns question whether to favorite a server after leaving after a longer amount of time off/on (Default: 0) | ||
+ | * {{cvar|cl_autoreload}} <0/1> - Turns automatic reloading off/on (can also be changed from advanced [[Options]]) | ||
+ | * {{cvar|cl_autorezoom}} <0/1> - Turns [[Sniper Rifle]] re-zoom off/on (can also be changed from advanced Options) (Default: 0) | ||
+ | * {{cvar|cl_cmdrate}} <30-66> - Max number of command packets sent to server per second (Default: 30) | ||
+ | * {{cvar|cl_burninggibs}} <0/1> - Turns burning [[gibs]] off/on (Default: 0) | ||
+ | * {{cvar|cl_cloud_settings}} <0/1> - Turns syncing of config files with the Steam cloud off/on (Default:1) | ||
+ | * {{cvar|cl_crosshair_file}} <filename> - Sets crosshair picture. "" is standard-crosshairs. example: "crosshair1" (can also be changed from [[Multiplayer options]]) (Default: "") | ||
+ | * {{cvar|cl_drawhud}} <0/1> - Hides/shows the HUD - ''{{cvar|sv_cheats 1}} required'' (Default: 1) | ||
+ | * {{cvar|cl_first_person_uses_world_model}} <0/1> - Sets full-body awareness mode off/on (for use with VR headsets) (Default: 0) | ||
+ | * {{cvar|cl_flipviewmodels}} <0/1> - Sets viewmodels normal/inverted(left-handed) - ''does not work while connected to a server'' (can also be changed from [[advanced options]]) (Default: 0) | ||
+ | * {{cvar|cl_hud_playerclass_use_playermodel}} <0/1> - Sets whether or not the player's model is used on the HUD (Default: 1) | ||
+ | * {{cvar|cl_interp}} <0.015-0.5> - Sets how far character models are interpolated (drawn away from their actual position) in the world, a good standard value for hitscan weapons is 0.0303, while for projectiles/flames 0.0152 is good (Default: 0.1) | ||
+ | * {{cvar|cl_interp_ratio}} <1-2> - This will determine the set interp with dividing your cl_updaterate based on what you set, 1 for projectiles, then 2 for hitscan weapons (Default: 2) | ||
+ | * {{cvar|cl_mvm_wave_status_visible_during_wave}} <0/1> - Turns HUD display always showing the robots left in a [[Mann vs. Machine (game mode)|Mann vs Machine]] wave off/on. | ||
+ | * {{cvar|cl_new_impact_effects}} <0/1> - Turns new, better looking impact effects off/on, most noticeable on glass (Default: 1) | ||
+ | * {{cvar|cl_ragdoll_collide}} <0/1> - Turns ragdoll collisions on/off (client-side only) | ||
+ | * {{cvar|cl_ragdoll_fade_time}} <seconds> - Sets time until ragdolls disappear (client-side only), default is 15 seconds | ||
+ | * {{cvar|cl_ragdoll_physics_enable}} <0/1> - Determines whether bullets, explosives, and attacks will interact with ragdolls (Default: 1) | ||
+ | * {{cvar|cl_showbackpackrarities}} <0/1> - Turns color-coded items in trade off/on | ||
+ | * {{cvar|cl_showfps}} <0/1/2> - Shows framerate (off/real-time/rounded) | ||
+ | * {{cvar|cl_showpos}} <0/1> - Shows the map coordinates and movement speed of the player | ||
+ | * {{cvar|cl_spec_carrieditems}} <0/1> - Shows non-standard items being carried by player you're spectating | ||
+ | * {{cvar|cl_smooth}} <0/1> - Smoother view/eye origin after prediction errors (Default: 1) | ||
+ | * {{cvar|cl_smoothtime}} <0.01-2> - Smooth client's view after prediction error over this many seconds (Default: 0.1) | ||
+ | * {{cvar|cl_updaterate}} <20-66> - Number of packets per second of updates you are requesting from the server (Default: 20) | ||
+ | * {{cvar|cl_yawspeed}} <number> - Sets the speed at which your character turns when using the {{cvar|+left}} and {{cvar|+right}} commands | ||
+ | |||
+ | === addcond commands === | ||
+ | {{main|Addcond}} | ||
+ | {{Note|{{cvar|sv_cheats 1}} required}} | ||
+ | * {{cvar|addcond 5}} - Gives the player a ÜberCharge effect that can be removed if healed by Dispenser, Medic or being killed | ||
+ | * {{cvar|addcond 11}} - Gives the player a critical effect that can be removed if healed by Dispenser, Medic or being killed | ||
+ | * {{cvar|addcond 19}} - Gives the player the Mini-Crit effect | ||
+ | * {{cvar|addcond 52}} - Gives the player permanent ÜberCharge effect. | ||
+ | * {{cvar|addcond 55}} - Gives the player the [[Amputator]] taunt effect. Affects nearby allies. | ||
+ | * {{cvar|addcond 56}} - Gives the player a critical effect that will <em>not</em> be removed unless killed or via removecond | ||
+ | * {{cvar|addcond 57}} - Gives the player a ÜberCharge effect that will <em>not</em> be removed unless killed or via removecond | ||
+ | * {{cvar|addcond 58}} - Gives the player the Vaccinator ÜberCharge effect that will be removed when killed or via removecond | ||
+ | * {{cvar|addcond 64}} - Player will Cloak immediately regardless of class. Used for the Invisibility Magic spell. | ||
+ | * {{cvar|addcond 66}} - Bots will ignore the player even if the player bumps into a bot when disguised or cloaked | ||
+ | * {{cvar|addcond 72}} - Gives the player an effect that enhance their reload speed, firing speed, movement speed and grants infinite double jumps | ||
+ | * {{cvar|addcond 73}} - Gives the player the Quick-Fix ÜberCharge effect | ||
+ | * {{cvar|addcond 74}} - Makes the player 10 times bigger and 10 times the health, also player will have infinite ammo but not clip size - player's melee range will remain the same | ||
+ | * {{cvar|addcond 75}} - Makes the player 10 times smaller; melee range and health will stay the same | ||
+ | * {{cvar|addcond 92}} - Player periodically regenerates ammo, health, and metal. Health regeneration rate is inversely proportional to maximum health. Used for the "Regen" powerup in Mannpower mode | ||
+ | * {{cvar|addcond 114}} - Enables glow outlines on friendly players and buildings | ||
− | === | + | === ent_ commands === |
− | * | + | {{hatnote|See [[Cheats]] for more ent_ commands}} |
− | * | + | {{Note|{{cvar|sv_cheats 1}} required}} |
− | * | + | ;Item pickups |
− | * | + | * {{cvar|ent_create item_healthkit_small}} - Spawns in a Small [[Health|Health Kit]] where the player is aiming |
− | * | + | * {{cvar|ent_create item_healthkit_medium}} - Spawns in a Medium Health Kit where the player is aiming |
− | * | + | * {{cvar|ent_create item_healthkit_full}} - Spawns in a Full Health Kit where the player is aiming |
− | * | + | * {{cvar|ent_create item_ammopack_small}} - Spawns in a Small [[Ammo|Ammo Pack]] where the player is aiming |
− | * | + | * {{cvar|ent_create item_ammopack_medium}} - Spawns in a Medium Ammo Pack where the player is aiming |
− | * | + | * {{cvar|ent_create item_ammopack_full}} - Spawns in a Full Ammo Pack where the player is aiming |
− | * | + | * {{cvar|ent_create item_teamflag}} - Spawns in a white [[Briefcase]] where the player is aiming. Note: Both teams can pick up the spawned Briefcase |
− | * | + | * {{cvar|ent_create item_currencypack_small}} - Spawns in a Small [[Credits]] Pickup where the player is aiming |
− | * | + | * {{cvar|ent_create item_currencypack_medium}} - Spawns in a Medium Credits Pickup where the player is aiming |
− | * | + | * {{cvar|ent_create item_currencypack_large}} - Spawns in a Large Credits Pickup where the player is aiming |
− | * | + | * {{cvar|ent_create tf_spell_pickup}} - Spawns in a [[Magic spells|Spellbook]] where the player is aiming |
− | * | + | |
− | * | + | ;Buildings |
− | * | + | * {{cvar|ent_create obj_sentrygun}} - Spawns in a level 1 [[Sentry Gun]] where the player is aiming |
+ | * {{cvar|ent_create obj_dispenser}} - Spawns in a level 1 [[Dispenser]] where the player is aiming | ||
+ | * {{cvar|ent_create obj_teleporter}} - Spawns in a level 1 [[Teleporter]] where the player is aiming | ||
+ | ** Optional parameters (work with certain commands): | ||
+ | *** <code>teamnum <2/3></code>: Team RED/BLU (values other than 2 or 3 will spawn a BLU building that will be attacked by both teams, but if it is a Sentry it will only attack BLU) | ||
+ | *** <code>defaultupgrade <0/1/2></code>: Level 1/2/3 building | ||
+ | *** <code>spawnflags <number></code>: Examples include <code>spawnflags 2</code> for invulnerability, <code>4</code> to make the building upgradable, and <code>8</code> to give Sentry Guns infinite ammo. Adding the values of multiple spawnflags together will impart those properties onto the desired entity | ||
+ | *** Example: {{cvar|ent_create obj_sentrygun teamnum 2 defaultupgrade 2 spawnflags 8}} spawns a level 3 RED Sentry Gun with infinite ammo | ||
+ | **** Adding the creator of the Sentry Gun using ent_fire | ||
+ | ***** <code>ent_fire !picker setbuilder !player; </code>: Sets the player who executed the command as the person who built the Sentry | ||
+ | ***** Example: {{cvar|ent_fire !picker setbuilder !player; ent_create obj_sentrygun teamnum 2 defaultupgrade 2 spawnflags 8}} spawns a level 3 RED Sentry Gun with infinite ammo built by the player | ||
+ | |||
+ | ;Neutral enemies and bosses | ||
+ | * {{cvar|ent_create headless_hatman}} - Spawns the [[Horseless Headless Horsemann]] where the player is aiming | ||
+ | * {{cvar|ent_create eyeball_boss}} - Spawns a variation of [[MONOCULUS]] where the player is aiming | ||
+ | ** {{cvar|ent_create eyeball_boss teamnum 1}} - Spawns a [[Magic spells#Rare Magic Spells|ghostly]] [[BLU]] MONOCULUS where the player is aiming for 10 seconds | ||
+ | ** {{cvar|ent_create eyeball_boss teamnum 2}} - Spawns a ghostly [[RED]] MONOCULUS where the player is aiming for 10 seconds | ||
+ | ** {{cvar|ent_create eyeball_boss teamnum 5}} - Spawns the boss version of MONOCULUS where the player is aiming | ||
+ | * {{cvar|ent_create merasmus}} - Spawns [[Merasmus]] where the player is aiming | ||
+ | * {{cvar|ent_create tf_zombie}} - Spawns a [[Skeletons|Skeleton]] where the player is aiming | ||
+ | * {{cvar|ent_create tank_boss}} - Spawns a [[Tank Robot]] where the player is aiming | ||
+ | ** Optional parameter (work with certain commands): | ||
+ | *** <code>speed <integer></code> Modifies movement speed of certain entities. | ||
+ | *** Example: {{cvar|ent_create tank_boss speed 1}} Spawns an extremely slow tank. | ||
+ | *** <code>health<integer></code> Sets health of the tank. | ||
+ | *** Example: {{cvar|ent create tank_boss health 100}} Spawns a tank with 100 health. | ||
+ | *** <code>modelscale <integer></code> Sets tank scale. | ||
+ | *** Example: {{cvar|ent_create tank_boss modelscale 2}} Spawns a big tank. | ||
+ | **** Example: {{cvar|ent_create tank_boss speed 200 health 50 modelscale 0.5}} Spawns a fast, tiny tank with 50 health. | ||
+ | |||
+ | ;Removing entities | ||
+ | * {{cvar|ent_remove}} - Removes the entity being pointed at by the crosshair | ||
+ | * {{cvar|ent_remove_all}} - Removes a specific type of entity, such as {{cvar|ent_remove_all obj_sentrygun}} | ||
=== tf_ commands === | === tf_ commands === | ||
− | * tf_allow_player_use 0/1 - | + | * {{cvar|tf_allow_player_use}} <0/1> - Toggles the {{cvar|+use}} command on a server, useful for some custom maps. (default: 0) - ''server operator only'' |
− | * tf_damage_disablespread 0/1 - | + | * {{cvar|tf_allow_taunt_switch}} <0/1/2> - Disallows/allows switching weapons during [[taunts]]. (1 = start of taunt only; 2 = at any time during the taunt) - ''server operator only'' (Default: 0) |
− | * tf_dingaling_pitchmaxdmg - | + | * {{cvar|tf_always_deathanim}} <0/1> - Forces death animation - ''{{cvar|sv_cheats 1}} only''. |
− | * tf_dingaling_pitchmindmg - | + | * {{cvar|tf_always_loser}} <0/1> - Forces "loser" (humiliation) animation and puts player in third-person (but can still fire weapons) - ''{{cvar|sv_cheats 1}} only''. |
− | * tf_dingaling_volume - | + | * {{cvar|tf_avoidteammates_pushaway}} <0/1> - Toggles the ability to push your teammates by standing near or in them. (default: 1) |
− | * | + | * {{cvar|tf_bot_add}} <number> - Spawns a number of computer-controlled bots - ''server operator only'' |
− | * | + | * {{cvar|tf_bot_flag_kill_on_touch}} <0/1> - If enabled, kills bots upon picking up the Intelligence. (default: 0) - ''{{cvar|sv_cheats 1}} only''. |
− | + | * {{cvar|tf_bot_quota}} <number> - Sets the total number of computer-controlled bots in the server, but if a player is in the server it will override a bot slot - ''server operator only'' (Default: 0) | |
− | * tf_medieval 0/1 - | + | * {{cvar|tf_damage_disablespread}} <0/1> - Turns random damage-spread (+-10%) for weapons off/on - ''server operator only'' (Default: 0) |
− | * tf_medigun_autoheal 0/1 - | + | * {{cvar|tf_damage_multiplier_(blue/red)}} <number> - Increases or decreases the damage vulnerability of a given team - ''{{cvar|sv_cheats 1}} only'' |
− | * tf_medieval_autorp 0/1 - | + | * {{cvar|tf_dingalingaling}} <0/1> - Turns weapon hit sound off/on (can also be changed from advanced options) |
− | * tf_medieval_thirdperson 0/1 - | + | * {{cvar|tf_dingalingaling_repeat_delay}} <seconds> - Limits how often the weapon hit sound can play (Default: 0) |
− | * tf_overtime_nag 0/1 - | + | * {{cvar|tf_dingaling_pitchmaxdmg}} <0-255> - Sets the pitch of maximum damage with your weapon, a lower pitch is recommended in most cases, (default: 100) |
− | * tf_use_fixed_weaponspreads 0/1 - | + | * {{cvar|tf_dingaling_pitchmindmg}} <0-255> - Sets the pitch of minimum damage with your weapon, a higher pitch is recommended in most cases, (default: 100) |
− | * tf_weapon_criticals 0/1 - | + | * {{cvar|tf_dingaling_volume}} <0~1> - Sets the volume for hit sounds, (default: 0.75) |
+ | * {{cvar|tf_flag_caps_per_round}} - Sets the number of times the Intelligence must be captured in [[Capture the Flag]] for a team to win (default: 3) - ''server operator only'' | ||
+ | * {{cvar|tf_forced_holiday}} <0-11> - Enables holiday mode (0: default; 1: TFBirthday; 2: Halloween; 3: Christmas; 4 = CommunityUpdate; 5 = EOTL; 6 = Valentines; 7 = MeetThePyro; 8 = FullMoon; 9 = HalloweenOrFullMoon; 10 = HalloweenOrFullMoonOrValentines; 11 = AprilFools) - ''server operator only'' | ||
+ | * {{cvar|tf_medieval}} <0/1> - Turns [[Medieval mode]] on/off, requires map change to take effect - ''server operator only'' | ||
+ | * {{cvar|tf_medigun_autoheal}} <0/1> - Turns healing without holding attack off/on (can also be changed from advanced options) (Default: 0) | ||
+ | * {{cvar|tf_medieval_autorp}} <0/1> - Enables/disables automatic medieval-style text modification in the chat box (Default in medieval mode: 1, default in normal servers: 0) | ||
+ | * {{cvar|tf_medieval_thirdperson}} <0/1> - Toggles third person view during Medieval mode (Default: 0) | ||
+ | * {{cvar|tf_mvm_jump_to_wave}} <integer> - Immediately skips to a specific wave in MvM | ||
+ | * {{cvar|tf_overtime_nag}} <0/1> - Turns [[Administrator responses|endless shouting]] of "OVERTIME!" in Overtime off/on - ''server operator only'' (Default: 0) | ||
+ | * {{cvar|tf_particles_disable_weather}} <0/1> - Disables weather effects on supported maps (Default: 0) | ||
+ | * {{cvar|tf_playergib}} <0/1/2> - Handles the frequency of gibbing. (0 = never; 1 = default; 2 = always, including attacks that normally don't gib) - ''server operator only'' | ||
+ | * {{cvar|tf_powerup_mode}} <0/1> - Enable [[Mannpower]] on the server off/on - ''server operator only'' | ||
+ | * {{cvar|tf_romevision_opt_in}} <0/1> - Turns Romevision in Mann vs. Machine off/on (Default: 0) | ||
+ | * {{cvar|tf_romevision_skip_prompt}} <0/1> - If nonzero, skip the prompt about sharing Romevision. (Default: 0) | ||
+ | * {{cvar|tf_scoreboard_mouse_mode}} <0/1/2> - Allows the user to interact with the [[scoreboard]] and right-click on player names to view a set of available actions, such as "Profile", which opens the Steam profile of the chosen user. Set to 1 to turn on at all times, and set to 2 to only turn on when the user clicks while viewing the scoreboard. (Default: 0) | ||
+ | * {{cvar|tf_scoreboard_ping_as_text}} <0/1> - Toggles if players pings are represented by numbers (text) or as 'connection strength' bars (Default: 0) | ||
+ | * {{cvar|tf_taunt_first_person}} <0/1> - taunts are in first person for full-body awareness mode (for use with Oculus Rift) (Default: 0) | ||
+ | * {{cvar|tf_test_spellindex}} <-1-11> - Set to index to always get a specific [[Magic spells|Magic spell]] (-1 = No spell; 0 = Fireball; 1 = Ball O' Bats; 2 = Uber Heal; 3 = Pumpkin MIRV; 4 = Blast Jump; 5 = Stealth; 6 = Teleport; 7 = Ball O' Lightning; 8 = Minify; 9 = Meteor Storm; 10 = Summon MONOCULUS; 11 = Summon Skeletons) - ''server operator only'' (Default: -1) | ||
+ | * {{cvar|tf_use_fixed_weaponspreads}} <0/1> - Turns fixed, consistent spread for weapons like Shotgun, Scattergun and Shortstop off/on - ''server operator only'' (Default: 0) | ||
+ | * {{cvar|tf_use_min_viewmodels}} <0/1> - Turns minimal viewmodels off/on, which reduces the size of weapons on screen. (Default: 0) | ||
+ | * {{cvar|tf_weapon_criticals}} <0/1> - Turns random criticals for primary or secondary weapons off/on - ''server operator only'' (Default: 1) | ||
+ | * {{cvar|tf_weapon_criticals_melee}} <0-2> - If set to 0, melee weapons will never Crit, even if {{cvar|tf_weapon_criticals}} is set to 1. If set to 1, melee weapons can Crit '''only if''' {{cvar|tf_weapon_criticals}} is 1. If set to 2, melee weapons can Crit no matter what {{cvar|tf_weapon_criticals}} is set to. - ''server operator only'' (Default: 1) | ||
=== sv_ commands === | === sv_ commands === | ||
− | * sv_cheats 0/1 - | + | * {{cvar|sv_cheats}} <0/1> - Turns [[cheats]] off/on - ''server operator only'' |
− | * sv_lan - cvar for | + | * {{cvar|sv_gravity}} <number> - Sets serverwide gravity (default: 800)- ''server operator only'' |
− | * sv_pure - | + | * {{cvar|sv_lan}} <0/1> - Allows/Disallows people on non-local networks from joining. - ''server operator only'' |
+ | **{{Note|In order to host a listen (in-game) server that people can connect to over the Internet, your 27015 port must be forwarded}} | ||
+ | * {{cvar|sv_password}} <password> - Sets the password for a server - ''server operator only'' | ||
+ | * {{cvar|sv_pure}} <-1/0/1/2> - Determines how much custom content (HUDs, animations, sound mods) should be allowed on a server (-1: Allow all; 0: Allow all, except for Materials ; 1: Uses sv_pure.cfg; 2: Uses sv_pure_strict.cfg) - ''server operator only'' | ||
+ | * {{cvar|sv_airaccelerate}} <number> - Controls how fast you lose momentum in the air from various actions. | ||
=== mp_ commands === | === mp_ commands === | ||
− | * mp_autoteambalance - | + | * {{cvar|mp_autoteambalance}} <0/1> - Disables/Enables automatic team balancing - ''server operator only'' |
− | * mp_disable_respawn_times - cvar for | + | * {{cvar|mp_disable_respawn_times}} <0/1> - Enables/Disables respawn times - ''server operator only'' |
− | * mp_idledealmethod - | + | * {{cvar|mp_forcerespawnplayers}} - Immediately respawns all players (and bots) on the server - ''{{cvar|sv_cheats 1}} only''. |
− | * mp_restartgame - | + | * {{cvar|mp_forcewin}} - Immediately wins the round for the command user's team - ''{{cvar|sv_cheats 1}} only''. |
− | * mp_teams_unbalance_limit - | + | * {{cvar|mp_friendlyfire}} <0/1> - Toggles [[friendly fire]] (the ability to injure teammates). - ''server operator only'' |
− | * mp_timelimit - | + | * {{cvar|mp_highlander}} <0/1> - Toggles [[Highlander]] mode. - ''server operator only'' |
− | * mp_usehwmmodels 1 | + | * {{cvar|mp_idledealmethod}} <0/1/2> - Chooses how to deal with idle players (0: Don't kick; 1: Move to spectate, then kick; 2: Kick directly) - ''server operator only'' |
− | * | + | <!-- mp_restarround? --> |
+ | * {{cvar|mp_restartgame}} <seconds until restart> - Restarts the round and resets the round time. - ''server operator only'' | ||
+ | * {{cvar|mp_scrambleteams}} - Initiates a team scramble immediately. | ||
+ | ** {{cvar|mp_teams_unbalance_limit}} <number> - The team size difference at which players are forced onto the opposite team. - ''server operator only'' | ||
+ | * {{cvar|mp_timelimit}} <minutes> - The length of time that a map should last before swapping. - ''server operator only'' | ||
+ | * {{cvar|mp_usehwmmodels}} <-1/0/1> - Disables/Enables HWM models used in TF2 Source Filmmaker shorts (-1: Never, 0: GPU-Based; 1: Always) | ||
+ | * {{cvar|mp_usehwmvcds}} <-1/0/1> - Disables/Enables mouth movement on HWM models (-1: Never, 0: GPU-Based; 1: Always) | ||
+ | * {{cvar|mp_waitingforplayers_cancel}} <0/1> - If nonzero, cancels "Waiting for players..." time - ''server operator only'' | ||
=== hud_ commands === | === hud_ commands === | ||
− | * hud_combattext 0/1 - | + | * {{cvar|hud_combattext}} <0/1> - Turns the damage text above enemies off/on |
− | + | * {{cvar|hud_combattext_batching}} <0/1> - Turns the damage text above players adding together within an interval off/on | |
− | + | ** {{cvar|hud_combattext_batching_window}} <.1~2> - Time in seconds to combine damage text | |
+ | * {{cvar|hud_combattext_doesnt_block_overhead_text}} <0/1> - Turns overwriting the particle effects used for Critical hits and Mini-Crits off/on | ||
+ | * {{cvar|hud_combattext_healing}} <0/1> - Turns healing text above teammates off/on | ||
+ | * {{cvar|hud_deathnotice_time}} <seconds> - How long to display the kill feed before it fades out | ||
+ | * {{cvar|hud_reloadscheme}} - Used to fix various HUD-color errors or lingering Crit-effects | ||
+ | * {{cvar|hud_saytext_time}} <seconds> - How long to display chat comments before they fade out (Default: 12) | ||
+ | === Miscellaneous commands === | ||
'''For players''' | '''For players''' | ||
− | * bind <key> <command> - Binds a key | + | * {{cvar|bind}} <key> <command> - Binds a key to a command. |
− | * unbind <key> - | + | * {{cvar|bind}} <key> - Displays the command the given key is bound to. |
− | * dropitem - Drop the flag or | + | * {{cvar|unbind}} <key> - Unbinds a key. |
− | * explode - Commit suicide | + | * {{cvar|unbindall}} - Unbinds all keys. |
− | * | + | * {{cvar|dropitem}} - Drop the flag or Intelligence. |
− | * fov_desired | + | * {{cvar|kill}} - Commit suicide. |
− | * jointeam red/blue/auto/spectator - Force team. (use this if you are stuck in "dead spectator" mode when too many people attempt to join a team at the same time) | + | * {{cvar|explode}} - Commit suicide by exploding into gibs. |
− | * jpeg - Take a jpeg screenshot. | + | * {{cvar|+attack}} - Forces the player to constantly use their primary fire. (Same as M1) ({{cvar|-attack}} will disable) |
− | * | + | * {{cvar|+attack2}} - Forces the player to constantly use their secondary fire. (Same as M2) ({{cvar|-attack2}} will disable) |
− | * retry - Retry connection to last server. | + | {{Anchor|attack3}} |
− | * status - Display map and connection status. | + | * {{cvar|+attack3}} - Forces the player to constantly use their tertiary fire. (Same as middle-click or M3) ({{cvar|-attack3}} will disable) |
− | * viewmodel_fov <number> - | + | * {{cvar|fov_desired}} <75-90> - Set desired field of view (higher values show more of the battlefield at the cost of fps) (can also be changed from advanced video [[Options]]) |
− | * r_drawviewmodel 0/1 - | + | * {{cvar|jointeam}} <red/blue/auto/spectator> - Force team. (use this if you are stuck in "dead spectator" mode when too many people attempt to join a team at the same time) |
− | * restart - | + | * {{cvar|jpeg}} - Take a jpeg screenshot. |
− | * find < | + | * {{cvar|noclip}} - Allows the players on the server to fly through walls. - ''{{cvar|sv_cheats 1}} only''. |
− | * hurtme <number> - | + | * {{cvar|retry}} - Retry connection to last server. |
− | * zoom_sensitivity_ratio < | + | * {{cvar|status}} - Display map and connection status. |
− | * net_graph < | + | * {{cvar|viewmodel_fov}} <number> - Sets distance in which your weapons are drawn, higher values show more of the weapon and arms but may show missing parts. (can also be changed from advanced Options) |
− | + | * {{cvar|r_drawviewmodel}} <0/1> - Turns viewmodels on and off. (can also be changed from advanced Options) | |
− | + | * {{cvar|r_drawtracers_firstperson}} <0/1> - Disables visuals from tracer rounds (from [[Machina]] and [[Hitman's Heatmaker]]) for your weapon only, not other players'. | |
+ | * {{cvar|r_drawdetailprops}} <0/1> - Disables certain map props. | ||
+ | * {{cvar|restart}} - Restarts the current server ''dedicated server only'' | ||
+ | * {{cvar|find}} <text> - Displays all commands that match a string of text | ||
+ | * {{cvar|hurtme}} <number> - Deals a given amount of damage (can be negative for extra health) - ''{{cvar|sv_cheats 1}} only'' | ||
+ | * {{cvar|zoom_sensitivity_ratio}} <0~1> - Sets the ratio of sensitivity while zoomed in with the Sniper Rifle with accordance to actual sensitivity. | ||
+ | * {{cvar|net_graph}} <0-4> Shows different amounts of information such as ping, framerate, lerp, and packet loss depending on the input value. | ||
+ | * {{cvar|thirdperson}} - Places your view in a camera behind your character - ''{{cvar|sv_cheats 1}} only'' | ||
+ | * {{cvar|thirdperson_mayamode}} - If active, turning in third person does not move the camera - ''{{cvar|sv_cheats 1}} only'' | ||
+ | * {{cvar|thirdperson_platformer}} <0/1> - If active, the mouse controls the camera while movement is controlled relative to it. | ||
+ | ** If {{cvar|thirdperson_mayamode}} isn't active, walking towards the camera will 'push' your view away. | ||
+ | * {{cvar|firstperson}} - Return to first person perspective. | ||
+ | ** If {{cvar|thirdperson_platformer}} is still set to 1, you will not be able to move the camera during [[taunts]]. | ||
+ | * {{cvar|currency_give}} <amount> - Gives a specified amount of credits in Mann vs. Machine (Maximum amount of credits you can have is 30000) - ''{{cvar|sv_cheats 1}} only'' | ||
+ | * {{cvar|snd_restart}} - Used to restart all sounds in any game mode. | ||
+ | * {{cvar|player_ready_toggle}} - Readies/unreadies the player in MVM and Competitive | ||
+ | * {{cvar|shake}} - Shakes the screen briefly, similarly to the shaking that occurs from a Payload cart's explosion - ''{{cvar|sv_cheats 1}} only'' | ||
+ | * {{cvar|ghost_spawn}} - Spawns a [[ghost]] that moves following a set path and disappears soon after. - ''{{cvar|sv_cheats 1}} only'' | ||
+ | * {{cvar|taunt_by_name}} <taunt name> - Runs a specified taunt, given the exact name of a taunt in the player's current taunt loadout, without having to open the taunt menu. | ||
'''For moderators/admins''' | '''For moderators/admins''' | ||
− | * changelevel <mapname> - | + | * {{cvar|changelevel}} <mapname> - Changes the map. |
− | * cvarlist - View complete cvar list. | + | * {{cvar|cvarlist}} - View complete cvar list. |
− | * exec - Execute config file. | + | * {{cvar|exec}} - Execute config file from the tf/cfg folder. |
− | * map <mapname> - | + | * {{cvar|map}} <mapname> - Changes the map and restarts the server. |
** Starts a new server if entered on the main menu - useful for bypassing the "Create New Server" dialog and map drop-down menu | ** Starts a new server if entered on the main menu - useful for bypassing the "Create New Server" dialog and map drop-down menu | ||
− | * maps - Display list of maps. | + | * {{cvar|maps}} <*/mapname> - Display list of maps. |
− | * | + | * {{cvar|nextlevel}} <mapname> - Sets the next map to be played. |
− | + | * {{cvar|rcon_password}} <password> - gives player access to remote control commands of a server. | |
− | * rcon <command> - | + | * {{cvar|rcon}} <command> - Executes an rcon command. |
− | * rcon_address <ip address> - | + | * {{cvar|rcon_address}} <ip address> - Sets the server address to send rcon commands to (if not set, console sends the command to the server that the player is currently in instead) |
+ | * {{cvar|phys_pushscale}} <number> - Determines how far player corpses can be "pushed" when killed | ||
+ | * {{cvar|phys_timescale}} <number> - Determines how fast props/projectiles move (default: 1) | ||
+ | * {{cvar|tf_ctf_bonus_time}} <number> - Determines how long (in seconds) guaranteed Critical hits are enabled when the Intelligence is captured on a CTF map. 0 disables them entirely. Default is 10 seconds. | ||
+ | |||
'''For recording''' | '''For recording''' | ||
+ | {{main|Help:Recording demos}} | ||
+ | * {{cvar|record}} <demo name> - Begins a demo recording | ||
+ | * {{cvar|stop}} - Stops a demo recording | ||
+ | * {{cvar|startmovie}} <moviename> - Opens up the source recorder during demo play back and allows for high quality avi format recording | ||
+ | * {{cvar|endmovie}} - Stops source recorder | ||
+ | * {{cvar|host_framerate}} <number> - Tells the source recorder to record at a constant framerate | ||
+ | * {{cvar|host_timescale}} <number> - Use in conjunction with {{cvar|host_framerate}} to produce a smooth video output. Can also be used alone to either speed up or slow down gameplay. Default is 1.0 - ''{{cvar|sv_cheats 1}} only'' | ||
+ | * {{cvar|demoui}} - Brings up a toolbox for replays (shift+F2 will also bring up the tool box) | ||
− | * | + | The following commands were introduced by the Demo Support feature (see {{Patch name|5|31|2016}}): |
− | * | + | * {{cvar|ds_record}} - Manually start a recording |
− | * | + | * {{cvar|ds_stop}} - Manually stop a recording |
− | + | * {{cvar|ds_mark}} <comment> - Bookmark the current demo tick count for future reference. The <comment> is an optional descriptor you may include. | |
− | + | * {{cvar|ds_status}} - Report the current recording status | |
− | * | ||
− | === weapon commands === | + | === {{anchor|weapon commands}}Weapon commands === |
+ | The "use" command is used to switch to the specified weapon. | ||
− | + | {{Template:Note|use is similar to the 'slot' commands, but cannot be used for voice commands.}} | |
*Syntax | *Syntax | ||
− | *:use <weapon_name> | + | *:{{cvar|use}} <weapon_name> |
*Arguments | *Arguments | ||
**<weapon_name> | **<weapon_name> | ||
***Scout | ***Scout | ||
− | **:tf_weapon_scattergun | + | **:<code>tf_weapon_scattergun</code> |
− | **:tf_weapon_handgun_scout_primary | + | **:<code>tf_weapon_handgun_scout_primary</code> |
− | **:tf_weapon_pistol_scout | + | **:<code>tf_weapon_soda_popper</code> |
− | **:tf_weapon_lunchbox_drink | + | **:<code>tf_weapon_pistol_scout</code> |
− | **:tf_weapon_jar_milk | + | **:<code>tf_weapon_lunchbox_drink</code> |
− | **:tf_weapon_bat | + | **:<code>tf_weapon_jar_milk</code> |
− | **:tf_weapon_bat_wood | + | **:<code>tf_weapon_handgun_scout_secondary</code> |
− | **:tf_weapon_bat_fish | + | **:<code>tf_weapon_cleaver</code> |
+ | **:<code>tf_weapon_bat</code> | ||
+ | **:<code>tf_weapon_bat_wood</code> | ||
+ | **:<code>tf_weapon_bat_fish</code> | ||
***Soldier | ***Soldier | ||
− | **:tf_weapon_rocketlauncher | + | **:<code>tf_weapon_rocketlauncher</code> |
− | **:tf_weapon_rocketlauncher_directhit | + | **:<code>tf_weapon_rocketlauncher_directhit</code> |
− | **:tf_weapon_shotgun_soldier | + | **:<code>tf_weapon_particle_cannon</code> |
− | **:tf_weapon_buff_item | + | **:<code>tf_weapon_shotgun_soldier</code> |
− | **:tf_weapon_shovel | + | **:<code>tf_weapon_buff_item</code> |
− | **:tf_weapon_katana | + | **:<code>tf_weapon_raygun</code> |
+ | **:<code>tf_weapon_shovel</code> | ||
+ | **:<code>tf_weapon_katana</code> | ||
+ | **:<code>tf_weapon_rocketlauncher_airstrike</code> | ||
***Pyro | ***Pyro | ||
− | **:tf_weapon_flamethrower | + | **:<code>tf_weapon_flamethrower</code> |
− | **:tf_weapon_shotgun_pyro | + | **:<code>tf_weapon_shotgun_pyro</code> |
− | **:tf_weapon_flaregun | + | **:<code>tf_weapon_flaregun</code> |
− | **:tf_weapon_fireaxe | + | **:<code>tf_weapon_jar_gas</code> |
+ | **:<code>tf_weapon_rocketpack</code> | ||
+ | **:<code>tf_weapon_fireaxe</code> | ||
***Demoman | ***Demoman | ||
− | **:tf_weapon_grenadelauncher | + | **:<code>tf_weapon_grenadelauncher</code> |
− | **:tf_weapon_pipebomblauncher | + | **:<code>tf_weapon_pipebomblauncher</code> |
− | **:tf_weapon_bottle | + | **:<code>tf_weapon_bottle</code> |
− | **:tf_weapon_sword | + | **:<code>tf_weapon_sword</code> |
− | **:tf_weapon_stickbomb | + | **:<code>tf_weapon_stickbomb</code> |
− | **:tf_weapon_katana | + | **:<code>tf_weapon_katana</code> |
***Heavy Weapons Guy | ***Heavy Weapons Guy | ||
− | **:tf_weapon_minigun | + | **:<code>tf_weapon_minigun</code> |
− | **:tf_weapon_shotgun_hwg | + | **:<code>tf_weapon_shotgun_hwg</code> |
− | **:tf_weapon_lunchbox | + | **:<code>tf_weapon_lunchbox</code> |
− | **:tf_weapon_fists | + | **:<code>tf_weapon_fists</code> |
***Engineer | ***Engineer | ||
− | **:tf_weapon_shotgun_primary | + | **:<code>tf_weapon_shotgun_primary</code> |
− | **:tf_weapon_sentry_revenge | + | **:<code>tf_weapon_sentry_revenge</code> |
− | **:tf_weapon_pistol | + | **:<code>tf_weapon_pistol</code> |
− | **:tf_weapon_laser_pointer | + | **:<code>tf_weapon_laser_pointer</code> |
− | **:tf_weapon_wrench | + | **:<code>tf_weapon_mechanical_arm</code> |
− | **:tf_weapon_robot_arm | + | **:<code>tf_weapon_wrench</code> |
− | **:tf_weapon_pda_engineer_destroy | + | **:<code>tf_weapon_robot_arm</code> |
− | **:tf_weapon_pda_engineer_build | + | **:<code>tf_weapon_pda_engineer_destroy</code> |
+ | **:<code>tf_weapon_pda_engineer_build</code> | ||
***Medic | ***Medic | ||
− | **:tf_weapon_syringegun_medic | + | **:<code>tf_weapon_syringegun_medic</code> |
− | **:tf_weapon_crossbow | + | **:<code>tf_weapon_crossbow</code> |
− | **:tf_weapon_medigun | + | **:<code>tf_weapon_medigun</code> |
− | **:tf_weapon_bonesaw | + | **:<code>tf_weapon_bonesaw</code> |
***Sniper | ***Sniper | ||
− | **:tf_weapon_sniperrifle | + | **:<code>tf_weapon_sniperrifle</code> |
− | **:tf_weapon_compound_bow | + | **:<code>tf_weapon_compound_bow</code> |
− | **:tf_weapon_smg | + | **:<code>tf_weapon_sniperrifle_decap</code> |
− | **:tf_weapon_jar | + | **:<code>tf_weapon_smg</code> |
− | **:tf_weapon_club | + | **:<code>tf_weapon_jar</code> |
+ | **:<code>tf_weapon_club</code> | ||
+ | **:<code>tf_weapon_sniperrifle_classic</code> | ||
***Spy | ***Spy | ||
− | **:tf_weapon_revolver | + | **:<code>tf_weapon_revolver</code> |
− | **:tf_weapon_knife | + | **:<code>tf_weapon_knife</code> |
− | **:tf_weapon_pda_spy | + | **:<code>tf_weapon_pda_spy</code> |
− | **:To equip | + | **:To equip Sapper, use: "<code>build 3 0</code>" |
+ | *Other Commands | ||
+ | **<code>invnext</code> - switches to the next weapon | ||
+ | **<code>invprev</code> - switches to the previous weapon | ||
+ | **<code>lastinv</code> - switches to the last weapon used | ||
== See also == | == See also == | ||
Line 178: | Line 363: | ||
* [[Scripting]] | * [[Scripting]] | ||
− | [[Category:Lists]] | + | == External links == |
+ | * [[vdc:List of TF2 console commands and variables|List of TF2 console commands and variables in the Valve Developer Community]] | ||
+ | |||
+ | [[Category:Lists|Useful console commands]] |
Latest revision as of 20:04, 11 November 2024
“Gotta move that gear up!” This article may contain content that is out of date. You can help improve this article by updating the content as necessary. See the wiki style guide. Notes: Update sv_cheats/server operator requirements, new commands, outdated commands |
This article has a list of console commands below. Using the Developer Console, you can turn specific gameplay and graphic settings on or off, or modify their values. The console can be enabled from the advanced menu in options or via Set launch options. Any command put in the autoexec.cfg file will automatically be loaded on game launch.
These settings can also be put into the class-specific .cfg files in your Team Fortress 2 folder in order to create class-specific configurations.
For a complete list of Team Fortress 2 console commands and variables, see the Valve Developer Wiki.
For more console commands, see Cheats.
Contents
List of useful console commands
cl_ commands
cl_ask_blacklist_opt_out
<0/1> - Turns question whether to blacklist a server after leaving after a short amount of time off/on (Default: 0)cl_ask_favorite_opt_out
<0/1> - Turns question whether to favorite a server after leaving after a longer amount of time off/on (Default: 0)cl_autoreload
<0/1> - Turns automatic reloading off/on (can also be changed from advanced Options)cl_autorezoom
<0/1> - Turns Sniper Rifle re-zoom off/on (can also be changed from advanced Options) (Default: 0)cl_cmdrate
<30-66> - Max number of command packets sent to server per second (Default: 30)cl_burninggibs
<0/1> - Turns burning gibs off/on (Default: 0)cl_cloud_settings
<0/1> - Turns syncing of config files with the Steam cloud off/on (Default:1)cl_crosshair_file
<filename> - Sets crosshair picture. "" is standard-crosshairs. example: "crosshair1" (can also be changed from Multiplayer options) (Default: "")cl_drawhud
<0/1> - Hides/shows the HUD -sv_cheats 1
required (Default: 1)cl_first_person_uses_world_model
<0/1> - Sets full-body awareness mode off/on (for use with VR headsets) (Default: 0)cl_flipviewmodels
<0/1> - Sets viewmodels normal/inverted(left-handed) - does not work while connected to a server (can also be changed from advanced options) (Default: 0)cl_hud_playerclass_use_playermodel
<0/1> - Sets whether or not the player's model is used on the HUD (Default: 1)cl_interp
<0.015-0.5> - Sets how far character models are interpolated (drawn away from their actual position) in the world, a good standard value for hitscan weapons is 0.0303, while for projectiles/flames 0.0152 is good (Default: 0.1)cl_interp_ratio
<1-2> - This will determine the set interp with dividing your cl_updaterate based on what you set, 1 for projectiles, then 2 for hitscan weapons (Default: 2)cl_mvm_wave_status_visible_during_wave
<0/1> - Turns HUD display always showing the robots left in a Mann vs Machine wave off/on.cl_new_impact_effects
<0/1> - Turns new, better looking impact effects off/on, most noticeable on glass (Default: 1)cl_ragdoll_collide
<0/1> - Turns ragdoll collisions on/off (client-side only)cl_ragdoll_fade_time
<seconds> - Sets time until ragdolls disappear (client-side only), default is 15 secondscl_ragdoll_physics_enable
<0/1> - Determines whether bullets, explosives, and attacks will interact with ragdolls (Default: 1)cl_showbackpackrarities
<0/1> - Turns color-coded items in trade off/oncl_showfps
<0/1/2> - Shows framerate (off/real-time/rounded)cl_showpos
<0/1> - Shows the map coordinates and movement speed of the playercl_spec_carrieditems
<0/1> - Shows non-standard items being carried by player you're spectatingcl_smooth
<0/1> - Smoother view/eye origin after prediction errors (Default: 1)cl_smoothtime
<0.01-2> - Smooth client's view after prediction error over this many seconds (Default: 0.1)cl_updaterate
<20-66> - Number of packets per second of updates you are requesting from the server (Default: 20)cl_yawspeed
<number> - Sets the speed at which your character turns when using the+left
and+right
commands
addcond commands
sv_cheats 1
required
addcond 5
- Gives the player a ÜberCharge effect that can be removed if healed by Dispenser, Medic or being killedaddcond 11
- Gives the player a critical effect that can be removed if healed by Dispenser, Medic or being killedaddcond 19
- Gives the player the Mini-Crit effectaddcond 52
- Gives the player permanent ÜberCharge effect.addcond 55
- Gives the player the Amputator taunt effect. Affects nearby allies.addcond 56
- Gives the player a critical effect that will not be removed unless killed or via removecondaddcond 57
- Gives the player a ÜberCharge effect that will not be removed unless killed or via removecondaddcond 58
- Gives the player the Vaccinator ÜberCharge effect that will be removed when killed or via removecondaddcond 64
- Player will Cloak immediately regardless of class. Used for the Invisibility Magic spell.addcond 66
- Bots will ignore the player even if the player bumps into a bot when disguised or cloakedaddcond 72
- Gives the player an effect that enhance their reload speed, firing speed, movement speed and grants infinite double jumpsaddcond 73
- Gives the player the Quick-Fix ÜberCharge effectaddcond 74
- Makes the player 10 times bigger and 10 times the health, also player will have infinite ammo but not clip size - player's melee range will remain the sameaddcond 75
- Makes the player 10 times smaller; melee range and health will stay the sameaddcond 92
- Player periodically regenerates ammo, health, and metal. Health regeneration rate is inversely proportional to maximum health. Used for the "Regen" powerup in Mannpower modeaddcond 114
- Enables glow outlines on friendly players and buildings
ent_ commands
sv_cheats 1
required
- Item pickups
ent_create item_healthkit_small
- Spawns in a Small Health Kit where the player is aimingent_create item_healthkit_medium
- Spawns in a Medium Health Kit where the player is aimingent_create item_healthkit_full
- Spawns in a Full Health Kit where the player is aimingent_create item_ammopack_small
- Spawns in a Small Ammo Pack where the player is aimingent_create item_ammopack_medium
- Spawns in a Medium Ammo Pack where the player is aimingent_create item_ammopack_full
- Spawns in a Full Ammo Pack where the player is aimingent_create item_teamflag
- Spawns in a white Briefcase where the player is aiming. Note: Both teams can pick up the spawned Briefcaseent_create item_currencypack_small
- Spawns in a Small Credits Pickup where the player is aimingent_create item_currencypack_medium
- Spawns in a Medium Credits Pickup where the player is aimingent_create item_currencypack_large
- Spawns in a Large Credits Pickup where the player is aimingent_create tf_spell_pickup
- Spawns in a Spellbook where the player is aiming
- Buildings
ent_create obj_sentrygun
- Spawns in a level 1 Sentry Gun where the player is aimingent_create obj_dispenser
- Spawns in a level 1 Dispenser where the player is aimingent_create obj_teleporter
- Spawns in a level 1 Teleporter where the player is aiming- Optional parameters (work with certain commands):
teamnum <2/3>
: Team RED/BLU (values other than 2 or 3 will spawn a BLU building that will be attacked by both teams, but if it is a Sentry it will only attack BLU)defaultupgrade <0/1/2>
: Level 1/2/3 buildingspawnflags <number>
: Examples includespawnflags 2
for invulnerability,4
to make the building upgradable, and8
to give Sentry Guns infinite ammo. Adding the values of multiple spawnflags together will impart those properties onto the desired entity- Example:
ent_create obj_sentrygun teamnum 2 defaultupgrade 2 spawnflags 8
spawns a level 3 RED Sentry Gun with infinite ammo- Adding the creator of the Sentry Gun using ent_fire
ent_fire !picker setbuilder !player;
: Sets the player who executed the command as the person who built the Sentry- Example:
ent_fire !picker setbuilder !player; ent_create obj_sentrygun teamnum 2 defaultupgrade 2 spawnflags 8
spawns a level 3 RED Sentry Gun with infinite ammo built by the player
- Adding the creator of the Sentry Gun using ent_fire
- Optional parameters (work with certain commands):
- Neutral enemies and bosses
ent_create headless_hatman
- Spawns the Horseless Headless Horsemann where the player is aimingent_create eyeball_boss
- Spawns a variation of MONOCULUS where the player is aimingent_create eyeball_boss teamnum 1
- Spawns a ghostly BLU MONOCULUS where the player is aiming for 10 secondsent_create eyeball_boss teamnum 2
- Spawns a ghostly RED MONOCULUS where the player is aiming for 10 secondsent_create eyeball_boss teamnum 5
- Spawns the boss version of MONOCULUS where the player is aiming
ent_create merasmus
- Spawns Merasmus where the player is aimingent_create tf_zombie
- Spawns a Skeleton where the player is aimingent_create tank_boss
- Spawns a Tank Robot where the player is aiming- Optional parameter (work with certain commands):
speed <integer>
Modifies movement speed of certain entities.- Example:
ent_create tank_boss speed 1
Spawns an extremely slow tank. health<integer>
Sets health of the tank.- Example:
ent create tank_boss health 100
Spawns a tank with 100 health. modelscale <integer>
Sets tank scale.- Example:
ent_create tank_boss modelscale 2
Spawns a big tank.- Example:
ent_create tank_boss speed 200 health 50 modelscale 0.5
Spawns a fast, tiny tank with 50 health.
- Example:
- Optional parameter (work with certain commands):
- Removing entities
ent_remove
- Removes the entity being pointed at by the crosshairent_remove_all
- Removes a specific type of entity, such asent_remove_all obj_sentrygun
tf_ commands
tf_allow_player_use
<0/1> - Toggles the+use
command on a server, useful for some custom maps. (default: 0) - server operator onlytf_allow_taunt_switch
<0/1/2> - Disallows/allows switching weapons during taunts. (1 = start of taunt only; 2 = at any time during the taunt) - server operator only (Default: 0)tf_always_deathanim
<0/1> - Forces death animation -sv_cheats 1
only.tf_always_loser
<0/1> - Forces "loser" (humiliation) animation and puts player in third-person (but can still fire weapons) -sv_cheats 1
only.tf_avoidteammates_pushaway
<0/1> - Toggles the ability to push your teammates by standing near or in them. (default: 1)tf_bot_add
<number> - Spawns a number of computer-controlled bots - server operator onlytf_bot_flag_kill_on_touch
<0/1> - If enabled, kills bots upon picking up the Intelligence. (default: 0) -sv_cheats 1
only.tf_bot_quota
<number> - Sets the total number of computer-controlled bots in the server, but if a player is in the server it will override a bot slot - server operator only (Default: 0)tf_damage_disablespread
<0/1> - Turns random damage-spread (+-10%) for weapons off/on - server operator only (Default: 0)tf_damage_multiplier_(blue/red)
<number> - Increases or decreases the damage vulnerability of a given team -sv_cheats 1
onlytf_dingalingaling
<0/1> - Turns weapon hit sound off/on (can also be changed from advanced options)tf_dingalingaling_repeat_delay
<seconds> - Limits how often the weapon hit sound can play (Default: 0)tf_dingaling_pitchmaxdmg
<0-255> - Sets the pitch of maximum damage with your weapon, a lower pitch is recommended in most cases, (default: 100)tf_dingaling_pitchmindmg
<0-255> - Sets the pitch of minimum damage with your weapon, a higher pitch is recommended in most cases, (default: 100)tf_dingaling_volume
<0~1> - Sets the volume for hit sounds, (default: 0.75)tf_flag_caps_per_round
- Sets the number of times the Intelligence must be captured in Capture the Flag for a team to win (default: 3) - server operator onlytf_forced_holiday
<0-11> - Enables holiday mode (0: default; 1: TFBirthday; 2: Halloween; 3: Christmas; 4 = CommunityUpdate; 5 = EOTL; 6 = Valentines; 7 = MeetThePyro; 8 = FullMoon; 9 = HalloweenOrFullMoon; 10 = HalloweenOrFullMoonOrValentines; 11 = AprilFools) - server operator onlytf_medieval
<0/1> - Turns Medieval mode on/off, requires map change to take effect - server operator onlytf_medigun_autoheal
<0/1> - Turns healing without holding attack off/on (can also be changed from advanced options) (Default: 0)tf_medieval_autorp
<0/1> - Enables/disables automatic medieval-style text modification in the chat box (Default in medieval mode: 1, default in normal servers: 0)tf_medieval_thirdperson
<0/1> - Toggles third person view during Medieval mode (Default: 0)tf_mvm_jump_to_wave
<integer> - Immediately skips to a specific wave in MvMtf_overtime_nag
<0/1> - Turns endless shouting of "OVERTIME!" in Overtime off/on - server operator only (Default: 0)tf_particles_disable_weather
<0/1> - Disables weather effects on supported maps (Default: 0)tf_playergib
<0/1/2> - Handles the frequency of gibbing. (0 = never; 1 = default; 2 = always, including attacks that normally don't gib) - server operator onlytf_powerup_mode
<0/1> - Enable Mannpower on the server off/on - server operator onlytf_romevision_opt_in
<0/1> - Turns Romevision in Mann vs. Machine off/on (Default: 0)tf_romevision_skip_prompt
<0/1> - If nonzero, skip the prompt about sharing Romevision. (Default: 0)tf_scoreboard_mouse_mode
<0/1/2> - Allows the user to interact with the scoreboard and right-click on player names to view a set of available actions, such as "Profile", which opens the Steam profile of the chosen user. Set to 1 to turn on at all times, and set to 2 to only turn on when the user clicks while viewing the scoreboard. (Default: 0)tf_scoreboard_ping_as_text
<0/1> - Toggles if players pings are represented by numbers (text) or as 'connection strength' bars (Default: 0)tf_taunt_first_person
<0/1> - taunts are in first person for full-body awareness mode (for use with Oculus Rift) (Default: 0)tf_test_spellindex
<-1-11> - Set to index to always get a specific Magic spell (-1 = No spell; 0 = Fireball; 1 = Ball O' Bats; 2 = Uber Heal; 3 = Pumpkin MIRV; 4 = Blast Jump; 5 = Stealth; 6 = Teleport; 7 = Ball O' Lightning; 8 = Minify; 9 = Meteor Storm; 10 = Summon MONOCULUS; 11 = Summon Skeletons) - server operator only (Default: -1)tf_use_fixed_weaponspreads
<0/1> - Turns fixed, consistent spread for weapons like Shotgun, Scattergun and Shortstop off/on - server operator only (Default: 0)tf_use_min_viewmodels
<0/1> - Turns minimal viewmodels off/on, which reduces the size of weapons on screen. (Default: 0)tf_weapon_criticals
<0/1> - Turns random criticals for primary or secondary weapons off/on - server operator only (Default: 1)tf_weapon_criticals_melee
<0-2> - If set to 0, melee weapons will never Crit, even iftf_weapon_criticals
is set to 1. If set to 1, melee weapons can Crit only iftf_weapon_criticals
is 1. If set to 2, melee weapons can Crit no matter whattf_weapon_criticals
is set to. - server operator only (Default: 1)
sv_ commands
sv_cheats
<0/1> - Turns cheats off/on - server operator onlysv_gravity
<number> - Sets serverwide gravity (default: 800)- server operator onlysv_lan
<0/1> - Allows/Disallows people on non-local networks from joining. - server operator only- In order to host a listen (in-game) server that people can connect to over the Internet, your 27015 port must be forwarded
- In order to host a listen (in-game) server that people can connect to over the Internet, your 27015 port must be forwarded
sv_password
<password> - Sets the password for a server - server operator onlysv_pure
<-1/0/1/2> - Determines how much custom content (HUDs, animations, sound mods) should be allowed on a server (-1: Allow all; 0: Allow all, except for Materials ; 1: Uses sv_pure.cfg; 2: Uses sv_pure_strict.cfg) - server operator onlysv_airaccelerate
<number> - Controls how fast you lose momentum in the air from various actions.
mp_ commands
mp_autoteambalance
<0/1> - Disables/Enables automatic team balancing - server operator onlymp_disable_respawn_times
<0/1> - Enables/Disables respawn times - server operator onlymp_forcerespawnplayers
- Immediately respawns all players (and bots) on the server -sv_cheats 1
only.mp_forcewin
- Immediately wins the round for the command user's team -sv_cheats 1
only.mp_friendlyfire
<0/1> - Toggles friendly fire (the ability to injure teammates). - server operator onlymp_highlander
<0/1> - Toggles Highlander mode. - server operator onlymp_idledealmethod
<0/1/2> - Chooses how to deal with idle players (0: Don't kick; 1: Move to spectate, then kick; 2: Kick directly) - server operator onlymp_restartgame
<seconds until restart> - Restarts the round and resets the round time. - server operator onlymp_scrambleteams
- Initiates a team scramble immediately.mp_teams_unbalance_limit
<number> - The team size difference at which players are forced onto the opposite team. - server operator only
mp_timelimit
<minutes> - The length of time that a map should last before swapping. - server operator onlymp_usehwmmodels
<-1/0/1> - Disables/Enables HWM models used in TF2 Source Filmmaker shorts (-1: Never, 0: GPU-Based; 1: Always)mp_usehwmvcds
<-1/0/1> - Disables/Enables mouth movement on HWM models (-1: Never, 0: GPU-Based; 1: Always)mp_waitingforplayers_cancel
<0/1> - If nonzero, cancels "Waiting for players..." time - server operator only
hud_ commands
hud_combattext
<0/1> - Turns the damage text above enemies off/onhud_combattext_batching
<0/1> - Turns the damage text above players adding together within an interval off/onhud_combattext_batching_window
<.1~2> - Time in seconds to combine damage text
hud_combattext_doesnt_block_overhead_text
<0/1> - Turns overwriting the particle effects used for Critical hits and Mini-Crits off/onhud_combattext_healing
<0/1> - Turns healing text above teammates off/onhud_deathnotice_time
<seconds> - How long to display the kill feed before it fades outhud_reloadscheme
- Used to fix various HUD-color errors or lingering Crit-effectshud_saytext_time
<seconds> - How long to display chat comments before they fade out (Default: 12)
Miscellaneous commands
For players
bind
<key> <command> - Binds a key to a command.bind
<key> - Displays the command the given key is bound to.unbind
<key> - Unbinds a key.unbindall
- Unbinds all keys.dropitem
- Drop the flag or Intelligence.kill
- Commit suicide.explode
- Commit suicide by exploding into gibs.+attack
- Forces the player to constantly use their primary fire. (Same as M1) (-attack
will disable)+attack2
- Forces the player to constantly use their secondary fire. (Same as M2) (-attack2
will disable)
+attack3
- Forces the player to constantly use their tertiary fire. (Same as middle-click or M3) (-attack3
will disable)fov_desired
<75-90> - Set desired field of view (higher values show more of the battlefield at the cost of fps) (can also be changed from advanced video Options)jointeam
<red/blue/auto/spectator> - Force team. (use this if you are stuck in "dead spectator" mode when too many people attempt to join a team at the same time)jpeg
- Take a jpeg screenshot.noclip
- Allows the players on the server to fly through walls. -sv_cheats 1
only.retry
- Retry connection to last server.status
- Display map and connection status.viewmodel_fov
<number> - Sets distance in which your weapons are drawn, higher values show more of the weapon and arms but may show missing parts. (can also be changed from advanced Options)r_drawviewmodel
<0/1> - Turns viewmodels on and off. (can also be changed from advanced Options)r_drawtracers_firstperson
<0/1> - Disables visuals from tracer rounds (from Machina and Hitman's Heatmaker) for your weapon only, not other players'.r_drawdetailprops
<0/1> - Disables certain map props.restart
- Restarts the current server dedicated server onlyfind
<text> - Displays all commands that match a string of texthurtme
<number> - Deals a given amount of damage (can be negative for extra health) -sv_cheats 1
onlyzoom_sensitivity_ratio
<0~1> - Sets the ratio of sensitivity while zoomed in with the Sniper Rifle with accordance to actual sensitivity.net_graph
<0-4> Shows different amounts of information such as ping, framerate, lerp, and packet loss depending on the input value.thirdperson
- Places your view in a camera behind your character -sv_cheats 1
onlythirdperson_mayamode
- If active, turning in third person does not move the camera -sv_cheats 1
onlythirdperson_platformer
<0/1> - If active, the mouse controls the camera while movement is controlled relative to it.- If
thirdperson_mayamode
isn't active, walking towards the camera will 'push' your view away.
- If
firstperson
- Return to first person perspective.- If
thirdperson_platformer
is still set to 1, you will not be able to move the camera during taunts.
- If
currency_give
<amount> - Gives a specified amount of credits in Mann vs. Machine (Maximum amount of credits you can have is 30000) -sv_cheats 1
onlysnd_restart
- Used to restart all sounds in any game mode.player_ready_toggle
- Readies/unreadies the player in MVM and Competitiveshake
- Shakes the screen briefly, similarly to the shaking that occurs from a Payload cart's explosion -sv_cheats 1
onlyghost_spawn
- Spawns a ghost that moves following a set path and disappears soon after. -sv_cheats 1
onlytaunt_by_name
<taunt name> - Runs a specified taunt, given the exact name of a taunt in the player's current taunt loadout, without having to open the taunt menu.
For moderators/admins
changelevel
<mapname> - Changes the map.cvarlist
- View complete cvar list.exec
- Execute config file from the tf/cfg folder.map
<mapname> - Changes the map and restarts the server.- Starts a new server if entered on the main menu - useful for bypassing the "Create New Server" dialog and map drop-down menu
maps
<*/mapname> - Display list of maps.nextlevel
<mapname> - Sets the next map to be played.rcon_password
<password> - gives player access to remote control commands of a server.rcon
<command> - Executes an rcon command.rcon_address
<ip address> - Sets the server address to send rcon commands to (if not set, console sends the command to the server that the player is currently in instead)phys_pushscale
<number> - Determines how far player corpses can be "pushed" when killedphys_timescale
<number> - Determines how fast props/projectiles move (default: 1)tf_ctf_bonus_time
<number> - Determines how long (in seconds) guaranteed Critical hits are enabled when the Intelligence is captured on a CTF map. 0 disables them entirely. Default is 10 seconds.
For recording
record
<demo name> - Begins a demo recordingstop
- Stops a demo recordingstartmovie
<moviename> - Opens up the source recorder during demo play back and allows for high quality avi format recordingendmovie
- Stops source recorderhost_framerate
<number> - Tells the source recorder to record at a constant frameratehost_timescale
<number> - Use in conjunction withhost_framerate
to produce a smooth video output. Can also be used alone to either speed up or slow down gameplay. Default is 1.0 -sv_cheats 1
onlydemoui
- Brings up a toolbox for replays (shift+F2 will also bring up the tool box)
The following commands were introduced by the Demo Support feature (see May 31, 2016 Patch):
ds_record
- Manually start a recordingds_stop
- Manually stop a recordingds_mark
<comment> - Bookmark the current demo tick count for future reference. The <comment> is an optional descriptor you may include.ds_status
- Report the current recording status
Weapon commands
The "use" command is used to switch to the specified weapon.
use is similar to the 'slot' commands, but cannot be used for voice commands.
- Syntax
use
<weapon_name>
- Arguments
- <weapon_name>
- Scout
tf_weapon_scattergun
tf_weapon_handgun_scout_primary
tf_weapon_soda_popper
tf_weapon_pistol_scout
tf_weapon_lunchbox_drink
tf_weapon_jar_milk
tf_weapon_handgun_scout_secondary
tf_weapon_cleaver
tf_weapon_bat
tf_weapon_bat_wood
tf_weapon_bat_fish
- Soldier
tf_weapon_rocketlauncher
tf_weapon_rocketlauncher_directhit
tf_weapon_particle_cannon
tf_weapon_shotgun_soldier
tf_weapon_buff_item
tf_weapon_raygun
tf_weapon_shovel
tf_weapon_katana
tf_weapon_rocketlauncher_airstrike
- Pyro
tf_weapon_flamethrower
tf_weapon_shotgun_pyro
tf_weapon_flaregun
tf_weapon_jar_gas
tf_weapon_rocketpack
tf_weapon_fireaxe
- Demoman
tf_weapon_grenadelauncher
tf_weapon_pipebomblauncher
tf_weapon_bottle
tf_weapon_sword
tf_weapon_stickbomb
tf_weapon_katana
- Heavy Weapons Guy
tf_weapon_minigun
tf_weapon_shotgun_hwg
tf_weapon_lunchbox
tf_weapon_fists
- Engineer
tf_weapon_shotgun_primary
tf_weapon_sentry_revenge
tf_weapon_pistol
tf_weapon_laser_pointer
tf_weapon_mechanical_arm
tf_weapon_wrench
tf_weapon_robot_arm
tf_weapon_pda_engineer_destroy
tf_weapon_pda_engineer_build
- Medic
tf_weapon_syringegun_medic
tf_weapon_crossbow
tf_weapon_medigun
tf_weapon_bonesaw
- Sniper
tf_weapon_sniperrifle
tf_weapon_compound_bow
tf_weapon_sniperrifle_decap
tf_weapon_smg
tf_weapon_jar
tf_weapon_club
tf_weapon_sniperrifle_classic
- Spy
tf_weapon_revolver
tf_weapon_knife
tf_weapon_pda_spy
- To equip Sapper, use: "
build 3 0
"
- <weapon_name>
- Other Commands
invnext
- switches to the next weaponinvprev
- switches to the previous weaponlastinv
- switches to the last weapon used