Welcome to FOoM's TeamFortress Files
Using Scripts


UPDATE FOR STEAM - Put all your .cfg files in the folder at - \Program Files\Steam\SteamApps\yourname@youremail.com\team fortress classic\tfc
Please read these direction frst:


Binding your key choices in the game's front end menu works well, but it has limits. Most experienced players edit their TFC preferences directly in the various config files found in your half-life/tfc folder. You edit them with notepad.

A.) Scripts used by all classes can go in autoexec.cfg or Steam's userconfig.cfg

You can put most scripts in your autoexec.cfg or Steam's userconfig.cfg, especially ones you want to use for all classes.

Example: Lets say you want grenade keys that you hit once to prime, then hit again to throw. Since you want that for all classes you would put this script into the autoexec.cfg using notepad.

//Gren Primer - hit key to prime, hit again to throw
bind "f" "throwgren;primeone"
bind "g" "throwgren;primetwo"

You should also copy the bind lines to your config.cfg so that you are sure each key will do exactly what you want it to.


B.) What if you want to use scripts for just one class? Or you want to use the same key for different things with different classes?

In your TFC folder you will find files named "soldier.cfg", "scout.cfg", etc, for all TFC classes. By default thses configs are not executed (used) by the TFC game. But to tweak your configs properly you will need to use them. If your install does not include the class.cfg files, you can download a full and completely blank set here. Unzip them and put in your tfc folder.
To enable the class config files the first thing you do is add this line to your config.cfg; setinfo "ec" "1" - That will turn on the class configs in TFC so that they execute automatically. That means when you spawn as a soldier, the game automatically executes the soldier.cfg, and any changes you make in that config file will be activated. When you change class again the corresponding class config will do the same.

//you must put this put in config.cfg with notepad
setinfo "ec" "1"

Example: Supose you want the "c" key to rocketjump as soldier and to build a sentry gun when you are an engy

Put a rocket jump script in your soldier.cfg like this one,
//rocketjump ver.1 - arc jump
alias ld "cl_pitchspeed 9999;+lookdown;wait"
alias unld "-lookdown;cl_pitchup 1;+lookup;wait;-lookup;cl_pitchup 89;wait;cl_pitchspeed 225"
alias +rkjmp "slot5;ld;+jump;+attack;wait;-attack;-jump;unld;+duck"
alias -rkjmp "-duck"
bind c "+rkjmp"

Note: The alias lines are the script, the bind line chooses the key to run it. For soldier, the config will set the "c" key as rocketjump.

Then put a sentry build script in your engineer.cfg like this,
//sentry build script
alias +sentry "detsentry; build 2"
alias -sentry "build 5"
bind x "rotatesentry"
bind c "+sentry"

Note: The "c" key will now be set for building gun when playing engineer.


Fornaught's Config Files

You can look at the full config setup I use ingame on the link below. I dont recommned that you replace your configs with these, just use them for reference to see how I set up the configs. These are the exact configs I use every time I play TFC.
Fornaughts full config files
Blank cfg files for all classes



Thats a good start with scripts, they can be made as simple or complex as you wish.
My advice is to keep it simple and ask for help when you need it.



Have any questions or need help?
You can post on our public forum, or reach us in irc.gamesurge #foom.

Have any scripts or links you would like to see here?
Submit them on our forum.