REViLLA Quake Site
News, Views, Opinion, Waffle...Massive Collection of the Greatest Quake DemosQuake Playing Guides, Advice, Configs, Paks, Binds...Quake Scene Links, Clan Sites Chart, Other Links...Extra - Resources, Profile, HooD Q2 Site, and More...
Quake 2 Bind-Writing Guide

Back to Binds Menu

Quake 2 Basic Bind Writing

This was split into various lessons on my old site. But here I've lumped the whole lot together in one memorable chunk for you to cut out and keep. Ignore me :)

Contents

1. The Console/Simple Binds - GO!
2. Config Files - GO!
3. Aliases - GO!
4. The Console/Simple Binds - GO!
5. Autodeactivating Aliases - GO!
6. The Console/Simple Binds - GO!
7. Mods - GO!
8. Simple One Key Toggle - Lag Defeater - GO!
9. Alias Rebinds Key - Multiple Demo Recorder - GO!
10. Aliases Rebind Aliases - Sensitivity and FPS Modifier - GO!
11. Modifier Keys - Shift/Ctrl/Alt - GO!
12. Weapon Drops - GO!
13. Banners - GO!

1. The Console/Simple Binds

When playing you don't want to have to stop, press your talk key and type a message everytime you want to express yourself so it's recommended to create binds, which are messages or commands attached to keys that you define. Quake2 provides you with a console where you can type in commands and execute scripts of pre-written commands. These commands can be team play messages, regular playing messages, special tricks like one key rocket jumps or zooms and even adjustments to the way Quake displays graphics. The console is a very powerful tool that lets you modify the game to a fair degree, but remember that it is part of Quake so if you can do it at the console it's not cheating in any way.

To bind a message to a key bring down the console (the key below escape) and type - bind <key> "hehehe"

Examples:

Bind H "Hehehe"

Bind Y "Shotm8"

Bind M "Nice1"

Binding commands is the same:

Examples:

Bind R "Use Railgun"

Bind P "Ready" (for use in Battleground)

Bind M "Drop Machinegun"

2. Config Files

A collection of binds can be combined in a config file. Write config files in Notepad, or any other text editor, that contain all the binds you need and save the file in the format <name>.cfg (mybinds.cfg for exampl). Save the file in your c:\quake2\baseq2 directory. To execute this file, bring down the console and type "exec mybinds.cfg". Another method is to make an autoexec.cfg file. This is automatically executed when you launch the game. This should contain all your regular binds and aliases to save you time.

For example, here is my chat.cfg file:

bind u "say thnx"

bind y "say shotm8"

bind h "say hehehe"

//bind z "say }:)" - NOTE: Using "//" means that Quake will ignore the text.

//bind x "say }:(" - So these lines aren't being executed.

bind , "say cyam8"

bind . "say him8"

bind l "say gg"

bind p "say played"

Experienced Users:

Any configs put in the baseq2 folder will be available to all mods but you may have to execute them manually. The trick I use is to place my autoexec.cfg in my c:\quake2 directory. I then have separate short autoexec.cfg files in each mod directory which then call this main one. For example my Lithium autoexec.cfg reads:

exec "../autoexec.cfg" // This calls the main autoexec in the quake2 directory

bind mouse2 "+hook" // These two add the specific binds needed for Lithium

bind m "drop rune"

Another thing to note when you start writing a lot of configs is that there is a size limit beyond which the config will produce an error. This is not a problem, simply add the line "exec nextbit.cfg" or whatever and start a new config.

Furthermore you need to bear in mind that the last line of the config will not be excuted so always make sure you have pressed enter after each line of text.

3. Aliases

Binds can only contain one command or one message. If you need more than this you have to use aliases. Aliases are collections of commands that can be executed together. For example, say you want to have a bind that combines saying "Hi" with a salute. The command for the salute is "Wave 1". The alias is written as follows:

alias greetings "say Hi;wave 1"

bind <key> "greetings"

You use the ";" to separate commands. The alias can have any name you choose and is case-sensitive.

4. The Console/Simple Binds

The standard keys are easy to bind "bind a blah", "bind space blahblah", but you can also attach binds to the keypad, which can be better because they're out of the way. Use the following descriptions:

KP_END, KP_DOWARROW, KP_PGDN, KP_LEFTARROW,

KP_5, KP_RIGHTARROW, KP_HOME, KP_UPARROW,

KP_PGUP, KP_SLASH, KP_MINUS, KP_PLUS,

