You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date.
Click here to see the current revision of this page.
Today I spent 2 hours configuring my advanced compile options in Hammer. I had never really used the feature before, so I didn't know the extent of what it could do. The thing that got me interested in messing around with my compile options was the map backup utility posted here.
Interface
Configurations: This is where the preset and custom configurations are stored. Pushing edit allows you to Add/Copy/Delete/Rename these configurations.
Commands: These are the commands that are executed during the compile, you can add, delete, move them up and down from here.
Properties: These are the properties of the commands. The first box is the command, and the second is the parameters that come after it. The Use Long Filenames checkbox allows the compiler to use filenames longer then 6 characters (Program Files instead of PROGRA~1). Ensure File Post-Exists checks to make sure the listed file exists before continuing, if it doesn't then a dialog box comes up.
Normal: Switches you back to normal compile mode.
Go!/Cancel: Starts compiling or exits the compile menu.
Commands
Executable: This allows you to select a executable file to run from your computer. Parameters: Whatever parameters the program uses.
Change Directory: This sets the current relative directory on your computer. So instead of typing in the whole path (C:\Program Files\Sierra\Half-Life\Valve\Maps) you only have to type in the relative path (Valve\Maps). Parameters: Just type in the directory you would like to switch to.
Copy File: Copies a file from one directory to another. Parameters: Just say the location of the start file, then the location you want to copy it too (eg. "C:\startfile.map C:\obstartfile.map").
Delete File: Deletes a file. Parameters: Just include the path of the file location (eg "C:\file.map").
Rename File: Renames a file. Parameters: Just type in the path where the file is, then the name you want to change it to (eg. "C:\oldfile.map newfile.map").
Programs: Runs a preset program (CSG, VIS, BSP, etc.) Parameters: Depends on the program you are running.
Variables
$path denotes where the path that you set as your RMF directory in the configuration menu (C:\Program Files\Hammer\maps).
$file is the name of the current rmf or map file you are editing. Can be followed by .$ext if you would like the program to retrieve the extension of the file.
$exedir denotes the location of the directory you said your HL exe was in (C:\Games\Sierra\Half-Life).
$gamedir denotes the location of your Valve folder inside of the Half-Life one (C:\Games\SierraHalf-Life\Valve).
$moddir denotes the location of the mod you currently want to run the maps as (C:\Games\Sierra\Half-Life\ns).
$bspdir is where you want Hammer to place the currently compiled maps (C:\Games\Sierra\Half-Life\valve\maps).
Currently my compile program makes a backup of my map, runs through the normal BSP, CSG, VIS, and RAD process. Then continues to copy the BSP to the valve/maps directory. It moves the .log and .err files to their own directory, and deletes all of the annoying files that clutter up my hammer/maps folder. The advanced compile system is very powerful, and this is only the start of what you can do with it. Experiment and play around until you find a configuration that you like. It will greatly improve the quality of your maps and the amount of clutter in your maps folder.
This article was originally published on the Valve Editing Resource Collective (VERC). TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.
The original author was Jeff 'Arbron Issarooth' Hitchcock