LumpMod v0.2.1

LumpMod is a small command-line utility for working with lumps in wad files in the format used by DOOM and DOOM 2. It can add, delete, extract, rename, list, and update individual lumps. It can also add sections (XX_START and XX_END, for instance) and delete entire sections.

Usage

lumpmod [wadfile] [command] [-s section] [parameters]

Sections are MAPxx (xx = 01-99, where that map exists in the file), ExMy (x, y = 1-9, where that map exists in the file), and anything else will be the section between WHATEVER_START and WHATEVER_END. Sections that do not exist in the wad file cannot be used. The section part can be left out to work with the whole file. Any section specified here while using the addsect or delsect commands will cause an error.

Note that the []... parameters in the command listings can be repeated. For example, you can use lumpmod clowns.wad add CLOWNS clowns.lmp to add a CLOWNS lump, or lumpmod clowns.wad add CLOWN1 clown1.lmp CLOWN2 clown2.lmp to add two clown-related lumps.

Note also that lump names and commands are case sensitive. There is an update command, but no UPDATE command.

Commands

add [-a lumpname] [-b] [-d] [-n] [LUMPNAME FILENAME]...

Add a lump to the end of the wad, or after the lump specified with the -a option. If the lump already exists, it will be overwritten (with its position unchanged) unless the -n option is specified, in which case no action will be taken, or the -d option is specified, in which case an additional lump with the same name will be added. If the lump specified in the -a option does not exist, an error will occur. The -b option will add the lump at the beginning, overriding the -a option.

addsect [SECTNAME]...

Add a section. The name must be one or two characters long. If section name is HX, zero-length entries HX_START and HX_END will be added to the end of the wad file. If this section already exists, no action will be taken.

delete [LUMPNAME]...

Remove LUMPNAME from the wad.

delsect [SECTNAME]...

Delete a section and anything inside it. If the section doesn't exist, no action will be taken.

extract [LUMPNAME FILENAME]...

Save the contents of LUMPNAME to the file named FILENAME. (Wad file will not be changed in any way.)

list [-v]

List all lumps in the wad, in the order they appear in the directory. With the -v option, include numbers and lump lengths.

rename [OLDNAME NEWNAME]...

Rename a lump in the wad.

update [LUMPNAME FILENAME]...

Update LUMPNAME with the contents of FILENAME. If no lump named LUMPNAME exists in the wad, no action will be taken.

Changes

Version 0.2.1 adds the -d option to the add command.

Version 0.2 contains a fix to a bug involving empty sections. The initial public release was version 0.1.

Bugs

LumpMod currently chokes on completely empty wad files (i.e., those that contain absolutely no lumps). Let me know if you find any other bugs.

Author

Catatonic Porpoise, <graue@oceanbase.org>. Updates can be found at http://www.thunderpalace.com/software/.

Thanks

Thanks to Matthew S. Fell for writing "The Unofficial DOOM Specs," which were very helpful in making this program.

License

Copyright © 2003 Thunder Palace Entertainment.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.