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. | |
-d | --dest | path | Define a destination path (directory/file). The destination
The path may contain escape sequences:
A |
-D | --DEST | path | Like --dest, but create the directory path automatically. |
-E | --esc | char | Define an alternative escape character for destination files. The default is '%'. For Windows batch files it is a good choice to set |
-p | --preserve | Preserve file times (atime+mtime) while converting or copying files. | |
-u | --update | Update only existing files and don't create new files. If set, --overwrite and --remove-dest are ignored. | |
-o | --overwrite | Overwrite already existing files without warning and ignore option --number. | |
--number | If a file already exist, append a number directly before the file extension to make the filename unique. If other numbered files already exist (ignoring case), use the maximum existing index+1. |
||
-r | --remove-dest | Remove already existing files before creating it. If set, --overwrite is ignored. |
|
--remove-src | Remove the source file after successful operation. |
||
--no-copy | Don't copy a file if it was not modified. | ||
--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 ' |
||
--wu8 | Create a WU8 archive, if possible. If the source is an U8 archive, convert it to a WU8 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. | ||
-C | --compr | level | Define a compression level between
Because of many repeated data, the best bz-compression mode varies. Therefor the levels Do not use compression level >6 for LZMA if the file is intended for Mario Kart Wii, as too much memory is required for decoding.
Option --norm takes precedence over --compr and sets the compression level for bzip2 to For more modes and details type wszst -C list. To force colorized output type wszst -C clist. |
-n | --norm | The uncompressed data will be normalized. See command NORMALIZE for more details. | |
--links | Support hardlinks while creating U8 and WU8 archives. Keep hardlinks if normalizing U8 and WU8 archives. On extracting, search hardlinks in every archive and try to create hardlinks at local file system. | ||
--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. | |
--pt-dir | [=mode] | Set one of the `point directory' modes 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. |
||
--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 |
||
--fast | Short cut for --compr=fast: Set the fastest real compression. It also overrides compression rates set by --norm or --compr. | ||
-c | --const | list | Define constant values, that are used by the internal encoders and by the numeric options as predefined global variables. This option allows a conditional encoding of text files. It can be used multiple times for multiple definitions.
The parameter is a comma separated list of terms and a term is ' |
--scale | vector[@origin] | Transform the data: Scale all coordinates and size values by 'vector' relative to the point 'origin'. If the origin is not set, Negative values mirror the coordinates. Each parameter is either a vector expression or a comma separated expression list of coordinates ('x,z' or 'x,y,z'). Transformations are calculated in the order SCALE, SHIFT, ROTATE, TRANSLATE. |
|
--shift | vector | Transform the data: Add 'vector' to all coordinates. It's simlar to --translate, but the addition is done before rotation. The parameter is either a vector expression or a comma separated expression list of coordinates ('x,z' or 'x,y,z').
Transformations are calculated in the order SCALE, SHIFT, ROTATE, TRANSLATE. |
|
--xss | x1old,x1new,x2old,x2new | --xss (x-scale-shift) calculates the X values of --scale and --shift, so that old values are transformed to the new values. The parameters are numbers or expression. | |
--yss | y1old,y1new,y2old,y2new | --yss (y-scale-shift) calculates the Y values of --scale and --shift, so that old values are transformed to the new values. The parameters are numbers or expression. | |
--zss | z1old,z1new,z2old,z2new | --zss (z-scale-shift) calculates the Z values of --scale and --shift, so that old values are transformed to the new values. The parameters are numbers or expression. | |
--rot | degree[@origin] | Transform the data: Rotate all coordinates and rotation values by the angle 'degree' (is a vector) around the 3 axes. All 3 axes goes through the point 'origin'. If the origin is not set, Each parameter is either a vector expression or a comma separated expression list of coordinates ('x,y,z'). Option --rot is an alternative for --xrot, --yrot and --zrot to define all 3 rotations in one step. Transformations are calculated in the order SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE, TRANSLATE. |
|
--xrot | degree[@origin] | Transform the data: Rotate all coordinates and rotation values by the angle 'degree' around the x-axis, that goes through the point 'origin'. If the origin is not set, Each parameter is either a vector expression or a comma separated expression list of coordinates ('y,z' or 'x,y,z'). Transformations are calculated in the order SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE, TRANSLATE. |
|
--yrot | degree[@origin] | Transform the data: Rotate all coordinates and rotation values by the angle 'degree' around the x-axis, that goes through the point 'origin'. If the origin is not set, Each parameter is either a vector expression or a comma separated expression list of coordinates ('x,z' or 'x,y,z'). Transformations are calculated in the order SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE, TRANSLATE. |
|
--zrot | degree[@origin] | Transform the data: Rotate all coordinates and rotation values by the angle 'degree' around the z-axis, that goes through the point 'origin'. If the origin is not set, Each parameter is either a vector expression or a comma separated expression list of coordinates ('x,y' or 'x,y,z'). Transformations are calculated in the order SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE, TRANSLATE. |
|
--ypos | pos | This option defines an Y position for KMP:CKPT transformations. It has only impact to X and Z rotations (Options --xrot and --zrot). If not set, the mean y of the active rotation origins are used. | |
--translate | vector | Transform the data: Add 'vector' to all coordinates. It's simlar to --shift, but the addition is done after rotation. The parameter is either a vector expression or a comma separated expression list of coordinates ('x,z' or 'x,y,z'). Transformations are calculated in the order SCALE, SHIFT, ROTATE, TRANSLATE. |
|
--null | Create a neutral transformation without affecting the coordinates. The only influence is, that the dependent values (like maximum) are re-calculated as if a transformation has taken place. | ||
--next | Close the current transformation step with all scaling, shifting, rotation and translation options and open a new step with cleared options. On transformation each step is logical done one by one. In real, one total transformation matrix is calculated and used for fast transformations.
If option --next is used, the ability for modifying the scale and rotation vectors (not the positions) of different KMP sections is nearly always lost. A warning is printed if this occurs. |
||
--ascale | factor@dir | Transform the data and do an axis scale: Close the current transformation step like --next and scale the data by This kind of transformation is EXPERIMENTAL! |
|
--arot | degree[@pos1]@pos2 | Transform the data and do an axis rotation: Close the current transformation step like --next and rotate the data by This kind of transformation is EXPERIMENTAL! |
|
--tform-script | script | Load the script and execute it by the text parser.
Then for each coordinate (2D and 3D), call the macro
For each file, macro Before each macro call, the private and local variables are cleared and only global parameters are permanent. The zero based index is cleared for each new source. The parameters of the macro calls are defined in the local name space. |
|
--rm-gobj | objlist | Remove objects from the KMP section |
|
--slot | keyword | Patch a track file to run at the specified slot. KMP and KCL may be modified. BRRES files may be added to or removed from SZS. The main keywords are |
|
--load-kcl | file | Load a KCL or OBJ file for reference issues. | |
--kcl | list | Set global options for KCL processing. Parameter
Keyword |
|
--kcl-flag | joblist | Modify the KCL flag of KCL files. A comma separated job list in the format
All KCL flags of the source list are assigned to the new value |
|
--kcl-script | script | After reading a KCL source file and executing all transformations, the text file If this option is used multiple times, each script is executed in the entered order. |
|
--tri-area | EXPR | Define the minimal area size of KCL triangles. The intention is to ignore triangles that are generally to small. |
|
--tri-height | EXPR | Define the minimal height of KCL triangles. The intention is to ignore deformed triangles (very slim, but long). --tri-ht is an alternative name for the option. |
|
--kmp | list | Set global options for KMP processing. Parameter
Keyword |
|
--speed-mod | factor | The speed modifier is a user extensions to change the basic speed of all vehicles. The speed factor itself is stored into KMP:STGI section of a track.
If --speed-mod is set to a value >0.0, then the last 2 bytes of the STGI section are patched. The value 0.0 reset these 2 bytes and deactivates the speed modifier. |
|
--ktpt2 | vector | Insert or replace a second KTPT. Use VECTOR as new position. VECTOR is either
If the first 4 characters of VECTOR are 'AUTO' (ignoring case), then the position is calculated automatically and set to the recommendation of command The tool looks for the nearest lap counter (CKPT with mode 0) and adjust the KTPT: The direction of the lap counter is copied and the KTPT is moved to the lap counter line using the new direction. LE-CODE uses the second KTPT to draw the finish line at another place away from the start position. |
|
--tform-kmp | list | Select KMP sections and objects for a transformation.
Sections are selected by the KMP section names AREA, CAME, CKPT, CNPT, ENPT, GOBJ, ITPT, JGPT, KTPT, MSPT and
Objects are selected by the keywords AREA-POSITION, AREA-ROTATE, AREA-SCALE, CAME-POSITION, CKPT-POSITION, CNPT-POSITION, CNPT-ROTATE, ENPT-POSITION, ENPT-SCALE, GOBJ-POSITION, GOBJ-ROTATE, GOBJ-SCALE, ITPT-POSITION, ITPT-SCALE, JGPT-POSITION, JGPT-ROTATE, KTPT-POSITION, KTPT-ROTATE, MSPT-POSITION, MSPT-ROTATE and
The keywords |
|
--repair-xpflags | file | Load a KMP file and use it to repair the settings of the extended presence flags, if they are destroyed by another KMP tool. |
|
--mdl | list | Set global options for MDL processing. To enable MDL patching, use option --patch-files and select BRRES files for patching.
Parameter
A MDL transformation (controlled by the transformation options) is only done, if at least one of the keywords
Keyword |
|
--minimap | Fix the minimap position in the same way as wszst MINIMAP --auto. All other minimap related options are ignored for the minimap processing. | ||
--pat | list | Set global options for PAT processing. Parameter
Keyword |
|
--patch-files | list | Define, which kind of KMP, KCL and BRRES/MDL files are objects for patching.
Parameter
Keyword |
|
--lt-clear | Clear LEX sections TEST and DEV1 and remove them and course.lex if empty. This option is executed before all other --lt-* options. | ||
--lt-online | mode | Set LEX:TEST parameter OFFLINE-ONLINE to this MODE. MODE is one of |
|
--lt-n-players | offline,online | Set LEX:TEST parameters N-OFFLINE and N-ONLINE to these integer values. Only track.szs files are modified. If needed, file course.lex and section TEST are created or removed if empty. | |
--lt-cond-bit | bitnum | Set LEX:TEST parameter COND-BIT to this integer value. Use -1 to deactivate this COND-BIT. Only track.szs files are modified. If needed, file course.lex and section TEST are created or removed if empty. | |
--lt-game-mode | mode | Set LEX:TEST parameter GAME-MODE to this MODE. MODE is one of |
|
--lt-engine | mode | Set LEX:TEST parameter ENGINE to this MODE. MODE is one of |
|
--lt-random | index | Force a random scenario, if INDEX is between 1 and 8. Value 0 enables auto selection and -1 disables this option. Only track.szs files are modified. If needed, file course.lex and section TEST are created or removed if empty. | |
--lex-purge | Delete LEX sections without any impact. Delete sub-file course.lex if it no longer contains a section. This option is executed after all --lt-* and --lex-* options. | ||
--lex-features | Calculate LEX setion FEAT (features) by analysing the track file. If no features found, delete the section and the possibly empty sub-file course.lex. If features found, then insert the section or update an existing section. If necessary, the sub-file course.lex is created. This option is executed after all --lt-* options and after --lex-purge.
CTGP uses the FEAT section to manage ghosts. |
||
--lex-rm-features | Remove LEX setion FEAT (features) if exists and the possibly empty sub-file course.lex. This option is ignored if --lex-features is set. It is executed after all --lt-* options and after --lex-purge. | ||
--patch-bmg | mode[cond][=param] | This option specifies a BMG patch mode. Some of the modes need a parameter or a file name of a BMG patch file (raw or text BMG), both separated by an equal sign. Modes with required file names are PRINT, REPLACE, INSERT, OVERWRITE, DELETE, MASK, EQUAL and
The optional condition If this option is used multiple times, all patch files will be processed in the entered order. |
|
--macro-bmg | file | Load a BMG file and add the messages to the macro library; already existing entries are replaced. The macro library is accessed by escape sequence |
|
--filter-bmg | list | If this option is set, the BMG messages are filtered by this list. Only enabled messages are exported to the output BMG file (binary or text).
The parameter is a list of message ids (short MID, 'Txx' or 'Uxx' or Mxx' or hex number) or message ranges (MID:MID) or one of the keywords NONE, IDENT (=ID), PARAM, CUPS, TRACKS, ARENAS, CHAT, CTCODE (=CT), CTUPS, CTTRACKS, CTARENAS, CTREFS, LECODE (=LE), LEUPS, LETRACKS, LEARENAS, LEREFS, XCODE (=X), XUPS, XTRACKS, XARENAS, XREFS, ALLCODE, ALLUPS, ALLTRACKS, ALLARENAS, ALLREFS, GENERIC or With v2.01a, this option was renamed from --msg to the more meaningful name --filter-bmg. The old name is still available. |
|
--le-menu | Patch language independent SZS files from directory .../Scene/UI/ to change the menu as required by LE-CODE to be able to select tracks from more than 8 cups. | ||
--9laps | Patch RACE*.szs files from directory .../Scene/UI/ to support 9 laps. It is based on https://wiki.tockdom.com/wiki/Lap_Texture_Fix v1.03. | ||
--ui-source | dir | This option affects options --le-menu and --9laps. If subfiles are to be exchanged in UI files, the files are first searched for in the specified directory. The internal files are only used if the file was not found. | |
--title-screen | dir | Specify a directory from which to search and replace title screens. Title screens only appear in the file 'Title.szs' and there in the sub-directory './title/timg/'. If the replacement file is not found, then search file 'title1.szs' to patch standard files or file 'title2.szs' to patch bokeboke files. | |
--cup-icons | image | Load given image, convert it to TPLx.CMPR and add the result as sub-files 'button/timg/ct_icons.tpl' and as 'control/timg/ct_icons.tpl' to files 'Channel.szs', 'MenuMulti.szs' and 'MenuSingle.szs'. Both sub-files are always linked, so that storage space is saved. The usual size for each single icon is 128x128. |
A transformation is logically done in the following steps:
The transformation is calculated in the following logical order: --scale, --shift, --xrot, --yrot, --zrot and --translate.
--shift and --translate are similar and simple vector adding transformations. Only the executions order (before and after the rotations) are different. All transformations with exception of --shift and the origins are used in the MDL files. All transformation options can be normalized to a scaling, a rotation and a translation vector and to a transformation matrix following the MDL standards. Try command wszst MATRIX for tests.
Keywords for option --patch-file (--pfile) | |
---|---|
keyword | Description |
This keyword clears (disables) all other keywords. | |
This keyword resets all keywords to their default status: TRACK and LOG are set, all others are cleared. | |
Patch all position, size and rotation values of KMP file course.kmp.
|
|
Patch all position values of KCL file course.kcl.
New normals and a new octree are caluclated.
|
|
OTHERKCL |
Patch all position values of KCL files excluding course.kcl. New normals and a new octree are caluclated. |
ALLKCL |
Patch all KCL files.
This parameter is a short cut for |
Patch the MDL of BRRES files course_model.brres and course_d_model.brres.
Option --mdl list decides the kind of patching.
|
|
MAP MINIMAP |
Patch the MDL of BRRES file map_model.brres.
Option --mdl list decides the kind of patching.
|
Patch the MDL of BRRES file vrcorn_model.brres.
Option --mdl list decides the kind of patching.
Since version v1.24, |
|
OTHERBRRES |
Patch the |
ALLBRRES |
Patch all BRRES files.
This parameter is a short cut for |
Patch the 5 main track files.
This parameter is a short cut for |
|
All file types are subject of patching.
This parameter is a short cut for |
|
This is a debugging keyword.
If set, the tools create a trace log about the main patching actions.
|
|
LOGALL |
This debugging keyword enables |
The first parameter (before the
Default is to scale around the position
Default is to rotate around axes the goes throght the position
It also possible to enter the rotation values separated for each axis with different origins by using --xrot, --yrot and --zrot.
The default is to use the mean y value of the origins defined by the active --xrot and --zrot options. This option overrides the default with the entered value.
Tracks can for example raised or lowered by using the parameter
Option
Back to our scaling example above. If you want to scale your track horizontal by factor 2 into the direction between x- and z-axis (z-axis rotated by 45 degrees around the y-axis), use the following options:
--yrot 45 --step --scale 2,1,1 --step --yrot -45It rotates the axis, that should be scaled, by 45 degree showing into x-direction, scales the x-axis and rotates it back. The second --step is not really necessary, because scaling is done before rotation.
Some KMP sections (AREA, CAME and GOBJ) have scaling and rotation vectors. If using a simple transformation, these vectors are modified by multiplying the entered scale or adding the entered the rotation. But if using a complex transformation with multiple steps, these operation can't be done and scale and rotation vectors keep unchanged. A warning message is printed if this occurs. Position vectors are handled correct in any circumstance.
A similar problem exists for MDL transformations. For complex transformations it is impossible to modify the vectors of MDL bones. If the user decided to use the VECTOR patching mode (using option --mdl VECTOR), the transformation mode is switched back to the default VERTEX mode for a full transformation support. A warning message is printed if this occurs.
Some MDL concepts
Keywords for option --mdl | |
---|---|
keyword | Description |
This keyword clears (disables) all other keywords. | |
This keyword resets all keywords to their default status: Only VERTEX is set, all others are cleared. | |
PARENT PARENT-NODE PARENTNODE CHILD CHILD-NODES CHILDNODES |
If
It seems, that only modifications of the parent node has any impact
to the track visualisation.
The impact of child modes are unsure.
So it's save to set This option has only impact, if at least one of the methods VECTOR or MATRIX is set. See MDL concepts above. |
ALLNODES |
Modify all nodes.
This parameter is a short cut for |
If this keyword is set, the vectors of each MDL section #1 are modified:
Scaling is muliplied and rotation
and translations are added to the existing values.
For complex transformations the tools will automatically activate VERTEX mode. See --next for details. |
|
The matrices (transformation matrix and its inverse) of MDL section #1 (bones) are calculated based on the vectors (scale, rotate, translate) of the same bone. No patching is done here. | |
The vertex lists of all MDL sections #2 are transformed.
If the vectors of the very first parent node of all MDL sections #1
defines a valid transformation,
the transformation is done with respect to these vectors.
|
|
This is a debugging keyword. If set, the tools create a trace log about the main MDL actions. |
Therefor the scaling and rotation vectors are reset and the translation vectors are defined using the minimal and maximal values. Last not least, the transformation matrix and its inverse are calculated.
The results are generally very good. There are only issues, if the MDL contains unused or bad placed vertices.
Keywords for option --slot | |
---|---|
keyword | Description |
Disable this option and do nothing: | |
DAISY 3.1 31 DESERT 7.1 71 |
Change a track file to run at slot 3.1 (Daisy Circuit)
and at slot 7.1 (DS Desert Hills):
|
SHERBET 6.1 61 |
Change a track file to run at slot 6.1 (N64 Sherbet Land):
|
SHYGUY 6.2 62 |
Change a track file to run at slot 6.2 (GBA Shy Guy Beach):
|
STANDARD STD <slot_no> |
Change a track file to run at all standard slots (all except 4.2, 6.1 and 6.2):
|
Change a track file to run at as many slots as possible
(all slots except 4.2 and 6.2):
|
This option is available since version 2.33a.
Example: wszst patch "./Scene/UI/*{[a-z]?,_R}.szs" -od ./newUI/ --le-menu
This option is available since version 2.36a.
Example: wszst patch --9laps "./Scene/UI/Race*.szs" -od ./newUI/
First a TPL file with the same filename is searched. If found, it replaces the old file. If not found, file title1.png for standard files and title2.png for bokeboke files is searched. If found, the file is used to patch the old file.
This option is available since version 2.33a.
Example: wszst patch "./Scene/UI/Title{,_R}.szs" -od ./newUI/ --title-screen ./source-dir/
This option is available since version 2.33a.
Example:
wszst patch "./Scene/UI/*{[a-z]?,_R}.szs" -od ./newUI/ --cup-icons ./icons.png --links
Option --links saves space, because both sub-files use the same data.