Hammer tutorial 1 – Configuring Hammer

Here’s the first installment of my Half-Life level design walkthrough.

This covers tools designed to edit Half-life and its mods, as well as very basic skills necessary for level design. This section will cover installing and setting up the Hammer editor and the files you will need to get started.

Stuff you will need

1) The Valve Hammer editor, available from here.
2) The appropriate FGD file (half-life.fgd for HL, cstrike.fgd for Counter-strike etc). Get those here.
3) An installed copy of Counter-strike, Half-life or Day of Defeat retail.
4) Download Zoners Half-Life compile tools from here.

It’s more than worth (in fact go there now) visiting the Valve editing resource center.

Install the Valve hammer editor somewhere on the same partition as you installed Half-life/dod/cs and create a new directory somewhere close by where you will store your map source files (for example, create a sub-directory in the hammer editor folder called “map source”).

The compile tools are used to convert the map from RMF (Rich Map Format – Hammer uses) to BSP (Binary Spaced Partition file). When you compile the editor converts the .rmf file into a .map extension which is the same as RMF but without a few things irrelevant to the editor. The game can only read BSP files so you must compile your map into a BSP.
Extract Zoners compile tools into a suitible directory (create a compile directory in the Hammer folder for example).

Getting started

When you’re installed, load Hammer and you will be prompted to setup the configuration. Hammer has a really good setup guide, well worth reading but additionally, I’ll cover the setup here.

For future reference, a “brush” is the name of a solid object in the editor. Hammer works like lego, you build a map out of small individual units like lego bricks. Each “brick” is called a brush.

An FGD file is a definition of all the entities used in a particular game. For example, they contain the entity used to spawn a player, or a light.

The configuration tabs:

General (leave all these as default if you’re unsure what they do)

Use independent window configurations

This toggles the 4 windows in the editor, when this option is checked they are free floating and set to your desired size and position. Leave this at its default.

Undo level

Pretty obvious; the bigger the number, the more memory Hammer will use to store undo levels.

Allow grouping/ungrouping while ignore groups is checked

Hammer allows you to group brushes to make it easier to manipulate complex objects. To save you having to constantly group and ungroup brushes, there’s a button called “ignore groups”. When this is pressed, you can select individual brushes without ungrouping them.
With this option checked, you can group and ungroup while brush groups are set to ignore. Sounds complex, and for now, ignore this option.

Stretch arches to fit original bounding rectangle

This is used to set the arch tool to keep the arch you’re creating within the boundary you set during its creation. Again, leave this set to default.

2D Views (leave all these as default if you’re unsure what they do)

Crosshair Cursor

As the name suggests, this toggles a crosshair cursor or the standard arrow cursor.

Default to 15 degree rotations

By default, you’re free to rotate objects to any angle. This snaps it to 15 degrees. Make sure this is on! You’ll rarely need to rotate objects outside of 15 degrees, so this makes things a lot easier.

Display scrollbars

Toggles window scrollbars, when off you scroll with the cursor movement in the window.

Draw Vertices

Toggles the vertices being drawn in the windows.

White on black color scheme

Toggles the color scheme (I personally find the black on white scheme hard on the eyes).

Keep group while clone dragging

Hammer allows you to make a copy of objects by selecting them and holding shift to create a clone. This option toggles the retention of the groups assigned to the original object.

Center on camera after movement in 3D

Fairly self-explanatory.

Use visgroup colors for object lines

This toggle the rainbow fun colors assigned to each brush. When off, all brushes appear white unless assigned a vis color. When on, this gives all brushes a random color which is useful for identifying brushes. I prefer to leave this off, but you may wish to leave it on to help identify brushes.

Arrow keys nudge selected object vertex

When on, this options allows you to nudge a vertex (the point at which to vertices meet) or an object when selected.

Re-orientate primitives on creation in the active 2D view

Centers the 2D view to the top of the created brush.

Automatic infinite selection in the 2D view (no enter)

When you drag a selection box around objects by default you don’t need to press enter to select the brush. This toggles that option.

Selection box selects by center handle only

Each brush has a small X to mark its center point. This option toggles selection of the brush to that X rather than the vertices of the brush.

Grid options

Tweak these to your own comfort, I prefer to have a size 16 grid highlighted every 64 units.

3D Views (leave all these as default if you’re unsure what they do)

Back clipping plane

This scale changes the point at which the map fades out of the cameras view in the distance. For lower end systems, make this lower.

Navigation

This is self-explanatory, tweak to your needs.

Reverse selection order

Reverses the order brushes are selected when they line up (for example if the X of the brushes center point overlap, this option changes the order they will be selected if clicked on).

Textures

This tab allows you to add or remove the texture wads you’ll use in the map. Click “add wad” and point it in the direction of a wad file in the Half-life/valve directory (or the mod directory /cstrike/ for example). You can add multiple wads.

Game configurations

This is the important one. Here you set the location of the FGD files and the other file locations you will need. First, in the “configuration” section, hit Edit and “Add”. Type a name for your game (example: dod) and ok. Repeat this for however many mods you may want.
Next, add the FGD location, it would be a good idea to store your FGD’s in the mod directory. FGD files are not location specific.

Default point and solid entity class

These are up to you, probably best to ignore them for now, but they’re basically setting the default entity that comes up when you choose to place one. I’d suggest you set the default point entity to either “light” or “info_player_start” and default solid entity to “func_wall”.

A point entity is an entity that is not made from brushes.
A solid entity is an entity that is made from brushes.

Game executable directory

Point this towards your HL.exe in the half-life folder.

Mod directory

Point this towards your mod directory, for example half-life/cstrike. Default half-life, is half-life/valve.

Game directory

Point this to your Half-life/valve directory or Counter-strike/cstrike directory.

RMF directory

Point this to the directory you created earlier. It’s where you will store the RMF (source) files you create.

Build programs

Select the game from the drop down box. There are six fields used to compile the map. Point the first to the location of the game exe. This is used to launch the game after the map has been compiled.
Earlier you created a compile directory with Zoners tools in it. The next four fields locate the individual tools needed to compile the map. Point each one to the appropriate file. For example, the CSG executable should point towards your compile directory and the HLCSG.exe file.
The final field asks where you want to put the compiled map. Point this at the valve/maps or cstrike/maps etc folder.

Hit ok, and you’re ready to start mapping.

Continue to page 2 >>

Leave a Reply