Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 60 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Tutorials

»
Left 4 Dead
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Your First Level
Versions: You must be logged in to view history.
A Simple and basic overview of how to create maps for Left 4 Dead

In this tutorial i am going to show you how to create a basic level for left 4 dead.

Creating a Basic Room

Part 1 - The Floor

Click the 5th icon on the Tool Bar, which is called the Block Creation Tool.

l4d_hammer_toolbar_05_40

Now, left-click and drag in the Top viewport in a Right and Down movement.

You should see a dotted outline of a rectangle or square as you drag. Create a square 512x512 units and let go of the left-mouse button. Press Enter on your keyboard to create this brush that you've just drawn.

l4d_hammer_brush_01_491

Note: Please create this brush so that the origin is in the center of the brush. You will need this located here so that the default nav file that isincluded in the SDK will work.

To go back to Selection Mode (the default mode), click on the 1st icon on the Tool Bar, the arrow, or press the Esc Key.

In selection mode, with the brush selected, you can change the size of the brush by left-clicking on any of the boxes that appear on the borders of the brush and dragging them out or in.

Let's decrease the thickness of the brush (which we'll be using as a floor) from 64 units to 16. To do this, we need to change the size of the grid. You can decrease the grid size with the [ key and increase it with the ] key. To bring the grid size down to 16 units, press the [ key twice.

In the Side viewport, drag the top border of the brush down so that it's 16 units thick.

l4d_hammer_brush_01_491_01

You can move brushes around once they're created. Left-click and drag inside a selected brush to move it or you can move it with the arrow keys.

First of all, to use the arrow keys to move objects, you will need to change an option in your settings. Go to Tools > Options to bring up the Configure Hammer Dialog Box.

There are other settings here as well, but for using the arrow keys, you will just need to check the box marked "Arrow keys nudge selected object/vertex"

l4d_hammer_brush_01_347

Let's move the floor brush down 16 units by placing the mouse cursor over the Side viewport and pressing the down arrow once. 

400pxl4d_hammer_brush_03_400

Note: You'll need your ground plane on the same level as the origin line so that the nav file included will work.

Part 2 - Navagating the Editor

2D Viewports:

  • Use Mouse Wheel to zoom in and out
  • Hold down the Space Bar and left-click drag to pan around the viewports

Camera Viewport:

  • Hold down the Space Bar and left-click drag to rotate the camera.
  • Hold down the Space Bar and right-click drag to move up/down and left/right.
  • Hold down the Space Bar and both right and left-click drag to move forward and backward.
  • You can also use W, S, A, and D to move forward, backward, strafe left and strafe right respectively.
  • The z key toggles on and off Mouse Look Mode. Move your mouse cursor over the Camera Viewport and press the z key. You can now move your mouse around as if mouse look was on in the game.
Note: The WSDA keys can be used in combination with the Space Bar navigation
Part 3 - Texturing

To see textures in the Camera viewport, right-click on the "camera" text in the Camera viewport and select 3D Textured. 

400pxl4d_hammer_brush_03_480

If you move up in the Camera viewport and look down at the floor that you've just created, you'll notice there's a default texture on it. You'll probably want to change it. To change the current texture, click on the Browse button on the Texture Box.

400pxl4d_hammer_brush_03_172

This will bring up the Texture Browser

400pxl4d_hammer_brush_03_222

In the Filter Field, you can filter the textures based on name. For this tutorial, type in the word "dev" into the field. This will bring up developer textures that will make it easier to create something quickly.

Now, find the texture called dev/dev_measuregeneric01b and double-click on it.

This should bring back the 4 viewports of the editor and place the generic dev texture as the current one.

Select the floor brush, if it isn't already selected, by clicking on it in the Camera viewport. When a brush is selected you can then click on the 7th icon down on the Tool Bar to apply the current texture to the selection

400pxl4d_hammer_brush_03_555_01

Part 4 - Creating the Walls and Ceilings

You can create the walls and ceiling of the room the same way you created the floor.

Duplicating:

You can also select an existing brush and duplicate it to create them.

Note: To duplicate, you will need to have the "Arrow keys nudge selected object/vertex" option set in your Tools > Options > 2D Tab.

Duplicating brushes to make a room.

To duplicate, select the floor brush that you've created. Move your cursor over the Side viewport and then hold the Shift Key down and press the Up Arrow Key. This will create a brush exactly like the floor on top of the existing floor.

You can now change the size and dimensions of this new brush to create a wall. Let's make the wall 128 units tall and 16 units thick. You can then duplicate the wall 3 more times to outline the floor.

400pxl4d_hammer_brush_03_300

Duplicate the floor brush 1 more time and raise it to become the ceiling.

Duplicating the floor to create a ceiling.

Note: Keeping your level clean will become very important when you start to run it in the game. It's a good idea not to have overlapping brushes (brushes that intersect one another). This can cause "z-fighting" in the game, which is where multiple faces fight to get drawn over one another.

400pxl4d_hammer_brush_03_300_01

Part 5 - Multiple Selection

You'll notice that in the Camera viewport, if you navigate inside the room, it's hard to tell what's going on because all of the walls, floor and ceiling are the same texture.

You can select all of the walls by holding down the Ctrl Key and clicking on them in the Camera viewport.

Then click on the Browse Button in the Texture Box again and, this time, select the orange texture next to the current one. It will be labeled dev/dev_measuregeneric01.

Use the 7th icon on the Tool Bar to apply it to the walls.

400pxl4d_hammer_brush_03_1200

Part 6 - Saving The File

To save a level, you can use Ctrl+s or File > Save from the Menu Bar.

You will need to give the file a name and choose the directory to place it in. For this tutorial, you can just name the file "tutorial01"

Part 7 - Placing Entities

Click on the 4th icon on the Tool Bar, the Entity Creation Tool.

400pxl4d_hammer_brush_03_40_01

Once the Entity Creation Tool is enabled, the Entity Box Drop Down Menus become active. Keep the Categories entry as "Entities". Change the Objects entry to "info_survivor_position" by clicking on the drop down arrow in the Drop Down Menu.

Now, navigate in the Camera viewport to the middle of the inside of the room and left-click on the floor.

This will place an info_survivor_position in the middle of the room.

400pxl4d_hammer_brush_03_300_02

The model for an info_survivor_position is Francis. He's the tallest character in Left 4 Dead, so this is a good entity to drop down to check your scale. 

Part 8 - Placing Light

Select the Entity Creation Tool again and this time select "light" from the Drop Down Menu under Objects. This time, place the light on the ceiling (above Francis' head). Go into Selection Mode by clicking on the Arrow Icon in the Tool Bar or by pressing the Esc Key.

Bring up the light's properties by double-clicking it in the Camera viewport or by selecting it (left-clicking on it) and then pressing the Alt-Enter Keys at the same time.

400pxl4d_hammer_brush_03_500

From the Properties Dialog Box, you can change various properties of the entity. For example, you can change the Brightness of this light. Click on the Brightness Row under Keyvalues and you will see a set of numbers on the drop down menu on the right side. The default setting for the brightness of a light is 255 255 255 200. The first 3 numbers represent the RGB values and the last number represents the intensity of the light.

You can click on the Pick Color Button to select a color rather than input values for it.

400pxl4d_hammer_brush_03_300_03

Simply click on the color you want the light to be and click OK.

This will bring you back to the Object Properties Dialog Box for the light. You should see any changes you made to the brightness on the Brightness Row and the drop down field on the right side if the Brightness Row is selected.

Click the Apply button to set your changes to the entity.

Close the dialog box by clicking on the X at the upper right side of the window.

Part 9 - Placing A Prop

Entities also consist of props like furniture, decoration, and complex parts of architecture. To place a prop, click on the Entity Creation Tool again (the 4th icon down on the Tool Bar). Go to the Entity Box and change the Objects field to prop_static. 

400pxl4d_hammer_brush_03_337

There are a variety of different kinds of props. Prop_static entities are props that are static – they don't move, animate, turn on or turn off. There are also prop_dynamic entities that can move, animate, be enabled and disabled. There are also prop_physics entities which the player can interact with and behave physically as they would in the real world. 

400pxl4d_hammer_brush_03_670

Point to the floor in front of the model of Francis and left-click to place a prop_static. You will see a red cube that represents the prop_static before a model is attached to it. Go into Selection Mode by pressing the 1st icon on the Tool Bar or pressing the Esc Key. Double click on the red cube to open the properties.

Click on the World Model Row and then click on the Browse Button on the right hand side to browse the available models.

Note: The first time that the Model Browser Window loads, it might take a while to load in all of the models. It might not look like the image you see above. Give it several seconds to load or close it and reopen it again.

400pxl4d_hammer_brush_03_500_01

In the Filter field at the bottom of the dialog box, type in "table". This will show all the models that have the word table in their name. Scroll down to the one named "props_furnitureit_mkt_table2.mdl" and then click OK.

This will bring you back to the Object Properties Dialog Box for the prop_static. You should see the name of the model now in the World Model Row.

Click the Apply button to set your changes to the entity.

Close the dialog box.

You will see the table that you just placed in the room in any of the viewports in the editor.

Part 10 - Moving Entities

To move the table, you can move your mouse over any of the viewports and use the arrow keys on your keyboard to move them around. You can also click and drag inside the bounding box of the selected entity to move it around with your mouse.

Let's move the table to a corner of our room and set it so that it sits on the floor.

400pxl4d_hammer_brush_03_350

Part 11 - Rotating Entities

To rotate an entity, simply click inside the selected entity's bounding box to switch it to rotate mode. You can then left-click and drag the corners to rotate.

Let's try placing a pump shotgun on the table in our room and rotating it so that it looks like it's in a natural position.

Click on the Entity Creation Tool in the Tool Bar.

In the Entity Box, select "weapon_pumpshotgun_spawn" from the drop down menu under Objects.

400pxl4d_hammer_brush_03_337_01

Click on the floor underneath the table prop.

Note: In the Camera viewport, entities can only be placed on brush surfaces.

400pxl4d_hammer_brush_03_300_04

Zoom into the Front viewport and click once inside the bounding box of the pump shotgun model to make its 4 corners highlight with circles around each one.

Left-click and drag in a counter-clockwise motion to rotate the pump shotgun so that it's lying on its side.

400pxl4d_hammer_brush_03_300_05

Zoom into the Side viewport and press the "[" key 4 times to decrease the grid spacing. Click and drag inside the bounding box of the shotgun to raise it to sit on top of the table.

300pxl4d_hammer_item_04_300

In the Top Viewport, click inside the bounding box of the shotgun until it's in the rotate mode again. Left-click and drag one of the corners counter-clockwise until the shotgun sits almost parallel to the table.

Now you will have a shotgun that you can pick up from the table.

Part 12 - Adding to Your Room

Using the duplication, scaling and moving of the brushes you currently have in your room, you can now build a hallway and another room identical to the first.

Make sure to create openings into both rooms from the hallway.

You can also duplicate the light in the first room and move it to the middle of the second room.

Now, save the level as "tutorial01.vmf"

Note: Your level will need be named this so that the included navigation file will match. Later, you will learn how to make your own nav file.

300pxl4d_hammer_item_04_350

 

Part 13 - Running Your Map in the game

For this first test map that you've created, copy the included file "tutorial01.nav" into your left4deadmaps directory. You can download it here

Once you have the level in a state where it can be tested, you can simply press F9 in the editor which will bring up the Run Map Dialog Box.

There are options that you can configure for different tests, but for now, just press OK.

Note: You will need to close any Source game that you have currently running before doing this.

300pxl4d_hammer_item_04_412

Your level in the game should load up after compiling. It may take a minute or two. 

Part 14 - The Nav Mesh

Note: Left 4 Dead requires another file called the nav mesh file for a level to function. We have provided one for the tutorial map that you have just created.

To see the nav mesh in the game, you will first need to enable the developer console in the game. Press the Esc Key in the game and click on Options. In the Options Window, click on the Allow Developer Console and select "Enabled".

Click on the OK Button and then click on the OK Button on the Options Window. Click on Resume Game.

To pull down the developer console, press the ` key.

Then, type nav_edit 1 in the console and hit enter.

You will see an area drawn on the ground where you are pointing as well as the areas that it is connected to. 

400pxl4d_nav_edit01_400

More information about the nav mesh can be seen by typing z_debug 1 in the console and pressing the Enter Key. 

Part 15 - Useful Console Commands

Here are some useful console commands that can be used in left 4 dead 

  • sv_cheats 1
          Turns on cheats
  • director_stop
Stops the director (no spawning for infected or specials
  • director_start
Starts the director (spawning resumes)
  • nb_delete_all
Deletes all existing npc's
  • map
Loads a map or reloads the level you're in
  • changelevel
Loads a map while continuing the session
  • god 1
Turns on God Mode for all Survivors
  • noclip
Allows you to fly through the world
  • z_spawn
Spawn a common infected where the cursor is
  • z_spawn smoker
Spawn a smoker
  • z_spawn hunter
Spawn a hunter
  • z_spawn boomer
Spawn a boomer
  • z_spawn tank
Spawn a tank
  • z_spawn witch
Spawn a witch
  • nb_blind 1
Make the infected blind to the player

 


That's it for this tutorial, hope it helps

Welshy

Original Source http://www.l4d.com/LevelDesignDocs.zip

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»