Everytime I see somebody type a script for TF2, even if it is a script specifically for one class, I see people put it in the autoexec.cfg. It seems as though the best place to put a rocket jump script would be in the soldier config, and the best place to put a sap script would be the spy.cfg.

Is there a reason people use the autoexec.cfg rather than the class config files?

  • 1
    Wow, thank you for introducing me to TF2 scripting. I had no idea this was even available.
    – JavadocMD
    Commented Jul 16, 2010 at 18:54

2 Answers 2


The individual class configs only need to be used if you have a bind conflict, as it won't matter what your binds for the Spy are while playing Scout, as long as they don't impede your other controls.

Generally, it's just laziness and not wanting to avoid all the binds in the other class configs.


I'm answering my own question here because I tinkered around with this last night and discovered the real reason people don't use the class configs. They don't work right.

If you add a rocket jump script to the soldier config I would expect that every time I play a soldier, and only a soldier, the rocket jump script would be enabled. This is only mostly true. The fact is that once I play a soldier the rocket jump script is now on all my classes.

Lets say I assigned the rocket jump script to mouse2 (which is entirely reasonable since the bazooka doesn't have an alt+fire). I play a soldier for a while, but then my team needs some defense and I switch to a demo man. When I try to detonate my sticky bombs using mouse2 I now jump and fire another sticky. Very, very annoying.

If you use the autoexec config at least you know that everything you add will affect all classes and you can plan accordingly.

  • That's fine. A script is only executed once, it can't be un-executed. You'd have to unbind all somewhere to have them work that way.
    – user56
    Commented Jul 16, 2010 at 13:10
  • 4
    I have mine setup in such a way that I created a default.cfg config that contains all the basic bindings (i.e. direct copy from config.cfg). It also runs an unbind all at the start of the file. This way all my class specifc configs do exec default.cfg and then load their class specific things. The only real downside of this approach is you can't change any key bindings in the ingame options because they will be reset next time you change classes.
    – Stephan
    Commented Jul 16, 2010 at 14:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .