Quake 4 Tweak Guide

[Page 7] Advanced Tweaking



Quake 4 is based on the highly advanced Doom 3 engine, which means one thing - lots and lots of tweaking potential. The last section was all about how to change the easily-accessible in-game settings; this section is all about getting into advanced tweaking. You will note that this section bears a remarkable resemblance to the Advanced Tweaking section of my Doom 3 Tweak Guide - that's unavoidable given it's almost the exact same engine which powers both games. There are notable differences however.


Click to enlarge

Doom 3 vs. Quake 4


Just to be clear, Quake 4 is not identical to Doom 3. Certain Doom 3 commands are different or missing from Quake 4, and vice versa. The aim of this guide is to point out the commands which work in Quake 4, and provide you with a standalone Quake 4 guide so you don't have to refer to my Doom 3 Tweak Guide and work out what the differences are for yourself.


However, the bulk of the tweaks for Doom 3 work exactly the same way for Quake 4, since it's the same basic engine. So if you have a tweaked custom Autoexec.cfg file for Doom 3 for example, you can use that as your starting point for a customized .cfg file for Quake 4 without too much modification.


Using the Advanced Tweaks


The most common mistake made in tweaking Quake 4/Doom 3 is to quickly apply a range of tweaks without knowing what exactly they do, so if you're new to tweaking the Quake 4/Doom 3 engine, read this section carefully and pay close attention to the descriptions of how tweaks are applied and what they do. If you've already done some tweaking for Doom 3, then the methods used are exactly the same, and you can skim through this information.


There are two main ways in which you can access and alter command variables in Quake 4 - through the Console and through .cfg (Config) files. To save time in this guide, I detail all the major commands one by one in the next section, and you can then decide the method to use to implement particular ones. The methods are essentially interchangeable, meaning changing the variable using one method has the same impact as doing it another way - the only difference is which is more convenient for you. Once you're familiar with the various methods, see the 'Which Way is Best' section at the bottom of this page for my opinions of how best to apply tweaks.


The Quake 4 Console


The console is the closest you can get to having direct real-time access to the Doom 3 engine powering Quake 4. Through the console you can enter commands to change engine variables during the game. To open the console, start Quake 4 and then press the CTRL, ALT and ~ keys together. You will see the console come down, and you can enter text at the command prompt. A list of commands you can enter are covered in the next section. To make regular access to the console easier, enter the following line into the console:


seta com_allowconsole 1


This means that you can now open and close the console by simply pressing the '~' key (the key above TAB), and not three keys at once. Note that the best way to make this and many other settings "stick", i.e. remain enabled even after quitting and restarting Quake 4, you will need to insert it into a Config file, or in the game icon's Target line, both of which are covered below.


Quake 4 Config Files


Although you can alter many variables by entering them into the console, most command variables need to be set each and every time you start Quake 4. This is because the game engine resets these variables to their default state as the engine initializes at startup. By default, when the game engine starts, it automatically detects the presence of, and runs the command variables from two specific files: Quake4Config.cfg and AutoExec.cfg. Quake4Config.cfg already exists in your \Program Files\id Software\Quake 4\q4base\ directory, and you can edit it using a text editor like Windows WordPad or Notepad. However changing some of the settings in Quake4Config.cfg will see them reset to default values again the next time you restart Quake 4. So the best thing to do is create a new text file, rename it to AutoExec.cfg and place it in your \Program Files\id Software\Quake 4\q4base\ directory. You can now enter all your custom tweaks and settings into this file, and they will come into effect automatically each and every time you start Quake 4. This makes it easier to keep track of what you have tweaked, and if at any time you want to remove all your tweaks, you can simply delete this AutoExec.cfg file, or see which commands need to have their values manually reset to default.


Note that there is another way of executing a config file, and that is to firstly create a config file with any name you wish, e.g. MyTweaks.cfg, place it in the \Program Files\id Software\Quake 4\q4base\ directory, and then in the Quake 4 console at any time type:


exec MyTweaks.cfg


This will run all the command variables in your new .cfg file, however unless you actually execute this file it will not be automatically run at startup time - only DoomConfig.cfg and AutoExec.cfg are automatically detected and run by Quake 4.


Update: As of the 1.4.2 patch, Quake 4 singleplayer and multiplayer each have their own directories. While singleplayer remains in its original directory, Quake 4 multiplayer can be found under the new \Program Files\id Software\Quake 4\q4mp directory. This means that there are now two sets of .cfg files, one set for singleplayer, the other for multiplayer.



Quake 4 Icon Commands


There is one more way you can run command variables for Quake 4 - enter them as part of the command line for the Quake 4 icon. To do this, first right-click on the icon you use to launch Quake 4, and then select Properties. In the Target box, you will see something similar to this (it varies depending on where you installed the game):


"C:\Program Files\id Software\Quake 4\Quake4.exe"


You can add command variables to the end of this line by using a space and then a '+' sign in front of each command. For example, to allow easy access to the console each time you start Quake 4, change the target line to the following:


"C:\Program Files\id Software\Quake 4\Quake4.exe" +set com_allowconsole 1


Note that there are quotes around the target to the Quake4.exe file, but after that, simply add a space and a plus sign before each command. Another example is provided below with three separate commands:

"C:\Program Files\id Software\Quake 4\Quake4.exe" +set com_allowconsole 1 +set r_gamma 1.3 +disconnect


This means that every time I use this icon to launch Quake 4, it changes my console to one-key access (using the '~' key), changes my gamma from (screen brightness) 1.0 to 1.3, and skips the introductory movies. Note the spacing - none between the plus signs and command, but a single space between each separate command.


So Which Way Is Best?


Now you know the different ways to apply command variables in the Quake 4 engine, as I mentioned before, there is no single "best" way. Each method works, it just depends on what you find more convenient. I personally prefer to place all my tweaks in a single AutoExec.cfg file, because that way I can see at a glance all the settings I've changed, and if need be I can remove the file (e.g. for troubleshooting purposes), or change each setting back to default. I can also easily back up this file so I can quickly reapply the same tweaks if ever I reinstall Quake 4, or if my settings are lost after I patch the game.


However, I suggest that you first use the in-game console to try some commands and see what effect they have on the game, and then you can insert them into your AutoExec.cfg file once you've determined if they're worth using, and which values work best for you. Furthermore, some commands are only really useful if used in the console - for example the "recorddemo" command records a custom demo...not something you want to have in your AutoExec.cfg file. Also note that certain commands don't come into effect until the game is restarted (e.g. or just use the vid_restart command - see the Advanced Tweaking section), so you will have to experiment by placing those in your AutoExec.cfg first, see what they do, and then decide whether to keep them or not.


Importantly, if you are going to edit Quake4Config.cfg, first make a backup of the file so that should something go wrong you can restore the file to its original state. Also, some people recommend that you make changes to Quake4Config.cfg and then make the file read only to prevent the game from erasing/resetting some of the changed settings. I personally don't recommend this, as Quake 4 needs to have write access to Quake4Config.cfg file so that for example when you change one of the in-game settings or a key binding, it can record the change in that file.



The next section provides a list of all the game's most useful commands/command variables (cvars) along with descriptions.