
This is a small help-file to explain what each Tool command and
Pool directive does, how to use it, and what its arguments are.
To use a directive in, type a # before it(ex:  # cwd  or  #cwd).

The argument types are as follows:

    bool:   A true or false value. 0 for false, 1 for true.

    float:  A number that can have a decimal(ex: 1.337).

    int:    An integer number(cannot have a decimal point).

    str:    A string of characters such as "letters". If the
        string contains spaces, enclose the string in quotes.
        (ex: "this is a string")

    dir:    A path to a directory. Except for the cwd directive,
        any command or directive asking for a directory will need
        it to be relative to the current working directory(cwd).
        Do NOT use / to separate folders. Tool doesnt recognize
        this as a separator. Use \ instead.

    file:   A path to a file. Any command or directive asking for
        a filepath will need it to be relative to the current
        working directory(cwd). Do NOT use / to separate folders.
        Tool doesnt recognize this as a separator. Use \ instead.

    str-no-quote: Same as str, except it cannot be enclosed
        in quotes, and as a result cannot contain spaces.

    file-no-ext:  Same as file, except you do not provide the
        file extension. Tool will either know the extension
        already or will be able to guess it.


#  DIRECTIVES
#############

  c
    Tells Pool to close Tool instances as soon as they finish processing.

    #  ARGUMENTS
    ############
    None


  cwd
    Changes the current working directory, allowing Tool to operate on
    folders it isn't inside. This allows you to use one copy of tool for
    any number of separate tags directories and Halo CE installations.

    #  ARGUMENTS
    ############
    <directory>  (dir)
        The directory to set as the current working directory.
        This is an absolute path, meaning it is not relative to anything.


  del
    Removes a variable from the list of replacements.
    See the 'set' directive.

    #  ARGUMENTS
    ############
    <var-name>  (str-no-quote)
        Name of the variable to remove.


  k
    Tells Pool to keep Tool instances open, even after they finish processing.

    #  ARGUMENTS
    ############
    None


  run
    Runs the specified file located in the current working directoy.
    Any additional arguments after <exec-path> are passed along to the
    executable when it is ran.
    
    Example:
        # run haloce.exe  -console  -devmode

    #  ARGUMENTS
    ############
    <exec-path>  (file)
        Name of the executable to run.


  set
    Adds a variable to a list that can be used for text replacements.
    To use the variable, you must put arrow braces around it.
    
    Example:
        # set   dir   "levels\test\tutorial"
    
        structure   <dir>\tutorial
        lightmaps   <dir>\tutorial  tutorial  1  0.000001
        build-cache-file   <dir>\tutorial

    #  ARGUMENTS
    ############
    <var-name>  (str-no-quote)
        Name of the variable.

    <var-value>  (str)
        The string to replace any occurances of <var-name> with.


  w
    Tells Pool to wait until all currently running Tool instances
    are closed before continuing executing commands and directives.

    #  ARGUMENTS
    ############
    None




