Tooling for interacting with .wad files. This command-line utility provides a set of tools for working with .wad archive files found in League of Legends.
- Extract: Extract contents from WAD files
- Diff: Compare WAD files and show differences
- More features coming soon!
Run this in PowerShell (uses a default user-writable directory and updates PATH):
irm https://raw.githubusercontent.com/LeagueToolkit/wadtools/main/scripts/install-wadtools.ps1 | iexAdvanced (choose a custom directory):
# Download and run with parameters
$tmp = Join-Path $env:TEMP 'install-wadtools.ps1'
iwr -useb https://raw.githubusercontent.com/LeagueToolkit/wadtools/main/scripts/install-wadtools.ps1 -OutFile $tmp
powershell -ExecutionPolicy Bypass -File $tmp -InstallDir "$env:LOCALAPPDATA\wadtools\bin"
Remove-Item $tmp -ForceDownload the latest release for your platform from the Releases page.
Available binaries:
- Windows (x64):
wadtools-windows.exe - Linux (x64):
wadtools-linux - macOS (x64):
wadtools-macos
To build from source, you'll need:
- Rust (nightly toolchain)
- Cargo (Rust's package manager)
# Clone the repository
git clone https://github.com/LeagueToolkit/wadtools.git
cd wadtools
# Build the project
cargo build --release
# The binary will be available in target/release/# Basic command structure
wadtools <COMMAND> [OPTIONS]
# Show command help
wadtools --help
wadtools <COMMAND> --helpGlobal options:
-L, --verbosity <LEVEL>: set log verbosity (error,warning,info,debug,trace)--config <FILE>: load options from a TOML file (defaults towadtools.tomlnext to the executable; created on first run)--progress <true|false>: show/hide progress bars (overrides config)--hashtable-dir <DIR>: recursively load hashtable files from this directory (overrides defaults and config)
Extracts files from a WAD archive. Use -i/--input for the WAD file, -o/--output for the destination directory.
Common flags:
-i, --input <PATH>: path to the input WAD file-o, --output <DIR>: output directory-H, --hashtable <PATH>(also-d): optional hashtable file to resolve names-f, --filter-type <TYPE...>: filter by file type(s) likepng,tga,bin-x, --pattern <REGEX>: filter by regex on the resolved path (see below)
Basic examples:
# Extract everything (recommended to provide a hashtable)
wadtools extract -i Aatrox.wad.client -o out -H hashes.game.txt
# Extract only textures (DDS or TEX) under assets/
wadtools extract -i Aatrox.wad.client -o out -H hashes.game.txt \
-f dds tex -x "^assets/.*\.(dds|tex)$"Configuration file example (wadtools.toml):
# Show progress bars by default (can be overridden by CLI)
show_progress = true
# Optional custom directory where hashtable files are loaded from
# If set, wadtools will recursively load all files in this directory on start
# This can be overridden by the CLI flag --hashtable-dir
hashtable_dir = "C:/Users/you/Documents/LeagueToolkit/wad_hashtables"-
Config file:
- By default we create and read
wadtools.tomlnext to the executable, regardless of current directory. - You can point to a different file via
--config <FILE>. - Precedence: CLI flags override config.
--progress=true|falsepersists back into the resolved config file.
- By default we create and read
-
Hashtable files:
- We load hashtables recursively from one of the following, in order:
--hashtable-dir <DIR>if providedhashtable_dirfromwadtools.tomlif set- Default directory:
- On Windows:
Documents/LeagueToolkit/wad_hashtables. - On other platforms: platform data dir from
directories_nextunderio/LeagueToolkit/wadtools/wad_hashtables.
- On Windows:
- If
-H/--hashtable <PATH>is provided, that specific file is also loaded in addition to the directory above. - If none of the directories exist, only the provided file (if any) is loaded.
- We load hashtables recursively from one of the following, in order:
How filtering works:
--pattern/-xand--filter-type/-fare combined with AND semantics.- A chunk must match the regex AND be one of the selected types to be extracted if both flags are provided.
- Regex is case-insensitive by default.
- To opt out, prefix the pattern with
(?-i). - Backreferences and lookarounds are supported.
- To opt out, prefix the pattern with
Regex examples:
# Case-insensitive (default)
wadtools extract -i Aatrox.wad.client -o out -H hashes.game.txt \
-x "^assets/.*\.(png|tga)$"
# Backreference example: DATA/Characters/<name>/<name>.bin
wadtools extract -i Aatrox.wad.client -o out -H hashes.game.txt \
-x "(?i)^DATA/Characters/(.*?)/\\1\\.bin$"Name resolution with hashtable:
- Without a hashtable, unknown paths are written using their 16-character hex hash (e.g.,
2f3c...b9a). - With
-H/--hashtable, matching hashes are resolved to readable paths before extraction.
When we add the .ltk postfix:
- We append
.ltkif the original path has no extension or the resolved destination would collide with an existing directory (this happens for a lot of.binfiles inUI.wad.clientfor example). - If we can detect the real type from file contents, we append it after
.ltk, e.g.foo.ltk.png; otherwise justfoo.ltk.
Handling long filenames:
- If the platform/filesystem rejects a write due to a long filename, we fall back to the chunk hash as the filename (16 hex chars) in the output directory.
- A warning is logged including both the readable path (if known) and the hashed path so you can correlate outputs.
File type filtering (-f/--filter-type):
- Uses content detection to identify types like
png,tga,bin, etc. - You can pass multiple values:
-f png tga. - Remember this ANDs with
--patternwhen both are provided.
Quick diff example:
wadtools diff -r old.wad.client -t new.wad.client -H hashtable.txt \
-o diff.csvShow the default hashtable directory:
wadtools hashtable-dir
# or
wadtools hd-
Install development tools:
rustup component add rustfmt clippy
-
Run tests:
cargo test -
Check formatting:
cargo fmt --all -- --check
-
Run clippy:
cargo clippy -- -D warnings
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate and follow the existing code style.
- Thanks to all contributors who have helped with the development of this tool
- Built using the league-toolkit library