KSP-Toolkit/Scripts
2021-01-20 01:56:07 -08:00
..
dds.py use argparse 2021-01-20 01:40:09 -08:00
ddsck.py use argparse 2021-01-20 01:40:09 -08:00
ddscompress.py Add format flag to ddscompress 2021-01-20 01:56:07 -08:00
ddsdecompress.py use argparse 2021-01-20 01:40:09 -08:00
README.md Add format flag to ddscompress 2021-01-20 01:56:07 -08:00

Scripts

Python scripts for interacting with files

Installation

All files require python3 to be installed.

ddscompress, ddsdecompress and ddsck require ImageMagick and Nvidia Texture Tools to be installed and available in your $PATH.

Usage

ddscompress.py

usage: ddscompress.py [-h] [--format {auto,DXT1,DXT5}] [--convertcmd CMD] [--compresscmd CMD] [files ...]

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

positional arguments:
  • files: input texture files
optional arguments:
  • -h, --help : show this help message and exit
  • --format {auto,DXT1,DXT5}: output texture format (default: auto)
  • --convertcmd CMD: name of imagemagick's convert tool (default: convert)
  • --compresscmd CMD: name of the nvidia dds compress tool (default: nvcompress)

ddsdecompress.py

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

positional arguments:
  • files: input dds files
optional arguments:
  • -h, --help: show this help message and exit
  • --decompresscmd CMD: name of the nvidia dds decompress tool (default: nvdecompress)

ddsck.py

usage: ddsck.py [-h] [--convertcmd CMD] [--infocmd CMD] [files ...]

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

positional arguments:
  • files: input dds files
optional arguments:
  • -h, --help: show this help message and exit
  • --convertcmd CMD: name of imagemagick's convert tool (default: convert)
  • --infocmd CMD: name of the nvidia dds info tool (default: nvddsinfo)