Mapping For Dummies/Lesson2
From UFO:AI
Contents
|
Lesson 2: Building up the Map
This section is a work in progress and is being roughed out. The information is presented so that it can assist you, but it is not at the explanation levels seen above --Wanderer
The general plan
Our objective now is to take our existing map from Lesson 1, and build it out to something you'd actually want to play on. We're going to do the following items to our map:
- Expand the grassy area and flatten it back off to include a dropship as a landing craft.
- Include some models into the shed so it isn't just a barren room.
- Use the prefab_drop_firebird.map file to copy/paste over a dropship with all the prebuilt actorclips and nodraw brushes which we'll explain later
- Put a light into our very dark shed so it doesn't look like a tomb.
- Add some windows to our shed, using two different methods, the clipper tool and the Ungroup Tool.
- Rough out a large 3 story house where the majority of the level will be played in.
- Use the clipper tool to split it off into floors, and move this to another copy of GtkRadiant to work with each one individually.
- Include stairs and the stepon brush, and use the copy from prefab_household.map for the internal ones, to travel between floors.
- Include some actorclip brushes for areas we want to block off, and some nodraw brushes to add some extra shadows.
- Fill up the house with models and prefabs. We'll also need to include some lights through the house.
- Include some info_human_start, info_alien_start, info_civilian_start objects to the map so that it becomes a functional map.
A little pre-work
We want to make sure our grassy area has plenty of room for a ship to land in, so widen it along the y by 256, and widen along the x about 640 (To around 832 or more). Re-expand our hedgerows to surround the areas correctly.
Knock out the modified cone you built on the grass to work with flat ground again for a while. Little terrain things like that either need to go in first or last, but in all cases tend to get in the way, and let's simplify this a bit.
Adding Models
By rt-clicking on the map with nothing selected, you can add a misc_model. Unfortunately, it's tough to preview models without just throwing it on the map and taking a looksee. Not all of them are textured. Inspect every model you choose to add via the camera view before considering it 'good'. Repeat this process for every new version, as the trunk is definately expanding.
What you're able to add is all the .md2 objects loaded in the base file. If you can't see these, you need to unpack the .pk3 files (winzip) that are in /base. Unpack them to their folder trees as loaded into the .pk3. Rename the .pk3 files (I like shoving them off to a new folder, myself) once you've unpacked them so the game doesn't read one set while you work with another.
Once you add a model, you can drag it around to position it like any other brush. Try to remove overlap with existing brushes. To make sure they confused you, however, you need to set 'level flags' in the Entity Attributes (N) screen, instead of in the Surface inspector. Unlike other brushes, if you don't set these level flags, there is no default, the model doesn't appear.
Try adding in a couple of models inside the shed, such as models/objects/furniture/metalshelf/metalshelf.md2.
If you look you'll also find the models for dropships. I recommend NOT using these, as Mattn and others have made prefabs for these ships that include all the necessary extra brushes to make it look clean.
If for some reason you're including a number of the same model (say, like in a jungle scene where you need the same plant constantly), you can duplicate the model by hitting the space bar and drag the new one off from on top of the old one. This CAN create entity groups, so don't do this if you need each model to behave independently.
Adding Prefabs
To add our dropship, let's open another copy of GtkRadiant and load up prefab_dropship. It's a little down in the file in the negative X, so you'll have to wander the map around a bit to find it.
Shift-select the item en-mass, then Ctrl C to copy it. Head to the other GtkRadiant you have open and paste it to the map with Ctrl-V. It should be hiding at the exact same XY that you picked it up from in the first map. Drag it up to your grassy knoll and Switch to XZ to level it off with the ground.
To hide the clipping you can click on the red box in the toolbar to turn those off. The nodraw (yellow) brushes there's no easy way to hide, but at least you should be able to see the model properly. If you need to, you can select the yellow nodraw brushes and type 'H' to hide them.
Note: Mapping convention: For nodraw, stepon, actorclip, weaponclip and other special brushes use respective textures in tex_common (for example, tex_common/actorclip).
Lighting Internal Areas
Right mouse click and choose light to add a local light source. The settings are similar to the way the worldspawn settings were set earlier, and use a high light value so it's not lost. You just end up needing to get a feel for these. The light is invisible to the end user, but the resulting light is not, so you can shove it into the middle of a room with no adverse affect.
Windows
Windows are always handy things to have... especially if you'd like to shoot out of them.
Clipper Tool (X)
Cut (not copy) and paste your wall from the map into the other copy of GtkRadiant. Type X to bring up clipper, click once at the top of the wall, and another time at the bottom. Two dots with #1 and #2 should come up. Hold down Shift Enter. It will Split the model along the line you've just drawn. Separate them out about 20-24 x units by individually selecting them and resizing them. Draw two smaller brushes for a top and bottom to the window, leaving a gap to see through. Copy and paste the entire selection back to the primary map.
CSG Ungroup (Shift-U)
Draw a brush the size of your desired window, and make sure it's at least as thick as the wall you're putting the window into. Now place this brush where you want the window, and hit Shift U. This will remove the area where you put the brush, and cut up the brush you were through into multiple pieces. It's hard to describe without screenshots, just do it.
You lose control of your texturing this way if you're using a finely detailed rarely repeating texture, so inspect your brush(es) after you perform this.
Hit Backspace to remove your 'window making' brush when done.
The house
Rough out a house. This is just like building the shed, only you're going to build rooms with doors. Work with one floor at a time, and work from the bottom up, and each floor should be 64 z units high. You can change this later once you're ready to experiment with things and can build your own stairways.
I recommend you build each floor independently in another copy of GtkRadiant. Remember to leave areas for stairs, otherwise, it's all yours. You want an entire building of bathrooms, go for it. Don't forget to roof and level flag it unless you're building an Observatory...
The example to be built will be a motel/bed and breakfast style place. The first floor being meeting rooms, big ol' cafe, front desk area (with a small back office), laundry room, and public restrooms with the 2nd and 3rd floor being motel rooms (which, eventually, I hope to add doors to.)
Once you've determined how many levels your final building is going to be, remember to adjust the 'maxlevels' property of the worldspawn entity. (l then n)
The stairs / step-on brush
Use the ungroup to punch holes in the floors as needed, and copy the stairway in prefab_misc at -128 x -320 and drop them into the the map and position it into your map. Shouldn't need much more than that, but make sure the bottom of the stepon aligns directly to the top of your floor.
The other invisible brushes: ActorClip and NoDraw
If you want to keep actors out of your local plantlife, actorclip a brush around it, like you'd see in prefab_vegetation.map.
If you want to see a shadow on your map (and this is especially true when dealing with misc_models, as they don't currently generate shadows via the engine in version 2.1.1), you can add a nodraw flag. To see how this works, hang a randomly built brush across your map, set it to nodraw, then build and view it in the engine. Nice big fat shadow.
Random_thought... wonder if I can ever animate one of these brushes to make it look like a plane's crashing....
Adding Aliens, Civilians, and Humans to your map
Right click and choose info -> info_alien_start (or human or civilian) onto the map.
MAKE SURE that these brushes fit exactly into a 32x32 box on the XY view (grid level 6) otherwise they don't function. The easiest way to deal with this is only place them when you've got a Grid 5 setting on, and right click at the center of the grid 6 boxes. If you start seeing error messages along the lines of 'z level not between 7:255' in the console when you load your map, you have one or more of these start positions in an incorrect location.
You can alter the start direction of a spawn by changing the angle in the entity properties. Just use the YAW setting near the bottom, or manually add in the angle property.