#  TOOL COMMANDS
################

  animations
    Compiles a folder of jma/jmm/jmo/jmr/jmt/jmw/jmz animations in the data folder into a model_animations tag. The directory you specify must contain these files in a folder named "animations". Do NOT type the "animations" part of the path; it is implied.
    
    Each jm* type compiles to a different type of animation. dx/dy/dz means the animation will permanently move the object in the world on that/those axis, while dyaw means it will permanently rotate the object. These are typically used for movement and turning.
    
    base (overlays be be played on it)
           jmm:	none
           jmw:	none (completely world relative)
           jma:	dx/dy
           jmt:	dx/dy/dyaw
           jmz:	dx/dy/dz/dyaw
    
    overlay (played on the current base {aiming, tire suspension, etc})
           jmo:	none
    
    replacement (replaces anything being played {grenade throw, etc})
           jmr:	dx/dy

    #  ARGUMENTS
    ############
    <source-directory>  (dir)
        The directory containing the "animations" folder to be compiled.


  bitmap
    Compiles the .tif image specified into a bitmap tag. Name the file with a .tif extension, not .tiff(tool only looks for .tif files). Once the bitmap is compiled, you may edit it in Guerilla or Mozzarilla to change how tool processes and compiles it. When you are done, run this command again to process it with those setting applied.

    #  ARGUMENTS
    ############
    <source-file>  (file-no-ext)
        The filepath of the bitmap to be compiled.


  bitmaps
    Compiles a folder of .tif images in the data folder into bitmap tags. Name them with a .tif extension, not .tiff(tool only looks for .tif files). Once the tags are compiled, you may edit them in Guerilla or Mozzarilla to change how tool processes and compiles them. When you are done, run this command again to process them with those setting applied.

    #  ARGUMENTS
    ############
    <source-directory>  (dir)
        The directory containing the bitmaps to be compiled.


  build-cache-file
    Builds a cache file with no Open Sauce enhancements whatsoever.

    #  ARGUMENTS
    ############
    <scenario-name>  (file-no-ext)
        Name of the .scenario to build the mapfile from.


  build-cache-file-ex
    Builds a cache file with extra Open Sauce arguments.

    #  ARGUMENTS
    ############
    <mod-name>  (str)
        The name of the mod this scenario belongs to.
        This will also be used when naming the new data-files.

    <create-anew>  (bool)
        Should new data-files be created before building the map?

    <store-resources>  (bool)
        Store the scenarios bitmaps/sounds/locale data in the data-files?

    <use-memory-upgrades>  (bool)
        Does the scenario require Open Sauces memory upgrades to run?

    <scenario-name>  (file-no-ext)
        Name of the .scenario to build the mapfile from.


  build-cache-file-new
    Builds a cache file with extra Open Sauce arguments.

    #  ARGUMENTS
    ############
    <create-anew>  (bool)
        Should new data-files be created before building the map?

    <store-resources>  (bool)
        Store the scenarios bitmaps/sounds/locale data in the data-files?

    <use-memory-upgrades>  (bool)
        Does the scenario require Open Sauces memory upgrades to run?

    <scenario-name>  (file-no-ext)
        Name of the .scenario to build the mapfile from.


  build-cpp-definition
    Builds a C++ definition for the tag-group specified and writes it to the current working directory(typically the folder tool.exe is in). 

    #  ARGUMENTS
    ############
    <tag-group>  (str-no-quote)
        The four character code designated for this tag type. For example, 'bitm' is for bitmap, 'matg' is globals, and 'snd!' is sound.

    <add-boost-asserts>  (bool)
        Whether or not to add assertions to the C++ definition to help make sure the structures are the correct size if you modify them.


  build-packed-file
    Something to do with compiling open-sauce shaders. Not useful to map makers.

    #  ARGUMENTS
    ############
    <source-directory>  (dir)

    <output-directory>  (dir)

    <file-definition-xml>  (file-no-ext)


  collision-geometry
    Compiles a directory of .jms models in the data folder into a model_collision_geometry tag. The directory you specify must contain these files in a folder named "physics". Do NOT type the "physics" part of the path; it is implied.
    
    Each jms file in the "physics" folder must be named after the permutation that jms file contains. Here are most of the special permutation names as well as when they are used:
           __base		(the default model)
           ~blur		(vehicle tires are spinning fast)
           ~primary-blur	(weapon primary trigger is firing fast)
           ~secondary-blur	(weapon secondary trigger is firing fast)
           ~damaged	(health of a region hit zero and died)
    
    If there is a "physics.jms" file in the "physics" folder, make sure it either has no vertices and triangles, or you have Pool's "Fix physics.jms" setting checked. Otherwise the command might fail.

    #  ARGUMENTS
    ############
    <source-directory>  (dir)
        The directory containing the "physics" folder to be compiled.


  compile-scripts
    NOT YET IMPLEMENTED

    #  ARGUMENTS
    ############
    <scenario-name>  (file-no-ext)


  compile-shader-postprocess
    Creates shader_postprocess_generic tags from HLSL .fx shaders in the data directory.

    #  ARGUMENTS
    ############
    <shader-directory>  (dir)
        Directory that contains the shaders to compile


  help
    Displays help messages for some of the Open Sauce commands.

    #  ARGUMENTS
    ############
    None


  hud-messages
    #  ARGUMENTS
    ############
    <path>  (dir)

    <scenario-name>  (str)


  import-device-defaults
    Unknown

    #  ARGUMENTS
    ############
    <type>  (str-no-quote)

    <savegame-path>  (file)


  import-structure-lightmap-uvs
    Replaces the lightmap UVs of a bsp with custom ones loaded from an obj file.
    The obj file must have lightmaps grouped by object and have the group index
    appending the group name (lightmap_0). Best way to ensure this is to export
    a fresh lightmaps obj using Aether, import it into your modelling program,
    and then ONLY edit the UVs to ensure the model matches the bsp.

    #  ARGUMENTS
    ############
    <structure-bsp>  (file-no-ext)
        Location of the target bsp, relative to the tags directory.

    <obj-file>  (file-no-ext)
        Location of the source obj, relative to the data directory.


  lightmaps
    Runs radiosity on the specified bsp to calculate static lighting. This process can typically take a long time at highest quality, so only run it when you have time to spare.
    
    Quick and dirty lightmaps can be calculated to allow you to quickly test changes to the level geometry. Use this command if you dont know what good testing values for your bsp are:
           lightmaps   <scenario>  <bsp-name>  0  0.1
    
    Best quality lightmaps would use these settings:
           lightmaps   <scenario>  <bsp-name>  1  0.0000001

    #  ARGUMENTS
    ############
    <scenario>  (file-no-ext)
        Filepath to the scenario that uses the bsp you want to light.

    <bsp-name>  (str)
        The name of the bsp to run radiosity on. This is the name of the structure_scenario_bsp tag you are running this on.

    <render-high-quality>  (bool)
        Use highest quality radiosity settings?

    <stop-threshold>  (float)
        The percentage of light remaining to stop calculating at. Light is cast in multiple passes from each surface, getting progressively finer with each pass. Each pass also reduces the total amount of light to be cast from each surface. When the amount of light remaining hits this value, radiosity will stop.


  merge-scenery
    Merges scenery instances from the source-scenario into the destination-scenario.

    #  ARGUMENTS
    ############
    <source-scenario>  (file-no-ext)
        The filepath of the scenario to copy the scenery from.

    <destination-scenario>  (file-no-ext)
        The filepath of the scenario to paste the scenery into.


  model
    Compiles a directory of .jms models in the data folder into a gbxmodel tag. The directory you specify must contain these files in a folder named "models". Do NOT type the "models" part of the path; it is implied.
    
    Each jms file in the "models" folder must be named after the permutation that jms file contains. Here are most of the special permutation names as well as when they are used:
           __base		(the default model)
           ~blur		(vehicle tires are spinning fast)
           ~primary-blur	(weapon primary trigger is firing fast)
           ~secondary-blur	(weapon secondary trigger is firing fast)
           ~damaged	(health of a region hit zero and died)

    #  ARGUMENTS
    ############
    <source-directory>  (dir)
        The directory containing the "models" folder to be compiled.


  physics
    Compiles a "physics.jms" model in the data folder into a physics tag. The directory you specify must contain a folder named "physics" with "physics.jms" INSIDE that "physics" folder. Do NOT type the "physics\physics" part of the path; it is implied.

    #  ARGUMENTS
    ############
    <source-directory>  (dir)
        The directory containing the "physics" folder to be compiled. The "physics" folder must contain the physics.jms file to be compiled.


  process-sounds
    Unknown

    #  ARGUMENTS
    ############
    <root-path>  (dir)

    <substring>  (str)

    <effect>  (str-no-quote)

    <value>  (float)


  remove-os-tag-data
    Removes OS tag data that would prevent loading in the stock tools.
    Back up your tags before hand to be safe.

    #  ARGUMENTS
    ############
    <tag-name>  (file-no-ext)
        Name of the tag to clean.

    <tag-type>  (str)
        Type of the tag (the tags file extension).

    <recursive>  (bool)
        Whether to also process all tags referred to by the given tag.


  runtime-cache-view
    Allows you to view the contents of the tag cache in an executing
    instance of Halo CE. See the tools own help for more details.

    #  ARGUMENTS
    ############
    None


  sounds
    Compiles a directory of folders of .wav files in the data folder into sound tags. Each folder in the directory specified will be compiled into a sound tag. Any sub-folders within these are treated as pitch ranges. Any .wav files inside these pitch range folders are permutations within that pitch range. If you do not need to use pitch ranges, just put each .wav permutation file directly inside each sounds folder.
    
    For example, to compile the tag:
           vehicles\sophia\sounds\cannon_fire.sound
    
    you would create this audio perumtation:
           vehicles\sophia\sounds\cannon_fire\default.wav
    
    and then run the command:
           sounds  vehicles\sophia\sounds  ogg  1
    
    NOTE: All .wav data files MUST be saved with 16bit signed, little endian, PCM encoding. This is the only format that tool can read.

    #  ARGUMENTS
    ############
    <directory-name>  (dir)
        The directory containing the sounds to be compiled.

    <platform>  (str)
        The format to compile the sounds to. The xbox and wav formats are basically the same, and are the only ones that will work on an Xbox. Ogg can only be used PC, and has higher quality than the others. If you have a choice, choose xbox for short quick sounds, and ogg for music or dialog.
        

    <use-high-quality(ogg_only)>  (bool)
        Prioritize audio quality over filesize?


  sounds_by_type
    Unknown

    #  ARGUMENTS
    ############
    <directory-name>  (dir)

    <type>  (str)

    <round-to-64-samples>  (bool)


  strings
    #  ARGUMENTS
    ############
    <source-directory>  (dir)


  structure
    #  ARGUMENTS
    ############
    <scenario-directory>  (dir)

    <bsp-name>  (str)


  structure-breakable-surfaces
    Unknown

    #  ARGUMENTS
    ############
    <structure-name>  (file-no-ext)


  structure-lens-flares
    Unknown

    #  ARGUMENTS
    ############
    <bsp-name>  (file-no-ext)


  tag-load-test
    Validates that a tag and ALL of its children can be loaded without error.
    Optionally prints additional diagnostic information.

    #  ARGUMENTS
    ############
    <tag-name>  (file-no-ext)
        Root tag's path.

    <group>  (str)
        Root tag's group name.

    <prompt-to-continue>  (bool)
        Prompt to continue for each child tag.

    <prompt-to-fix-unresolved>  (bool)
        NOT YET IMPLEMENTED.

    <load-non-resolving-refs>  (bool)
        Load all tag_references, even if they're non-resolving.

    <print-size>  (bool)
        Print the total size of the tag hierarchy as well as the tag_group memory.

    <verbose>  (bool)
        Outputs progress/extra information as it processes the tags.


  unicode-strings
    #  ARGUMENTS
    ############
    <source-directory>  (dir)


  windows-font
    Shows a prompt which allows you to select an installed windows font you wish to compile into a font tag.

    #  ARGUMENTS
    ############
    None


  zoners_model_upgrade
    Unknown

    #  ARGUMENTS
    ############
    None


