Enter Half-Life Re-imagined, our current competition!
Check out Skewing textures in Hammer, our newest tutorial!
Welcome, Bear, our newest member!


Site Stuff






Valve Predictions 2017

What's the most likely thing Valve will release this year?



A new game


More overpriced hardware


Source 2 SDK


An army of evil killer cyborgs


The hounds



1 mins


4 mins


21 mins


30 mins


38 mins


38 mins


1 hours



A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

Mapfile Backup Application

By Tony 'Merl' Moore

Version 2.0 (25/11/02)

instructions · examples · troubleshooting · download

The Mapfile Backup utility was created in response to a need voiced by the community. What was this need? SAVE OUR MAPS! :) A long running request by the community was that automatic map backups be supported. Although not time based (it'd be handy to have the backup run every 10 minutes, sure), this is the next best thing as it will create a backup of your map files each time you compile.

The actual location of the mapbackup.exe file on the hard drive is irrelevant. Hence, it should be unzipped to a convenient location (eg. beside ZHLT).

The Expert compile mode under Worldcraft or Hammer should then be modified, so that this executable is called with the name of the mapfile before CSG. By default, an incremental backup will be created of your mapfile (mapname0000.map, mapname0001.map, etc) in the same directory everytime you compile.

You can change the default behavior by specifying the appropriate switches described below:

-ext extension     Force a specific extension for all backup files
-dir     Place backups of all files inside \filename\
-out path     Force a specific backup path (negates -ext and -dir)
-max #     Specify a maximum number of backup files to create

-e, -d, -o and -m are also accepted


  • You can pass multiple file paths to backup into commandline parameters.
  • If no extension exists on the filepath, the tool attempts to look for both an .rmf and a .map file to backup.
  • Once the maximum number of backups is reached (defined by -max), the program starts overwriting at 1 and counts up again.

The examples below use the $path\$file parameters used in the editor's advanced compile mode. If you were to use this utility in a batch file, you would use the actual path and name of the mapfile there.

Example: If I wanted to incrementally backup my map and rmf file every compile. I could use the following Expert compile mode command:

    mapbackup.exe $path\$file

Example: If I wanted to backup only the .rmf, within its own folder, and have 30 incremental backup files at one time. I could use the following Expert compile mode command:

    mapbackup.exe $path\$file.rmf -d -m 30

Example: I want to backup my map file and my 3rd hull file (mapname.p2) in their own directory, with a maximum of 50 backup files. I couuld use the following Expert compile mode command:

    mapbackup.exe $path\$file.map $path\$file.p2 -m 50 -d

Below are some common questions that may arise.

What are ZHLT, that were mentioned above, and where can I find them?

    ZHLT stands for Zoner's Half-Life Tools. These are modified versions of the original map compile tools (qcsg.exe, qbsp2.exe, vis.exe, and qrad.exe). Zoner's versions (hlcsg.exe, hlbsp.exe, hlvis.exe, and hlrad.exe) of the tools are very much improved, even aside from the more consistent naming. They add more versatility to the compile process and several new features, and they're no different to use than the original tools. They also feature several fixes to bugs that have been in the tools since the days of Quake.

Didn't Merl do some customization of ZHLT?

    He certainly did! Read more about them here:

Do I have to use this utility through Worldcraft/Hammer?

    Not at all! You can easily use this utility in a batch file or manually (well, if you really wanted to...). The examples above show parameters to use while in the editor. $path and $file are variables for use in the advanced compile mode. In a batch file, these would be replaced with the actual path and filename of the map.

How do I add the mapbackup.exe tool to Hammer?

    To add mapbackup.exe as a command, click on the Cmds button in the advanced compile dialog and select executable, then browse to and select the mapbackup.exe file. Add everything after "mapbackup.exe" into the "Parameters" field.

Below is the latest version of this application.