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

Format Implementation Reference

This launchpad tracks the implementation status of KotOR file formats across our parsing libraries (rakata-formats) and our strongly-typed wrappers (rakata-generics).

Status Legend:

  • Full: Binary reader/writer implemented with roundtrip tests.
  • Generics: Strongly-typed wrappers and linting schemas implemented.
  • Partial: Basic parsing support, advanced features deferred.
  • Canonical: Validated against vanilla KotOR (K1) runtime behavior.

Archive Formats

FormatStatusNotes
BIFFullSupports variable/fixed tables. Deterministic 4-byte payload alignment. BZF compression feature-gated.
KEYFullFirst-match lookup semantics (native verified). Duplicate key insertions ignored.
ERFFullSupports ERF/MOD/SAV. Optional blank-block emission for MODs is explicit opt-in.
RIMFullSupports V1.0. Offset fallback handled. Tight packing.

GFF & Blueprints

FormatStatusNotes
GFF StructureFullCore binary parity for structs/lists/fields. Localized strings supported. Stable list ordering.
GenericsGenerics13 typed blueprints completed: ARE, DLG, GIT, IFO, UTC, UTD, UTE, UTI, UTM, UTP, UTS, UTT, UTW. Tied into rakata-lint.

3D Models & Walkmeshes

FormatStatusNotes
MDL/MDXFullBinary reader/writer with full geometry, node hierarchy, controllers, and MDX vertex data. ASCII reader/writer for modder interop. In-game verified.
BWM / WOKFullV1.0 binary tables (vertices, faces, materials, etc.). Strict bounds validation.

Texture Formats

FormatStatusNotes
TPCFullContainer header/payload/footer. Canonical pixel-type mapping (DXT5 for type 4). Mip payload sizing matches native right-shift.
DDSFullSupports standard D3D headers and K1-specific CResDDS prefix (20-byte metadata).
TGAFullReader normalizes to RGBA8888. Canonical mode rejects grayscale RLE. Lossless passthrough when source pixels are unmodified.
TXIFullASCII format. Case-insensitive command tokens (native verified). Coordinate block support.

Text & Data Formats

FormatStatusNotes
2DAFullBinary V2.b.
TLKFullStrict language-aware decode/encode. Validated against test.tlk.
VISFullASCII format. Case-insensitive room normalization. Deterministic ordering.
LYTFullASCII format. Strict Windows-1252 text handling. Count-driven parsing.
LTRFullV1.0 headers. 28-char probability tables.

Audio Formats

FormatStatusNotes
WAVFullStandard RIFF + KotOR SFX/VO obfuscation wrappers. MP3-in-WAV unwrapping support.
LIPFullV1.0 header + keyframes. Deterministic writer.
SSFFullV1.1 header + 28-slot sound table.

Missing / Deferred Formats

These formats are currently unimplemented or do not yet have strongly-typed wrappers in rakata-generics.

FormatStatusNotes
NCS / NSSDeferredNWScript Source and Compiled bytecode. NCS decompilation is slated for future work via an independent pipeline.
GUIDeferredGraphical User Interface layout blueprints (GFF).
JRLDeferredJournal and quest tracking blueprints (GFF).
FACDeferredFaction mappings and reputations (GFF).
PTHDeferredPathfinding graphs and navigation waypoints (GFF).
ITPDeferredItem Palette definitions (GFF).
BIKDeferredBink Video container (proprietary video format). Unlikely to be implemented natively.

Provenance Policy

Because this project seeks to achieve strict interoperability with a two-decade-old engine, mere “correctness” is insufficient. We guarantee canonical behavior.

  • Target: Canonical vanilla Star Wars: Knights of the Old Republic 1 (2003).
  • Engine Audits: We do not guess how the engine behaves. Code is written exclusively from observed engine evidence notes derived from clean-room reverse engineering (via Ghidra/ret-sync). Every implementation choice is documented directly inside that format’s specific page on this site.
  • Verification: Behaviors are locked via deep integration tests against synthetic fixtures. If a parser perfectly round-trips an invalid file but the game engine rejects it, it is treated as a critical bug.