KP_ENTER, KP_INS, KP_DEL, The Asterisk one - you've got me :(

For example:

Bind KP_HOME "Contact Info: revilla@revilla.com, ICQ 21345065"

5. Autodeactivating Aliases

Another trick with aliases is to make them activate and automatically deactivate by using a "+" symbol. Here's an example:

alias +cg "use chaingun;+attack"

alias -cg "-attack;weaplast"

bind mouse2 "+cg"

This will bring out and fire your chaingun when you hold down the right mouse button and then select your last weapon when you let go.

Another example:

alias +zoom "fov 30"

alias -zoom "fov 90"

bind mouse2 "+zoom"

This zooms in your view when you press the right mouse button and returns to normal when you let go. There's a more advanced version of this in the next lesson.

6. The Console/Simple Binds

It is possible to set variables in Quake just like a programming language. For example, when using binds which temporarily change your sensitivity, like the zoom one, you need to be able to record values so they can be restored.

Using the command set you can (obviously enough) set a variable to a value, which can be either a number or a word. For example:

set oldsensitivity $sensitivity

Note: The dollar sign is used to set "oldsensitivity" to the value of "sensitivity" and not to the word itself.
Some variables are already set up. For example:

bind h "say Hi my name is $name"

or

bind m "say I 0wn $mapname"

Variables are complex but they are the key to some very fancy tricks you can use to really make full use of binds.

Here are two examples of aliases, variables and autodeactivation at work. Don't worry if you don't understand how they work (especially the rocket jump one), as long as you see what's going on.

Zoom Bind:

Here's my zoom bind (This also uses the autodeactivation mentioned in the last lesson):

// Sniperscope

alias +zoom "set storesen $sensitivity;set sensitivity $finesen;fov 100;wait;fov 70;wait;fov 55;wait;fov 48;wait;fov 45;wait;fov 44"

alias -zoom "set sensitivity $storesen;fov 120"

bind <key> "+zoom"

The "fov" command does the zooming. It controls what your field of vision should be. I use fov 120 (the default being 90) which lets you see more but things also look further away and thus smaller and harder to aim at. However, being able to see attackers out of the corner of your eye is very useful and a higher fov makes you feel as if you're running faster, too. The "waits" are there to make it zoom in smoothly, and aren't really necessary to be honest, but I like them.

Rocket Jump Bind:

Here's my rocket jump bind (but I don't use it anymore :P ):

// Rocket Jump Quake 2 Alias - Custom Version (Taken from PQ site)

alias +rj "rj1;rj2"

alias rj1 "set cl_pitchspeed- $cl_pitchspeed;cl_pitchspeed 100000;wait;+lookdown;wait;-lookdown;set cl_pitchspeed $cl_pitchspeed-"

alias rj2 "set hand- $hand;hand 2;+moveup;+attack;echo Rocket Jump"

alias -rj "-attack;-moveup;set hand $hand-;centerview"

bind <key> "+rj"

7. Mods

There's more to Quake than the ordinary Deathmatch as you'll already know. There are in fact a vast range of mods you can play. Three of the most common are CTF, Battleground and Lithium. Because these mods add extra features to the game they require the use of extra commands and for this you will need the console and, preferably, some binds to speed things up.

Capture The Flag:

The Grapple:

In this game you get an extra tool, the grapple. This lets you swing around the map like Tarzan and good players use it to sweep into the enemy base, grab the flag and flee without using weapons at all.

The basic command for the grapple is "Use Grapple". This selects the grapple then you press fire to use it. Personally though, I don't find this quick enough. I use the following alias and bind which fires the grapple instantly:

alias +hook "use grapple;+attack"

alias -hook "-attack"

bind mouse2 "+hook"

Special Variables:

Both CTF and Battleground allow you to use special variables that are replaced with the appropriate text. Here they are:

%H - Your health.

%N - Name(s) of the player(s) standing near to you.

%W - The weapon you're currently holding.

%A - Your armour.

%L - Your current location.

%T - Amount of ammo.

The last one I've mentioned is probably the most useful because you can set up team play messages (see below) to announce your location, which is vital for co-ordinating attacks and manoeuvres.

They are used like any other normal variable as follows:

bind F5 "say_team ATTACKING - %h, %a, %t and %w"

bind F6 "say_team >>> NEED SUPPORT [I'm %L] <<<"

bind F7 "say_team Do you want my power shield %n ?"

Team talk:

Say_Team was mentioned above and is a special command that shows messages only to your team-mates. The enemy cannot see them.

For example:

