SS Textures
By Silverspirit

Information
- Disclaimer: As this script renames files on your computer, I
  am not resposible for any damage(s) caused by it.

- This script is only compatible with 16 and 32 bit textures (png files)
  Using bm8 files caused Tribes 2 to crash when deactivating textures.

- This script only works when running the base mod client-side (not to
  be confused with server mods)

- ANY texture that is properly named can be used with this script.

- This script does not bypass CRC checks, and is not intended to.
  Using this script is the same as alt-tabbing out of Tribes 2, renaming
  a bunch of files, and refreshing the texture cache in Tribes 2.

- pkzip.exe is the PKZip Command Prompt client. ssTextures_remove.bat
  requires it.

- If you download terrain textures, I recommend that you also download
  the default terrain at http://scripts.tribalwar.com/silverspirit/skins.

Installation
- Extract ssTextures.vl2, ssTextures_backup.bat, ssTextures_remove.bat,
  and pkzip.exe to your base folder.

- Put all of your properly named textures ins their appropriate
  folders. Example skins can be downloaded at
  http://scripts.tribalwar.com/silverspirit/skins
  Extract them to the base folder with directories on.

- Run Tribes 2, then exit when it is finished loading.

- You should have a file called sstex.lst in your base folder.
  Inside it are all of the filenames for textures that need to be
  removed from skins.vl2 and/or textures.vl2 in order for the script
  to work. Tribes 2 treats directories in vl2 files just like folders,
  so if a weapon_disc.png is in skins.vl2 Tribes 2 cannot rename a
  file outside of a vl2 to weapon_disc.png in the textures/skins folder.

- Run ssTextures_backups.bat to create backups of your skins.vl2 and
  textures.vl2. If there is ever another patch to Tribes 2, restore
  these backups before updating.

- If you ever watch T2TV or host a classic server on the same Tribes 2
  install that this script is on, copy the backup skins.vl2.bak and
  textures.vl2.bak to the Tribes2/GameData/T2TV folder and/or the
  Tribes2/GameData/classic folder and rename to skins.vl2 and textures.vl2.
  This also applies for any other mods that you host on this install.

- Run ssTextures_remove.bat to remove the appropriate files from
  skins.vl2 and textures.vl2.

- Open sstex.lst with notepad and make sure none of the files listed in
  it are in any of your vl2s, or in your textures folder.

- Any time you download new textures you need to run Tribes 2, exit,
  then run ssTextures_remove.bat.

Naming Convention
- ss~<type>~<name>[~<number>].png

- <type>: The type of the texture. Types can be found in the .sstex
  files in ssTextures.vl2 (can be opened with notepad)
  Example: ss~disc~Toejam-Black n Blue.png

  You can also substitute the type with the path to the real texture,
  replacing /'s with `'s, and excluding the extension (.png).
  Example: ss~textures`skins`weapon_disc

- <name>: The name of the texture. Can be anything, usually has the
  author, skin color, or other short description.

- <number> (optional): The number of the texture, if the texture is
  part of a set, like an explosion. Padding zeros are not required.
  Example: ss~discExp~Wargod-Killer Space Blue~14.png

GUI
- Press shift + * (numpad) to open or close the GUI anywhere in Tribes 2.

- The filelist on the left side of the GUI contains a list of validated
  textures. The popup above it has a list of all the types, plus an 'All'
  category that will filter the filelist to a certain type. Use the filelist
  to select the texture or texture set that you want to work with.

- When you select a texture, either its texture or model that uses it's
  texture will be shown, depending on if you have texture or model selected.
  If you have model selected, but the texture is not given a model in the
  type files, the view will be changed to texture.

- When you select a texture set, and view the texture, a slider and Play/Stop
  button will appear. Use the slider to scroll through the frames in the
  animation, or press play to loop through the animation. The animation will
  continue to loop until you press stop or select a texture in the filelist
  that is not part of a set.

- Activate/Deactivate Button: This button renames the selected texture or
  texture set. When a texture is activated, any textures of the same type
  will be deactivated.

- Save Button: Opens the save dialog. When you save, the activated textures
  are written to a file in the prefs/ssTexturesSettings folder. If you
  save a file starting with an underscore (_) it will be loaded when Tribes 2
  starts.

- Load Button: Opens the load dialog. When you load, all of the textures
  and texture sets in the savefile are activated . None are deactivated that
  aren't forced by others being activated. Because only the activated
  textures are saved, you can overlap settings.

- Flush Button: Flushes the texture chache. You need to do this after
  activating and deactivating all your textures so that they will show up.
  Ingame this can take a while, depending on the performance level of your
  computer. Out of game it is usually quick.

- Close Button: Closes the GUI.

- Deactivate All Button: Deactivates all textures. This is useful when
  saving your settings. Deactivate all, activate the ones you want to
  save, then save them. Repeat.

- Reload All Button: Deactivates and revalidates all textures, reloads
  your settings, and flushes the texture cache. WARNING: This sometimes
  causes Tribes 2 to error.

Type Files
- Filename: prefs/ssTexturesData/*.sstex

- Line format: <typename> <frames> <starting frame number> <digits in number> <texture>[ <model> <animation number> <skin>]

- <typename>: The name of the type.

- <frames>: For sets, the number of textures in the set. If the texture
   is not part of a set, put a zero(0).

- <starting frame number>: For sets, the starting number in the set.
  If the texture is not part of a set, put a zero(0).

- <digits in number>: For sets, the number of digits in the textures
  number (01 = 2, 001 = 3). If the texture is not part of a set, put a
  zero(0).

- <texture>: Path to the real texture relative to the base folder excluding
  the extension.

- <model> (optional): Name of the dts file to display when viewing the texture.

- <animation number> (optional): Animation sequence number to show when viewing
  the model.

- <skin> (optional): Only applicable for player skin types, sets the skin of
  the model when viewing it.

- One type per line.

- Skinners may include type files with their skins. Any file with the
  extension .sstex in the prefs/ssTexturesData folder will be loaded
  for types.