Synopsis
Parameters
One or more BSP files or folders to decompile.If a folder is provided, BSPSource will process all
.bsp files in that directory. Use --recursive to include subdirectories.Alternatively, if --list is specified, provide text files containing paths to BSP files (one per line).Options
General Options
Display help information and exit.
Display version information and exit.
List all available Steam Application IDs and exit.Useful for finding the correct app ID to use with
--appid.Enable debug mode.Increases verbosity and adds additional debug data to the VMF file. Useful for troubleshooting decompilation issues.
Recursively decompile files found in subdirectories.When a folder is provided as input, this option will process all BSP files in nested subdirectories.
Override output path for VMF file(s).
- For a single BSP file: Specifies the exact output VMF file path.
- For multiple BSP files: Treated as a directory where all VMF files will be written.
Treat specified files as text files containing a BSP file list.Each line in the file should contain a path to a BSP file or folder. This is useful for batch processing many files.
Entity Related Options
Don’t write any point entities.Point entities are entities without brushes, such as
light, info_player_start, etc.Don’t write any brush entities.Brush entities are entities with geometry, such as
func_door, trigger_multiple, etc.Don’t write
prop_static entities.Static props are non-moving models like buildings, trees, and decorative elements.Don’t write
info_overlay entities.Overlays are decals applied to surfaces, such as graffiti or signs.Don’t write
env_cubemap entities.Cubemaps provide reflections for reflective surfaces.Don’t write
func_detail entities.Detail brushes don’t affect visibility calculations and are used for optimization.Don’t write
func_areaportal or func_areaportal_window entities.Areaportals control visibility between areas for optimization.Don’t write
func_occluder entities.Occluders block visibility and improve performance.Don’t write
func_ladder entities.Ladder entities define climbable surfaces.Don’t write
func_viscluster entities.Visibility clusters are used for optimization in large maps.Don’t fix instance entity brush rotations for Hammer.By default, BSPSource corrects rotation issues that occur with instance entities. This flag disables that behavior.
Force manual entity mapping for areaportal entities.By default, BSPSource automatically maps areaportals. This forces manual mapping instead.
Merge
func_detail brushes that touch into one entity.This can reduce entity count in the decompiled VMF.Brush Related Options
Don’t write any world brushes.World brushes are the main geometry of the map. Enabling this creates an empty map with only entities.
Don’t write displacement surfaces.Displacements are deformable surfaces used for terrain and organic shapes.
Brush decompiling mode. Controls how brushes are reconstructed from the BSP.
- BRUSHPLANES
- ORIGFACE
- ORIGFACE_PLUS
- SPLITFACE
Brushes and planes (default)Reconstructs brushes using plane information. This is the most accurate method and produces the cleanest results, closely matching the original VMF structure.Use this mode for best results in most cases.
Thickness of brushes created from flat faces, in units.In face-based modes (
ORIGFACE, ORIGFACE_PLUS, SPLITFACE), some faces may be perfectly flat. This setting controls how thick the brushes created from these faces will be.Lower values create thinner brushes but may cause issues in Hammer. The default of 1.0 unit is generally safe.Texture Related Options
Replace all face textures with this texture.Useful for debugging brush geometry without visual clutter, or for creating template maps.Example:
--facetex "dev/dev_measuregeneric01"Replace all back-face textures with this texture.Only used in face-based decompiling modes (
ORIGFACE, ORIGFACE_PLUS, SPLITFACE). Back faces are the internal faces of brushes created from flat faces.Example: --bfacetex "tools/toolsnodraw"Don’t fix environment-mapped materials.By default, BSPSource corrects cubemap material references to work in Hammer. This flag disables that behavior.
Don’t fix tool textures.By default, BSPSource corrects tool texture names like
toolsnodraw or toolsblocklight. This flag disables that behavior.Miscellaneous Options
Don’t write any VMF files, read BSP only.Useful for testing BSP reading or using BSPSource as a BSP parser without output.
Don’t load lump files (
.lmp) associated with the BSP file.Lump files contain additional data that can be embedded separately from the BSP. Disabling this may result in incomplete decompilation.Skip decompiling protection checking.Some maps include protection mechanisms to prevent decompilation. BSPSource attempts to detect these. This flag skips that detection, which can increase speed when mass-decompiling unprotected maps.
Don’t group entities from instances into visgroups.By default, BSPSource organizes instance entities into visgroups for easier editing. This flag disables that organization.
Don’t create Hammer cameras above each player spawn.By default, BSPSource creates camera entities at player spawn points for easy navigation in Hammer. This flag disables that feature.
Override game detection by using this Steam Application ID.BSPSource normally auto-detects the game from the BSP file. Use this to force a specific game when auto-detection fails or is incorrect.Use
--appids to list all known app IDs.Example: --appid 440 (Team Fortress 2)Set the VMF format used for decompiled maps.
- AUTO
- OLD
- NEW
Automatic (default)BSPSource automatically determines the appropriate format based on the game and BSP version.
Unpack embedded files in the BSP.Many BSP files contain embedded resources like textures, models, and sounds. This option extracts them to disk alongside the VMF file.
Disable ‘smart’ extracting of embedded files.Smart extracting automatically skips files generated by VBSP that are only relevant to running the map in the engine (like compiled lighting data). Disabling this extracts all embedded files.
Examples
Basic Usage
Decompile a single BSP file:ctf_2fort.vmf in the same directory
Decompile Multiple Files
Decompile all BSP files in a directory:Recursive Decompilation
Decompile all BSP files in a directory and its subdirectories:Custom Output Location
Decompile with custom output path:Debug Mode
Enable debug output:Selective Entity Decompilation
Decompile without static props:Brush Mode Examples
- Default Mode
- Original Faces
- Split Faces
Use BRUSHPLANES mode (default):This is equivalent to:
Force Game Detection
Force Team Fortress 2 (app ID 440):Texture Replacement
Replace all textures with a debug texture:Extract Embedded Files
Unpack embedded files with smart unpacking:Batch Processing
Create a filemaps.txt with BSP paths:
Advanced Combinations
Decompile with multiple options:- Recursively processes all BSP files in
/path/to/maps/ - Outputs VMF files to
/path/to/output/ - Skips static props and overlays
- Uses BRUSHPLANES mode
- Extracts embedded files
Exit Codes
BSPSource returns the following exit codes:0- Success (all files decompiled successfully)- Non-zero - Error occurred during decompilation
Notes
When decompiling protected maps, BSPSource may detect protection mechanisms and warn you. Use
--no_prot to skip these checks, but be aware the output may be incomplete or incorrect.