bind F5 "say_team DEFENDING - %h, %a, %t and %w"

Currently you probably use the "T" key to talk mid-game. This is set up for a server-wide message. It is also possible to create a team-talk key that works in the same way, as follows:

bind Y "messagemode2"

Other useful CTF commands:

Team red/blue -This lets you change team. Always join the losing team when you join a server.

Drop Tech - There are four different techs in CTF which alter aspects of your character:

1. Power Amplifier - Increases the strength of your weapons. Useful for defenders.

2. Time Accelerator - Increase the rapidity of your fire. Again, useful for defenders.

3. Disruptor Shield - Increases your capacity to withstand attacks. Useful for attackers.

4. Autodoc - Gradually increases your health up to 150. If you then get the Megahealth you'll have 250 health!! This page isn't about tactics at all but if I just mention a common trick used by serious CTF teams. They swap this rune between themselves to charge each other up then hand it back once they're at peak health. Very clever.

Anyway, the "drop tech" command drops your current one and lets you pick up a new one. One problem is that if you drop a tech, you can't pick it back up unless you've had another tech in the meantime.

Battleground:

This mod is used for clan battles and for duels. There are many commands available (some only to admins) but these are the most useful:

Ready - You must type ready before the match can begin.

Team <teamname> - This lets you join either team. Note that there may be a size limit to the team and also the people in the team can lock it to prevent further people joining. Duellers often do this.

Teamname <teamname> - Changes the name of the team you're in. Only the captain can do this, the first person to join the team.

Teamskin <teamskin> - Changes the skin worn by your team. Again this is only available to the captain. Use it as follows:

teamskin "male/claymore"

teamskin "female/voodoo"

Say_team/Messagemode2 - These are identical to CTF.

The Variables %H, %W, %A, %N, %T and %L - Again, these are identical to CTF.

Lithium:

This is a great mod for improving your skills because it is so frantic. There are two main differences from ordinary deathmatch - the grapple and the runes.

The grapple is different from CTF's in that it is far faster. Also, you can use it whilst still using your current weapon. The bind is simpler, too:

bind mouse2 "+hook"

Next, there are the coloured runes which are similar to CTF's. To drop one you use this command:

bind M "Drop rune"

8. Simple One Key Toggle - Lag Defeater

Here's how to use a simple toggle key. This is a bind I use constantly. When you get severe lag, you can recover sometimes by lowering your rate to a low amount (this prevents the game trying to get more data than your connection is capable of, and gives the connection chance to recover. See again how a variable is used to store the original value of rate:

alias lowrate "set arate $rate;set rate 10;netgraph 1;bind LEFTARROW highrate;echo Low Rate: $rate"

alias highrate "set rate $arate;netgraph 0;bind LEFTARROW lowrate;echo Normal Rate: $rate"

bind LEFTARROW "lowrate"

9. Alias Rebinds Key - Multiple Demo Recorder

Here's a very useful mini script for recording more than one demo, without having to use the console. Notice how F5 is rebound by the alias so it executes the next alias on the next keypress. Also notice how I've tagged a variable onto the end of "demo1_" so the map name is inserted:

//Multiple Demo Recorder by Revilla

alias drtext "echo *** Recording Demo Now - Press F6 to Stop ***"

alias nextdemo1 "stop;drtext;record demo1_$mapname;bind F5 nextdemo2"

alias nextdemo2 "stop;drtext;record demo2_$mapname;bind F5 nextdemo3"

alias nextdemo3 "stop;drtext;record demo3_$mapname;bind F5 nextdemo4"

alias nextdemo4 "stop;drtext;record demo4_$mapname;bind F5 nextdemo5"

alias nextdemo5 "stop;drtext;record demo5_$mapname;bind F5 nextdemo6"

alias nextdemo6 "echo *** No more demo slots available ***"

alias stoprecording "stop;echo *** Demo Stopped - Press F5 to Start ***"

bind F5 "nextdemo1"

bind F6 "stoprecording"

10. Aliases Rebind Aliases - Sensitivity and FPS Modifier

These scripts use a similar method to the demo recorder in Lesson 9, but there is a difference in the way they work. For the demo recorder I used an alias that rebinds the key to the next alias. These scripts bind a key to a set alias and it is that alias that is rebound. Look at the scripts below.

Here's a very good mini script for modifying your sensitivity, without having to use the console:

//Sensitivity Modifer by Revilla

alias modsenmore "ms4"

alias modsenless "ms2"

