GtkRadiant 1.4 set-up
(& editing idtech3 games)
Setting up GTKRadiant 1.4 or below correctly depends a good deal on where the games being editing and their associated assets are located as well as the operating system being used. If everything is installed to their respective default locations then, generally speaking, there will be few problems (if any).
Where they do occur is as a result of wanting to use Radiant within the context of a fully custom mod and/or a completely different game project. The following tutorial will explain how to set-up GTKRadiant 1.4 in relation to custom mods and independent game development.
*.qe4, *.proj and *.pref files ^
When starting a new game development, game editing or game modding project using GTKRadiant as a level editor, a 'preference' file is generated and saved to a "scripts" folder, containing all the essential and relevant information Radiant needs to keep track of a projects settings - games asset locations, file paths, executables, compilers and so on. This 'user' data is saved as a text file named "user[n]" (where "n" is an incremental number) and depending on which version of Radiant or GTKRadiant is being used, will have one of two file extensions, either "*.qe4" or "*.pref", so "user[n].qe4" or "user[n].proj" - GTKRadiant 1.4 for example uses user[n].proj files. Both versions of the 'user' file store the same information but in slightly different formats.
<key name="mapspath" value="E:/Program Files/Return To Castle Wolfenstein/main/maps/"/>
Radiant's own preference file, "local.pref", is stored in a ".game" folder as a sub-directory of where-ever Radiant itself was installed (typically C:\Program Files); Quake 3 editing has a folder called "q3.game"; Wolfenstein, one called "wolf.game". There's no special need to edit this last file except perhaps to point Radiant at the correct location for the users preference file.
Incorrect preference & user settings ^
To fix the above problem simply open "user[n].proj" or "user[n].qe4" into a text editor and change files paths to reflect the correct locations of the information Radiant is looking for. Using a section of GTKRadiant 1.4's *.proj file as an example, if it looked like the following;
A typical example of GtkRadiant's user0.qe4 preferences files open in a text editor
GTKRadiant and its various iterations are generally set up to install to default locations, typically C:\Program Files\. Additionally the various files loaded as part of this process are also written with the assumption that all other editing related date and material is similarly set-up. When using Radiant for custom content production this obviously means that path 'preference' and 'user' files may not necessarily contain the correct information relative to the project which is likely to cause problems when trying to compile, save or export maps and levels as a result of Radiant not being able to find the files and data it's looking for.
<key name="mapspath" value="E:/Program Files/Return To Castle Wolfenstein/main/maps/"/>
However, the game, assets and GTKRadiant itself are installed to "D:\GAMES", then any path referencing the old, incorrect locations ("E:/Program Files/" as above) would need to be updated to reflect the new, correct path information like so;
<key name="mapspath" value="D:/GAMES/Return To Castle Wolfenstein/main/maps/"/>
This solution fixes the most common issues with GTKRadiant when it can't find the maps, scripts, asset and Q3map2 compiler directories and locations (see errors below).
GTKRadiant 1.4 set-up for custom content & mods ^
If Radiant is being used to modify an existing game the "basepath" will need to be checked to make sure it's pointing at the correct folder. For example, in making a mod for Return to Castle Wolfenstein a folder named "spkat5" is created and used as the master root location into which all the custom content is to go. Sometimes Radiant has trouble writing this information to user[n].proj, especially where the editor has been used previously with default content, often keeping the incorrect path information like so;
Typical example of GtkRadiant user0.proj preferences file set up for Custom Modifications and content
<key name="basepath" value="E:/Program Files/Return To Castle Wolfenstein/main/"/>
Now that a custom mod is being made, this path info needs to be corrected so that both the route to the game installation and the mods root folder are correctly included, like so;
<key name="basepath" value="D:/GAMES/Return To Castle Wolfenstein/spkat5/"/>
This correction will now force Radiant to load up the correct project settings.
GTKRadiant *.game folder & custom games ^
GTKRadiant can be used as a level design tool for full-on game development projects, before being used in that capacity though, a couple of prerequisites are necessary namely a "*.game" folder that sits in Radiant's own installation directory. Additionally a copy of the aforementioned (above) "*.pref" file, "local.pref" which stores information about mouse speeds, user interface information and other general application data needs to be placed into the *.game folder. For example, Quake 3 has a .game folder named "q3.game"; Wolfenstein, one named "wolf.game" - for any development project a similarly named folder would need to be created, "bunnies.game" for instance, into which an unedited copy of "local.pref" is placed (not the file name of "local.pref" isn't changed when or after doing this).
GTKRadiant 'games' folder ^
So Radiant knows what game to load when it starts up a file needs to be placed in Radiant's "games" folder - this is not to be confused with the "*.game" folders as it's a separate core folder from which GTKRadiant gets information pertaining to what games it's should show the user on starting (as shown opposite).
Selecting the new Custom games after creating the new project file and its appropriate settings
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<!-- generated by Radiant setup, modify at your own risks -->
name="Bunnies, the game!"
Simply copy/paste one of the other file available in ..\GTKRadiant-1.4\games\ and edit the paths so they reflect the custom content Radiant is going to use - make sure to rename "name" in the xml file so as to distinguish the new project for any pre-existing choice that might remain available - "Bunnies, the game!" in the example above.
The final piece of the puzzle setting up GTKRadiant as a level editor for independent game production is to add a "Radiant-1.4" folder to the root directory of the project, typically "C:\Program Files\Game Folder\Radiant-1.4". Ideally it should not be placed anywhere else or be contained in any other folders, else Radiant won't be able to find it.
Inside 'Radiant-1.4' are copies of 'local' tools and utilities built or customised for specific use with the game Radiant is being set up to create content for, these are not generally 'global' tools in the same way as Q3Map2, which is accessed and used to compile maps and levels from different games, but instead tools that are the opposite and only of use in their specific editing environment; games such as Quake 3 and Wolfenstein for example, each have their own 'local' version of "bspc.exe" for compiling 'bot/AI' information placed in this folder.
GTKRadiant error messages ^
If using GTKRadiant on Windows Vista systems it's common to get a number of errors and problems (which are, incidentally, solved with 1.5). The simplest and most common relate to Radiant's inability to find the files or locations it's looking for (for other errors, specifically "wgl" problems see links above). The following examples are from "user[n].proj".
Failed to execute error
On trying to compile a map using the included version of Q3map3 the following is common, being the result of the BSP process looking in the wrong location (as instructed by the project settings) for the compiler Q3map2;
Failed to execute the following command: "E:/Program Files/GtkRadiant-1.4/q3map2" -v -connect 127.0.0.1:39000 -game wolf -fs_basepath "E:/Program Files/Return To Castle Wolfenstein/" -meta D:/GAMES/Return To Castle Wolfenstein/main/maps/testNo brushes selected.
To fix this error make sure the paths in the *.qe4 or *.proj files are correct (as explained above).
Autosave.map error: couldn't open...
Similarly GTKRadiant is set-up by default to automatically save a version of the current project to "autosave.map", when this can't be found, or it can't be opened, the following message appears in the editors command console;
ERROR: couldn't open E:/Program Files/Return To Castle Wolfenstein/main/maps/autosave.map for write
As above, to fix this, make sure the 'autosave' path is correct in user[n].proj.
<key name="autosave" value="D:/GAMES/Return To Castle Wolfenstein/main/maps/autosave.map"/>