Expert compile mode

From Valve Developer Community
Revision as of 08:29, 1 July 2005 by [email protected] (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Expert compile mode is a way of using a gui-screen to make batch scripted compiles. If you know what I mean by that, you probably should not use this, but batch files instead :)

How does compiling work?

Once you understand [Saving and compiling |the basics], you might have a clue

Hammer setmapparam.gif

First observe how the compile process consists of three programs:

  • vbsp.exe builds the mapfile
  • vvis.exe calculates which parts of your level need to be rendered when the player is at a certain place (using visleafs )
  • vrad.exe lights your map

Also observe you can use three options (1) for each tool. However, if you click on any of the links of the tools, you'll soon realise there are WAAAAAY more. You can only use them with batch scripts (which are basically a bunch of DOS-commands) or the expert compile mode.

See that "Expert" button in the lowerleft corner? Why don't you press it? Let's get adventuring.

The dialog

Expert compile.JPG

You'll see a dialog like above show up. Allthough at first this may seem pretty difficult, it really isn't. If you are scared, press the "Normal" button and act like you never even knew what expert compiling is.

First, we have some "configurations". This is handy, for instance, when you want multiple setups for compiling: one for fast compiling, one for compiling cs:s maps, one for glview etc. You can add, delete, and rename configurations using the "Edit" button right of the selection box.

Each setup holds a number of commands you can use. Normally, these commands are used to run each compile tool, and perhaps deleting, moving, copying or renaming certain files (e.g. moving the mapfile to the game-directory, deleting logfiles etc) Use the "New" button to add a command. Use the "Remove" button to remove one, and use the "Move up" and "Move down" buttons to change the sequence in which the commands are run. We don't want to copy the map or run the game before it is made for instance. You can use the checkboxes to the left of each command to skip the commands if you wish.

The command

Typically, a command consists of a "Command" and one or more "Parameters". The command shows which action to perform (you can select them using the "Cmds" button). If you want to run a program that's not directly in that list (the tools and the HL2 executable are already there) select "executable" and a dialog will open to browse to any executable. (you can use, but not select batch file here, btw) Some actions have a strange syntax, like $bsp_exe: hammer will recognise these commands and replace them with the right directories. $bsp_exe will be replaced with the directory to bsp.exe for instance.

For the real nerds: Any dos-command can be used here.

The parameters tell the programs what to do. For instance, which map to compile, or what options to use. Again, the "Parms" button allows you to select a number of variables hammer knows and replaces. Things like the mapfile, or certain directories can be used here. Between multiple parameters, add a space. Examine the "Default" configuration a bit and the compile tools Wike entries (see above) so you can learn which parameters can be used. Please note that each compile tool needs the directory of the mapfile to know what file to compile. This should be logical to you. They also have a "game" parameter, telling them which directories to look in to find the stuff they need (textures, models, etc)

Fiddle around with the options, but make sure you have a backup of whatever you are experimenting with. You don't want your maps to be accidentally deleted.

The last two options are

Ensure file post-exists:

You can use this to make sure certain files are copied befire overwritten

Use Process window

You should always leave this on, but it certain cases you don't want to know the progress of your map-compiling.

Finally, press "Go!" to run the compile.