User:Spupy/Sandbox/Customizing

From Team Fortress Wiki
< User:Spupy‎ | Sandbox
Revision as of 11:57, 29 April 2013 by Spupy (talk | contribs) (Copying page to personal sandbox)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Customizing Team Fortress 2 is the act of exploiting the modular nature of Source Engine games to modify settings and game files in the Team Fortress 2 directory that could not be done in-game using the built in settings or developers console. Personalizations and useful edits to the HUD, game, and control settings can be made to customize the player's gaming experience.

Disclaimer: Modifying configuration files may leave Team Fortress 2 in a broken or otherwise unplayable state. Do so at your own risk and discretion.

Directory structure

The following is the directory structure for the Team Fortress 2 configuration files. This list includes helpful descriptions of each file's function.


Starting Folder: \Steam\steamapps\account\team fortress 2\

  • bin\ (no editing)
  • hl2\
    • media\
    • resource\
  • platform\
  • tf\
    • bin\
    • cfg\
      • autoexec.cfg (user scripts)
      • chapter1.cfg (commentary config tc_hydro) [gcf]
      • chapter2.cfg (commentary config cp_gravelpit) [gcf]
      • chapter3.cfg (commentary config cp_well) [gcf]
      • config.cfg (auto-generated, key bindings))
      • config.360.cfg (Xbox 360 default config) [gcf]
      • config_default.cfg (default config.cfg) [gcf]
      • settings.scr (vgui create server options and currents)
      • settings_default.scr (default settings.scr) [gcf]
      • SFM_DefaultAnimationGroups.txt [gcf]
      • user.scr (vgui multiplayer options and currents)
      • user_default.scr (default user.scr) [gcf]
      • valve.rc (base script loading) [gcf]
      • 360controller.cfg (configuration for Xbox 360 gamepad) [gcf]
      • undo360controller.cfg (sets back the console commands 360controller.cfg changed) [gcf]
    • DownloadLists\
    • downloads\
    • maps\
    • materials\
    • media\
    • resource\
    • screenshots\ (snapshots saved here, as .tga files)
    • sound\
    • gameinfo.txt
    • gamestate.txt
    • steam.inf [gcf]
    • stats.txt
    • tf2_playerstats.dmx (TF2 class stats)
    • whitelist.cfg (allowed custom files when creating a server with sv_pure 1) [gcf]

tf\cfg\config_default.cfg

This file contains the default key-binds within Team Fortress 2. The Wiki has a copy of it uploaded here (direct-link to file contents).

hl2\media\StartupVids.txt

Default state:

media/valve.bik

If this file is changed, TF2 will replace it with the above on startup.

tf\tf2_playerstats.dmx

Stats are stored both online on the Steam Community server (where everyone can see them via your personal Steam ID page), as well as locally on your machine in this text file, so your own stats can be displayed in game for you without downloading the list from the Steam server every time. This file is readable plain text, and so it can be edited and your modified stats will be displayed to you in-game. However, the text file is actually independent from the data that resides online on Steam, so you can not actually tamper with these stats. The only way to delete both on- and offline stats is the 'reset stats' button in-game, which will both delete the local file as well as contact the online server to delete the stats file as well. Apart from file tampering, because the on- and offline data are actually separate, there may be syncing problems, e.g., you may get different stats displayed locally than what is actually saved on the Steam Community server.


Multiple class configs

Each class has its own individual configuration file, e.g. heavyweapons.cfg, located in the tf\cfg\ folder of your steam directory. These are not used as each class uses the main config.cfg settings. Because of this, when a command is bound to a key it is written to the config.cfg file, and that key can no longer be used for any other command until it is rebound to do so either by console command or through the keyboard settings. The class config files can be used to bind multiple commands to the same key dependant on which class you are playing.

For example, in the Engineer.cfg you could bind 'F1' to the "build 2" command (build a Sentry Gun), while in Demoman.cfg bind the same key to the "voicemenu 2 0" command (call for help).

This can cause complications, as one of these key binds will then apply to all other classes. This can be remedied by applying the other classes 'F1' key bind settings in their .cfg files to their original or new command.

Client CVARs

These variables allow you to change certain elements of Team Fortress 2.

Name Default Definition
hud_classautokill 1 Automatically kill player after choosing a new playerclass.
hud_fastswitch 0 Show weapon icons when switching weapons
net_graph 0 Draw the network usage graph, = 2 draws data on Payload, = 3 draws Payload legend.
net_graphpos 1 1 is right, 2 is centre, 3 is left
cl_allowdownload 1 Client downloads customization files, sounds, maps from server, decals
cl_allowupload 1 Client uploads customization files, decals
cl_hud_minmode 0 Display a more minimalist TF2 styled HUD interface if set to 1
cl_playerspraydisable 0 Disable player sprays.
cl_showfps 0 Show the current frames per second. 1 for instant, 2 for averaged.
fov_desired 75 Sets the base field-of-view. Can be set to values between 75 to 90.
viewmodel_fov 54 Sets the base field-of-view. Can be set to any desired value.
tf_build_menu_controller_mode 0 Use console controller build menus. 1 = ON, 0 = OFF. (Xbox 360)
tf_disguise_menu_controller_mode 0 Use console controller disguise menus. 1 = ON, 0 = OFF. (Xbox 360)
tf_hud_notification_duration 3 How long to display hud notification panels before fading them
tf_hud_num_building_alert_beeps 2 Number of times to play warning sound when a new alert displays on building hud objects (Engineer)
ragdoll_sleepaftertime 5.0f After this many seconds of being basically stationary, the ragdoll will go to sleep. 0.0-0.3 for freezing ragdolls when they get killed. (Client Command)

