VERC: Mapfile Backup Application Last edited 21 years ago2002-11-25 16:00:00 UTC

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.

This article was recovered from an archive and needs to be reviewed

  1. The formatting may be incorrect as it was automatically converted to WikiCode from HTML, it needs to be revised and reformatted
  2. Some information may be out of date as it was written before Half-Life was available on Steam
  3. After the article is re-formatted and updated for Steam HL, remove this notice
  4. Please do not remove the archive notice from the bottom of the article.
  5. Some archive articles are no longer useful, or they duplicate information from other tutorials and entity guides. In this case, delete the page after merging any relevant information into other pages. Contact an admin to delete a page.

Version 2.0 (25/11/02)

instructions (Link: #instructions) · examples (Link: #examples) · troubleshooting (Link: #troubleshooting) · download (Link: #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.

Instructions (Link: #)

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

Notes:

Examples (Link: #)

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

Troubleshooting (Link: #)

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.

ZHLT can be found here -- http://dev.valve-erc.com/?go=zhlt (Link: ?go=zhlt)

Didn't Merl do some customization of ZHLT?

He certainly did! Read more about them here:

http://dev.valve-erc.com/?go=mhlt (Link: ?go=mhlt)

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.

Download (Link: #)

Below is the latest version of this application.
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.

Comments

You must log in to post a comment. You can login or register a new account.