Wrath Mapping: Unofficial Getting Started
Here’s a quick unofficial guide on getting started mapping for Wrath…
Some Stuff To Know First
[UPDATE] Wrath is out now! And with that, so are the official entity definitions. This article has been updated to reflect the official release of the game and tools. Ok, like my proctologist always says, onward and upward.
Wrath uses DarkPlaces and takes advantage of many formats used in Quake 3, such as its primary level format Q3BSP. There are a lot of advantages in using Q3BSP (aside from some possible performance) is the arbitrary hull sizes. Without getting technical, just know that Wrath was made with Q3BSP so that’s what we’re going to use.
The basic process for creating a level involves making the geometry in an editor such as TrenchBroom and then compiling that .map file into something the game can load through a process called compilation.
NOTE: .map files can be edited in notepad, as they are just raw text. A good way to quickly replace textures or edit key/vals if need be (be careful doing this though).
There are 3 main steps to compile a .map into a .bsp, which are all handled by one program called Q3Map2 (Q3map was the original program used to compile Quake 3 maps way back in the day but has been replaced by a much more feature rich sequel).
- BSP
This step takes the .map file and does some magic to create the actual .bsp file which the engine understands (BSP stands for Binary Space Partition). At this point you could load it up into the game and run around but it’ll lack any optimizations and lighting. If you’re curious as to what’s happening during this process basically the raw .map data is being crunched and contains “lumps” of data that the engine uses to render the world etc…, it strips external surfaces and is only concerned with what’s ‘inside the map’… At this stage let’s not worry too much, the main takeaway is that the .map needs to be run through a program to become a .bsp…
- VIS
This step optimizes the map by determining what areas are visible from any given spot, basically it helps the engine run the map faster. As a level designer, you can place hints in your map to help this process along but let’s not worry about that atm. If you’ve made your map correctly, this stage shouldn’t take very long at all. I do want to note here that brushes (the basic building blocks of a level) can be flagged as “detail” which will be skipped by VIS. Otherwise it’ll be treated as “structural” which seals a map. If you find you’re getting “leaks”, check to see if a brush you’re using to seal the map is set as detail by mistake.
- LIGHT
This step compiles all the lighting in the level and is the longest process of compiling a map. Just a note, Q3BSP does not support light styles the way Quake 1 or 2 do, so all lights must be static.
Realtime Lights
There is a way to create realtime lights but they are more expensive to render so use with caution but if you want to play around with them you may have to set r_shadow_realtime_world 1 in the console to enable them.
- r_editlights 1 to enable in-game editing of rtlights.
- r_editlights_spawn to create a new light at the crosshair position.
With the light selected:
- r_editlights_edit radius 700 to change the radius or size of the light, 700 in this case.
- r_editlights_edit style 4 to set the light style to Quake’s style 4.
- r_editlights_edit color 1 0 0 (Red Green Blue) 1 is max but you can go over for extra bright colors.
- r_editlights_save will save your lights to a special mapname.rtlights file and will be loaded alongside the map if it exists.
- r_editlights_remove to remove a light.
- r_editlights_edit move X Y Z* to move a light around.
There are other options but those are the basics. Typing just r_editlights should bring up some helpful commands.
Trenchbroom
I believe Trenchbroom can load .ent files, which was the format used officially by Wrath vs. FGD. So the following can probbaly be disregarded now, however I’m just going to leave it here just in case it may be of use regarding entities like misc_model or lightJunior.
_skybox: see here.
_decal: see there.
misc_model: misc_model is a special entity that allows models (typically .md3) to be baked right into the map as if they were world geometry and they will light as though they are part of the world as well, there is a spawnflag (CLIPMODEL) to add collision.
lightJunior: Q3BSP contains something called a light grid, basically it’s information from lights that models use to light more accurately. This entity will only affect this grid, so for example, if you added a bright green lightJunior in the center of a dark room, you’d find models would appear bright green but world geometry would not be affected.
Regular points lights can also be told NOT to affect the light grid as well via a spawnflag in case you want to add some moody lighting to the world but don’t want to affect models.
This adds a lot of control over how you want things to appear in the game.
Next, you’ll have to edit the preferences to let TrenchBroom know where Wrath is installed. If you installed it via Steam, the path will be something like C:\Program Files (x86)\Steam\steamapps\common\WRATH
Once done, you can create a new map (Quake 3 Legacy) with Wrath selected. A good way to check that the path you set is right, is over on the right side of the screen under entities, you’ll see a preview of each entity, like armor will look like the armor in the game and not a blank wireframe box. If you see wireframe boxes, make your the path you gave is correct.
Mapping for Wrath is very much the same as mapping for Quake using TrenchBroom. To get started, check out this tutorial series by dumptruck_ds. External textures using wads and other Quake1 specific stuff won’t work in Wrath when using Q3BSP, so keep that in mind.
Compiling your maps
Download the latest version of Q3Map2 here included with NetRadiant-Custom.
After you’ve made your first room, added a light and an info_player_start entity you’ll want to compile it and see how it plays. Save your .map file to C:\Program Files (x86)\Steam\steamapps\common\WRATH\kp1\maps.
There are a few options when it comes to compiling a .map to Q3BSP. One is Q3Map2Build Using and configuring it is pretty easy.
Alternatively you may also want to try compiling it using a batch file.
Navigate to C:\Program Files (x86)\Steam\steamapps\common\WRATH\kp1\maps where you’ve saved your .map file and make a new file in there and call it something like compilemymap.bat and paste the following inside it and edit it to reflect where you put Q3Map2 and the map you want to compile:
NOTE: Parameters taken from quote by KillPixel from the 3DR Discord and modified below:
The assumes you’ve called your map MYMAP.map. Make sure to change the paths and such.
"C:\PATH_TO_Q3Map2\q3map2.exe" -fs_basepath "C:\Program Files (x86)\Steam\steamapps\common\WRATH\" -fs_game "kp1" -v -meta "C:\Program Files (x86)\Steam\steamapps\common\WRATH\KP1\maps\MYMAP.map"
"C:\PATH_TO_Q3Map2\q3map2.exe" -fs_basepath "C:\Program Files (x86)\Steam\steamapps\common\WRATH\" -fs_game "kp1" -vis -v -saveprt "C:\Program Files (x86)\Steam\steamapps\common\WRATH\KP1\maps\MYMAP.map"
"C:\PATH_TO_Q3Map2\q3map2.exe" -fs_basepath "C:\Program Files (x86)\Steam\steamapps\common\WRATH\" -fs_game "kp1" -light -v -cpma -lightmapsize 1024 -bounce 2 -bouncescale 4 -bouncegrid -dirty -dirtscale 1 -samples 4 "C:\Program Files (x86)\Steam\steamapps\common\WRATH\KP1\maps\MYMAP.map"
pause
Once done, you can scroll up to see what the compiler spit out about your map during the compile process and close the batch window when done.
Then, assuming you’ve set up everything correctly. All you have to do is run the batch file and see that it compiled MYMAP.map into MYMAP.bsp. To run the game with your custom map make a new shortcut to your wrath.exe and add +map MYMAP. You can also make another batch file next to your wrath.exe and call it runmap.bat:
cd..
wrath.exe +map MYMAP
Save and run and with any luck you should find yourself playing your own custom Wrath map.
Distribution
If all you’ve made is a custom map file, you can simply distribute the .bsp file. Make a new zip file but make sure the structure inside contains the paths /maps/yourmap.bsp rename the .zip to something like yourawesomemap.pk3. This .pk3 can be placed in the kp1 directory and played by typing map yourmap in the console.
Good luck and happy mapping!