This is my TF2 "Config" or as I prefer to call it, my TF2 autoexec. It's what customises my game beyond what the in-game settings UI lets you using automatically run console commands. By design, because you can use it to run any in-game console command as if you opened the console and typed it in, this is insanely powerful. One simple example is the (now patched?) TF2 bomb finding bind that turns on the game instructor (the tutorial-esque popups) to show where the bomb is through smokes.
That's totally fine, it's definitely complicated (especially for beginners) and creating your own can be pretty daunting. I'll do my best to use simple and uncomplicated terminology in the explanations below, just please try not to get turned away by the size of the CFGs. There's a lot in them but it all breaks down to some pretty simple formatting and everything is organized (and soon documented on each line)
CFG is a file type just like .exe
or .txt
. When you put a file ending in .cfg
(i.e. autoexec.cfg
) in specific folders, TF2 will see that and know that the file has console commands.
If you're more technically inclined, Valve has a more detailed explanation of these files in their Developer Docs which you check out here.
Autoexec's are files named autoexec.cfg
that you have to manually add to one of the game's cfg/
folders. They're files that TF2 will look for when the game starts and run the commands inside. This lets you automate changing settings, quickly share all of your settings with others, and accomplish some really awesome automation & tricks by using the game's console to our advantage.
If you're more technically inclined, Valve has an explanation of these files in their Developer Docs which you check out here.
Still have questions? Check the FAQ below and if you still don't have an answer, create an Issue and ask me your question!
- My autoexec isn't working!
Make sure you have
+exec autoexec.cfg
in your launch options for TF2 - Do I need to use any other launch options? While you don't need to, you can get some extra functionality and potentially performance from some launch options. See the Launch Options section below.
Launch options are options you can set that the game will use when it loads.
Mine are specifically setup for my PC (Seriously, if you use exactly you could run into game crashes and screen tearing), to make it easy there are mine and a freely copy-pastable version below mine. These will look complicated at first but they all just change one thing each so it's not that complicated.
Mine:
-no_texture_stream -small -threads 16 -forever -enablefakeip -novid -gl_enablesamplerobjects -NoQueuedPacketThread -rpt -tickrate 66 -high -windowed -noborder -refreshrate 180 -maxplayers 255 +exec autoexec.cfg +exec config/utility/sv_pure_bypass.cfg
Mine without the me-specific options (easy copy-paste):
-no_texture_stream -small -forever -enablefakeip -novid -gl_enablesamplerobjects -NoQueuedPacketThread -rpt -tickrate 66 -high -windowed -noborder -maxplayers 255 +exec autoexec.cfg +exec config/utility/sv_pure_bypass.cfg
First to get this out of the way, options that start with a -
are "normal" launch options that change stuff about how the game launches, tell the engine to do a certain thing, or hint to your OS about something. The ones that start with a +
are simply in-game console commands that will be run as soon as the game starts.
One example of where this could be useful is if you needed to use sv_cheats commands in your autoexec, you could put +sv_cheats 1
in your launch options and turn off sv_cheats at the end of your autoexec that way the cheat command is enabled when you launch but if you reload your config in-game it won't disable achievements.
To change your launch options for steam games, the best and easiest way to change these is to:
- Go to your steam Library
- In the list of games on the left side of the window, right click the game that you want to change the launch options of
- Click "Properties..."
- Click the "GENERAL" tab on the left of the popup window
- Put your launch options in the "LAUNCH OPTIONS" textbox at the bottom of the popup window
-no_texture_stream
Disables texture streaming (textures aren't unloaded and reloaded dynamically as you move around a map), better performance with higher VRAM GPUs-small
Allow window sizing smaller then 640x480, you shouldn't ever go below that resolution but this will let you, with some potentially interesting UI consequences.-threads 16
This is the number of threads to allocate for the thread pool, a Valve Employee recommended against setting this on reddit but I do anyways. Don't set it above 16 (otherwise the game crashes randomly after a while) and don't set it above your CPU's thread count.-novid
The game's "intro video will not play", this means you'll use a tiny bit less of RAM and you'll get into the main menu a little bit faster with the one con of the game being black until the main menu does load..-rpt
Clears console.log on startup, logs all console output in console.log, and starts the game with the developer console enabled.-high
Launches the game with HIGH_PRIORITY_CLASS in Windows, effectively hinting that it should make TF2 a priority over other programs.-windowed
Launches the game in windowed mode.-noborder
Launches the game in borderless windowed if the game is running in windowed mode, making it look like it's fullscreen but without the game minimizing when you click outside the window, however this will break support for stretched resolutions-refreshrate 165
Force a specific refresh rate, you set this to your monitors refreshrate. Don't use this as a framerate limiter, instead you should use the fps_max and fps_max_menu console commands instead.-maxplayers 255
This is used to "Set the maximum players allowed to join the server", 255 is the absolute maximum set by the Source Engine.+exec autoexec.cfg
This executes autoexec.cfg, this shouldn't be necessary but unless you've done some really weird and exotic modifications it doesn't hurt anything to have it run twice.
Help with these would be much appreciated
- Implement BananaGaming's "ADVANCED BIND SCRIPT" (multiple binds per key using key combos)
- External doumentation (with GitHub Wikis)