- v3.2 - 32 Q&As, for Quake 4 - 6/23/2006
Edited by AEon (C) 2006
(* Marks changes since v0.97)
Intro
- The following FAQ is intended for mappers with Q3A experience, that have decided to start mapping for Quake 4. As you will notice several basic things have changed from Q3A to Q4, notably the real time lighting, the way visibility is handled via Visportals, textures are no longer one simple image but bumpmapped, ... and many other changes. The following will hopefully help to transition from Q3A to Q4 mapping.
Note: In some cases a short description is not enough to explain the more complex topics, thus links to more in-depth articles are provided.
Focus: Multiplayer maps are the focus of this FAQ: DM (Death Match), Tourney, TDM (Team Death Match), and CTF (Capture the Flag, later maybe). But the information should also be applicable to other mods.
Editor: The examples use Quake 4's built in editor, but should also be workable for the latest GTKradiant (v1.5).
HTML Version: If you prefer a niced-up version of this FAQ, with working Index and Anchors see:
Index
- Getting Started
- *Setting up Quake 4 for Mapping?
- *Launching Q4 and the Editor?
- Configuring Q4 and the Editor?
- Useful mapping Tools & Mods?
- How to Build a Map?
The Basics- What are Q4's Heights & Distances?
- How to Compile a Q4 map?
- How to apply Visportals?
- How to properly add lighting?
- How to add outdoor (ambient) light?
- *How to Clip MP Maps?
Movement Related Elements- *How to add Respawn points?
- *How to add Jumppads?
- *How to add Acceleration Pads?
- *How to make Teleporters work?
- *How to add Weapon/Item Spawn Pads?
- How to build a Ladder?
- How to build an Elevator?
- How to add Sliding Doors?
Detail Elements- How to add a Skybox?
- *Using Q3A Skybox textures in Q4?
- *How to place Models?
- How to add basic Fog?
- *How to add Ambient Sounds?
- *How to trigger Sounds?
- How to add simple Terrain?
- How to add Particle effects?
Debugging & Finalizing the Map- How to Test a MP Map (Console Commands)?
- How to Debug a Map?
- How to wrap things up into a pk4?
Additional Information- About the Q4 SDK?
- Other FAQs & Tutorials?
FAQ Related- *Notation
- Credits
- History
- ToDo List
Getting Started
*Setting up Quake 4 for Mapping?
- Info:
- Long years of Q3A mapping have shown more than once that it is a good idea to install the game you are developing for twice!
In one folder - the development folder - you install all the mods, editors, SDKs, and custom content (textures, models, etc.), and your different map versions. Usually you also start unpacking parts of Raven's original pak00#.pk4 archives. And if I remember correctly, this can lead to an un-pure local install (prohibiting online play). As you will see the install can get very untidy.
The other folder - the test / online folder - is basically a clean install of the game that you use to try out the "finished" versions of your map .pk4. It is also the folder you should use to play online.
Why use a second clean install?
Because it lets you test your map for potentially missing custom content. A classic for Q3A used to be textures that came with GTKradiant, but were *not* part of the original game, thus would very often be missing in final map packs. Bad! So by simply walking through your map, you now can "see" if your pk4 has every relevant file included. Additionally you can also easily check the console warnings.
Step by step:- Install Q4 from CD/DVD into a folder called Quake4\!
Important: Raven points out that the default folder for Q4: Quake 4\ (note the space in the folder name), can lead to problems with the compiler or other parts of the editor. It is thus best to avoid installing Q4 in a path that contains spaces!
E.g. "I:\Games\Quake4\" would be a good place, whereas "I:\Program Files\Quake 4\" would be asking for trouble! - Now install the latest Quake 4 Patch (presently 5/4/2006 v1.2).
Note: Installing the latest patches is recommended, to avoid the hassle of unfixed bugs. Plus most online servers will quickly update to that patch, so that older versions of the game usually will no longer be able to connect. - Next make a duplicate of your Quake4\ folder, naming it e.g. Quake4Clean\ (this will be your "Vanilla Q4" test/online install).
- Should you plan to create your own textures or models, or start work on your own modification (MOD) install the latest version of the Quake 4 SDK (v1.2) into your Quake4\ development folder.
- Next you would go about running Q4 from both installs, setting up your key bindings and preferred game resolutions. E.g. create an q4base\autoexec.cfg file with key bindings.
- Another interesting install for mappers is the Q4 Debug Mod that provides a powerful HUD (Heads Up Display) for Debugging your map. Install this in your Quake4\ folder as well or if you like into a parallel folder, i.e. Quake4SDK\.
- Optionally you might like to install the community editor GTKradiant v1.5, as an alternative to Q4's built in editor. Again install its files in Quake4\.
Tip: Next read up on the "Launching Q4 and the Editor?" Q&A and the "Configuring Q4 and the Editor?" Q&A.
Downloads: See the "Useful mapping Tools & Mods?" Q&A to get the Q4 Debug Mod, the SDK, and GTKradiant.
- Long years of Q3A mapping have shown more than once that it is a good idea to install the game you are developing for twice!
*Launching Q4 and the Editor?
- Info:
- There are quite a few very convenient console commands that let you run Q4 with various options set on launch. A mapper will want to have at least *two* icons on his desktop, one to launch Q4 and another one to directly launch the Editor.
Step by step:- Under XP Right-click on your Q4 icon on the Windows desktop.
- Select Properties.
- Under Target you should read something like "I:\Games\Quake4\Quake4.exe".
- Now add (omit the // comments) to the command line:
Code: Select all
+set com_allowconsole 1 // Allow cheats +set win_allowMultipleInstances 1 // Q4 copies +disconnect // No movies
- This allows the use of cheats and will also skip the "annoying" startup movies.
E.g.: "I:\Games\Quake4\Quake4.exe" +set com_allowconsole 1 +disconnect
Tip: If you own very high-end hardware you might like to run Q4 twice. Once as editor and once to test your map in parallel. And switch between the copies via the system's Alt + Tab. For this use the +set win_allowMultipleInstances 1 parameter.
Note: Tests show that you cannot run the game and the editor from the same Quake4\ folder, you need two installs of Q4 for this to work. A classic use, to run a dedicated server and the game from one folder is not possible either. - Make a copy of the Q4 icon, specifically to directly launch the Editor.
- This time add (again omitting the // comments):
Code: Select all
+set com_allowconsole 1 // Enable cheats +set r_mode <#> // Set editor resolution +set r_fullscreen 0 // Editor in window mode +set r_brightness 1 // Fix desktop brightness +set r_multisamples 0 // Turn off Anti Aliasing +vid_restart // Update changes +wait // Should the editor not // start add several // +wait commands +editor // Launch editor
- The above turns off full screen mode (the editor needs to be run in window mode), corrects Q4's default brightness from 1.2 to the normal desktop brightness of 1, turns off Anti Aliasing (avoids grid blurring), performs a video restart, and launches the editor. For some folks that editor does not start properly with the above set of parameters, should that happen try adding one or more +wait commands.
E.g.: "I:\Games\Quake4\Quake4.exe" +seta com_allowConsole 1 +set r_fullscreen 0 +set r_brightness 1 +set r_multisamples 0 +vid_restart +editor
Tip: With +set r_mode <#> you set the render mode <#> from 3 (640x480) to 8 (1600x1200). - While you are at it run the software that controls your Graphics Card and turn off Anti Aliasing (AA). Q4's Editor at times crashes with AA enabled plus will badly blur the grid lines of the editor's 2D-views!
Tip: For users of ATi cards, Right-click on your Windows desktop, and select the ATi Control Center, and under the Graphics Settings tab, 3D, Anti Aliasing, check "Let the application decide".
Note: Also ensure AA is turned off in Q4! I.e. run Q4, via Settings menu, System, Video Settings, Advanced Settings, turn Antialiasing off.
Tip: As an alternative you can turn off AA from the console with r_multisamples 0.
- Anti Aliasing and the Editor @ quake3bits.com by Kat
Configuring Q4 and the Editor?
- Intro:
- As mapper you will need at least 2 configurations: One .cfg that lets you play (basics) *and* test/debug the various aspects of the game (e.g. mapping.cfg), and one specifically for online multiplayer games (e.g. mp.cfg).
Why the need for different configurations?
Because when mapping you will run everything at desktop resolution (i.e. editor) and probably pretty much at the best quality level your hardware can handle. Doing so will yield a better feeling for how your map "should" look, when you run Q4 from editor via F2-key.
On the other hand when playing online, you will probably want to turn down all the graphics settings (low quality), lower the resolution, and also want special key bindings for online play (e.g. mod specific, or chat messages).
Using these two configurations lets you change between them easily, and your multiplayer settings will also come in handy testing your map at *low* settings.
Info:- Q4 automatically executes the configuration file q4base\autoexec.cfg, so for simple scripting needs putting all the bindings and commands into this file will be a good start. E.g. place everything that is shared by both cfg files (mapping.cfg and mp.cfg) in the autoexec.cfg.
Comment: I use the 3 mouse buttons, W, A, S, D movement keys, and the keys 1 to 0, Q, E, R, T, F, C, X, Y, Shift, Ctrl, Space as shortcuts to bring up weapons directly. But all the keys to the right of the keyboard are free to bind. (AEon)
The mp.cfg:- Primarily the default function keys for voting, plus several chat bindings that come in handy.
Code: Select all
// MP Colored Nick Name // -------------------- // ^0 Default ^1 Red ^2 Green // ^3 Yellow ^4 Blue ^5 Cyan // ^6 Pink ^7 White ^8 Gray // ^9 Black seta ui_name "^1^^3AEon^1^^0" // MP Chat Messages (fun) // ---------------- // ^0 resets colors to default console/HUD color bind "h" "say '^7...^3Hi EvErYoNe^7... 8-)^0'" bind "m" "say '^7...^3ShMiLe^7... :)^0'" bind "j" "say '^7...^3WheEeEeEe^7... 8-))^0'" bind "k" "say '^7...^3ThAnKs^7... :-)'" bind "l" "say '^7...^3LaTeR fOlKs^7... :o)^0'" bind "i" "say '^7...^3AaArRrHhHgGg!^7...^0'" bind "n" "say '^7...^3NiCe OnE^7... :-P^0'" bind "o" "say '^7...^3OuChiLiE^7... :-|^0'" bind "p" "say '^7...^3OoOoPpPsSs^7... :D^0'" bind "u" "say '^7...^3SoRrY^7... :-)^0'" ...more coming soon...
- Debug bindings...
Code: Select all
...coming soon...
- As mapper you will need at least 2 configurations: One .cfg that lets you play (basics) *and* test/debug the various aspects of the game (e.g. mapping.cfg), and one specifically for online multiplayer games (e.g. mp.cfg).
Useful mapping Tools & Mods?
- Info:
- Even though most of what a mapper needs comes out of the box, i.e. is part of the Quake 4 retail game, a few additional downloads should make life easier.
Downloads:- Quake 4 Debug HUD @ iddevnet.com
Info: Very useful "official" Debug mod for Q4 from Raven. - GtkRadiant 1.5.0 beta - build 03-02 @ qeradiant.com
Info: Powerful community developed editor, Q3A mappers will already know it. - Quake 4 SDK @ iddevnet.com
Info: Everything you need to create your own custom Models and Textures, etc. - Map Rotator @ wfrevolution.com
Info: Tool makes it easier to mirror CTF levels. - Tools & Utilities List @ quake3bits.com
Info: MD5/MD3/ASE Importers & Exporters (Viewers) and Misc Tools.
How to Build a Map?
- Info:
- If you are totally new to mapping, many of the Doom 3 based tutorials should get you started, since D3 and Q4 basically use the same engine and editor.
Links:- Quake 4 Level Editor @ iddevnet.com
Info: Official online documention for editor - a must read! - Build a Basic Room @ iddevnet.com
Info: First steps to get a simple room done. - Keyboard Shortcuts/Reference @ iddevnet.com
Info: Learning the key shotcuts for editor will help you map more quickly. - D3W.org's Tuturial Listing @ doom3world.org
Info: Comprehensive list of text and video tutorials for Doom 3, should also help for Q4.
The Basics
What are Q4's Heights & Distances?
- Info:
- Every id game slightly changes the player height, the maximum jump height and jump distances, the maximum height of steps etc.
Step by step:- Coming up (***).
How to Compile a Q4 map?
- Info:
- Compared to Q3map2, the options of Q4's compiler dmap are less complex, and since neighter visibility nor light need to be compiled, the compile process can easily be triggered via menu. Compile times are usually measured in seconds.
Step by step:- Create a leak-free room with a player respawn (info, info_player_deathmatch).
- Start the BSP compile (Bsp menu, bsp).
- You can now test the map in-game via F2-key.
Links:- dmap Console Command @ modwiki.net
Info: Explicit list of dmap parameters. - Doom 3 Compiling and map errors @ doom3world.org
Info: Should dmap the compiler show errors, this thread should explain what they mean.
How to apply Visportals?
- Info:
- Q3A used hint brushes to manipulate visibility, but that whole slew of ugly chopping apart of vis trees is a thing of the past. Q4 uses something simpler that can be calculated in real time: Visportals.
Basically what this does: Imagine 2 rooms with a doorway connecting them. You place a brush that completely fills out the doorway, and place the Visportal "texture" on brush face that covers the doorway. Now when you stand in room 1, but cannot see the doorway in your field of view, room 2 will not be rendered. Thus optimizing FPS.
Important: Walls will *not* autoclip the view like in Q3A, you need to make every area "airtight" with Visportals!
Step by step:- Place brushes that cover your doorways or windows, these will become the Visportal brushes.
- *One* face will become the Visportal, completely sealing the gap (Zones must be airtight!).
- Select the brush with Shift + Left-click.
- And apply textures/common/nodraw to make all faces invisible.
- Select the chosen Visportal face with Ctrl+Shift + Left-click in the 3D view to select one face.
- Finally apply the textures/editor/visportal texture to create the portal.
Warning: Visportals segment all triangles they are in contact with, generating extra polygons!
Testing: You can test the workings of Visportals with the console command r_showPortals 1 (0 to turn this off). This will draw all Visportals, green means an open portal and red a closed portal.
Links:- Visportal @ modwiki.net
Info: More detailed version of the above, using images to illustrate Visportal workings. - Performance and Framerate @ iddevnet.com
- Q3A used hint brushes to manipulate visibility, but that whole slew of ugly chopping apart of vis trees is a thing of the past. Q4 uses something simpler that can be calculated in real time: Visportals.
How to properly add lighting?
- Links:
- Lighting Tips @ map-center by Raven
Info: Another must read on Lighting by the makers of Q4. - r_lightdetaillevel [n] @ quake3bits.com by Kat
Info: Show specific lights only at defined "Quality Settings". - 'Overbright' Lights @ quake3bits.com by Kat
Info: At times you may want to make a commonly used light brighter without much fuss.
- Lighting Tips @ map-center by Raven
How to add outdoor (ambient) light?
- Info:
- Lighting in Q4 is less trivial than in Q3A, especially since many overlapping light sources will very much slow down the frame rate, but luckily Raven provided ambient light shaders.
Step by step:- Right-click on 2D-view, and add a light entity that covers the complete map.
- Press J-key to open Light Editor dialog.
- Uncheck Cast checkboxes, except Cast Diffuse.
- From the texture scrollbox pick lights/ambientlight_nofall.
- Pick an Ambient Color, close to black (e.g. dark gray).
- Test effect on map.
Links:- Quake 4 Ambient Light by Method - Source of above.
*How to Clip MP Maps?
- Info:
- While building your MP map, it is a good idea to cover / simplify the geometry for the players via clips to avoid them getting stuck.
In Q3A this was especially useful (botclip) to optimize the map for AI. And apparently custom bots exist for Q4 as well.
Note: I am aware of the Oak Bots, these seem to work well enough with player_clip but Raven recommends the usage of clip. It was proposed that monster_clip should work much like Q3A's botclip, but is does not. monster_clip actually breaks the bot movement!
Step by step:- Anything the player might get stuck on, e.g. a painting on a otherwise flat wall, should be covered with a clip, a brush that covers the wall plus the frame of the painting.
- Select the brush that you want to use for clipping with Shift + Left-click.
- Pick the texture from the Media tab (M-key):
- Click textures/common/clip texture, to apply it.
Note: There are several other clip textures. But for the most part these will not be used much in for MP maps. For details read Clipping Your Level.
Important: Raven uses textures/common/player_clip in it's MP maps, this is discouraged though, use clip as suggested above instead! - The player should no longer get stuck on that wall now.
Tips: Raven suggests ramp-clipping stairways, to allow for ramp-jumping.
More examples of clipping:- Typical examples of clipping are patches. It is almost always a good idea to cover rounded corners with multi-sided clip brushes. Especially because bots in Q4 get suck in patches!
- Cover complicated geometry, e.g. sculptures with one big clip brush.
- Close off map areas you do not want to player to reach with clipping.
- Add small ramps to areas where a player might get stuck.
- Most corners and even more so columns and frames should be clipped with 45 degree angles, to avoid the player getting stuck.
Links:- Clipping Your Level @ iddevnet.com
Info: Complete list if clipping textures, plus SP and MP tips for clipping.
- While building your MP map, it is a good idea to cover / simplify the geometry for the players via clips to avoid them getting stuck.