alias ms1 "echo Sensitivity 4 (MIN);sensitivity 4 ;alias modsenmore ms2; alias modsenless ms1"

alias ms2 "echo Sensitivity 4.5 ;sensitivity 4.5 ;alias modsenmore ms3; alias modsenless ms1"

alias ms3 "echo Sensitivity 4.75 ;sensitivity 4.75;alias modsenmore ms4; alias modsenless ms2"

alias ms4 "echo Sensitivity 5 ;sensitivity 5 ;alias modsenmore ms5; alias modsenless ms3"

alias ms5 "echo Sensitivity 5.5 (MAX);sensitivity 5.5 ;alias modsenmore ms5; alias modsenless ms4"

bind - "modsenless"

bind = "modsenmore"

This next script is identical in method but it is for modifying your frames per second (it is useful to lower your fps when you are suffering lag, but if your connection is good you will want to increase it to play better):

//FPS Modifier by Revilla

alias modfpsmore "fps5"

alias modfpsless "fps3"

alias fps1 "echo FPS 41 (MIN);set cl_maxfps 41;alias modfpsmore fps2;alias modfpsless fps1"

alias fps2 "echo FPS 43 ;set cl_maxfps 43;alias modfpsmore fps3;alias modfpsless fps1"

alias fps3 "echo FPS 45 ;set cl_maxfps 45;alias modfpsmore fps4;alias modfpsless fps2"

alias fps4 "echo FPS 50 ;set cl_maxfps 50;alias modfpsmore fps5;alias modfpsless fps3"

alias fps5 "echo FPS 55 ;set cl_maxfps 55;alias modfpsmore fps6;alias modfpsless fps4"

alias fps6 "echo FPS 60 (MAX);set cl_maxfps 60;alias modfpsmore fps6;alias modfpsless fps5"

bind UPARROW "modfpsmore"

bind DOWNARROW "modfpsless"

What's the difference between this method and that mentioned in the last lesson you may well ask. With longer scripts it's more elegant if you like to use these kind of aliases because, if you choose to rebind the key you only need alter one line in the script. With the other method you would need to edit every line. The other method is useful for short binds, though, because it is so simple to understand.

11. Modifier Keys - Shift/Ctrl/Alt

If you've ever tried writing clan binds you've probably realised that there just aren't enough keys on the keyboard. Using modifier keys, however, you can assign multiple messages to the same key. So, for example, you could have Key M - "Megahealth Room Secure" and ALT-M - "Megahealth Room Lost to Enemy". They work best and are easier to remember when you assign related messages to the keys in question. Anyway, here it is:

The trick is to use variables that are reassigned when the relevant modifier key is pressed. You have an alias with a variable in its name so that the correct one is called. It sounds complex but it's relatively simple:

bind CTRL "+set_ctrl"

alias +set_ctrl "set modifier 1"

alias -set_ctrl "set modifier 0"

bind ALT "+set_alt"

alias +set_alt "set modifier 2"

alias -set_alt "set modifier 0"

set modifier 0

So, when you hold down ALT, modifier is set to 2, and when you hold CTRL it is set to 1. The "-set_alt" and "-set_ctrl" reset "modifier" to zero when u let go (Check Lesson 1 for info on autodeactivating aliases). Next, you need to design aliases that will be called depending on what modifier is set to:

alias example "example_$modifier"

alias example_0 "say_team All Secure %L" // Pressing "M" on its own

alias example_1 "say_team Need Support %L" // Pressing Ctrl+M

alias example_2 "say_team Multiple Hostiles %L" // Pressing Alt+M

bind m "example"

As you can see, the trick is in the top line - you are setting "example" to call a variable alias. You will obviously want to experiment with this but I should point out that the variable must be at the end. So you can't have "example_$mapname_$position" for example. However, in theory there is nothing to stop you setting up the Keypad keys as modifiers, allowing you 9 messages per key! You decide :)

12. Weapon Drops

In any team game you should share out your ammo and weapons so that the team as a whole will have more firepower and stand more chance of winning. To do this you need a slick set of weapon-drop keys, which I can provide :P . I'm going to give away my set here which took a lot of tweaking and development over the months. It's a long script but it allows you to drop weapons and ammo together or just ammo.

This script uses most of the skills I've gone through so far. Modifiers - to choose whether to drop ammo or the weapon as well, using the same key. Autodeactivation - for the modifiers. Toggle keys - for the declaration. You can set it to announce the drop or drop silently. Variable Aliases - You can use the 3 key to select the Super Shotgun as normal, with Shift to drop shells, or with ctrl to drop shells plus the weapon itself. team-talk messages - for the declaration.

