BSPSource: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(edited not about protection. Turns out BSPSource doesn't need workarounds. it just decompiles it anyways.)
(Added Console commands, added link to CI fork. Added a couple of notes.)
Line 7: Line 7:
{{note|Decompiled maps aren't identical to the original '''VMF''' files that were used to compile them, and often present issues such as invalid geometry solids or misplaced [[Areaportal|areaportal]] brushes.}}
{{note|Decompiled maps aren't identical to the original '''VMF''' files that were used to compile them, and often present issues such as invalid geometry solids or misplaced [[Areaportal|areaportal]] brushes.}}
{{note|Some maps protected from decompilation prevent the conversion. However, [[VMEX]] "Protection methods" like using '''No_decomp 1''', '''tools/locked''' and the '''obfuscation shape''' will be ignored. A warning will pop up, but it will decompile anyways.}}
{{note|Some maps protected from decompilation prevent the conversion. However, [[VMEX]] "Protection methods" like using '''No_decomp 1''', '''tools/locked''' and the '''obfuscation shape''' will be ignored. A warning will pop up, but it will decompile anyways.}}
== Console Commands ==
usage: bspsrc [options] <path> [path...]
{{note| BSPSource must be ran with java console via like java -jar <jarfile> args1 args2 etc. }}
{{note| Options must come first, example: java -jar "bspsrc.jar" -o "D:\programs x86\vmfs" "D:\bsps\arena_badlands.bsp"
Which will decompile arena_badlands.bsp and put the vmf into the path given. }}
{|class="standard-table" style="margin:1em 0;width:50%;white-space:pre-wrap"
! Cmd? !! Description
|-style="vertical-align:top"
| -d||style="word-break:break-all"|Enable debug mode. Increases verbosity and adds additional
|-style="vertical-align:top"
| -h,--help||style="word-break:break-all"|Prints the commands
|-style="vertical-align:top"
| -l <file>||style="word-break:break-all"|Use a text files with paths as input BSP file list.
|-style="vertical-align:top"
| -o <file>||style="word-break:break-all"|Override output path for VMF file(s). Treated as directory if multiple BSP files are provided.
default: <mappath>/<mapname>_d.vmf
|-style="vertical-align:top"
| -r||style="word-break:break-all"|Decompile all files found in the given directory.
|-style="vertical-align:top"
| -v||style="word-break:break-all"|Print version info.
|-style="vertical-align:top"
| -no_areaportals||style="word-break:break-all"|Don't write func_areaportal(_window) entities.
|-style="vertical-align:top"
| -no_brush_ents||style="word-break:break-all"|Don't write any brush entities.
|-style="vertical-align:top"
| -no_cubemaps||style="word-break:break-all"|Don't write env_cubemap entities.
|-style="vertical-align:top"
| -no_details||style="word-break:break-all"|Don't write func_detail entities.
|-style="vertical-align:top"
| -no_ladders||style="word-break:break-all"|Don't write func_ladder entities.
|-style="vertical-align:top"
| -no_occluders||style="word-break:break-all"|Don't write func_occluder entities.
|-style="vertical-align:top"
| -no_overlays||style="word-break:break-all"|Don't write info_overlay entities.
|-style="vertical-align:top"
| -no_point_ents||style="word-break:break-all"|Don't write any point entities.
|-style="vertical-align:top"
| -no_rotfix||style="word-break:break-all"|Don't fix instance entity brush rotations for Hammer.
|-style="vertical-align:top"
| -no_sprp||style="word-break:break-all"|Don't write prop_static entities.
|-style="vertical-align:top"
| -force_manual_areaportal||style="word-break:break-all"|Force manual entity mapping for areaportal entities
|-style="vertical-align:top"
| -force_manual_occluder||style="word-break:break-all"|Force manual entitiy mapping for occluder entities
|-style="vertical-align:top"
| -brushmode <enum>||style="word-break:break-all"|Brush decompiling mode:
BRUSHPLANES  - brushes and planes
ORIGFACE      - original faces only
ORIGFACE_PLUS - original + split faces
SPLITFACE    - split faces only
default: BRUSHPLANES
|-style="vertical-align:top"
| -no_brushes||style="word-break:break-all"|Don't write any world brushes.
|-style="vertical-align:top"
| -no_disps||style="word-break:break-all"|Don't write displacement surfaces.
|-style="vertical-align:top"
| -thickness <float>||style="word-break:break-all"|Thickness of brushes created from flat faces in
units.
default: 1.0
|-style="vertical-align:top"
| -bfacetex <string>||style="word-break:break-all"|Replace all back-face textures with this one.
Used in face-based decompiling modes only.
|-style="vertical-align:top"
| -facetex <string>||style="word-break:break-all"|Replace all face textures with this one.
|-style="vertical-align:top"
| -no_texfix||style="word-break:break-all"|Don't fix texture names.
|-style="vertical-align:top"
| -no_tooltexfix||style="word-break:break-all"|Don't fix tool textures.
|-style="vertical-align:top"
| -appid <string/int>||style="word-break:break-all"|Overrides game detection by using this Steam Application ID instead.
Use -appids to list all known app-IDs.
|-style="vertical-align:top"
| -appids||style="word-break:break-all"|List all available application IDs
|-style="vertical-align:top"
| -format <enum>||style="word-break:break-all"|
Sets the VMF format used for the decompiled maps:
AUTO - Automatic
OLD  - Source 2004 to 2009
NEW  - Source 2010 and later
default: AUTO
|-style="vertical-align:top"
| -no_cams||style="word-break:break-all"|Don't create Hammer cameras above each player spawm.
|-style="vertical-align:top"
| -no_lumpfiles||style="word-break:break-all"|Don't load lump files (.lmp) associated with the BSP file.
|-style="vertical-align:top"
| -no_prot||style="word-break:break-all"|
Skip decompiling protection checking. Can increase
speed when mass-decompiling unprotected maps.
|-style="vertical-align:top"
| -no_smart_unpack||style="word-break:break-all"|
Disable 'smart' extracting of embedded files.
Smart extracting automatically skips all files
generated by vbsp, that are only relevant to
running the map in the engine.
|-style="vertical-align:top"
| -no_visgroups||style="word-break:break-all"|Don't group entities from instances into visgroups.
|-style="vertical-align:top"
| -no_vmf||style="word-break:break-all"|Don't write any VMF files, read BSP only.
|-style="vertical-align:top"
| -unpack_embedded||style="word-break:break-all"|Unpack embedded files in the bsp.
|}
[[Category: Console Commands]]


== External links ==
== External links ==
* [https://github.com/ata4/bspsrc/releases BSPSource on GitHub]
* [https://github.com/ata4/bspsrc/releases Original BSPSource on GitHub]
* [https://github.com/AnthonyPython/bspsrc/releases Anthonypython's CI fork on Github]
{{note| The fork has Github CI, which mean's any one can do pull request change merge's and a new build will be created automaticly now with pushed changes.}}
[[Category:Third Party Tools]]
[[Category:Third Party Tools]]

Revision as of 12:21, 28 September 2021

Template:Otherlang2

BSPSource v1.4.0
BSPSource icon.png

BSPSource is a VMEX-based map decompiler for Source games. It converts BSP files back into VMF ones that can be loaded in Hammer. It also includes numerous bug fixes over VMEX and new features for doing the conversion, such as extracting embedded assets, processing multiple BSPs at once, and more.


Note.pngNote:Decompiled maps aren't identical to the original VMF files that were used to compile them, and often present issues such as invalid geometry solids or misplaced areaportal brushes.
Note.pngNote:Some maps protected from decompilation prevent the conversion. However, VMEX "Protection methods" like using No_decomp 1, tools/locked and the obfuscation shape will be ignored. A warning will pop up, but it will decompile anyways.

Console Commands

usage: bspsrc [options] <path> [path...]

Note.pngNote: BSPSource must be ran with java console via like java -jar <jarfile> args1 args2 etc.
Note.pngNote: Options must come first, example: java -jar "bspsrc.jar" -o "D:\programs x86\vmfs" "D:\bsps\arena_badlands.bsp" Which will decompile arena_badlands.bsp and put the vmf into the path given.
Cmd? Description
-d Enable debug mode. Increases verbosity and adds additional
-h,--help Prints the commands
-l <file> Use a text files with paths as input BSP file list.
-o <file> Override output path for VMF file(s). Treated as directory if multiple BSP files are provided.

default: <mappath>/<mapname>_d.vmf

-r Decompile all files found in the given directory.
-v Print version info.
-no_areaportals Don't write func_areaportal(_window) entities.
-no_brush_ents Don't write any brush entities.
-no_cubemaps Don't write env_cubemap entities.
-no_details Don't write func_detail entities.
-no_ladders Don't write func_ladder entities.
-no_occluders Don't write func_occluder entities.
-no_overlays Don't write info_overlay entities.
-no_point_ents Don't write any point entities.
-no_rotfix Don't fix instance entity brush rotations for Hammer.
-no_sprp Don't write prop_static entities.
-force_manual_areaportal Force manual entity mapping for areaportal entities
-force_manual_occluder Force manual entitiy mapping for occluder entities
-brushmode <enum> Brush decompiling mode:

BRUSHPLANES - brushes and planes ORIGFACE - original faces only ORIGFACE_PLUS - original + split faces SPLITFACE - split faces only default: BRUSHPLANES

-no_brushes Don't write any world brushes.
-no_disps Don't write displacement surfaces.
-thickness <float> Thickness of brushes created from flat faces in

units. default: 1.0

-bfacetex <string> Replace all back-face textures with this one.

Used in face-based decompiling modes only.

-facetex <string> Replace all face textures with this one.
-no_texfix Don't fix texture names.
-no_tooltexfix Don't fix tool textures.
-appid <string/int> Overrides game detection by using this Steam Application ID instead.

Use -appids to list all known app-IDs.

-appids List all available application IDs
-format <enum>

Sets the VMF format used for the decompiled maps: AUTO - Automatic OLD - Source 2004 to 2009 NEW - Source 2010 and later default: AUTO

-no_cams Don't create Hammer cameras above each player spawm.
-no_lumpfiles Don't load lump files (.lmp) associated with the BSP file.
-no_prot

Skip decompiling protection checking. Can increase speed when mass-decompiling unprotected maps.

-no_smart_unpack

Disable 'smart' extracting of embedded files. Smart extracting automatically skips all files generated by vbsp, that are only relevant to running the map in the engine.

-no_visgroups Don't group entities from instances into visgroups.
-no_vmf Don't write any VMF files, read BSP only.
-unpack_embedded Unpack embedded files in the bsp.

External links

Note.pngNote: The fork has Github CI, which mean's any one can do pull request change merge's and a new build will be created automaticly now with pushed changes.