

Title:         BSP Converter
Version:       1.7
Date:          1999-12-22
Author:        Mr. Elusive


Description
-----------

The BSPC tool is used to create AAS files from BSP files.
An AAS file is a file with areas used by the Quake III Arena bot in order
to navigate and understand a map. The Quake III Arena maps are stored in
BSP files.


Usage
-----

bspc [-<switch> [-<switch> ...]]

Example 1: bspc -bsp2aas d:\quake3\baseq3\maps\mymap?.bsp
Example 2: bspc -bsp2aas d:\quake3\baseq3\pak0.pk3\maps/q3dm*.bsp

Switches:
   bsp2aas  <[pakfilter/]filter.bsp>    = convert BSP to AAS
   reach    <filter.bsp>                = compute reachability & clusters
   cluster  <filter.aas>                = compute clusters
   aasopt   <filter.aas>                = optimize aas file
   output   <output path>               = set output path
   threads  <X>                         = set number of threads to X
   cfg      <filename>                  = use this cfg file
   optimize                             = enable optimization
   noverbose                            = disable verbose output
   breathfirst                          = breath first bsp building
   nobrushmerge                         = don't merge brushes
   freetree                             = free the bsp tree
   nocsg                                = disables brush chopping


Several metacharacter may be used in the filter and pakfilter.

*          match any string of zero or more characters
?          match any single character
[abc...]   match any of the enclosed characters; a hyphen can
           be used to specify a range (e.g., a-z, A-Z, 0-9)

.pk3 files are accessed as if they are normal folders. For instance
use "d:\quake3\baseq3\pak0.pk3\maps/q3dm1.bsp" to access the
map q3dm1.bsp from the pak0.pk3 file. 

Multiple files may be listed after the switches bsp2map, bsp2aas, reach,
cluster and aasopt.

If a BSP file is being converted to an AAS file and no output path
is entered on the command-line then the AAS file will automatically
be stored in the same folder as the BSP file. However if the BSP file
was stored in a .pk3 file then the AAS file will be stored in a folder
with the name 'maps' outside the .pk3 file.

Updating entity lump
--------------------

If an AAS file is already available for a BSP file and you ONLY change
the entities inside this BSP file then you only have to recalculate the
reachabilities. This way you can move items around without the need to
recalculate the whole AAS file which can save quite some compile time.
You can recalculate the reachabilities as follows:

bspc -reach mymap.bsp

Where mymap.bsp is the BSP file. The mymap.aas file has to be in the
same folder as mymap.bsp or should be in the output folder specified
with the -output option!

Keep in mind that as soon as any geometry in the map changes the whole
AAS file HAS to be recalculated in order to play with bots.

Leaks
-----

Just like there can be vis leaks in a map there can also be clipping
leaks. Two things can be wrong when the BSPC tool outputs that a map
leaks.

1. There are no entities in the map at all, or all entities that are
actually in the map are placed in solid. In this case the BSPC tool
outputs "WARNING: no entities inside". (At least a player start entity
is needed to load a map anyway.)

2. There is a spot in the map where players can go outside the map
into the void. This is bad, players should never be able to fall out
of a level. In this case the BSPC tool outputs "WARNING: entity
reached from outside". The BSPC tool also writes a mymap.lin file
that can be loaded in the Q3Radiant editor to show lines that go
through the actual leak.


Version Changes
---------------

1.7 (1999-12-22)

- fixed ducked bounding box size
- fixed sv_maxsteepness being zero in aas configuration
- AAS files are now automatically stored in BSP file folder
- fixed crash bug caused by overflow of a simulated stack
