Table of Contents
reone comes with a separate executable, containing a number of tools for inspection and modification of the game assets.
Features:
- Inspect and extract BIF, ERF and RIM archives
- Convert 2DA, GFF and TLK files to JSON
- Convert JSON files to 2DA, GFF and TLK
- Convert TPC images to TGA/TXI
- Unwrap audio files (WAV and MP3)
- Create RIM, ERF and MOD archives from directories
- Convert binary PTH to ASCII PTH and vice versa (KotorBlender)
Usage
Start with adding the reone-tools directory to the system path:
$env:PATH+="TOOLS_DIR"
(PowerShell)
export PATH=$PATH:TOOLS_DIR
(Unix shell)
Note: here and below substitute *_DIR
variables with absolute directory paths, and *_PATH
variables with absolute file paths.
Extract a BIF file to a destination directory:
reone-tools --game GAME_DIR --extract BIF_PATH --dest DEST_DIR
Extract an ERF/RIM file to a destination directory:
reone-tools --extract FILE_PATH --dest DEST_DIR
Convert a 2DA, GFF or TLK file to JSON:
reone-tools --to-json FILE_PATH
Convert a JSON file to 2DA:
reone-tools --to-2da FILE_PATH
Convert a JSON file to GFF:
reone-tools --to-gff FILE_PATH
Convert a JSON file to TLK:
reone-tools --to-tlk FILE_PATH
Convert a TPC image to TGA/TXI:
reone-tools --to-tga FILE_PATH
Unwrap an audio file:
reone-tools --unwrap FILE_PATH
Create a RIM archive from directory:
reone-tools --to-rim DIR
Create an ERF archive from directory:
reone-tools --to-erf DIR
Create a MOD archive from directory:
reone-tools --to-mod DIR
Convert an ASCII PTH file to binary PTH:
reone-tools --to-pth FILE_PATH
Convert a binary PTH file to ASCII:
reone-tools --to-ascii FILE_PATH
Batch converting TPC images to TGA/TXI:
@(Get-ChildItem -Filter *.tpc) | %{&"reone-tools" --to-tga $_.name}
(PowerShell)
ls *.tpc | xargs -I{} reone-tools --to-tga {}
(Unix shell)
Note: same principle applies to batch processing 2DA, GFF, etc.
Automation
We recommend developers to extract all game archives to a separate directory, and batch convert assets to more accessible formats, e.g. 2DA, GFF and TLK to JSON, MDL and PTH to ASCII, TPC to TGA/TXI, NCS to PCODE/NCS and etc. On Windows we provide a Python script to automate these steps. Open scripts/extract_resources.py
in any text editor and modify top-level variables according to your needs. Then, execute it from the command line:
python extract_resources.py
Configuration
Game and destination directories can be set from the configuration file named "reone-tools.cfg".
Other Resources
Use nwnnsscomp to disassemble NCS files, DeNCS to decompile and Kotor Tool to compile them.
Use KotorBlender in combination with MDLops/MDLedit to import & export MDL, LYT and PTH files.