BSPSource: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (added bspsource template)
m (Cleanup - keep it short without non-essential console commands for a GUI application nor the mention of other tools)
Line 1: Line 1:
{{lang|BSPSource}}
{{lang|BSPSource}}
[[Image:Bspsrc.jpg|thumb|right|300px|BSPSource v1.4.0]]
[[Image:Bspsrc.jpg|thumb|right|300px|BSPSource v1.4.2]]
[[File:BSPSource icon.png|64px|left]]'''{{bspsource|3}}''' 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.
[[File:BSPSource icon.png|64px|left]]'''BSPSource''' is a GUI map decompiler for [[Source]] games, written in [[w:Java (programming language)|Java]].


Based on [[VMEX]], it converts [[BSP]] files 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|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.}}
== 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.
|}


{{note|Due to technical reasons, decompiling maps doesn't accurately recreate their original '''VMF''' state, often presenting issues such as invalid geometry solids or misplaced [[Areaportal|areaportal]] brushes in the decompiled file.}}
:{{workaround|Decompiling the file again or more times may generate better results, such as avoiding some of these issues.}}
{{note|Depending on the decompilation protection present in some community-made maps, the conversion may be prevented.}}


== External Links ==
== External Links ==
* [https://github.com/ata4/bspsrc/releases Original BSPSource on GitHub]
* [https://github.com/ata4/bspsrc/releases BSPSource on GitHub]
* [https://github.com/AnthonyPython/bspsrc/releases Anthonypython's CI fork on Github]
{{note|The fork has Github CI, which means anyone can do pull request change merges and a new build will be created automatically with newly-pushed changes.}}
[[Category:Third Party Tools]]
[[Category:Third Party Tools]]

Revision as of 14:10, 26 September 2022

English (en)Polski (pl)Русский (ru)Translate (Translate)
BSPSource v1.4.2
BSPSource icon.png

BSPSource is a GUI map decompiler for Source games, written in Java.

Based on VMEX, it converts BSP files 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:Due to technical reasons, decompiling maps doesn't accurately recreate their original VMF state, often presenting issues such as invalid geometry solids or misplaced areaportal brushes in the decompiled file.
PlacementTip.pngWorkaround:Decompiling the file again or more times may generate better results, such as avoiding some of these issues.
Note.pngNote:Depending on the decompilation protection present in some community-made maps, the conversion may be prevented.

External Links