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
| Property | Value |
|---|---|
| Extension(s) | .txi |
| Magic Signature | None |
| Type | ASCII Configuration Strings |
| Rust Reference | View 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 Event | Ghidra Provenance & Engine Behavior |
|---|---|
| Invalid Commands | Function: 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 Agnosticism | Function: CAurTextureBasic::ParseField (0x00422390)Field matching acts strictly case-insensitive (e.g. cMgTxi == cmgtxi). |
| Line Normalization | Function: 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 Parsing | Function: 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. Thefirstword()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 toParse_bool(). Ansscanfstrips the whitespace and evaluates"1"totrue.- Argument-less Flags: Passing just a flag (
"decal") triggers the branch, butParse_boolphysically finds no argument. It fails to match"true","false","1", or"0", silently safely leaving the boolean integer unchanged from its previous memory allocation.