Talk:List of TF2 console commands and variables

From Valve Developer Community
Jump to: navigation, search

How to update the cvar/cmd list

IMPORTANT: If you have done this before, remember to delete your previous version of cvarlist.txt or you will have quite a bit of confusion on your hands.

To update the cvar/cmd list start by opening up your preferred text editor, such as Notepad, and then copying this into a new text document. Next, save the document as defaults.cfg into your \cfg\ folder for TF2, make sure to set the file type to save it as to 'All files (*.*). This config file resets a lot of commonly changed variables back to their default values, and your going to need to execute this later so that your cvarlist paste will accurately represent every command and its default values. Since executing the file will change your settings your going to want store whatever settings you are using currently so that you can change back to them later. If you use a config, or have an autoexec, you should be okay, but it is still a good idea to keep a copy of your current settings. To store your current settings, enter

into the console. This saves all of your current settings to config.cfg, when you want to return to your normal settings again just execute it by typing
exec config
into the console. To check that the config has correctly restored the defaults to all variables type
exec defaults

into the console. After the game has finished loading, during which it should be unresponsive for a bit, you will be prompted with a dialog saying READY TO PLAY?, click the (X) in the top right corner to close it. Once it has been closed, open up the options menu, and then click on the Advanced... box. A pop up should appear allowing with a box to enable the developer console, select it, click OK, click OK again, and then open the console and enter the following

exec defaults

wait for it to load again, and then enter


After that all you should see in the console is

"hap_melee_scale" = "0.800000" ( def. "0.8" )
"hap_noclip_avatar_scale" = "0.100000" ( def. "0.10f" )
"cl_overdraw_test" = "0"
 client cheat
"windows_speaker_config" = "4" ( def. "-1" )
"name" = "<Your Name Here>" ( def. "unnamed" )
 archive server_can_execute
 - Current user name
"mat_texture_list_all" = "0"
 - If this is nonzero, then the texture list panel will show all currently-loaded textures.
"mat_texture_list_view" = "1"
 - If this is nonzero, then the texture list panel will render thumbnails of currently-loaded textures.
"mat_show_texture_memory_usage" = "0"
 - Display the texture memory usage on the HUD.
"sv_cheats" = "1" ( def. "0" )
 notify replicated
 - Allow cheats on server
"r_worldlights" = "2" ( def. "4" )
 - number of world lights to use per vertex
"r_flashlightdepthtexture" = "0" ( def. "1" )
"mat_texture_limit" = "-1"
 - If this value is not -1, the material system will limit the amount of texture memory it uses in a frame. Useful for identifying performance cliffs. The value is in kilobytes.

If you see more variables then the ones I listed, please shoot me a message on my talk page so that I can update the default.cfg to reset more variables, but really its no problem. Your going to need to remember what variables are left in the console, so make a copy of the contents somewhere else for future retrieval. The next thing that you need to do is actually collect the new cvarlist. Start doing this by typing

clear;con_logfile cvarlist.txt;cvarlist;con_logfile end

into the console. What this does is clears the console of any previous text then starts logging all console outputs to cvarlist.txt then it outputs the cvarlist to the console and then afterwards ends the recording to the cvarlist.txt file. Once you have run the command locate your \tf\ folder, usually found at C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\. Inside there should be a text file by the name cvarlist.txt, it contains the list of all commands and console variables. Remember the list of variables that we had earlier, now is when we need them. Inside cvarlist.txt find each of the variables that had its default value listed next to it in the form "<Variable Name>" = "*" ( def. "#" ), and change whatever is listed as its value to the number listed instead of the # in the def. note. Now that you have a correct and complete cvarlist the next step is to update the page, start by adding the date that you are doing this work on to the note at the top, as well as the build number of TF2 that you are running. To find out what build you are running go back to the console and type in

clear;map itemtest

which will clear out the console and then load up the Itemtest map. Once Itemtest has loaded feel free to disconnect. In the console there should be something that looks like this

Team Fortress
Map: itemtest
Players: 1 / 24
Build: *******
Server Number: 1

copy down the number that is in the place of the *'s and use it to replace the build number from the old version of the page. Note: The Itemtest map isn't special, you can load up any map, but it in particular is quick to load.

Finally, copy and paste corresponding sections of the cvarlist to the appropriate locations in alphabetical order, a helpful template for this can be found here, as well as changed the listed total number of convars/concommands to whatever the new number is.

If you have any questions feel free to contact me on talk page! The Editors Apprentice (talk) 18:56, 21 October 2017 (UTC)

norecord tags use

Knowing how ConVar flags work in-code, I'm assuming `norecord` is tied to the `FCVAR_NORECORD` flag, which forbids the ConVar/ConCommand from being recorded in demos.

I'd put that in the page itself, but I want to know you guys' opinion before I do so.

Thanks! Lonkfania (talk) 15:28, 7 August 2017 (UTC)

That sounds great! Adding it would be much appreciated! The Editors Apprentice (talk) 18:56, 21 October 2017 (UTC)