HLBSP

is the command-line tool that generates the BSP trees for the map and creates a runnable BSP. It deprecates QBSP2 from the original compile tools. 
== Options ==
-leakonly	
* Run BSP only enough to check for LEAKs. If you already know a map has a leak, this is a good option to just save some time in HLBSP and just generate the pts file.
-noopt	
* Skip plane optimization on output. HLBSP version p14 and later automatically removes unused planes when writing the output BSP. This switch turns off that behavior.
-maxnodesize #	
* Sets the maximum portal node size. This option tweaks the maximum size of a portal node. Setting it smaller will bsp the world into smaller chunks at the cost of higher r_speed values, but it can pay itself back in many cases with making vis either faster, or more accurate, or both.
-noclip	
* Don't process the clipping hull (not for final runs). This is a continuation of the -noclip option in HLCSG. In this case it tells HLBSP that HLCSG was compiled with -noclip and to not attempt to BSP the collision hulls as they are not present in the bsp.
 -nofill 	
* Don't fill outside (will mask LEAKs) (not for final runs). This step causes filling to not be performed, which will cause all the faces on the outside of the map to not be discarded. It is probably a bad idea to rad a map that has been compiled this way, though vis should run normally.
-nonulltex	
* Disables NULL texture stripping.
-notjunc
* Don't break edges on t-junctions (not for final runs). This is a development/debugging option that should not be set in normal use.
-subdivide #	
* Sets the face subdivide size. Faces in Half-Life are subdivided by this value (in units). The default is 240, and it should never need to be set lower (as it just increases r_speed values). Setting the value higher may cause problems in software mode. If in doubt, leave at the failsafe default value of 240.
== Shared options ==
-chart	
* Display bsp statitics. This option will cause the program to print out the bsp statistics right before it writes out the bsp. It is most handy to do -chart with HLRAD and HLVIS at the end of the compiles. The ripent program will alway display the chart.
-dev #	
:Compile with developer message. Internal ZHLT debugging messages have been slowly added to the tools. This variable sets the 'level' to display. In order (starting with 0 and going up) : Off, Error, Warning, Info, Fluff, Spam, MegaSpam. Generally this option should never be used except at request, to diagnose a compile problem on an end-users machine.
-estimate
* Display estimated time during compile. This option replaces the 10...20... style progress indicators with a estimate bar with some estimated completion times, as well as the exact number of the current job and how many jobs there are to do. The three different times remaining factor in varying amounts of historical data to guess how much longer it will take to run. It is good for a ballpark figure, but frequently not much more accurate than that.
-lightdata #	
* Set custom lightdata maximum (MB). Higher values than the default (6MB) can cause performance issues. You should perform compatability testing before releasing maps if they're over the preset limit.
-low | -high
* Run program an altered priority level. Setting the priority of the compile tools to -low is very handy, as you can multitask and do other things without really feeling the drain of the compile programs on the system, provided there is enough memory for the tools and the other programs you use.
-noinfo
* Do not show tool configuration information. ZHLT 2.1 added a configuration display for each of the tools as they run, to display the current settings for all configurable options as well as their defaults. This sometimes causes problems with other programs, most notably when compiling within Worldcraft, it likes to crash when too much stuff scrolls into its compile process window.
-nolog	
* Don't generate the compile logfiles. This option just disables the generation of the .log and .err files which are normally generated whenever the compile tools run.
-texdata #	
* Alter maximum texture memory limit (in KB). Half-Life was built with a 2MB texture limit, as was Opposing Force. The ZHLT default limit is 4MB. Even 4MB can be a bit much, when combined with model textures, skies, hud graphics, and more. This is especially true of people with older cards (Voodoo 1 and 2's, etc).
-threads #	
* Manually specify the number of threads to run. This option is generally only necessary on the non-windows versions of the tools, where there is not a standard way to detect the number of processors in the system and auto-set the value. It can be manually set on windows machines, primarily if you wish to use fewer threads than processors.
-verbose
* Compile with verbose messages. Many of the tools have 'minor warnings' and informative messages which are displayed when verbose mode is set. As the ZHLT 2.x series developed, many of the developer specific settings have been moved to developer messages, while the mapper-related messages remain as verbose messages.
== External links ==
* ZHLT Wiki
Category:Third Party Tools
Category:Third Party GoldSrc Tools
Category:Non-Steam Applications
Category:GoldSrc Level Design