Giter Site home page Giter Site logo

adainrivers / d4-texture-extractor Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 5.0 385 KB

Extracts and converts Diablo 4 .tex files to png, webp or jpg. Also slices the files into separate images when applicable.

License: MIT License

JavaScript 100.00%
diablo-4

d4-texture-extractor's Introduction

Diablo 4 Texture Extractor

What it does

The Diablo 4 Texture Extractor is a tool that extracts and converts .tex files to PNG, WebP, or JPG formats. It can also slice the files into separate image files when applicable.

Known Issues

  • Some of the intermediate DDS files might not be valid, which can cause texconv to fail.

Installation

  1. Clone this repository by following the instructions in the GitHub documentation.
  2. Download the latest CASCConsole.zip from https://github.com/WoW-Tools/CASCExplorer/releases.
  3. Extract the contents of the CASCConsole.zip into the CASCConsole folder under d4-texture-extractor folder. CASCConsole.exe and the other files from the zip file should be in the same folder with extract_cascconsole.exe_and_other_files_here
  4. Run npm install in d4-texture-extractor folder. You should have at least latest LTS version of NodeJS installed.

Usage

Usage: node ./index.js [options]
All options are optional

Options:
  -e, --extract                Automatically extract game files before processing (this will delete previously extracted files)
  -g, --gameFolder <path>      Path to Diablo IV folder, for example "C:\Program Files (x86)\Diablo IV\"
  -c, --concurrency <number>   number of concurrent tasks
  -o, --outputformat <format>  png, jpg or webp
  -p, --outputpath <path>      Full or relative path to output folder, default is './{outputformat}'
  -f, --filter <wildcard>      Wildcard to filter files to process, for example '2DUI*', no need to include .json extension, default is '*'
  -nc, --nocrop                Do not crop images to the size of the texture, useful for map textures
  -ns, --noslice               Do not slice the images, useful for map textures
  -nsf, --noslicefolders       Do not use slice folders, instead save slicers to the output folder, prefixed with the file name
  -h, --help                   display help for command

You can find the full list of texture file names here

Example 1: Extract and convert all texture files starting with 2D into webp folder in webp format.

node .\index.js -f 2D* -c 10 -o webp -g "C:\Program Files (x86)\Diablo IV" -e

Example 2: Convert previously extracted files starting with zmap in webp format without cropping and slicing.

node .\index.js -f zmap* -c 10 -o webp -nc -ns

Credits and thanks

And finally to ChatGPT for doing half of the work for me. :)

d4-texture-extractor's People

Contributors

adainrivers avatar lmachens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.