Skip to content

Command Line Usage

matyalatte edited this page May 12, 2025 · 14 revisions

UE4-DDS-Tools uses python scripts internally.
So you can use them with command line.

python\python.exe src\main.py file [texture] [options]
  • file: Input file. The following formats are available.
    • .uasset: Texture asset file. It works in the same way if you put .uexp or .ubulk.
    • .dds: DDS file.
    • .txt: Use the first line as an input path.
    • texture files (.png, .jpg, etc): Texture file for convert mode.
    • folder: a folder for the folder injection
  • texture: Texture file (or folder) for injection mode. (dds, tga, hdr, etc.)
  • --mode=*: The following modes are available.
    • inject: Inject dds into uasset. Default mode.
    • export: Extract dds from the asset.
    • check: Check the UE version of the asset.
    • convert: Convert texture files with texconv.
    • parse: Just parse files.
    • valid: Check if the tool can handle the asset correctly.
    • remove_mipmaps: Make the asset no mipmaps.
    • copy: Copy only texture assets.
  • --save_folder=*: Output path
  • --version=*: UE version. 4.0 ~ 4.27, 5.0 ~ 5.4, ff7r, and borderlands3 are available.
  • --export_as=*: Texture format. dds, tga, bmp, jpg, png are available.
  • --convert_to=*: Format for convert mode. tga, hdr, bmp, jpg, png, and DXGI formats (e.g. BC1_UNORM) are available.
  • --no_mipmaps: Make output files no mipmap textures.
  • --force_uncompressed: Use uncompressed format for BC1 ~ BC7, and ASTC.
  • --skip_non_texture: No errors for non-texture assets.
  • --image_filter: Image filter for mip generation. point, linear, and cubic are available.
  • --save_detected_version: Save detected version to src/config.json. This is an option for check mode.
  • --max_workers: The number of workers for multiprocessing. Default is the number of processors on the machine.

Examples

Injection

python/python.exe src/main.py color.uasset newcolor.dds --save_folder=./injected --verison=4.27

This command injects newcolor.dds into color.uasset extracted from a UE4.27 game.
And it saves the injected asset in ./injected.

Extraction

python/python.exe src/main.py normalmap.uasset --mode=export --save_folder=./exported --verison=4.20 --export_as=png

This command extracts a texture from normalmap.uasset (that extracted from a UE4.20 game).
And it saves the texture in ./exported as a png file.

Conversion

python/python.exe src/main.py sample.png --mode=convert --save_folder=./converted --convert_to=bmp

This command converts sample.png to a bmp file.
And it saves the file in ./converted.

Clone this wiki locally