bsputil#

bsputil - utiltiy for working with Quake BSP files

Synopsis#

bsputil [OPTION]… BSPFILE

Description#

bsputil is a small utility for in-place manipulation of Quake BSP files.

Options#

--scale x y z#

Scale the .bsp by the given scale factors.

This is experimental, only a few entity properties are edited:

  • origin

  • lip

  • height

--replace-entities ENTFILE#

Replaces the .bsp’s entity lump with the contents of ENTFILE.

Todo

Apparently this can handle being BSPFILE being a path to a .MAP file, and update one map file given the entities in a second, ENTFILE.

Move this functionality to maputil?

--convert FORMAT#

Convert the input .bsp to one of the given formats:

  • bsp29

  • bsp2

  • bsp2rmq

  • hexen2

  • hexen2bsp2

  • hexen2bsp2rmq

  • hl

  • q2bsp

  • qbism

This is a “container” conversion only, so most conversions will not be usable.

--extract-entities#

Extract the entity data from BSPFILE and create a plain text .ent file. The output filename is generated from BSPFILE by stripping the .bsp extension and adding the .ent extension.

--extract-textures#

Extract the texture data from BSPFILE and create a Quake WAD file. The output filename is generated from BSPFILE by stripping the .bsp extension and adding the .wad extension.

--replace-textures WADFILE#

Replace any textures in BSPFILE with updated versions from WADFILE.

Note

A warning will be issued if any texture sizes don’t match between BSPFILE and WADFILE.

--check#

Load BSPFILE into memory and run a set of tests to check that all internal data structures are self-consistent. Currently the tests are very basic and not all warnings will result in errors from all versions of the Quake engine. This option is not targeted at level designers, but is intended to assist with development of the qbsp tool and check that a “clean” bsp file is generated.

--modelinfo#

Print some information on all models in the .bsp.

Todo

Deprecated in favour of the .json export of bspinfo.

--findfaces x y z nx ny nz#

Find faces with the given x, y, z coordinates inside the face, and the face having the given normal nx, ny, nz.

--findleaf x y z#

Prints the leaf at the given coordinates.

--settexinfo facenum texinfonum#

Change the texinfo of a given face.

--decompile#

Decompile BSPFILE to BSPFILE.decompile.map.

--decompile-geomonly#

Decompile BSPFILE to BSPFILE.decompile.map without texturing.

--decompile-ignore-brushes#

Decompile BSPFILE to BSPFILE.decompile.map without using the Q2 brushes lump.

--decompile-hull N#

Decompile only the given hull number to BSPFILE.decompile.hullN.map

--extract-bspx-lump LUMPNAME OUTFILENAME#

Write the BSPX lump LUMPNAME to OUTFILENAME.

--insert-bspx-lump LUMPNAME INFILENAME#

Read INFILENAME and insert it as a BSPX lump LUMPNAME in BSPFILE.

--remove-bspx-lump LUMPNAME#

Removes LUMPNAME from BSPFILE.

--svg#

Writes a top-down SVG rendering of BSPFILE.

Author#

Kevin Shanahan (aka Tyrann) - http://disenchant.net
Eric Wasylishen
Based on source provided by id Software

Reporting Bugs#

Improvements to the documentation are welcome and encouraged.