bind CTRL "+set_ctl"

alias +set_ctl "set modifier 1"

alias -set_ctl "set modifier 0"

bind SHIFT "+set_shft"

alias +set_shft "set modifier 2"

alias -set_shft "set modifier 0"

bind ALT "+set_alt"

alias +set_alt "set modifier 3"

alias -set_alt "set modifier 0"

set modifier 0

bind 3 "selectss"

bind 4 "selectcg"

bind 5 "selectcg"

bind 6 "selectrl"

bind 7 "selectrl"

bind 8 "selecthb"

bind 9 "selectrg"

bind 0 "selectbfg"

alias selectcg "selectcg_$modifier"

alias selectcg_1 "drop MACHINEGUN;drop CHAINGUN;drop BULLETS;drop BULLETS;set droptext CHAINGUN/MACHINGUN;declare"

alias selectcg_2 "drop BULLETS;set droptext BULLETS;declare"

alias selectcg_0 "use MACHINEGUN;use HYPERBLASTER;use CHAINGUN"

alias selecthb "selecthb_$modifier"

alias selecthb_1 "drop HYPERBLASTER;drop CELLS;drop CELLS;set droptext HYPERBLASTER;declare"

alias selecthb_2 "drop CELLS;set droptext CELLS;declare"

alias selecthb_0 "use HYPERBLASTER"

alias selectrl "selectrl_$modifier"

alias selectrl_1 "drop GRENADES;drop GRENADE LAUNCHER;drop ROCKET LAUNCHER;drop ROCKETS;drop ROCKETS;set droptext RL/GL;declare"

alias selectrl_2 "drop ROCKETS;set droptext ROCKETS;declare"

alias selectrl_0 "use GRENADES;use GRENADE LAUNCHER;use ROCKET LAUNCHER"

alias selectrg "selectrg_$modifier"

alias selectrg_1 "drop RAILGUN;drop SLUGS;drop SLUGS;set droptext RAILGUN;declare"

alias selectrg_2 "drop SLUGS;set droptext SLUGS;declare"

alias selectrg_0 "use RAILGUN"

alias selectss "selectss_$modifier"

alias selectss_1 "drop SHOTGUN;Drop SUPER SHOTGUN;drop SHELLS;drop SHELLS;set droptext SUPER_SHOTGUN;declare"

alias selectss_2 "drop SHELLS;set droptext SHELLS;declare"

alias selectss_0 "use SHOTGUN;use SUPER SHOTGUN"

alias selectbfg "selectbfg_$modifier"

alias selectbfg_1 "drop BFG10K;drop CELLS;drop CELLS;set droptext BFG10K;declare"

alias selectbfg_2 "drop CELLS;set droptext CELLS;declare"

alias selectbfg_0 "use BFG10K"

alias declareon "set dec 1;bind kp_slash declareoff;echo Declare On"

alias declareoff "set dec 0;bind kp_slash declarejoke;echo Declare Off"

alias declarejoke "set dec 2;bind kp_slash declareon;echo Declare Joke"

alias declare "declare_$dec"

alias declare_1 "wave 1;say_team ** $droptext Dropped %L [%n] **"

alias declare_2 "wave 1;say_team ** Oops Butterfingers - $droptext Dropped %L [%n] **"

alias declare_0 "wave 1"

declareon

There. I hope that helps. One thing. I have some extra lines inserted in mine to bind other keys to the weapons. So, to bind "A" to the rocket launcher I just insert:

bind a "selectrl"

13. Banners

If you've ever seen players displaying fancy bordered messages or their names in large lettering you may be wondering how to do this. It is in fact very simple. You use a special program called Q2TEXT to write a four line banner. You then bind a key to execute this config at any time. Don't use them too often, though, it gets annoying and there's also a risk of being kicked from some servers for message flooding.

Download Q2TEXT here: http://www.at-dot.freeserve.co.uk/index.html

Then save the config it creates in your baseq2 directory and write a bind as follows:

bind F11 "exec mybanner.cfg"

And that's as far as my course went. I always intended to publish my own personal team binds but I've never got round to it. Most top teams use a modified pak file so that the letter characters are brighter and it also gives you coloured symbols for highlighting special messages. Very easy to do. If there's the demand I'll explain it :)

 


Contact Information - E-Mail: REViLLA, ICQ: 21345065

Site Created on 1 January 2000. All Content, Design and Graphics by REViLLA.