Team Fortress 2

Team Fortress 2

66 ratings
How To Create And Make Your autoexec.cfg Better
By DIJEM
Some Tips To Make Your Autoexec.cfg Better
   
Award
Favorite
Favorited
Unfavorite
Версия На Русском Языке
What Is autoexec.cfg
Autoexec.cfg is a configuration file that is stored in the TF2 files. Its main function is to automatically configure TF2 when it is launched. This file can contain custom settings such as keybindings or commands that enhance TF2 performance by increasing FPS.
How To Create autoexec.cfg
  1. Right click on TF2 in your Steam library > "Properties" > "Local Files" > "Browse Local Files".
  2. In the TF2 folder go to: > tf > cfg
  3. Create a .txt file called autoexec.txt and change .txt part to .cfg
    To change the file type from the ribbon bar, select View > Options > Change folder and search options. In the View tab of the Folder Options window, make sure that the Hide extensions for known file types checkbox is disabled, then select the OK button to save.
How To Use Config File And Mastercomfig At The Same Time
You need to repeat all previous steps exept the name of .cfg file. You can call it whatever you want. I use "custom.cfg". The main thing is that its name does not coincide with files already existing in the folder.
Right click on TF2 in your game library > "Properties" > in the General tab, select "Set Launch Options" > in the command line type +exec "your file name".cfg:
+exec custom.cfg
Notepad++
First of all, I really recomend you to use free program called Notepad++[notepad-plus-plus.org], It's very useful for editing .txt files.
How To Organize autoexec.cfg
Two slashes are used to indicate to the game that they are followed by a comment.
Don't put them on the same line before the commands!
You can use them to know exactly what commands do so you won’t get confused in the future if you will need to disable something:
// Itemtest Auto Load map_background itemtest; wait 10; disconnect // Viewmodel Settings viewmodel_fov 95 fov_desired 90 tf_use_min_viewmodels 1 zoom_sensitivity_ratio 0.793471

You can also save your launch options there in case you will lose it, don't forger to put two slashes before:
// Launch Options // +exec custom.cfg -nocrashdialog -width 1920 -height 1080 -novid -nojoy -nosteamcontroller -nohltv -particles 1 -precachefontchars
Making Mods Work In Casual And Increasing The Speed Of The First Connection To The Server
For what I wrote in the section title, you need to make the game automatically launch the easiest map - itemtest.
This action kind of prepares all the files for further use and you won't have to wait for a long time while first connection to the server. Also, many mods will work in casual with no problems.

All you need to do is to copy-paste this command in your .cfg file:

// Itemtest Auto Load map_background itemtest; wait 10; disconnect

WARNING!
On not powerful systems, TF2 could take 30-60 seconds to launch. That's ok, just wait and you'll be ready to play!
Showcase Of My Autoexec.cfg (Don't Use It, Just Check How It Looks Like)
// Itemtest Auto Load map_background itemtest; wait 10; disconnect // Viewmodel Settings viewmodel_fov 95 fov_desired 90 tf_use_min_viewmodels 1 zoom_sensitivity_ratio 0.793471 // CPU mat_queue_mode 2 // VSynk mat_vsync 0 // DirectX mat_dxlevel 100 // Spray cl_allowdownload 1 cl_allowupload 1 cl_playerspraydisable 0 // No Power Saving mat_powersavingsmode 0 // No Match Hud tf_use_match_hud 0 // Binds bindtoggle \ "r_drawviewmodel" bind "mouse4" "load_itempreset 0" bind "mouse5" "+use_action_slot_item" bind leftarrow "voicemenu 0 4" bind rightarrow "voicemenu 0 5" bind uparrow "voicemenu 0 6" bind downarrow "voicemenu 0 7" // Null-Cancelling Movement Script bind w +mfwd bind s +mback bind a +mleft bind d +mright alias +mfwd "-back;+forward;alias checkfwd +forward" alias +mback "-forward;+back;alias checkback +back" alias +mleft "-moveright;+moveleft;alias checkleft +moveleft" alias +mright "-moveleft;+moveright;alias checkright +moveright" alias -mfwd "-forward;checkback;alias checkfwd none" alias -mback "-back;checkfwd;alias checkback none" alias -mleft "-moveleft;checkright;alias checkleft none" alias -mright "-moveright;checkleft;alias checkright none" alias checkfwd none alias checkback none alias checkleft none alias checkright none alias none "" // Item panels loading tf_time_loading_item_panels .0005 //Red bullet holes on wood fix r_decalstaticprops 1 // Launch Options // +exec custom.cfg -nocrashdialog -width 1920 -height 1080 -novid -nojoy -nosteamcontroller -nohltv -particles 1 -precachefontchars //3d player model cl_hud_playerclass_use_playermodel 1 //mouse sensivity 0.31 dpi 400, 3200 //Numpad class select bind KP_END "join_class scout" bind KP_DOWNARROW "join_class soldier" bind KP_PGDN "join_class pyro" bind KP_LEFTARROW "join_class demoman" bind KP_5 "join_class heavyweapons" bind KP_RIGHTARROW "join_class engineer" bind KP_HOME "join_class medic" bind KP_UPARROW "join_class sniper" bind KP_PGUP "join_class spy"
43 Comments
TwinkleMcDinkle 21 Jul @ 10:48am 
this actually helped
DIJEM  [author] 14 Jun @ 11:41am 
fps_max #
# - any number
Gazi_Asker 14 Jun @ 11:26am 
how can i cap my fps with this?
DIJEM  [author] 2 Apr @ 7:24am 
Prevents you from pressing two opposing directions, which causes you to stop moving
Floating Text 1 Apr @ 5:51am 
what is that null-cancelling movement?
Missing.png 1 Mar @ 4:44pm 
Is your file called "autoexec.cfg" exactly, and is it stored in "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\cfg"? If not, do you use mastercomfig, or any other modification to TF2?
Zhe Timmeh 1 Mar @ 3:26pm 
Autoexec file.

And it's the only command i want it to execute, nothing else.
DIJEM  [author] 1 Mar @ 12:43pm 
Every other command from file works?
Missing.png 1 Mar @ 12:41pm 
Are you typing it on your console or are you using an autoexec file?
Zhe Timmeh 1 Mar @ 12:37pm 
Before you ask, yes i've done everything written on here, it just does not want to work