if you want to know how to create a map, welcome here! I'm going to teach you GTK Radiant basics and give you tips and tricks to know before starting mapping. GTK Radiant isn't the only software that allows you to create maps. Actually it's pretty old, unstable and has many inconvenients.
Then why would you teach us how to use this one?? Well it has a certain advantage over other softwares: it supports Urban Terror, which is quite old too and is a MOD of Quake 3.
So, most mappers use GTK radiant, let's get to it!
I Highly suggest that you read the full tutorial, in the right order, please just use this summary to go back to where you were. I wrote the tutorial as if someone was reading since the beggining (if I don't explain how to do one thing, it's probably explained before).
I’ll do the following only on Windows…well because I only have a Windows! Please follow the instructions STRICLY, you have to do exactly the same as we do. Once you downloaded the compressed file (.zip), open it with Winrar, 7Zip or whatever can open a compressed folder and then copy it into your Program Files, for me it’s C:\Program Files(x86).
Now you can follow Kurokei’s tutorial (link below) to install GTK Radiant 1.5 from step 3).
WARNING: before you go there:
- Step 4) COPY your Urban Terror 4.1 ! (Don't worry your map will be 4.2 compatible, it's just easier to map with the 4.1 folder)
- Step 15) be smart and don’t copy the path Kurokei has for q3map2.exe and bscp.exe, copy the actual path you have.
Before beginning I advise you to choose Layout 3, the most handy one to my mind (you can see 3 views + 3D view at one time).
II. GTK basics
Let’s start with shortcuts and tricks you should know before mapping!
Using the layout 3:
- At the top-left corner, you have the 3D view window where you can see what your map looks like and wander around like a Spectator player in Urban Terror.
- At the top-right corner, there is the 2D above view window.
- At the bottom two corners you have the two 2D side view windows.
You’ll have to know that the 2D views are made to draw brushes (walls, grounds …) whereas the 3D view only helps you to get a preview of the map. You can actually act on the map from the 3D view but I highly advise not to. Just consider it as a preview window.
3D view window: To be able to get a good preview of the map, right click once on the 3D view window. Then your mouse will stay trapped in the window and you will be able to move the mouse to change your angle of view. You can now also move the camera with Arrow keys (not WASD!). Right click again to free your mouse. From that window you will also be able to select one or some brush(es) (Shift+leftClick), one or some face(s).
2D view windows: Okay! Now you are going to draw your first brush! To do so, think about what it is going to be. We are going to make a ground first, so left click the 2D above view somewhere and let your button pressed. Then drag your mouse towards another point of that view. When you’ll release the button, a brush will be created, between your two points. As you only defined the length and width of your new brush, the height will be set the same as the previous brush you selected (keep that in mind, it can save you much time when you’re mapping, and want to create a brush, you first select the nearest and most similar shaped brush, then deselect it and draw your new brush) .
Then train a bit with the 3D view to get a good view of your brush like I did:
Good! Actually this doesn’t look like a ground at all…Let’s fix that! First, we have to decrease its height. To do so, let’s choose the bottom-right view which is a sided view if you remember. Now, on a sided view, think 3D, what you see up on that view is the same up as the 3D view. So put your mouse in this green zone (out of the shape but aligned with the face you want to move:
Then left click on one of these zones, let it pressed and drag until you get the height you want, and then release.
Then, you want to increase the length and width, so this time the 2D above view is more appropriated.
First, let’s have a better overview: to move yourself on one 2D view, right click it and let it pressed until you moved where you want. You can also use the mouse wheel to zoom in or out. So zoom out for that, you need more room in the window to enlarge correctly your ground.
Do exactly the same as before, whereas this time, as you work on the above view, the ‘up’ of the window does not correspond to the up of the 3D view, think you are working from above so to enlarge the brush, drag the faces up and left (or right).
Okay now you have a perfect ground for your map!
Keep in mind that the game won’t start the map if the map is leaked: that is to say you can go ‘out’ of the map. For example, if you try to compile and play a TDM with friends on your little ground, your favorite game won’t be so happy, because the map isn’t closed. To run it you need at least a full box.
What are we waiting for? Let’s do it!
To deselect a brush (now it is red so it is selected), just press Esc. Please, when you start some new stuff on your map, always think about pressing Esc, better more than needed! You never know if something is still selected at the opposite side of your map, and then GTK will make crap when you will proceed operations with that brush still selected, very bad.
TIP: To move a brush you misplaced, either left click and drag from the INSIDE of the brush, or better, left click once on a view to select the view and then move it in the view with Alt+Arrows.
So deselect the ground, and make the first wall from the above view:
As I said before, when you’ll create that brush, it will have the height of the ground so keep the wall selected and increase its height with one of the two sided views.
Now you have one wall. You know what? Let’s be lazy and copy it three times!
Let’s reselect the wall. Press Esc, and then select the wall you want to duplicate by using Shift+leftClick on the 3D view on the wall. Now, press the space bar to duplicate your brush. As it is oriented this way, this is going to be the opposite wall. Then put it at the exact same place than the first wall by using Alt+UpArrow then Alt+LeftArrow. Now, select the above view and move the wall all the way left precisely:
Now, Esc, select the two walls by Shift+leftClick them both. Press Space bar, Shift+UpArrow / Shift+LeftArrow. Then press the z-axis Rotate button:
Then I’ll let you make them fit perfectly to make a box (without ceiling though) by resizing them ONE BY ONE. So first deselect them, select one, make it fit, then the other one:
TIP: You can change the accuracy by clicking on the Grid tab, up there, then select a grid. I advise you not to use .5 and .25 grids which get you bugs sometimes, Grid 1 is 1 Quake Unit accurate, this is most of the time enough!
Let’s finish our box. Wait I’m sure you know how to! If you really don’t have a clue, I’ll help you. Deselect everything, select the ground, duplicate it, place it at the same place as the first one and then either move it up from one of the sided views, or use the shortcut + on the numpad to lift it up. Of course in case you need, - will make it go lower.
Now you should be done! Let’s add a spawn point! Deselect everything, select the ground then deselect it. Now right click in the center of the cube in your above view, select info/info_player_start.
Finally, move it just above the ground (move it down with -).
Now Urban Terror can run your map! The thing is, you won’t be able to play it. Because there are no textures at all! Actually the default texture is always Caulk. This is a very useful texture from the Common pack. Let me explain.
TIP: To delete a brush or several, select them, and then press Back arrow key above the Enter button. The regular Del is not bound to delete brushes.
III. Textures and shaders
The caulk texture is a special texture that tells the game: “Hey dude don’t you mind calculating that texture, put void instead”. So in game, the caulk textures looks like an awful bug. You’re going to ask “Then why the hell is it even available in the editor??”. This texture saves a lot of FPS by not calculating surfaces that are not meant to be seen. So when you will set textures to your map, you’d often rather not set the texture to the whole brush every time (except for small or fully visible brushes).
For now we are going to use some existing textures instead of importing your own to GTK. Click on Textures in the upper status bar of GTK Radiant then select Common. You might need to first select -------- all down to see the list further to seek Common. Fine, you loaded Common textures. Those textures are mostly invisible but have special behaviors controlled by Shaders (see below). Now we want visible textures to play! Select again Textures then ut/ut_turnpike for example. You loaded Turnpike textures. Now press T to open the texture menu. As you can see there are many textures!
Click on somewhere in GTK Radiant to deselect the Texture window. Then deselect everything (Esc). To select a single face of a brush, press Ctrl+Shift+leftClick. Do it on the ground, then left click on a ground texture you like in the texture window.
Press Esc and select all four walls by pressing Ctrl+Shift+Alt+leftClick (dat shortcut!) on each wall. Then set the texture you want. Do the same for the ceiling.
Now your little map is ready to go!
IV. Playing the map
To play it, click on the Bsp tab then Q3Map2: (single) BSP –meta. You can also play it directly from the Q3Map2 (buggy), ask Kurokei :D
Then yourmap.bsp will be created, usually here: Mapping\q3ut4\maps. Then, create a folder elsewhere and call it exactly maps. Copy the .bsp file inside. Finally, compress the maps folder you just created, with Winrar for example, to .zip! Then rename it to the same name as the bsp and rename the extension to .pk3.
If you don't know how to change extensions, go to windows Config panel then Folder options, go to the second tab, should be Display or something. Then uncheck "Mask extensions of known type". Then you can rename the extension too when you press F2.
There you go, you have made a map! You can put it in the q3ut4 folder of your game and run it by: /devmap yourmap in Urban Terror Console. Congratulations! The .pk3 folder will contain all a map needs in the end. Example of .pk3:
Maps: contains the .bsp you compiled from GTK.
Levelshots: This is image people see during Urban Terror loading (.jpg)
Models: See Kurokei tutorial soon
Scripts: Contains shaders (shaders tells the game the behavior of each texture)
Sound: Contains custom sounds (.wav)
Textures: Contains your custom textures (.jpg)
If they bother you, you can delete all the files GtkRadiant created during the compiling. Just keep the .map (which is the editor file you load in GtkRadiant) and the .bsp.
TIP: To gain some time for testing, you can do the following: Go find your Quake3-UrT, right click, Send to Desktop (Shortcut). Then right click the shortcut you just created on your Desktop, click Properties, go to the second tab which should be shortcut. In Target, write: C:\...\UrbanTerror42\Quake3-UrT.exe +sv_pure 0 +devmap yourmap. Of course, replace ... by your actual path, and yourmap by the actual name of your map. You can now rename the shortcut in what you want!
V. Custom textures
If you want to create a super-mega-hyper famous map, you don’t want to use textures from Urban Terror basic maps. I advise you to create your own textures, under standard jpg (not progressive jpg or else Urban Terror will make a great crash!). Also, try not to be creative about the texture size (please don’t make a 53x541 sized texture for example), try to fit it as powers of 2: ..16; 32; 64; 128.. Also keep in mind to make it tileable, which means that you can repeat the texture on a ground for example without making it weird-looking (top must fit to the bottom at every point etc.)
I’m going to take Kurokei’s gray cube texture as an example. >> Download it here << First, go to Mapping\q3ut4\textures and create a folder. Name it as you like, I’ll go with map_tuto. Usually name it after your map name. Finally put your texture inside this folder:
Fine! Now, go to Mapping\q3ut4\scripts, and create a text document. Name it the same as the folder you just created and set .shader as extension. So I get map_tuto.shader. Edit it with Windows Notepad, or Notepad++ (better overview of your coding). Now copy this code in your shader file:
This is the most basic code for one texture.
I’ll explain line by line. In the first line, this is where you tell GtkRadiant how you want things to be sorted. After the word textures you will set the name of the virtual folder in which the texture will be (in the Texture window of GtkRadiant), then the name of the texture, here wall_gray.
Then you have the keyword qer_editor_image which tells the editor which image to show, only in GtkRadiant, not In Game.
And finally map which tells the game which texture use In Game. As you can see, I didn’t write textures/map_tuto/wall_gray.jpg but textures/wall_gray.jpg. This is to show you that the path is different: in the map .pk3, I’ll put my textures at the root, so textures/wall_gray.jpg. Just keep in mind that what comes after map is the path to the texture, from the .pk3 whereas what comes after qer_editor_image is the path to the texture from Mapping/q3ut4.
If all this is unclear to you (what I understand perfectly :D), just keep the same paths than me.
If you chose a different name for your map, folder etc, replace my names in the shader.
Finally, you have to tell GtkRadiant that you added a new texture folder. To do so, go to Mapping/q3ut4/scripts, find and edit shaderlist.txt with your favorite text editor.
If you don’t have this file, create it with this exact name. You want to add the name of your folder so that GtkRadiant will be able to get all your new textures. So add a line anywhere, and add the name of your shader (and folder usually):
Okay now restart GtkRadiant, click the Texture tab, you should now be able to select your new folder in the list! Find it and left click it to load your texture (green circle):
Then press T to open the texture window. You will now be able to see your beautiful custom texture! If you don’t, click on Textures tab and then uncheck Show in use or check Show all.
Now create an 80x80x80 Quake Unit cube (10 little grid squares with grid 8). Keep it selected and apply your custom texture to the whole brush. At this point, your texture may look weird, if the size doesn’t fit properly. You have a couple ways to fix that. If the texture is misplaced, you can use the shortcut Shift+ArrowKeys to move the texture. You have also a good weapon to fight against texture bugs: the Surface inspector! So keep the brush selected and press S to open the Surface inspector. You have now several settings you want to experiment with. Here, I want to resize and center the texture in each face. So I will press the Fit button:
As you can see, there are 2 numbers besides the Fit button. Here they are set to 1 and 1 so GtkRadiant tries to fit the texture once in width and once in height. If I put 2 and 2 I would have gotten 4 squares per face etc. So my textures are perfectly fitted now. There’s just one little problem: some faces are mirrored. So select the mirrored faces if you have the same problem (Ctrl+Shift+Alt+LeftClick remember), open the Surface inspector and invert the sign of H Scale (Add or remove a - at the beginning of the value). Try to avoid doing this to textures you Fitted before, it will make crap.
Of course, you can set different textures on each face of a single brush by selecting the faces one by one and set their texture.
That’s it for the textures! I must admit I’m clearly not a texture god, so that is the only stuff I can teach you :)
NOTE: If you have custom textures in your map, you will need to put more things in your .pk3 folder. Now you should have:
- A new textures folder in which you put all your own textures
- A new scripts folder in which you put your shader.
Keep in mind that your shader has to contain all your textures code, so every time you add a new texture, you have to copy the whole block I gave you about wall_gray, change the names…to fit it to your new texture names !
VI. GtkRadiant Tools
File: Basically New, Save, Load .map files. But also, you can Save selected…: all you selected will be saved in another .map file, you’ll be able to import with the Import… button. Finally you can load recently opened files.
Edit: Basically Copy, Paste and show the Map info.
View: Sometimes, your mouse goes so far in a 2D view (bug) that you see no more grid and can’t go back to your map. If you check all down, the coordinates of your mouse you’ll get an astronomic number. To go back to your map, hit the Center 2d button in this tab. You can also filter some types of objects you don’t want to see. You can also hide a selected brush that obstructs your 3D view by pressing H. To show everything hidden, press Shift+H.
Selection: You can invert your selection by pressing i. I’ll talk later about the other features.
Bsp: You can choose here the type of compilation you wish. I’ll maybe explain them later.
Grid: You can choose the grid accuracy as I explained before.
Textures: You can choose which texture folders you want to load to your current map project.
Misc / Region: No use for now.
Brush: By clicking Arbitrary sided… you can turn the selected brush into a polygon that has the number of faces you chose.
Curve: You can do some shapes, I’ll let you experiment these. One cool thing in this, is the Simple patch mesh which will make your brush as thin as you chose, and will be visible on one side and invisible and crossable on the other side.
Plugins: There are MANY useful commands, honestly I didn’t try them all, at all. One useful thing to do sometimes is bobtoolz/Brush Cleanup when you selected everything in your map (Esc then press i). It cleans up badly cloned brushes, unwanted buggy brushes etc…
Help: GtkRadiant Manual and Shortcut recap!
Mirroring and rotating: Well I have nothing more to say, the names are pretty precise.
Selection tools: For example, Select touching selects all the brush touching your current selected brush. Select inside is very useful too, to select objects that are made of lots of brushes: It selects everything inside the current selected brush before deleting it.
Surgery tools: - CSG Subtract: Perhaps one of the most useful tools of GtkRadiant. It allows you to dig a hole in a brush. Just create a brush that has the shape of the hole you want, place it in the brush you want to dig at the place you want the hole to be. You might need to make it longer like I did up and down. Then press CSG Subtract and finally delete the brush that dug the hole:
The only inconvenient of Subtract: it does not just create a hole in your brush, it creates brushes to make the shape you want, with a hole. As you can see on my screenshot, it made 4 brushes to do the shape I wanted. So if you try to make less squared holes, prepare yourself to get tones of brushes. That’s when you want to use Select inside to select them all at once !
- CSG Merge: Quite useful too, you can merge 2 similar-shaped brushes into a single one. For example, I made a simple corridor section that I cloned once because I want a longer corridor. So I would have many brushes. Now, I can merge every brush from the corridor. Once I cloned the corridor section and put it at the end of the other, I deselect everything, and I select brushes two by two (two grounds, two walls, etc.) and press CSG Merge: every time, again and again until I have one longer corridor:
- Hollow: When you select a rectangle brush then press Hollow, GtkRadiant will carve in the brush and so you have an empty box, which can be a room in the end. Don’t use it too much, it’s quite buggy on the edges of the box.
- Clipper: Very useful tool, it allows you to cut a slice in a brush! A picture is worth thousand words. Look, I’ll explain just below:
>> See picture <<
I first cloned the gray cube twice and I merged them to make one long rectangle. Then I press the Clipper button, then I place two point (in blue) which set the direction I want to cut in. Then either press Shift+Enter to keep both parts or just Enter to keep only the part colored in yellow in the 2D view. Then press Esc twice (deselect Clipper and deselect brushes), then select the upper part and delete it to get that slope! Finally I selected the new face and I fitted the texture with the Surface inspector so it looks less crappy.
I will not talk about the last button (Make Detail Brushes) in the orange square because it caused me trouble and I can’t find out how it works.
Rotating and scaling tools: - Cubic clip the camera view: If you turn this button on, you will not see brushes that are a little far away from your camera on the 3D view, to save little FPS in GtkRadiant.
- Free rotation: (Or press R) Basically a rotation, affected by grid accuracy.
- Free Scaling: When you turn this on, also turn on two of the three axis buttons you want to scale among, next to it. Then you can scale your brush up or down with Alt+Arrows. Remember to turn them all off after you did.
Caulk selection: Changes the selected entire brush texture to Caulk. It doesn’t work if you only select a face though, for a single face you must do it by T then select Caulk.
There you go, I explained the most useful tools of GtkRadiant !
VII. Shaders and Common textures
Remember before when I talked about shaders and textures behavior? Well, there are some presets behaviors, which are the ones in the Common texture folder.
Take a map and load the common textures as we did before and open the texture window (T). You should get that:
These textures are invisible but they all have a special behavior. I’m going to explain to you the ones I already used and know.
- Caulk: You should know it very well now ;)
- Cushion: Put it over your ground, this is a NoFallDamage ground!
- Nodraw: This is an invisible texture which the player can cross.
- Nodrop: Place it over the bottom of a bin, this texture destroys dropped items and weapons
- Origin: Origin for rotating objects.
- Slick: Put it over your ground, this is an icy texture! Put it just before your walls to prevent the players from wall jumping it.
- Trigger: I’m going to talk about it in the next part about Entities!
As you can see, in order not to get bothered with over-thicknesses due to the NoFallDamage ground for example, I just put the special wall or ground at the same place as the regular textured wall or ground. Usually, it’s not good at all to make two brushes at the very same place (texture bugs) but in this case, one of the two textures is invisible, so it’s ok!
But these are just some preset shaders, you can do your own of course! Actually, honestly you won’t create something which will be groundbreaking. Most of the time, you’ll copy and paste some shader part from the internet, that’s how it works!
As an example, I’ll show you how to include the ladder shader to a texture!
First find a ladder texture, I’ll take >> this << one. Now, open again the shader you made for your map just before (map_tuto.shader for me) and copy this new block:
That’s all. Now you can set beautiful ladders everywhere, and when you will compile (don’t forget to put textures and scripts folders with the maps folder in the .pk3!) and play it on Urban Terror, you will be able to grab it! Wonderful isn’t it? You can find lots of shader scripts on google with simple requests such as water shader and copy/paste the interesting part in your own shader.
TIP: You can also prevent the player from grabbing an edge, but it’s not a shader, it’s the shape on the edge. You need cut the edge in this way with the Clipper:
If you don’t like the Clipper that much, you can just move the vertices. Select the brush, then press V, there you are in Vertices mode, you can move them by selecting them (Left click only), then Alt+Arrows like if it was a brush. There's also an Edges mode by pressing E.
VIII. Brush entities
Here comes an interesting part! Brush entities are brushes that have a special function, a task to do; we can say they are active, whereas regular brushes are passive. A brush entity can be a door, a teleporter, a jump pad… We will try to review most of them in the following.
Warning: a map can contain only 255 brush entities, so be careful !
First create a random brush (on a new map I advise, create a room around), and while it is still selected, right click it on a 2D view. You can see some options now, in this lesson we are going to use the classnames in func, target and trigger. I guess these names explain themselves pretty good, func are functions assigned to brushes and trigger brushes trigger the targets. Note that one brush can have one and only one classname, so either one func_... or one target_... etc.
As an example, select trigger/trigger_hurt for your brush. At this point, depending on your GtkRadiant version, either you will see on the 2D view trigger_hurt written in color, or not. For example, mine doesn’t show it (this must be in some setting somewhere, I don’t know). So now you applied the classname trigger_hurt to your brush. Every brush entity has properties, also called Key or Pair. To show the properties of a selected brush, press N. You should get this window (actually the same as the Texture window and console but not on the same tab, look down):
You can reset the properties by hitting Reset, or delete only one property by clicking Del Key/Pair. Well for now you have nothing to delete! Up the window you have a little window where you can see what type of entity your brush is. Here, trigger_hurt is highlighted. Just below you have a little help window. Even below, you have some checkboxes to set some more properties to your brush. They change depending on the type of entity you chose.
Here for example, we took a hurt type, whose function is to…deal damage to the player who touches it.
NOTE: Keep in mind that most of the brush entities are INVISIBLE in game (Except for breakables), so you can let them in Caulk. Every time you want the brush to be visible, you have to create another passive and textured brush below, or inside the entity. I’ll show you just after that.
Now, let’s add a Property! To do so, you have to know the Key name, to enter just after Key in this window, and then the value you want after Value. To valid the property and save it, you have to press enter while you cursor is in the Value text box. Let’s test that! The basic property of a Hurt is dmg which is, as you can see in the help above, the amount of damage dealt to the player by server frame (very fast). Write dmg in the Key text box, and write 10 or the value you wish in the Value text box. Then press enter:
You pair will now be in the list, next to classname. You can also check the boxes ("Spawnflags"):
- Silent: If you don’t want the player to hear the hurt noise when he gets hurt.
- Slow: If you want to slow the hurt rate down to 1 per second.
Now I’m going to show you how to make it look alright on your map:
As you can see, there is one textured brush that has no function at all. This is just for the visual aspect of the hurt. Then place your hurt block over it and make it fit the size like I did.
NOTE: Be careful if you duplicate (Space bar) a brush entity, the 2 brushes will be linked together and have the same function, no matter what. So if you change the property of one of them, the other will change too. So avoid duplicating a brush entity unless you want exactly the same function.
Create a pad brush sized as you want. Right click it on a 2D view and select trigger_teleport and press N to display the properties. Now, set the Key: target, with the Value: tp1, or whatever you like. This Value is just for you, to remember what is linked with what etc.
That’s all for the teleporter pad. Now you must tell GtkRadiant where you have to be teleporter to. So deselect everything, right click somewhere on the Above 2D view and select target_teleport. Open the Entity properties and set the Key: targetname and the Value: tp1, or the same value you put just before in the trigger_teleport properties! When you press enter, an arrow should be drawn between the two objects. You can now move the green square where you’d like the player to be teleported. Be careful not to put it inside a wall or ground. Also, don’t put it too high, or else, unless you put a Cushion ground, the player will die, or break his legs. Keep in mind that the player is thrown when teleported, so he won’t fall right down.
Actually, target and targetname Keys are common for all entity type. Look at the schema to understand how they work, it’s quite easy actually:
Finally, make a textured brush inside the teleport pad, make it at the same place than the pad and then reduce it by 1 Quake Unit, or what you want, on every side (up, front, left, right, back if it’s not against a wall).
Make a pad brush sized as you want. Right click it on a 2D view and select trigger_push. Then set the Key: target and Value: jmp1. Now create a target_push as we did just before. Set the Key: targetname and Value: jmp1. Now they are linked together. Now you want to experiment with this feature because, the player with be thrown towards the target_push, so the position of the target_push is not the position you want the player to land. See below:
Finally, do like the teleport pad, to make it visible.
NOTE: To turn a brush entity into a regular passive brush, select it, right click a 2D view, Ungroup entity.
Here’s a simple one. Just draw a brush, right click it on a 2D view, select func_breakable. That’s it. If you want, you can add the Key: health with the Value you’d like, to define the minimum damage the player has to deal to it before it breaks. Also try Key: type to define what kind of material it should break like. Check the little help window to see which number corresponds to which material.
Okay here comes the harder part! No, no, don’t go, it’s not that hard actually! First, prepare the door like I did:
First we are going to do a rotating door, which will open like a regular IRL door when you press Action(Ctrl). Create a brush that has the same height as the door and make it 8 Quake Units long and 8 Quake Units large. Place it just besides the door, and texture it Common/origin, this is the pivot of the door. Then select both the pivot and the door, and right click on a 2D view, select func_rotatingdoor:
There you go, a door!
Now what if you want a sci-fi door that goes up or down and opens by itself when someone walks by? There’s a function for that! Prepare another door, we are going to make it disappear up when someone walks by.
Select you new door, right click on a 2D view, select func_door. Then make the same 4 Properties as me:
- targetname: You should know it now! It is the name we will put as target in the thing that will open the door.
- trigger_only: If not set, the players can activate the door by pressing the Action key. If set to 1, it can only be activated by a trigger.
- angle: This sets the direction the door will go.
o -1: Up
o -2: Down
o 0 or 360: Right (on the above view)
o 90: Up (on the above view)
- lip: This sets the number of Quake Units that will be remaining out of the first brush the door will cross. I set 4, that means the door will go up until there are 4 Quake Units of the door showing out of the brush which is above the door. Yes it’s hard to understand, I doubt the developers understood, themselves.
NOTE:Most entities support the angle Key, such as the spawn point.
NOTE 2: The Key speed also exists, you can set it as you need.
There you go, a door. Wait, this isn’t over yet! We need to activate it! Draw a brush just in front of the door and texture it common/trigger. This represents the area where the player needs to be to activate the door. Once you’re done, right click it on a 2D view, and choose trigger_multiple. Set the target to…wait I’m sure you know that! Then add the Key: Wait, Value: 1. This wait Key specifies the time in seconds the trigger has to wait before it triggers again the target.
If you tested the door before, you must have noticed that once opened, the door stays opened until you step again on the trigger area. Delay entities can fix that! Deselect everything, then right click a 2D view and create a target_delay. Place it wherever you want, it’s invisible in game, though you’d rather place it near its trigger, just for a better overview in GtkRadiant. Create another one besides the first one. Let me explain you how it works:
First, you have to know that Wait: -1 stands for Wait 0 seconds in GtkRadiant, do not ask me why!
As you can see, the first delay transfers the trigger immediately to the door (It opens right when you trigger the area), while the second delay timer is running. Eventually, after 1 second, the 2nd delay will trigger the door again, which means closing it. That’s how it works! So fill in your delays the Keys I wrote in the image for it to work. Don’t forget to change the trigger area Key: target, Value: d_door1 instead of door1. To edit a key, just click the line, then rewrite the Value and press Enter.
Of course trigger_multiple aren’t the only trigger that exists! You mostly want to use buttons in your map. This is how you do it:
First create the support for the button to make it look better, then create a back block that will be shown when the button is pressed. Finally, create the button itself, wait I show you!
Fine! Next, right click on a 2D view, and select func_button and fill in the Keys lip, angle and wait. Here, my lip is set to -1 because I want to button to end up 1 Quake Unit behind the back block after I pressed it. Wait 1: the button will keep disabled for 1 second (it will keep behind the back block for 1 second and nobody can activate it again in that time). Finally, you have to set the angle depending on your button orientation. Check on the above 2D view in which direction you want it to go, for me it’s left, so 180 degrees (as shown by the buttons square of the entity window if you have 1.6.4 GtkRadiant).
Now, of course your button can be pressed but it activates nothing. You know what? Let’s do an elevator! Create a thin rectangle platform just besides your button. Apply a func_door to that platform. Note that most moving brushes will be set as func_door no matter whether they are actual doors or not! Now set the Key targetname to Value lift or whatever you want. Don’t forget to set the button target to lift too! Then set the elevator trigger_only to 1 and angle to Value: -1. About the lip, you have to count how many Quake Units you want your elevator to go up, then put a minus before it, and now test values around that! I don’t know why, but in my case, my elevator has to go 184 up but I had to set lip to -172. You have to test things with negative lip! There you go, a button-powered elevator!
Bigtexts & sounds
If you want your map to be a little more interactive, you might want to add some text and sounds!
Right click somewhere on a 2D view, and add a target_print. Link it somehow to a trigger. I made a trigger_multiple area covering the zone the elevator leads to and I linked it to the target_print. Don’t forget to set a wait key long enough (I put 10 seconds) so the bigtext doesn’t spam. Open the target_print entity window and set the Key: message to Value: ^1You shouldn’t be here, get down! or the message you like. As you can see, you can use Urban Terror colors with ^number.
Now let’s add a sound linked with them! Deselect everything and create a target_speaker. Then you can link a sound to it by adding Key: noise, Value sound/------.wav. Of course place the actual sound name instead of the dashes. Also don’t forget to insert your sound in the sound folder in your .pk3 after compiling!
TIP: You can press L key to get a list of all the entities of your map. From here you can seek bugs.
Now you tried a bit with entities, you should understand that it is always barely the same. I’ll let you experiment those two, after you read their help window!
- func_bobbing: A platform that goes back and forth continuously.
- func_pendulum: A … pendulum around an Origin brush.
- func_rotate: A brush that will rotate continuously around an Origin brush.
As a Urban Terror player, you must have noticed there’s a location system, locations are written on the bottom-left corner of the game when it exists. Now I’ll tell you how to set locations to your map.
It’s really simple actually. Create a brush that represents the area of the location and texture it common/trigger. Finally, right click a 2D view and select trigger_location and add the Key: message with the Value: Your location. That’s all.
In the end, if location brushes are everywhere on your map, in order to see something, you will want to hide them (H) temporarily (Shift+H to show again).
Player / weapons / items Spawns
At the beginning of this tutorial you learnt how to create the info_player_start. This is enough to play your map. However, you may want to make separated spawns depending on the team of the player. Before I tell you how to do this, keep in mind that your map will always need the info_player_start even if you add the red and blue spawns. Actually, this info_player_start will be the place where players will be when they just entered the game, as Spectators.
To create the two teams’ spawns, right click somewhere on a 2D view, then select info_ut_spawn. Create two of them and place them where you’d like players to spawn. Select them both and add the Key : g_gametype, Value : 3,4 (TS and TDM. You can add more if you want). Then deselect them and edit their properties one by one. In the first one, add Key : team, Value : blue and you guess what Value to put on the second one! There you go, two spawns for the two teams. You can also set the angle so players spawn looking the direction you wanted.
Now, you can also make a spawner of weapons and items. Depending on your version, you will have directly weapons and items in your right click. If you don’t (like me), create another info_ut_spawn, press N, select classname info_ut_spawn and rename info_ut_spawn to one of the names below:
- ut_weapon_glock (works only in 4.2!)
- ut_weapon_colt1911 (works only in 4.2!)
- ut_weapon_mac11 (works only in 4.2!)
- ut_item_extraammo (buggy ‘texture’, don’t ask me, I didn’t get it)
- ut_item_nvg (Basically Tac googles)
Please tell me if I forgot an item or a weapon :).
Once you chose one, add the Key: count, Value: 10000 or whatever amount you want. Count is actually the total number this spawner can create. If you set to 1 for example, only 1 weapon will spawn, then there will be no more weapon; Key: wait, Value: 2 or the time you want between each respawn. You can also set the angle to choose the direction the weapon or item is facing.
That’s it for entities! I know it’s the hardest chapter but it is a very important one. I’ll let you download my testing map where I put everything I explained before, so you can see and understand where you failed.
Download the .map (http://as6m87eqlo.1fichier.com/)
IX. Common errors
I’m going to list here a few of the errors you are going to get, and try to explain how to solve them, even though error solving is not an exact science at all! You’ll mostly have to try things to debug, I’ll tell you the main way to solve them, if you case doesn’t match, you’ll have to seek further.
I put in red the errors you get in GtkRadiant after you tried to compile and in orange the errors you get in Urban Terror.
- Map is leaked: There is a hole somewhere leading to void, you have to fill it or else you won’t be able to run your map. Follow the red arrow to find the hole.
- Couldn’t find a spawn point: Most likely you forgot to keep your info_player_start when you added the teams spawns. Anyway you have to create one somewhere!
- SV_SetBrushModel: NULL: Okay, this is a painful one…There are many possible causes for this very error. First try selecting everything in your map (Esc then i), then do plugins/bobtoolz/Brush Cleanup, delete the unwanted brushes. If you had a Entity leaked in the GtkRadiant debug console while compiling, double click this error to go the entity and check if the entity that is leaked is linked to something. If it’s not, link it. Finally if nothing works, delete it and create it again.
TIP: If you can't get rid of an error, try the following:
- bobtoolz/Brush Cleanup on all your brushes.
- L menu: check your entities, if one isn't linked to anything, your bugs probably comes from here. Either delete the entity or link it. You can press Select in this menu to select the entity you highlighted. You'll have to close this window to act on GtkRadiant.
- Try using the white Compile Console of GtkRadiant to get clues about the cause of your bug/crash.
- Try deleting the last brushes you draw.
I’ll give you a link to all the possible errors you can get because I can’t list them all here:
Complete error list
That's it for the tutorial! You should now be able to create any type of map. If just didn't talk about one thing: lights. This is because I didn't figure it out myself. But usually you have to create lights entities with a right click, and finally in the end choose a Compile mode with -light in it!
When you entirely finished your map, you may finally use the (final urt) mode!
If you have any question or suggestion, don't hesite to post here. Once you finished your map, don't forget to let me know too ! :)
This tutorial is getting pretty long, you might consider using anchors
1) The unit of the grid you call "pixel" are actually called quake units or qu, that's useful to know if your map require precise fine-tuning (e.g a jump map), as you can follow HappyDay's measurements to scale your maps accordingly. Also you can display your speed in qu per second in-game. Maybe also take JRandomNoob's words in account:
Players who are right next to a thin brush (less than 16 qu, usually this means doors and windows) clip into it and can be shot from the other side (they’re only visible through the brush if it’s less than 8 qu thick).
2) I also had the reflex to use CSG Substract for various operations until a more experienced mapper told me not to (it creates weird irregular shapes). To quote him:
Don't ever, ever, ever use CSG subtract! It will only cause you pain and torment! CSG merge is fine, even CSG hollow is tolerable on cuboid brushes... but CSG subtract is undoubtedly the work of the devil. It creates tiny brushes, screwed up angles and god knows what else so DONT USE IT!!!!!!! EVER!!!!!!! Everything you want to do can be done using clipping mode (X), edge drag mode (E) or vertex drag mode (V).
And he pretty much does everything by clipping now.
Yeah I though about anchors, I'll do a summary!
Didn't know about that, I'll change the pixels to qu later :)
About Subtract, it only depends on what you want to do. If you want to do a simple hole like my example, it's actually fine. Indeed if you try a different weird hole, you'll get tons of brushes as I said
Okay guys I added all the things I wanted to talk about. Now everybody should be able to create a beautiful Deathrun map! :D
I'll keep editing minor things but I don't think I will add one more part, or something ^^