There one thing that you still don't know about me - I'm a HL scripting expert (for all it's worth ;-) so I thought I'll copy&paste a script I posted on the Steam forums recently. It might be useful for some of you.
"Back in the day I used to play around with HL scripts A LOT - mostly for myself and my friends. My config was so huge that it obviously caused a z_malloc overflow and I had to split it into smaller files which were loaded consecutively. Basically there were none of the commonly sought after "cheat scripts" like anti-recoil etc. but advanced customization settings like a script that fast-switched only the three basic weapons (without grenades) on the mousewheel when fastswitch hadn't been implemented for it yet etc.
I digress.
I heard that many people like to switch their Medic, Pyro and now Heavy, I presume, loadouts without having to go through the annoying mouse-click menus. This is achieved by using the "equip" command and some simple binds but from what I gathered none of the scripts were "elegant enough" for me - the most advanced thing they were doing was a simple button cycle algorithm.
You may already notice that my motto is: "If it's worth doing then it's worth overdoing" (I wrote a batch script once that had around 1000 lines of code to basically rename one file back and forth with an interactive user interface etc. ;-)
Hence I came up with more POWERFUL versions of the quick loadout switching script for the Medic, the Pyro and the Heavy (figuring out the weapon codes was easy since Valve seems to follow a certain numbering scheme and it was only a matter of trying out some combinations =).
What the scripts do is quite simple: they allow you to cycle through your normal and unlockable weapons with three keys (of course you have to stand in a spawn area and have unlocked the given weapon - this isn't any kind of cheat script) and display pretty console messages in the upper left corner while doing so. You can define your default loadout and even check it with a fourth key which, again, displays some pretty messages.
The scripts are commented; specifically for YOU guys, I could do without all this stuff if I were to use it only by myself; so changing your loadout and the keys (mine are F1, F2, F3 and F4) should be quite easy.
Redundant after the last update:
There's one minor issue with the Backburner: if you select the weapon without going through the menu your maximum health will increase to 225 points BUT you'll still have the default 175 hitpoints so you'll be needing a trip to the nearest locker (which should be close by since you're in the spawn area anyway) or some other form of healing.
Without further ado, here are the scripts.
Paste them into your Steam -> steamapps -> account@someserver.com -> team fortress 2 -> tf -> cfg -> pyro.cfg, medic.cfg and heavyweapons.cfg files respectively.
Code:
// Pyro
// -------------------------------IGNORE-THIS-;-)---------------------------------------------------
// Message setup
alias "d1" "developer 1; contimes 3; con_notifytime 3"
alias "d4" "developer 1; contimes 6; con_notifytime 5"
alias "d0" "wait 1000; contimes 0; con_notifytime 0; developer 0"
alias "m_backburner" "echo Equipped a Backburner"
alias "m_flamethrower""echo Equipped a Flamethrower"
alias "m_flaregun" "echo Equipped a Flare Gun"
alias "m_shotgun" "echo Equipped a Shotgun"
alias "m_axtinguisher""echo Equipped an Axtinguisher"
alias "m_fireaxe" "echo Equipped a Fire Axe"
// Equipment aliases with cycle stubs
alias "backburner" "equip 7 0 5; alias message1 m_backburner; alias prim 1norm"
alias "flamethrower" "equip 7 0 0; alias message1 m_flamethrower; alias prim 1custom"
alias "flaregun" "equip 7 1 4; alias message2 m_flaregun; alias sec 2norm"
alias "shotgun" "equip 7 1 0; alias message2 m_shotgun; alias sec 2custom"
alias "axtinguisher" "equip 7 2 6; alias message3 m_axtinguisher; alias tert 3norm"
alias "fireaxe" "equip 7 2 0; alias message3 m_fireaxe; alias tert 3custom"
// Aliases for the binds
alias "1custom" "backburner; d1; message1; d0"
alias "1norm" "flamethrower; d1; message1; d0"
alias "2custom" "flaregun; d1; message2; d0"
alias "2norm" "shotgun; d1; message2; d0"
alias "3custom" "axtinguisher; d1; message3; d0"
alias "3norm" "fireaxe; d1; message3; d0"
// Loadout echo
alias "my_loadout" "d4; echo My current loadout:; message1; message2; message3; d0"
// -------------------------------YOUR-STUFF-GOES-HERE---------------------------------------------------
// Default setup
backburner
shotgun
axtinguisher
// Binds (prim = primary weapon, sec = secondary, tert = tertiary weapon, my_loadout = echo of current loadout)
bind "F1" "prim"
bind "F2" "sec"
bind "F3" "tert"
bind "F4" "my_loadout"
Code:
// Medic
// -------------------------------IGNORE-THIS-;-)---------------------------------------------------
// Message setup
alias "d1" "developer 1; contimes 3; con_notifytime 3"
alias "d4" "developer 1; contimes 6; con_notifytime 5"
alias "d0" "wait 1000; contimes 0; con_notifytime 0; developer 0"
alias "m_blutsauger" "echo Equipped a Blutsauger"
alias "m_syringe" "echo Equipped a Syringe Gun"
alias "m_kritzkrieg" "echo Equipped a Kritzkrieg"
alias "m_medigun" "echo Equipped a Medigun"
alias "m_ubersaw" "echo Equipped an Ubersaw"
alias "m_bonesaw" "echo Equipped a Bonesaw"
// Equipment aliases with cycle stubs
alias "blutsauger" "equip 5 0 1; alias message1 m_blutsauger; alias prim 1norm"
alias "syringe_gun" "equip 5 0 0; alias message1 m_syringe; alias prim 1custom"
alias "kritzkrieg" "equip 5 1 2; alias message2 m_kritzkrieg; alias sec 2norm"
alias "medigun" "equip 5 1 0; alias message2 m_medigun; alias sec 2custom"
alias "ubersaw" "equip 5 2 3; alias message3 m_ubersaw; alias tert 3norm"
alias "bonesaw" "equip 5 2 0; alias message3 m_bonesaw; alias tert 3custom"
// Aliases for the binds
alias "1custom" "blutsauger; d1; message1; d0"
alias "1norm" "syringe_gun; d1; message1; d0"
alias "2custom" "kritzkrieg; d1; message2; d0"
alias "2norm" "medigun; d1; message2; d0"
alias "3custom" "ubersaw; d1; message3; d0"
alias "3norm" "bonesaw; d1; message3; d0"
// Loadout echo
alias "my_loadout" "d4; echo My current loadout:; message1; message2; message3; d0"
// -------------------------------YOUR-STUFF-GOES-HERE---------------------------------------------------
// Default setup
blutsauger
medigun
ubersaw
// Binds (prim = primary weapon, sec = secondary, tert = tertiary weapon, my_loadout = echo of current loadout)
bind "F1" "prim"
bind "F2" "sec"
bind "F3" "tert"
bind "F4" "my_loadout"
Code:
// Heavy
// -------------------------------IGNORE-THIS-;-)---------------------------------------------------
// Message setup
alias "d1" "developer 1; contimes 3; con_notifytime 3"
alias "d4" "developer 1; contimes 6; con_notifytime 5"
alias "d0" "wait 1000; contimes 0; con_notifytime 0; developer 0"
alias "m_natasha" "echo Equipped Natasha"
alias "m_sasha" "echo Equipped Sasha"
alias "m_sandvich" "echo Equipped a Sandvich"
alias "m_shotgun" "echo Equipped a Shotgun"
alias "m_kgb" "echo Equipped K.G.B."
alias "m_fists" "echo Equipped Fists"
// Equipment aliases with cycle stubs
alias "natasha" "equip 6 0 8; alias message1 m_natasha; alias prim 1norm"
alias "sasha" "equip 6 0 0; alias message1 m_sasha; alias prim 1custom"
alias "sandvich" "equip 6 1 7; alias message2 m_sandvich; alias sec 2norm"
alias "shotgun" "equip 6 1 0; alias message2 m_shotgun; alias sec 2custom"
alias "kgb" "equip 6 2 9; alias message3 m_kgb; alias tert 3norm"
alias "fists" "equip 6 2 0; alias message3 m_fists; alias tert 3custom"
// Aliases for the binds
alias "1custom" "natasha; d1; message1; d0"
alias "1norm" "sasha; d1; message1; d0"
alias "2custom" "sandvich; d1; message2; d0"
alias "2norm" "shotgun; d1; message2; d0"
alias "3custom" "kgb; d1; message3; d0"
alias "3norm" "fists; d1; message3; d0"
// Loadout echo
alias "my_loadout" "d4; echo My current loadout:; message1; message2; message3; d0"
// -------------------------------YOUR-STUFF-GOES-HERE---------------------------------------------------
// Default setup
sasha
sandvich
kgb
// Binds (prim = primary weapon, sec = secondary, tert = tertiary weapon, my_loadout = echo of current loadout)
bind "F1" "prim"
bind "F2" "sec"
bind "F3" "tert"
bind "F4" "my_loadout"
Several notes
- I noticed that the scripts are ESPECIALLY useful on the Special Attack servers with their melee-only sudden death. I couldn't be bothered to mention that but I've been reaping the benefits of this knowledge for quite some time: using my scripts to define default loadouts through "equip" commands DOESN'T change the equipment you have chosen on the loadout screen. How is that useful? You can actually choose the Fireaxe and Bonesaw in the loadout screen since they are far more useful in Sudden Death and e.g. the Axtinguisher and Ubersaw as defaults in my script (the sudden death plugin doesn't execute class scripts - I realized that when I wasn't able to switch my weapon with F3 =)... Tadaa!
- The info messages displayed in the upper left corner aren't handled in a very elegant way and that's because Valve changed the behavior of the "developer 0" command... Basically if you start switching all the weapons around the messages will be disappearing very quickly when all the "wait" commands initiated before catch up... Back in the day it was possible to simply use "developer 0" and all the text that had been displayed before wouldn't disappear... :-(
- If you prefer "whole loadout switching" (I for my part use all kinds of different combos so I don't want to waste keyboard space) then you just need the part where I aliased all the weapon equipment commands and make some really easy binds like:
bind "anykey" "backburner; shotgun; fireaxe"
bind "anotherkey" "flamethrower; flaregun; axtinguisher" etc.
Any suggestions are welcome. I am able (but not necessarily willing) to write ANY script that's possible in Valve's very, very simple console scripting language but I'll most likely ignore any requests concerning new scripts if I wouldn't use them myself (currently I'm using none except for the one above) unless they're challenging and fun to code or designed to do some crazy stuff. :-D"