2020-11-03 07:58:36 +00:00
# Scripts
2021-01-20 07:57:24 +00:00
Python scripts for interacting with files
2020-11-03 07:58:36 +00:00
## Installation
2021-01-20 07:57:24 +00:00
All files require python3 to be installed.
2020-11-03 07:58:36 +00:00
2021-01-20 07:57:24 +00:00
`ddscompress` , `ddsdecompress` and `ddsck` require [ImageMagick ](https://imagemagick.org/index.php ) and [Nvidia Texture Tools ](https://github.com/HeliumProject/NvidiaTextureTools ) to be installed and available in your `$PATH` .
2020-11-03 07:58:36 +00:00
## Usage
2021-01-20 07:57:24 +00:00
### ddscompress.py
2021-01-22 01:37:08 +00:00
usage: ` ddscompress.py [-h] [--format {auto,DXT1,DXT5}] [--nomips] [--noflip] [--keep] [--convertcmd CMD] [--compresscmd CMD] [files ...]`
2020-11-03 07:58:36 +00:00
2021-01-20 07:57:24 +00:00
Converts any number of files to `.dds` format, automatically choosing dxt1 or dxt5 depending on if the source image has anything in its alpha channel. Designed to be used with a glob, e.g: `ddscompress.py *.png`
2020-11-03 07:58:36 +00:00
2021-01-20 09:56:07 +00:00
##### positional arguments:
2021-01-20 09:42:20 +00:00
* `files` : input texture files
2021-01-20 09:40:09 +00:00
2021-01-20 09:56:07 +00:00
##### optional arguments:
2021-01-20 09:42:20 +00:00
* `-h, --help ` : show this help message and exit
2021-01-20 09:56:07 +00:00
* `--format {auto,DXT1,DXT5}` : output texture format (default: auto)
2021-01-22 01:37:08 +00:00
* `--nomips, -m` : Do not generate mipmaps
* `--noflip, -f` : Do not flip the image
* `--keep, -k` : Do not delete originals
2021-01-20 09:42:20 +00:00
* `--convertcmd CMD` : name of imagemagick's convert tool (default: `convert` )
* `--compresscmd CMD` : name of the nvidia dds compress tool (default: `nvcompress` )
2021-01-20 09:40:09 +00:00
2021-01-20 07:57:24 +00:00
### ddsdecompress.py
2021-01-20 09:40:09 +00:00
usage: `ddsdecompress.py [-h] [--decompresscmd CMD] [files ...]`
Converts any number of files to `.tga` from `.dds` . Designed to be used with a glob, e.g: `ddsdecompress.py *.dds`
2021-01-20 09:42:20 +00:00
2021-01-20 09:56:07 +00:00
##### positional arguments:
2021-01-20 09:42:20 +00:00
* `files` : input dds files
2020-11-03 07:58:36 +00:00
2021-01-20 09:56:07 +00:00
##### optional arguments:
2021-01-20 09:42:20 +00:00
* `-h, --help` : show this help message and exit
* `--decompresscmd CMD` : name of the nvidia dds decompress tool (default: `nvdecompress` )
2021-01-20 07:57:24 +00:00
### ddsck.py
2021-01-22 01:37:08 +00:00
usage: `ddsck.py [-h] [--transparency | --format] [--convertcmd CMD] [--infocmd CMD] [files ...]`
2021-01-20 09:40:09 +00:00
Checks any number of dds files for common issues, including formats not supported by KSP, and DXT5 textures that don't use the alpha channel. Designed to be used with a glob, e.g: `ddsck.py *.dds`
2021-01-20 09:56:07 +00:00
##### positional arguments:
2021-01-20 09:42:20 +00:00
* `files` : input dds files
2021-01-20 07:57:24 +00:00
2021-01-20 09:56:07 +00:00
##### optional arguments:
2021-01-20 09:42:20 +00:00
* `-h, --help` : show this help message and exit
2021-01-22 01:37:08 +00:00
* `--transparency, -t` : Generate a list of files that fail the transparency check
* `--format, -f` : Generate a list of files that fail the format check
2021-01-20 09:42:20 +00:00
* `--convertcmd CMD` : name of imagemagick's convert tool (default: `convert` )
* `--infocmd CMD` : name of the nvidia dds info tool (default: `nvddsinfo` )