A CELL record defines a cell. Interior cells are defined in the CELL group while exterior cells are defined in the WRLD group. The CELL record is followed by a group containing the references for the cell.
Persistent references are defined in the 'persistent children' subgroup while temporary references are defined in the 'temporary children' subgroup. Visible when distant references are defined in the 'visible distant' subgroup.
For an exterior cell, the persistent references are defined in a dummy cell in the worldspace group. The visible when distant and temporary references are then defined within exterior block/subblock groups. The 'visible distant' subgroup must occur before the 'temporary children' subgroup for a cell, otherwise the distant objects will not be rendered by the game engine.
For an interior cell, the persistent and temporary references are defined in interior block/subblock groups. The 'persistent children' subgroup must occur before the 'temporary children' subgroup.
The block and subblock groups for an interior cell are determined by the last two decimal digits of the lower 3 bytes of the cell form ID (the modindex is not included in the calculation). For example, for form ID 0x000CF2=3314, the block is 4 and the subblock is 1.
The block and subblock groups for an exterior cell are determined by the X-Y coordinates of the cell. Each block contains 16 subblocks (4x4) and each subblock contains 64 cells (8x8). So each block contains 1024 cells (32x32).
Subrecord | Type | Info |
---|---|---|
EDID | zstring | Cell editor ID |
FULL | zstring | Cell name |
DATA | ubyte[1] | Flags
|
XCLL | struct | Lighting (only used for interior cells) |
XCMT | ubyte[1] | Music type if not default type
|
XOWN | formid | Owner (NPC or Faction) |
XGLB | formid | Global variable (if owner is NPC) |
XRNK | long | Faction rank (if owner is faction) |
XCCM | formid | Climate (if interior cell behaves like exterior cell) |
XCWT | formid | Water |
XCLW | float | Water height (if not 0.00) |
XCLR | formid[*] | Regions containing the cell |
XCLC | long[2] | (X, Y) grid (only used for exterior cells) |