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
| Property | Value |
|---|---|
| Extension(s) | .rim |
| Magic Signatures | RIM (version V1.0) |
| Type | Lightweight Archive |
| Rust Reference | View 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 anERFmodule or aRIMmodule—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.
| Action | Engine Behavior |
|---|---|
| Signature Check | Explicitly validates the exact RIM magic and the V1.0 version string implicitly upon loading. |
| Header Evaluation | The 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
ERFdead zone, RIM files feature a massive 96 bytes of completely inert padding sitting physically between offsets0x18and0x77inside 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.