Customizing

From TF2 Wiki

Share/Save/Bookmark
Jump to: navigation, search

Contents

Changing your name

To change your player name to something other than your Steam community name use the following command within a .cfg script or type it each time via the console (replacing the <name> with your choice). If you wish to make this a permanent change, you will need to change your Steam Community name, as your name will be reverted to the Steam Community name upon every new map load. Adding this to your autoexec.cfg file (see Scripting) will not help you in this regard.

setinfo name "<name>"

Directory Structure

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]

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 is actually separate, there may be syncing problems, i.e. you may get different stats displayed locally than what is actually saved on the Steam Community server.

tf\cfg\valve.rc

Replacing this file in a config package is a very bad idea. This config file loads the startup menus, it runs the autoexec, and run a joystick configuration if present.

Client CVARs

These variables allow you to change certain elements of tf2.

Name Default Definition
hud_classautokill 1 Automatically kill player after choosing a new playerclass.
hud_fastswitch 0 Show buckets when switching weapons (tf2 only has 1 weapon per bucket)
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 75 or 90
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)

Bind keys in options menu

To be able to bind your keys to custom commands in the options menu like all of the default commands. In your tf/scripts there may be a file name kb_act.lst, if there isn't, either grab it from the appropriate directory in "team fortress 2 content.gcf" or just create your 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"
"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"
"showmapinfo"		"#TF_MapInfo"
"inspect"		"#TF_Inspect"
"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"
"quit"			"#Valve_Quit_Game"
"toggleconsole"		"#Valve_Console_Toggle"

and then you can add your own commands in pre-existing categories, or create your own category, formatted with the command on the left and description on the right, as shown here:

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


Personal tools