Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

TXI (Texture Extensions)

TXI files (or TPC appended arrays) are highly forgiving plain-text metadata blocks applied adjacent to graphical files to enforce custom mipmap, bumpmap, or animation shaders.

At a Glance

PropertyValue
Extension(s).txi
Magic SignatureNone
TypeASCII Configuration Strings
Rust ReferenceView rakata_formats::Txi in Rustdocs

Data Model Structure

rakata-formats inherently pairs TXI payload access alongside its target texture. When querying the virtual resolver, textures are natively returned as a combined TextureWithTxiResult object. This architecture guarantees that the raw graphic bytes and their exact applied TXI rule block are inextricably tracked as a coupled pair throughout the virtual environment.

Engine Audits & Decompilation

The following documents the engine’s exact load sequence for TXI text configurations mapped from swkotor.exe.

(Decompilation logic for this section was audited and verified via native Ghidra pipeline against swkotor.exe, explicitly pulling from CAurTextureBasic::ParseField at 0x00422390.)

Pipeline EventGhidra Provenance & Engine Behavior
Invalid CommandsFunction: CAurTextureBasic::ParseField (0x00422390)
Unknown or unsupported TXI commands are safely bypassed. If the parsed string evaluation fails to match an explicit configuration branch, the subroutine immediately exits without throwing any logger alarms or terminating texture load.
Case AgnosticismFunction: CAurTextureBasic::ParseField (0x00422390)
Field matching acts strictly case-insensitive (e.g. cMgTxi == cmgtxi).
Line NormalizationFunction: CAurTextureBasic::ParseField (0x00422390)
The native internal engine scanner searches exclusively for LF (\n) bounds. However, if the read targets an active disk file, the underlying standard C fgets call automatically handles CRLF normalization before handing strings to the regex evaluator.
Boolean ParsingFunction: Parse_bool (0x00463680)
The native Parse_bool validation explicitly performs lowercase scans evaluating against exact variants of "true", "false", "1", or "0".

Note

Boolean Parsing Nuance Modding documentation often warns against specific formats or keywords (like decal). Decompilation reveals the universal behavior applied to all boolean flags:

  • Missing Space: Keys merged with their arguments (e.g. "decal1", "mipmap0") silently abort. The firstword() extractor pulls the merged string, completely failing the target evaluation list.
  • Separated Numbers: Space-separated numbers (e.g. "decal 1") are completely structurally valid. firstword() pulls "decal" and hands " 1" off to Parse_bool(). An sscanf strips the whitespace and evaluates "1" to true.
  • Argument-less Flags: Passing just a flag ("decal") triggers the branch, but Parse_bool physically finds no argument. It fails to match "true", "false", "1", or "0", silently safely leaving the boolean integer unchanged from its previous memory allocation.