Skyrim Mod:Mod File Format/CELL
CELL records contain the data for either interior (CELL top group) or exterior (WRLD top group) cells. They follow the same format in both cases. The CELL record is followed by a group containing the references for the cell, organized into subgroups. Persistent references are defined in the 'persistent children' subgroup while temporary references are defined in the 'temporary children' subgroup. The 'persistent children' subgroup must occur before the 'temporary children' subgroup.
The block and sub-block groups for an interior cell can be determined either by the label field of the group headers of the block and sub-block, or by the last two decimal digits of the Form ID. For example, for Form ID 0x138CA, which is 80,074 in decimal, 4 indicates that this is block 4, and the 7 indicates that it's sub-block 7.
The block and sub-block groups for an exterior cell can be determined either by the label filed of the group headers of the block and sub-block, or by the X, Y coordinates of the cell from the XCLC field. Each block contains 16 sub-blocks (4x4) and each sub-block contains 64 cells (8x8). So, to get the sub-block number, divide the coordinates by 8 (rounding down), and the block number can be determined by dividing the sub-block numbers by 4 (again, rounding down). Thus, a cell with the X, Y coordinates 31, 50 would be in floor(31 / 8) = 3, floor(50 / 8) = 6, so sub-block 3, 6. Dividing again, only this time by 4, it would be in block 0, 1.
- 0x00000400 - Persistent Cell?
- 0x00020000 - Off Limits
- 0x00080000 - Can't Wait
|-||EDID||zstring||Cell editor ID|
|-||FULL||lstring||In game name of the cell. Only in interior cells.|
|+||DATA||uint16||flags - Sometimes the field is only one byte long
|-||XCLC||struct||(X, Y) grid location of the cell followed by flags. Always in exterior cells and never in interior cells.
|-||XCLL||struct||92 byte structure - Lighting
this field has only 64 bytes in NavMeshGenCellDUPLICATE001
|-||XCGD||struct||Only found in Xbox360 and PS3 official DLC, not supported by CK 184.108.40.206.
|+||LTMP||formID||The lighting template for this cell.|
|+||XCLW||float||Non-ocean water-height in cell, is used for rivers, ponds etc., ocean-water is globally defined elsewhere.
|-||XCLR||formID||Regions containing the cell (assumed from Oblivion).|
|Fields below this line can appear in any order.|
|-||XLCN||formID||The location for (of?) this cell.|
|-||XWCS||uint32||Size of XWCU/16 - CK changes this into use of XWCN Always has the value three in Skyrim.esm.|
|-||XWCN||uint32||Size of XWCU/16 Only one occurrence - 0x04|
|-||XWCU||struct||Water Current, series of 16 byte structures, minimum 3
Unclear how structures are matched up to "Linear Velocity" and "Angular Velocity" shown in CK
|-||XCWT||formID||The water for (of?) this cell.|
|-||XOWN||formID||Owner NPC or Faction (assumed from Oblivion). Only in interior cells.|
|-||XILL||formID||ID of an NPC_ or FLST. Only in interior cells.|
|-||XWEM||zstring||Water Environment Map only interior cells|
|-||XCCM||formID||Climate if interior cell behaves like exterior cell (assumed from Oblivion). Only in interior cells.|
|-||XCAS||formID||The acoustic space for this cell.|
|-||XEZN||formID||A reference to an encounter zone.|
|-||XCMO||formID||The music type for this cell.|
|-||XCIM||formID||The image space for this cell.|
The last four bytes in XCLC do not appear to be a form ID. The following values appear 100 or more times in those last four bytes:
The less frequent values show a distribution of values that makes them look like a bitmap.