ARE Format (Area Static Blueprint)
The Area (.are) blueprint format operates as the static environmental foundation of any game module. It establishes the rigid, overarching properties of a level, orchestrating the terrain’s grass rendering definitions, dynamic sunlight and fog constraints, ambient audio scale, and the primary interior/exterior state configurations. It effectively constructs the structural ‘stage’ that dynamic entities (like creatures and doors) populate later on.
At a Glance
| Property | Value |
|---|---|
| Extension(s) | .are |
| Magic Signature | ARE / V3.2 |
| Type | Area Static Blueprint |
| Rust Reference | View rakata_generics::Are in Rustdocs |
Data Model Structure
Rakata maps the Area definition directly into the rakata_generics::Are struct. To view the exhaustive binary schema and strict GFF field mappings, please refer to the Rustdocs for this struct, where each field is explicitly documented.
Engine Audits & Decompilation
The following documents the engine’s exact load sequence and field requirements for .are files mapped from swkotor.exe.
(Decompilation logic for this section was entirely audited and verified via native Ghidra pipeline against swkotor.exe, explicitly pulling from CSWSArea::LoadArea at 0x0050e190.)
The initial LoadArea dispatch branches out to parse the .are GFF, .lyt layout, .git instance tracking, and .pth bounds. The engine processes roughly 61 scalar fields, 4 scripts, 3 lists, and a nested minigame struct natively within the LoadAreaHeader subroutine.
Core Environmental Identity
| Field Category | Engine Property & Behavioral Quirk |
|---|---|
| Identity | Name (LocString), Comments (String), ID (Int) -> Standard definition strings. |
| Identity | Tag (String) -> Lowercased on load (via CExoString::LowerCase). The only tag to behave this way! |
| Scripts | OnHeartbeat, OnUserDefined, ... -> CResRef script payloads. |
| State Flags | Flags (DWord) -> Bit 0 explicitly marks an Interior environment. |
| State Flags | RestrictMode (Byte) -> Hardcoded Event: Changing this to a non-zero value during gameplay forces CSWPartyTable::UnstealthParty. |
Note
Internal Weather Truncation If
Flags(Bit 0) marks the area as an interior space, the engine zeros out all weather properties upon load, actively discarding any prior weather assignments.
Weather & Terrain Generation
| Field | Type | Engine Evaluation |
|---|---|---|
ChanceFog | INT | Stored persistently as an integer. |
ChanceRain, ChanceSnow, ChanceLightning, WindPower | INT | Warning: The engine explicitly truncates these INT properties to 8-bit bytes at runtime. Values over 255 silently wrap around. |
Grass_TexName | ResRef | If empty or invalid, the engine forces a hard fallback to "grass". |
AlphaTest | FLOAT | Defaults to 0.2 (older tools commonly assume 0.0). |
Area Lighting & Sun/Moon Tracking
KOTOR handles dynamic sunlight constraints separately between Sun and Moon.
| Property Groups | Type | Engine Evaluation |
|---|---|---|
Fog Ranges (MoonFogNear/Far, SunFogNear/Far) | FLOAT | Defaults to an immense distance of 10000.0. The engine aggressively clamps values to be ≥0.0. |
Tints (*AmbientColor, *DiffuseColor, *FogColor) | DWORD | Processed seamlessly as standard DWORD color masks. |
Environment Shadows (ShadowOpacity, *Shadows) | BYTE | Basic toggles and opacities orchestrating render limits. |
Map Transitions & Saving states
| Feature Category | Engine Evaluation & Triggers |
|---|---|
| Minimap Logic | Geographic vectors (MapResX, spatial coordinate structs like WorldPt1X) are only loaded if an actual Minimap TGA/TPC asset matching the level name exists on disk! |
| Parsing Type | If read, the engine parses MapPt along a dual-path logic checking if it is formally a FLOAT or INT type. |
| Zoom Bias | Area maps evaluate MapZoom to a default scaling scalar of 1, not 0! |
| Stealth Save-States | The stealth framework leverages the .are struct to snapshot .StealthXPMax and .StealthXPCurrent directly as DWORDs when parsing the layout. |
The Minigame Struct
Read via CSWMiniGame::Load (0x006723d0). If a minigame context triggers, the .are reads the nested Type (DWORD mapping 1=Swoop, 2=Turret). It injects highly specialized float properties modifying basic terrain speeds:
| Field | Injection Default / Constraint |
|---|---|
LateralAccel | Defaults safely to 60.0. |
MovementPerSec | Scales to 6.0 (Swoops), 90.0 (Turrets), or 0.0 otherwise! |
Bump_Plane | Bounds are heavily clamped to 0..3. |
| Nested Arrays | The struct natively requires sub-struct Player arrays (Models, Camera, Axes) and Enemy/Obstacles lists to operate properly. |
Rakata Linter Rules
The core priority of rakata-lint is shielding users from fields that look valid in older editors but fail in the K1 engine. E.g., there are 19 distinct fields generated by standard modding tools (like DisableTransit, KOTOR 2 ForceRating, etc) that are completely evaluated as dead data by the vanilla engine.
(Seven crucial engine-read fields were previously obfuscated by strict model bindings, but now pass through source_root validation.)
Lint Diagnostics Implemented:
- Weather Truncation: Identifies Rain/Snow/Lightning chance above
255before they wrap around as bytes. - Context Discards: Flags interior environments that contain weather parameters the engine will inevitably zero out.
- Index Fallbacks: Informs the developer that an empty
Grass_TexNameoperates identically as"grass". - Behavioral Flags: Warns that area Tag edits are natively lowercased during instantiation.