Bind keys in the options menu

In order to bind keys to custom commands in the options menu, like all of the default commands, the user will need to go to their tf/scripts folder where they may find a file named kb_act.lst. If the file is not there, the user can either take it from the appropriate directory in "team fortress 2 content.gcf" or create their own, and fill it with:

"blank"				"=========================="
"blank"				"#Valve_Movement_Title"
"blank"				"=========================="
"+forward"			"#Valve_Move_Forward"
"+back"				"#Valve_Move_Back"
"+moveleft"			"#Valve_Move_Left"
"+moveright"			"#Valve_Move_Right"
"+jump"				"#Valve_Jump"
"+duck"				"#Valve_Duck"
"+moveup"			"#Valve_Swim_Up"
"+movedown"			"#Valve_Swim_Down"
"+lookup"			"#Valve_Look_Up"
"+lookdown"			"#Valve_Look_Down"
"blank"				"=========================="
"blank"				"#Valve_Communication_Title"
"blank"				"=========================="
"+voicerecord"			"#Valve_Use_Voice_Communication"
"say"				"#Valve_Chat_Message"
"say_team"			"#Valve_Team_Message"
"voice_menu_1"			"#TF_Voice_Menu_A"
"voice_menu_2"			"#TF_Voice_Menu_B"
"voice_menu_3"			"#TF_Voice_Menu_C"
"voicemenu 0 0"			"#TF_Call_For_Medic"
"blank"				"=========================="
"blank"				"#TF_Title"
"blank"				"=========================="
"changeclass"			"#Valve_Change_Class"
"changeteam"			"#Valve_Change_Team"
"open_charinfo_direct"		"#TF_Open_Charinfo"
"open_charinfo_backpack" 	"#TF_Open_Charinfo_Backpack"
"+quickswitch"			"#TF_Quickswitch"
"dropitem"			"#TF_DropFlag"
"taunt"				"#TF_Taunt"
"use_action_slot_item"		"#TF_Action"
"showmapinfo"			"#TF_MapInfo"
"inspect"			"#TF_Inspect"
"callvote"			"#TF_call_vote"
"blank"				"=========================="
"blank"				"#TF_ClassSpecific_Keys"
"blank"				"=========================="
"+attack2"			"#TF_ClassSkill_Demoman"
"+attack2"			"#TF_ClassSkill_Heavy"
"+attack2"			"#TF_ClassSkill_Medic"
"+attack2"			"#TF_ClassSkill_Sniper"
"+attack2"			"#TF_ClassSkill_Spy"
"lastdisguise"			"#TF_ClassSkill_Spy_LastDisguise"
"disguiseteam"			"#TF_ClassSkill_Spy_DisguiseTeam"
"blank"				"=========================="
"blank"				"#Valve_Combat_Title"
"blank"				"=========================="
"+attack"			"#Valve_Primary_Attack"
"+reload"			"#Valve_Reload_Weapon"
"invprev"			"#Valve_Previous_Weapon"
"invnext"			"#Valve_Next_Weapon"
"lastinv"			"#Valve_Last_Weapon_Used"
"slot1"				"#Valve_Weapon_Category_1"
"slot2"				"#Valve_Weapon_Category_2"
"slot3" 			"#Valve_Weapon_Category_3"
"slot4"				"#Valve_Weapon_Category_4"
"slot5"				"#Valve_Weapon_Category_5"
"slot6"				"#Valve_Weapon_Category_6"
"slot7"				"#Valve_Weapon_Category_7"
"slot8"				"#Valve_Weapon_Category_8"
"slot9"				"#Valve_Weapon_Category_9"
"slot10"			"#Valve_Weapon_Category_0"
"blank"				"=========================="
"blank"				"#Valve_Miscellaneous_Title"
"blank"				"=========================="
"impulse 201"			"#Valve_Spray_Logo"
"+showscores"			"#Valve_Display_Scores"
"screenshot"			"#Valve_Take_Screen_Shot"
"save_replay"			"#TF_SaveReplay"
"replay_togglereplaytips"	"#TF_ToggleReplayDirections"
"quit"				"#Valve_Quit_Game"
"toggleconsole"			"#Valve_Console_Toggle"
"askconnect_accept"		"#Valve_Accept_Redirect"
"cl_trigger_first_notification" "#TF_Notification_Trigger"
"cl_decline_first_notification" "#TF_Notification_Decline"

As such, it is possible for the user to create their own button binds using each class.cfg file, or even create their own category, as shown below:

"blank"				"=========================="
"blank"				"EXAMPLE CATEGORY"
"blank"				"=========================="
"exec sniper.cfg"		"Execute Sniper config"