Configuring Valve Hammer Editor

This article help you configure Valve Hammer Editor (formerly known as Worldcraft). I assume that you have experience with Windows Explorer and WinZip and that you know how to install programs. It also helps if you're familiar with the folder structure of Half-Life and Counter-Strike (before and after Steam).

Contents:


Necessary Files

In order to create maps for Counter-Strike you need the following:

[ Top ]


Using GCFScape

Hammer isn't very exciting without some textures to play with, so we're going to use some of the wad files that come with Half-Life and Counter-Strike. Up to and including CS 1.5 these were lying around in the valve and cstrike folders, but in the Steam version they are located inside so-called cache files, which makes the configuration of Hammer a bit more complicated.

A cache file (with the file type .gcf) is a file that can contain multiple files in a folder structure, just like a zip file. In order to look inside them we're going to use the program GCFScape.

Install GCFScape and launch the program. If it doesn't work it may be because you don't have Microsoft .NET Framework 2.0 installed.

We need the following wad files:

Here's how to extract the wad files from the cache files:

  1. Click the menu File and select Open.
  2. Locate the cache file in the SteamApps folder and doubleclick it. You should now be presented with a layout that resembles Windows Explorer. If you're familiar with the folder structure of Half-Life and Counter-Strike you should feel right at home.
  3. Go to the folder that has the wad files you need.
  4. Select the wad files (hold Ctrl to select multiple), then right click and select Extract.
  5. Select SteamApps\<Account Name>\counter-strike\cstrike as destination folder.

[ Top ]


The Textures Tab

The Textures Tab

Launch Hammer if you haven't done so already. If this is the first time you'ved started it (or if for some reason it hasn't been configured yet), the program will offer to open the New User's Guide. Don't do this. You can then skip Step 1 below, as Hammer will automatically open the Options window.

  1. Click the menu Tools and select Options.
  2. Go to the Textures tab.
  3. If there are any wad files on the list, select them and click Remove.
  4. Click Add WAD and select the following files from SteamApps\<Account Name>\­counter-strike\cstrike:
    • decals.wad
    • halflife.wad
    • liquids.wad
    • xeno.wad
    • cstrike.wad
    • zhlt.wad

Note: In the old days (before Steam) the path to the cstrike folderen was typically quite short (e.g. D:\Games\Half-Life\cstrike), but in Steam the paths are so long that you can't see the names of the wad files. Fortunately, Hammer doesn't change the order of the wad files, so just remember that you shouldn't remove the first 6 entries.

[ Top ]


The Game Configurations Tab

The Game Configurations Tab
  1. Go to the Game Configurations tab.
  2. Click Edit and then Add in the little window that appears.
  3. Hammer supports multiple game configurations, so you need to name this one. It doesn't matter what you call it, but feel free to call it Counter-Strike.
  4. Click OK (or hit Enter) and then Close.
  5. Click Add, go to Valve Hammer Editor\fgd\counter-strike, and select counter-strike.fgd.
  6. Set Default PointEntity class and Default SolidEntity class to anything, for example light and func_wall, respectively.
  7. Set Game Executable Directory to the drive letter of the path where Steam is installed, followed by a colon, for example D:. This might only be necessary if Steam is installed on another drive then the compilation tools.
  8. Leave the rest of the fields empty.

[ Top ]


The Build Programs Tab

The Build Programs Tab
  1. Go to the Build Programs tab.
  2. Set Game executable to Steam\Steam.exe.
  3. Set CSG executable, BSP executable, VIS executable, and RAD executable to hlcsg.exe, hlbsp.exe, hlvis.exe, and hlrad.exe, respectively, in the ZHLT folder.
  4. Set Place compiled maps in this directory before running the game to SteamApps\<Account Name>\counter-strike\cstrike\maps.
  5. Click OK.

[ Top ]


The Run Map Dialog

I don't recommend compiling your map from within Hammer, unless you have a lot of RAM. It takes a lot of resources to have Hammer running with the map loaded, and it seems to be impossible to cancel the compilation once it's been started. I suggest you take a look at my article on How to Compile Maps using a Batch File instead.

If you still want to compile from Hammer, here's how to do it:

  1. Click the Run Map! icon on the far right on the toolbar.
  2. Click Expert if it doesn't already say Run Map [Advanced] in the window's titlebar.
  3. Select Half-Life: Counterstrike (full) under Configurations.
  4. Click the bottom line (the one with $game_exe) in the Compile/run commands box, insert -applaunch 10 at the beginning of the line in the Parameters box and remove -game cstrike. You should end up with -applaunch 10 +map $file -dev -console +deathmatch 1. Be sure to have spaces between the parameters.
  5. Click Go!.

The compilation settings are saved, so from now on you can just click Go!.

The Run Map Dialog

[ Top ]