Various tools for making KSP mods
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Andrew Cassidy f6201e87f2 Add option for normal map swizzling 1 month ago
..
README.md add more options for ddsck and ddscompress 3 months ago
color.py DXT1 image parsing 2 months ago
dds.py add DXT5 to DXT1 conversion tool 2 months ago
ddsck.py add DXT5 to DXT1 conversion tool 2 months ago
ddscompress.py Add option for normal map swizzling 1 month ago
ddsdecompress.py more header parsing/writing work 2 months ago
dxt5to1.py add DXT5 to DXT1 conversion tool 2 months ago
s3tc.py add DXT5 to DXT1 conversion tool 2 months ago

README.md

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}] [--nomips] [--noflip] [--keep] [--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)
  • --nomips, -m: Do not generate mipmaps
  • --noflip, -f: Do not flip the image
  • --keep, -k: Do not delete originals
  • --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] [--transparency | --format] [--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
  • --transparency, -t: Generate a list of files that fail the transparency check
  • --format, -f: Generate a list of files that fail the format check
  • --convertcmd CMD: name of imagemagick's convert tool (default: convert)
  • --infocmd CMD: name of the nvidia dds info tool (default: nvddsinfo)