Rotwood TEX Tool
KTEX texture packer + converter for Rotwood.
Installation
Requirements:
- Python 3.12+
- ImageMagick
Windows
Install dependencies
- Python (Check "Add python.exe to PATH")
- ImageMagick ("Windows Binary Release" .exe installer)
Install rwtextool
- From PyPI (recommended):
- Open a terminal window
- Run
pip install rwtextool
- From source repo:
- Download repo ZIP or
git clone(if you have Git) - Open terminal widnow in rwtextool directory
- Run
pip install .
- Download repo ZIP or
Now you can use tex2img and img2tex system-wide, see Usage for more details.
Linux
Install dependencies
# Debian
sudo apt install git imagemagick python3
sudo apt install python3-venv # for venv
sudo apt install python3-pip # for global pip
# Arch Linux
sudo pacman -S git imagemagick python
sudo pacman -S python-pip # for global pip
# Fedora
sudo dnf install git ImageMagick python3
sudo dnf install python3-pip # for global pip
Install from PyPI
pip install rwtextool
Install from source
git clone https://codeberg.org/gibbert/rwtextool
cd rwtextool
# virtual environment
python3 -m venv .venv
source .venv/bin/activate
pip install .
# install system-wide (not recommended)
sudo pip install --break-system-packages .
Nix flake
This repo includes a Nix flake that provides a package under packages."x86_64".default.
There are 2 executables, tex2img and img2tex.
With nix run (uses tex2img by default)
nix run "git+https://codeberg.org/gibbert/rwtextool" -- --help
With nix shell
nix shell "git+https://codeberg.org/gibbert/rwtextool"
tex2img --help
img2tex --help
Example Nix flake input:
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rwtextool = {
url = "git+https://codeberg.org/gibbert/rwtextool";
inputs.nixpkgs.follows = "nixpkgs";
};
For outputs I have specialArgs = { inherit inputs; };
In modules:
{ pkgs, inputs, ... }: {
environment.systemPackages = [
inputs.rwtextool.packages.${pkgs.stdenv.hostPlatform.system}.default
];
}
Usage
Extract image from tex files
tex2img --auto-atlas ui_ftf_power_icons1.tex
Pack folder of textures
img2tex directory/path
More detailed --help info
Unpacking TEX+XML to PNGs
usage: tex2img [-h] [-A] [-a ATLAS_PATH] [-v] tex_path
Unpacks a Rotwood Klei TEX file (and XML atlas) to PNG images.
positional arguments:
tex_path TEX texture file
options:
-h, --help show this help message and exit
-A, --auto-atlas Automatically find and use the XML atlas matching the
texture file name
-a, --atlas ATLAS_PATH
XML atlas file, the result unpacked images will be
placed in a new directory
-v, --verbose Output verbosity level (can stack) (warnings, info,
all info)
Packing PNGs into TEX+XML
usage: img2tex [-h] [-v] source_path
Packs a directory of PNG images into Rotwood Klei TEX textures and atlases.
positional arguments:
source_path Directory of PNG files
options:
-h, --help show this help message and exit
-v, --verbose Output verbosity level (can stack) (warnings, info, all info)
License
This project uses the GPL 3 or later license (see LICENSE).
Metadata
Release files for rwtextool 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rwtextool-1.0.0.tar.gz | 20.3 kB | Without provenance | Details for rwtextool-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rwtextool-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for rwtextool-1.0.0-py3-none-any.whl |
Total release size: 40.7 kB
Release files / rwtextool-1.0.0.tar.gz
| Download URL | rwtextool-1.0.0.tar.gz |
|---|---|
| Size | 20.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f09aeda8d9f5b0b04c3f7953bc9125293909ddcb4fe45869cd9f7a19f08eb508
|
|
BLAKE2b-256 checksum How to use checksums |
17633055565e1d63dff714458eff276c1915c6c7b995334173faefaadb3b15e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / rwtextool-1.0.0-py3-none-any.whl
| Download URL | rwtextool-1.0.0-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40a0728a70f3d3d182a1b5709d8fc2c45ce2db8b0b97d2ce074cf6673283e5d1
|
|
BLAKE2b-256 checksum How to use checksums |
cddfb39fb4d018badbc333885c90e200d912821c9c7a59ec4cb817d65734e295
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for rwtextool 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.