prevnext   » SZS: Wiimms SZS Toolset » wszst: Wiimms SZS Tool » wszst distribution

wszst distribution

Load each SOURCE (SZS, WBZ, U8 or WU8) and calculate a checksum of the uncompressed data. If SOURCE is a directory, scan it for SZS, WBZ, U8 and WU8 files. If a source directory starts with "arena", all tracks of the directory are assumed to be battle arenas. Finally print the results into file RESULT. Wildcards and pipe characters are parsed.

The default name for RESULT is "distribution.txt". Extension .txt is appended to the filename if not defined. If RESULT is a directory, it is used as first source too.

If file RESULT exists, it is automatically added as last source to the list of option --source, but only if not already added. On scanning of file result, parameters are scanned too.

See +welect DISTRIBUTION½ for a new and alternative implementation of this.

Contents

1.   Syntax

wszst DISTRIBUTION result source...
wszst DISTRIBUTION directory [source]...

2.   Options

Options
Option Param Description
--no-wildcards Disable wildcard parsing and use each filename exactly as specified.
--in-order Process the input files in order of the command line and don't delete duplicates.
-i --ignore Ignore non existing source files without warning.
-n --norm The uncompressed data will be normalized. See command NORMALIZE for more details.
--ignore-setup Ignore hidden setup file 'wszst-setup.txt'. This file is used to determine some default settings and to find out sub archives and files to encode. Use this option only if you know what you do.
--u8 Create an U8 archive, if possible. If the source is a WU8 archive, convert it to an U8 archive. This is the default if the setup file 'wszst-setup.txt' has no other definition. The default compression mode is set to Yaz0 (see --yaz0).
--wu8 Create a WU8 archive, if possible. If the source is an U8 archive, convert it to a WU8 archive.
--pack Create a PACK archive.
--brres Create a BRRES archive.
--breff Create a BREFF archive.
--breft Create a BREFT archive.
--yaz0 If creating a compressed file, force Yaz0 compression. Yaz0 compression is the default, if no compression method is defined by option or setup file.
--yaz1 If creating a compressed file, force Yaz1 compression. The difference to Yaz0 is only the magic, which is set to 'Yaz1'.
--bz If creating a compressed file, force BZ compression (a YAZ0 like file format with BZIP2 compression).
--bzip2 If creating a compressed file, create a BZIP2 compatible file.
--cybz If creating a compressed file, force YBZ compression (YAZ0 file header, but BZIP2 compression), but don't change the payload.
--ybz If creating a compressed file, force archive format U8 with YBZ compression (YAZ0 file header, but BZIP2 compression). Therefore it is a short cut for --u8 --cybz.
--lz If creating a compressed file, force LZ compression (a YAZ0 like file format with LZMA compression).
--lzma If creating a compressed file, create a LZMA compatible file.
--cylz If creating a compressed file, force YLZ compression (YAZ0 file header, but LZMA compression), but don't change the payload.
--ylz If creating a compressed file, force archive format U8 with YLZ compression (YAZ0 file header, but LZMA compression). Therefore it is a short cut for --u8 --cylz.
--szs Short cut for --u8 --yaz0: Create an U8 archive, if possible, and set the compression method to Yaz0.
--wbz Short cut for --wu8 --bz: Create a WU8 archive, if possible, and set the compression method to BZ.
--wlz Short cut for --wu8 --lz: Create a WU8 archive, if possible, and set the compression method to LZ.
--lfl Create a LFL (LE-CODE File List) archive.
--pt-dir [=mode] Set one of the `point directory' modes REMOVE (=0), FORCE (=1) or AUTO (default). If --pt-dir is used without parameter, then FORCE is assumed.

This option is only relevant if creating an U8 archive. It decides, if a special directory with name '.' will be added as base for all other files.

--rm-aiparam Remove the directory AIParam and all files from the archive. This option has only impact, if creating a new archive or normalizing an existing archive. --rmai is a short cut.
--align-u8 size Define an align value for the sub files in U8 archives. The value must be a power of 2 and the default value is 32 (0x20) This value is only relevant if creating or normalizing U8 archives.
--align-lta size Define an align value for the sub files in LTA archives. The value must be a power of 2 and the default value is 32 (0x20) This value is only relevant if creating LTA archives.
--align-pack size Define an align value for the sub files in PACK archives. The value must be a power of 2 and the default value is 32 (0x20) This value is only relevant if creating or normalizing OACK archives.
--align-brres size Define an align value for the sub files in BRRES archives. The value must be a power of 2 and the default value is 4 This value is only relevant if creating or normalizing BRRES archives.
--align-breff size Define an align value for the sub files in BREFF archives. The value must be a power of 2 and the default value is 4 This value is only relevant if creating or normalizing BREFF archives.
--align-breft size Define an align value for the sub files in BREFT archives. The value must be a power of 2 and the default value is 0x20 This value is only relevant if creating or normalizing BREFT archives.
--align size Define an align value for the sub files in all archives. This is a short cut for --align-u8=size {--align-lta=size --align-pack=size --align-brres=size --align-breff=size --align-breft=size.
-L --logging This debug option enables the logging of internal lists and maps. Set it up to three times to be more verbose.
-Y --extended-errors Enable extended error messages. This includes a source file and line reference. Logging level 1 activates it too. --xerr is a short cut.
--timing Activate the timing of some operations. Logging level 3 activates them too.
--encode-all Encode all files. Normally a file is only encoded, if the source is younger than the destination or the destination is missing. Only files in the [encode] section of the file 'wszst-setup.txt' are candidates for encoding. --eall is a short cut. Option --no-encode takes precedence over --encode-all.
--encode-img Encode all image files. Normally a image file is only encoded, if the source is younger than the destination or the destination is missing. Only files in the [encode] section of the file 'wszst-setup.txt' are candidates for encoding. --eimg is a short cut. If set, option --no-encode is ignored for images.
-a --all Encode all files. This is a short cut for --encode-all (and more options in the future).
--no-encode Do not encode files before creating an archive. --noenc is a short cut. Option --no-encode takes precedence over --encode-all, but --encode-img takes precedence for images.
--no-recurse Do not create archives recursively. Normally files in the [create] section of the file 'wszst-setup.txt' are created first. --norec is a short cut.
--no-echo Suppress output of @ECHO commands while scanning text files.
-N --no-check Do not make plausibility checks for KCL and KMP files.
-x --transform list Convert image formats. A comma separated list with terms is expected. A term have the syntax '[SRC=]DEST'. It means: convert SRC format into DEST format. If SRC= is not set, the destination format is used for all source formats. This makes only sense as last rule. If DEST is empty no transformation is done for the source. Examples: 'TPL' or 'GRAY' or 'BTI.IA8' or 'TPL.I4+I8=IA8,TEX=,CMPR'

SRC and DEST are tuples of file, image and palette formats and of 2 more attributes. All parts are optional and separated by points, the order is irrelevant.

Allowed file formats are: TPL, TEX, BTI, BREFT-IMG (=BTIMG), PNG (import). Allowed image formats are: I4, I8, IA4, IA8, RGB565 (=R565), RGB5A3 (=R3), RGBA32 (=R32), C4, C8, C14X2, CMPR. Allowed palette formats are: P-IA8 (=P8), P-RGB565 (=P565), P-RGB5A3 (=P3). Attributtes are PALETTE, NO-PALETTE, GRAY, COLOR, ALPHA and NO-ALPHA.

All terms are managed as list. For each graphic the list is iterated until the first SRC tuple of a term matches the graphic. Then the destination tuple is used for the transformation.

The command wimgt TEST prints a clearly arranged readable table as result of this option.

--strip If creating a PNG file, don't add comments about creator and source formats.
--auto-add Analyze the KMP (if exist) and add missing BRRES, BREFF, BREFT, BRASD and KCL files automatically, if the tool can find the files in any sub directory named 'auto-add'. This sub directory is searched in all directories of 'SEARCH_PATH'; use command wszst AUTOADD to view them. Command wszst AUTOADD may also create an auto-add database. --aadd is a short cut.
--mipmaps If reading a source, scan for mipmaps and load them too. For PNG files, files named NAME.mm#.EXT with #=1.. are searched. This is the default. --mm is a short cut.
--no-mipmaps If reading a source, ignore mipmaps. This disables not the creation of mipmaps (see -n-mipmaps). --no-mm is a short cut.
--n-mipmaps num Force the number of mipmaps. Values between 0 and 20 are allowed. Value OFF (default) disables this option. If enabled, options --max-mipmaps and --mipmap-size are ignored. The creation of mipmaps stops if the width or the height of the mipmap becomes 0. --n-mm is a short cut.
--max-mipmaps num Control the automatic mipmap creation. Values between 0 and 20 are allowed and the default is 4. The mipmap creation for an image stops, if the set number is reached. This option is ignored, if --n-mipmaps is enabled. --max-mm is a short cut.
--mipmap-size num Define the minimal width and minimal height of a generated mipmap. Any value >0 is allowed. The default is 8. This option is ignored, if --n-mipmaps is enabled. --mm-size is a short cut.
--fast-mipmaps If resizing an image, use the old fast resize algorithm (default until v1.64a) instead of the new smart one. Both algorithms differ only, when creating a mipmap for images with odd width or odd height. The old algorithm is faster (factor 2-4) than the default algorithm, but the new algorithm creates better resized images. --fast-mm is a short cut.
--cmpr-default rgb1[,rgb2] Define 2 colors for the case, that all 16 pixels of a CMPR block are transparent. The default is to calculate an average color of all transparent pixels. Before v2.04 white was used.

2 RGB values (hex values with 6 digits each) are expected as parameter. If optional RGB2 is missed, a copy of RGB1 is used. As first step, both colors are converted to RGB565 colors C1 and C2 and sorted, so that C1<C2 (mandatory for CMPR). If C1 and C2 are identical, the least significant bit of green is cleared for C1 and set for C2.

Use parameter '0' to force black, '-1' to force white, or '-' to reset to auto calculation.

--base64 [=mode] Encode the the checksum string as BASE64 with 27 characters instead of hex. If a parameter is set, it acts like --coding=mode.
--db64 [=mode] Encode the the checksum string and some length as BASE64 with 32 characters instead of hex for database searches. This options implies --coding=URL if no other coding is defined. If a parameter is set, it acts like --coding=mode. Option --db64 has priority over --base64.
--coding mode Define the coding of the non alphanumeric characters for BASE64: STANDARD (+/=, default), URL (-_=), STAR (-_*) or XML (.-*).
-s --source path Define a text file for filename to slot translation. A »slot filename« list is expected. Use this option multiple times to define more than one source file. A definition of a later source overwrites previous definitions. The file RESULT of the command line is appended automatically as last entry, if exists and not already included.

3.   Description

...

3.1   Example

  1. Enter the directory where all you files of your distribution reside.
  2. Execute: wszst distribution .
    Don't forget the point at the end of the command.
  3. Edit the file distribution.txt.
  4. Visit https://ct.wiimm.de/upload, follow the instructions and upload the configuration file.