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

RIM (Resource Image)

RIM files operate as a radically leaner alternative to ERFs. They are used exclusively by the game engine for distributing absolutely essential or lightweight modules without the hefty structural metadata overhead of an ERF file. They provide rapid, self-contained loading for core engine environments.

At a Glance

PropertyValue
Extension(s).rim
Magic SignaturesRIM (version V1.0)
TypeLightweight Archive
Rust ReferenceView rakata_formats::Rim in Rustdocs

Data Model Structure

Because RIM files act as a lightweight twin to the ERF format, the rakata-extract crate extracts them identically.

  • Capsule Generalization: Standard module extraction relies entirely on calling rakata_extract::Capsule::read_from_bytes(). The developer API makes absolutely no programmatic distinction between querying an ERF module or a RIM module—it behaves perfectly seamlessly either way.

Engine Audits & Decompilation

The following information documents the KOTOR engine’s exact load sequence and field requirements for genuine .rim capsule variants. All behavior was mapped natively from swkotor.exe during clean-room reverse engineering.

Resource Image Overrides (CExoKeyTable::AddResourceImageContents)

Mapped from 0x0040f990.

ActionEngine Behavior
Signature CheckExplicitly validates the exact RIM magic and the V1.0 version string implicitly upon loading.
Header EvaluationThe engine physically reads the entry_count (offset 0x0C) and the keys_offset (offset 0x10) from the header to explicitly navigate the file structures.

Tip

The 96-Byte “Dead Zone” Exactly like the ERF dead zone, RIM files feature a massive 96 bytes of completely inert padding sitting physically between offsets 0x18 and 0x77 inside the 120-byte header. The engine blindly sweeps right past it during initialization. It is perfectly safe to zero out this region when generating new synthetic fixtures.