The alias is a very robust and powerful element of the Quake 2 console. For that reason I
have dedicated an entire page in this tutorial to its discussion. By no means do I think I
will teach you everything there is to know about aliases, but I will give you a working
knowledge of them so you can at least start using other people's aliases.
An alias, at its most basic level, is just a console
command. What an alias does is give the user the ability to lump a combination console
commands into one. Say I wanted to be able to send a pre-written message to every other
player, display the Quake 2 version info, and change to the last weapon I was carrying all
with the press of one key (of course why you would want to do all that at once is another
question). All of that could be accomplished rather easily with and alias and binding that
alias to a key. See the example below:
bind q weird
alias weird "say Weird Aliases Are Fun!; version; weaplast"
Copy the above example into your autoexec.cfg file located
in the "baseq2" folder of your Quake 2 directory. If autoexec.cfg doesn't exist
then go ahead and create the file and then copy the example into it and save. Now start
Quake 2 and enter a level. Every time you press the Q key you will say
"Weird Aliases Are Fun!", your version of Quake 2 will be displayed, and your
player will switch to the last weapon he/she was carrying.
HOW AN ALIAS WORKS
To better understand the alias I will now step you through the above example alias to see
just how it works. Let's start by looking at the line that starts with "alias."
This is where the alias is actually declared. After the word "alias" comes the
word "weird." That is the name (given by you) for the alias. Naming an alias is
important because if we didn't there would be no way to run the alias. In this example we
could run the alias "weird" at any time by bringing down the Quake 2 console and
typing in "weird."
After we've named the alias comes the actual commands
performed by it. There are a total of three console commands used in this alias:
- say Weird Aliases Are Fun!
Notice the syntax I use for the commands in the alias. All
of them are in between quotation marks (" "), and each command is separated by a
semi-colon (;). Now each of those commands is just a console command, as I previously
mentioned. So each command performs as it normally would had you just typed it into the
console by hand. The first command has your character say "Weird Aliases Are
Fun!", the next outputs the version of your copy of Quake 2, and the final command
just switches your player's weapon to the last one they were using.
The final line (actually it's the first) in the above
example is just a bind command that binds the Q key to the alias "weird." So
every time you hit the Q key the alias "weird" is executed.
On a basic level that's how aliases work! Now that wasn't
too hard, was it?
After reading the above information you should have the basics of aliases down. Like many
players however you may not care to actually write your own aliases - and why should you?
You're too busy playing Quake 2 to worry about that sort of stuff! Luckily there are
plenty of people on the Internet who are writing aliases (good ones, too) and distributing
them for others to use.
Of course once you find the aliases you've got to know how
to use them. If you've read the page up to this point you already know most of what it
takes to run a basic alias. Here's quick recap of how to use a basic alias:
- copy the alias into a cfg file in your "baseq2"
- Start Quake 2 and make sure the cfg file with the alias is
executed (e.g. exec myconfig.cfg).
- To run the alias either type its name in the console or
press the key that the alias is bound to.
That's how a basic alias is setup and executed. There is
one other type of alias that runs a bit differently. These types of aliases require the
user to press a key and hold it down for the alias to work effectively. A good example of
this would be the "sniper scope" alias. This alias allows you to zoom in on an
area, much like looking at through a sniper scope. Here's what that alias looks like
(alias by Jack Frost):
bind ctrl +zoom
alias +zoom "fov 20"
alias -zoom "fov 90"
Notice that this particular alias is actually made up of
two separate aliases - "+zoom" and
"-zoom." The "+zoom" alias zooms in and "-zoom" zooms out.
The only alias that is bound to a key however is "+zoom." So whenever we press
and hold the ctrl key the player's view zooms in. When you release the ctrl key the view
zooms back out to the normal view. The rule of thumb to remember: when you have an alias
that has both "+" and "-" components you should only bind the
"+alias_name" to a key.
SOME USEFUL ALIASES
Here are a few common aliases that are very popular with beginning and expert Quake
players alike. Just copy them into your favorite config file to use. Feel free to change
the keys the aliases are bound to so as to accommodate your control layout.
This alias is useful for use with the Quake 2 mod CTFII (you will learn more about mods
and CTFII in the next part). The alias allows you to grapple up to a position and then
automatically switch to your previous weapon so you can snipe out the enemy team.
To use this alias press and hold down the grapple key - Q
in this example - and fire the grapple at the position you want to hang from. Once you are
there let go of the key and you will automatically switch to the last weapon you were
holding. Press Q again to unhook yourself. This alias was written by ThEWaiT.
bind q "+grap"
alias weap1 "use blaster;alias weaplast use blaster"
alias weap2 "use shotgun;alias weaplast use shotgun"
alias weap3 "use super shotgun;alias weaplast use super shotgun"
alias weap4 "use machinegun;alias weaplast use machinegun"
alias weap5 "use chaingun;alias weaplast use chaingun"
alias weap6 "use grenade launcher;alias weaplast use grenade launcher"
alias weap7 "use rocket launcher;alias weaplast use rocket launcher"
alias weap8 "use hyperblaster;alias weaplast use hyperblaster"
alias weap9 "use railgun;alias weaplast use railgun"
alias weap0 "use bfg10k;alias weaplast use bfg10k"
bind 1 weap1
bind 2 weap2
bind 3 weap3
bind 4 weap4
bind 5 weap5
bind 6 weap6
bind 7 weap7
bind 8 weap8
bind 9 weap9
bind 0 weap0
alias +grap "use grapple"
alias -grap "weaplast"
With this alias you can zoom in on other players, much as if you were looking at them
through a sniper scope. Press and hold down the CTRL key to zoom in. Release the CTRL key
to zoom back out to normal view. Alias by Jack Frost.
bind ctrl +zoom
alias +zoom "fov 20"
alias -zoom "fov 90"
The rocket jump is a great technique but it's more useful if you can do it quickly. This
alias lets you do that. Point yourself in the direction you want to jump and then hit the
F key to rocket jump (just make sure you have the rocket launcher and it's drawn because
otherwise it won't work). Alias by Majestyk.
bind F +rj
alias +rj "rj1;rj2"
alias rj1 "cl_pitchspeed 100000;wait;+lookdown;wait;-lookdown;cl_pitchspeed 150"
alias rj2 "set rj_hand $hand;hand 2;+moveup;+attack"
alias -rj "-attack;-moveup;set hand $rj_hand;centerview"
Well that's the short and skinny on Quake 2 and aliases. As with the console, I highly
recommend you research this topic some more on your free time. Explore around the Quake 2
sites and see what cool aliases people have written.
A good site to start out at is Fahrenheit 176.
That's everything for Part 4. Now click the link below to
enter into the world of Quake 2 mods...