It's very much written like a cook-book - you don't have to
understand exactly what you're doing; if you follow the
instructions, it'll work out ok :)
In contracst to the rest of the FAQ, this chapter is meant to be read sequentially.
Details about working with UnrealEd can be found in the next chapter.
By the way, if both this tutorial and the FAQ seem oddly familiar to you, it's because it is: I also wrote The Unofficial Duke Nukem 3D Editing FAQ, and a lot of the info has been re-used.
So: doubleclick on the UnrealEd icon and make yourself some coffee while the program starts up. It'll take some time (told you it's a memory hog).
The UnrealEd interface consists of several parts:
Of course, you can zoom and pan all the window contents about - I'll show you that later.
So when we want to build our room now, we'll need to take a big cube brush and carve it out of the surroundings. The result is a neat square cave, which we'll texture to look like a room in a storage house.
Now a new window called Build a Cube appears where you can set the cube properties.
We'll need a solid cube (remember, the whole empty map in front of you consists of solid
granite, and we're just carving a bit out of it), so keep the radiobutton at the top set to
Solid.
As to the size units - well, a minimum room for our character to stand in should have a
Height x Width x Breath of about 128 x 64 x 64. We're looking for a nice high storage room,
so set the cube size to a height of 256 and a Width x Breadth of 512 x 512.
Ignore the option Wall Thickness (it's for hollow cubes) and Group Name. You can also, unfortunately, forget about the Help button, as the .HLP file is not included in the Beta version...
Click on Build to create a brush with the specified size, and Close to close the Build a Cube window again.
Now, since we haven't done anything with the brush yet (we haven't carved it or added it to our map), it has no impact on our map at all. It's not even properly visible - you might think of it as a cursor.
So this is where you take the all-important step and click on the Subtract Brush from
World icon, which is this one:
.
(The green square is supposed to be your brush, the grey one is the world).
Ta-DAH! One room created, just like that.
What has happened is that you've used your cursor brush (shown in red) to create a
subtraction brush (shown in green).
The 2D views haven't changed (the red brush is drawn over the newly created room, hiding it),
but the 3D view shows both the red brush outline and the room, textured in a weird bubbly
texture.
Look at this texture. Memorize it. Learn to hate it: it means you've forgotten to add a texture.
But first we'll learn how to move around on our map:
Now, zoom each map in until the cube fills the window comfortably: press both mouse buttons and move the mouse up and down to zoom.
Simple, isn't it?
Thus, position yourself inside our new room.
Look at the 2D views when you do so: the little eye icon shows your current position, and the
red arrow attatched to it shows your view direction.
.
This is the perfect moment to explain an irritation in UnrealEd: you have to left-click into
a window to update it.
Thus, when you move your view point in the 3D map, you'll have to click in all three 2D Views
to see how your viewpoint icon changes position.
However, at the moment the brush is an irritation, so we'll hide it:
Click in the 3D Window and press [B]. This toggles the brush display on and off, so it
you ever wonder where your brush went, it might simply be hidden (I fell for that a couple
of times already :)
The second line contains a selction box saying: (All).
That's not so good, we don't want to see all textures at once. Click on the selection box to
see which texture sets are loaded.
Hmmm. Currently, the texture packages Editor, Engine and UnrealI are
available.
Not good enough - none of these texture packages really contains what we're looking for
(btw, if you want to know which textures are all available, you might want to sneak a look at
the texture reference).
Now we'll have to load a new texture package. Look for the Load button at the
bottom of the browser, and click it. A selection window pops up with a list of all the
texture packages available.
Load the package NaliCast (yes, these are textures from the Nali Castles).
See how the browser now shows 'NaliCastle' under the Browse line at the top?
Directly underneath is yet another selection box, where you can select what subset of the
textures you wish to view. Choose Wall.
Now have a look at all these nice textures. Use the three buttons directly above the texture list to change the size of the textures. Note that at maximum display size, the size of the textures is shown next to their names.
Choose the texture named wall1_su.
If you've still got the one wall selected, it will now automatically change to the new texture.
If not, select the wall and click the Apply button at the bottom of the texture
list.
Now wallpaper the other three walls using the same texture.
.
Looks nice, doesn't it? Have a look at the corners: see how neatly the textures fit together?
That's one of the great advantages of using rooms which fit neatly on the grid.
As a general rule, your wall lengths and room heights should all be a multiple of 2: 64, 128,
256, 512, 1024, and so on. Life is made even easier by the fact that you can enter simple
formulas when choosing a brush size: instead of just entering a number like 1024, you
can type 128*3+64. Very useful if you're tired or aren't used to doing this in your head.
Look around your room. Nice, isn't it? And so easy to create.
To move the light icon in 2D mode, click on the light (it should turn green to show it's selected), hold the Shift key and drag the icon around with the left mouse button. Position the light in the middle of the room, just under the roof.
To see the effect of the light, choose the Mode menu in the 3D view and select
Dynamic Lightning.
Hang on...it's already at this setting, how come we don't see the walls being lit?
That's because we have to rebuild the level first. Quake builders will groan now, but in
Unreal rebuilding (compiling) a level is really fast: press [F8] to call up the
Rebuilder window. Click on the Rebuild Geometry button (make sure
that the Auto BSP checkbox is active).
.
Voila! The 3D view changes to display a dimly lit room. Very nice.
If you want see more clearly, you can change the 3D View mode to Textures, using the Mode menu again.
To uniquely identify all classes, I'll refere to them like this: Class.Subclass.Subclass.
For example, the PlayerStart class would correctly be called
NavigationPoint.PlayerStart.
(More correctly, this should be Actor.NavigationPoint.PlayerStart, but since we rarely need
anything except Actors, we'll keep it simple).
So. Click on PlayerStart to select it. Now right-click into our room in a 2D view
and select Add PlayerStart here from the pop-up menu:
.
Now move the player start position until it hovers just above the floor of our room. Make sure
to check all three 2D windows to see if it is correctly positioned.
(As an aside, did you have a closer look at the pop-up menu just now? There are three (count 'em) options who have the A shortcut assigned to them. Don't you love Beta software?).
Press ^P to play your map. First, the Unreal Log WIndow will pop up, showing
you what Unreal is doing while starting up.
As soon as Unreal has started, you're in your map! Walk around, fire your Pistol, have fun,
enjoy the milestone of your first working Unreal World.
Quit Unreal (the fastest way is to type EXIT into the console) to return to the editor.
Just in case the earth didn't move for you and you can't find out what you did wrong: I am including the current map state with this tutorial. Use it to find out where you went wrong.
If we want to place crates into it (and we do), we have two choices: either we add a crate object (which can be shot, possibly containing something), or we build a crate out of a brush (which'll be rocksolid and indestructable).
I know: let's do both.
Using the rightclick-menu in one of the 2D views again, add the box to the map and position it
on the floor in a corner.
Now you have a box in the game, and you can try right now to start your map again and shoot it
(remember to save your map first!).
But...the box is still empty. Let's put something inside: the AutoMag pistol.
Back in the 2D View, rightclick on the box and select the very first option:
WoodenBox Properties (1 selected), which will pop up a window called
WoodenBox Properties.
See how many properties such a simple object has? But right now we're only interested in
a single one: click on Decoration to open the properties which are shared by all
decorations.
We want to fill in the contents field, so select the class
Inventory.Weapons.AutoMag in the browser and then click on the contents field in
the WoodenBox Properties window. Select the Use button and you'll see the text
Class'UnrealI.AutoMag' appearing in the contents.
Note: you could just have typed Class'UnrealI.AutoMag' instead of selecting the AutoMag class from the Browser, but it's so much easier this way, don't you think?
Close the WoodenBox Properties window and play your map again: much better!
To be fair to the player, the new box will look different to the last one.
First change the browser back to Texture mode and load the texture package called GenLn. From it, choose the texture called mbox10 (in the Deco subset).
Next, we have to create a new brush, this time adding it to the world: right-click on the
Build A Cube icon, and create a brush sized 64 x 64 x 64.
Find the red active brush both in the 2D and the 3D views (remember that you might have to
press [B] to toggle active brush display) and position it on the floor, in a different
corner of the room (you move the brush just like moving an object: leftclick to select it,
drag it using shift-leftmouse click).
Once the brush is just where you want it, click the Add Brush To World icon:
.
The newly created add brush shows up blue in the 2D views.
Have a look at it in 3D mode (you might want to toggle the active brush display off again):
ugh. The textures don't fit at all.
Okay, to fix textures: select one of the textures and rightclick on it, and select the Surface Properties Menu. Aah, lots and lots of options, just the way I like it!
Choose the Scale tab, set the Simple Scale to 0.5 and click Apply.
Next, select all other faces by leftclicking on them while holding [Ctrl] and select
Apply again.
When that's done, choose Close to close the Surface Properties window again.
If you want, take some time now to explore the other surface properties. Fun things like Pan, Rotate or (best of all) Effects.
Rebuild your map and play it again (need I still remind you to save your work under yet another name?).
Feel free to play about, adding more decorations (like chairs or chests), mess around with the surface properties (have you tried Mirror yet?), and come back here when you're done.
Oh, and while you're at it, you might want to switch the 3D view mode to Map Persp, to see just how much more complex the first crate (the mesh) is to the second one. See why it would slow the engine down?
Use the 2D views to make sure that the floors of both rooms are at the same height. Also, you'll have to set the 3D view mode to Textures, as the new room doesn't contain a light yet and will thus be pitch dark.
As expected, the textures in the street look weird. Choose any textures you like to wallpaper the room with; I'm going to use NaliCast.Walls.wmbr for the walls and NaliCast.Base.block2 for the floor. Let's ignore the sky for now, it's a special case anyway and we'll look at it later.
This might be a good moment to tell you a useful shortcut when texturing things: hold
[Alt] and rightclick on a texture to remember it, point at another wall, hold
[Alt] again and leftclick on it to change the texture to the remembered one.
Try it: it's really convenient.
Place two lights at the roof of the new room, right-clicking on them to change their LightColor.LightBrightness property to something lighter, like 120.
Create a brush sized 64 x 32 x 64 (assuming that the street is 32 units north from the storage
room) and use it to carve (ie create a subtraction brush) between the street and the room:
.
You'll have to rebuild your level again to see the changes in the 3D View.
As easy as that. Play your level again and look out the window at the street.
Glass is a bit more complicated, and is covered in
The HowTo Section.
You'll notice that the wall texture containing the window doesn't look very good anymore, because it wasn't meant to have a window cut into it. You should change it, perhaps to the same texture you used on the other side of the wall, in the street.
So far we haven't bothered with the texture on the sides of the window or the doorway, but let's
take a moment to fix at least the floor texture of the doorway.
Make the texture the same as the floor texture in the storage room, select both floors,
rightclick and choose Align as Floor/Ceiling from the Align Selected
menu. This makes sure that the texture flows evenly into the door - unaligned textures look
terrible.
When you rebuild now (remember, you'll have to rebuild after most changes and definitively
before playing the map), you'll see the light from the street spilling into the room.
Such a vast improvement over the DOOM/Duke Engines, where you had to do this by hand...
First, create the door. Make it a bit thinner than the doorway but otherwise the same size
(would be drafty otherwise). Place it in midair in the street and texture it any way you like.
(Hint: look at the NaliCast.Door textures).
Make sure that you texture all sides of the door, and if your texture uses hinges, make
sure they're all on the right side.
In 2D mode, select the door (you might want to move the red brush away to make sure you're
actually selecting the right brush). Richtclick on it and choose
Copy Polygons/To brush.
Now the active (red) brush contains our door (although the original is still floating in
mid-air).
Move the active brush into the doorway and click the Add Movable Brush icon:
Hide the active brush and take a look at what you've created: it looks like a normal brush,
but it only shows up as an outline in the 3D view.
Rightclick on it.
The most interesting bit in this menu is the Mover Keyframe option; it's where
you define the keyframes of the moving brush. In the game, the brush will move from keyframe
to keyframe (rotating if necessary) when triggered.
Choose Key 1 from the keyframe list.
Now you can drag the door to the 'open' position. You can either simply let it slide into the
wall or use [Ctrl] and Rightdrag to rotate it to any position (in the 2D views).
Once you're happy with the final door position, select the door brush again and switch it back to the Key 0 keyframe (the start position).
Rebuild the map and play it.
Once you're sure the door works okay, you can delete the original brush still floating about
in mid-air.
By the way, rotating doors have a little problem: if they open towards you, the bump into
you and immediately close again. Thus they should be triggered by a button or something - it's
safer to build 'normal' doors as sliding into walls.
The door isn't perfect: it doesn't make a noise, it might open too fast or too slow. You can fiddle with the doors properties (have a look at Mover.MoveTime, for example), or you can look up doors in The HowTo Section.
This is just a demo map, so we'll continue to the final part: the sky.
The exact details can be looked up in The HowTo Section, I'll just show you a quick way for now.
First, you create the SkyBox itself: this is simply room somewhere, which defines what the sky will look like. Carve a 128 x 512 x 512 room somewhere on your map. Of course, it shouldn't be connected to any of your rooms.
Load the SkyBox texture package and texture the floor with grnd, the walls
and ceiling with NCld.
The ceiling needs two effects set: U-Pan (for moving clouds) and Unlit (so the
clouds are fully visible).
Finally, place an object on the floor in the middle of the SkyBox: Info.ZoneInfo.SkyZoneInfo.
To apply the SkyBox, move back to the street and give the sky texture the Fake Backdrop Effect. Rebuild the map and try it out.
Okay, so it isn't perfect. But it does show you how to do the most important bits, and should provide a solid base for creating 'real' maps.
Have fun, and Best Of Luck!
(Oh, you want to add monsters? Here's a tip: have a look at Pawn.ScriptedPawn...)