Open main menu

UESPWiki β

Oblivion Mod:Save File Format/CELL

< Mod / Oblivion: Oblivion Mod: Modding: Save File Format

A CELL Change Record (change record type 48) describes changes to the game's cells (CELL mod file records). It can contain the following subrecords (with their corresponding byte in the overall Flags), in order of appearance:

The relative positions of the subrecords have all been confirmed; their contents (as far as they are understood) are based on actual save files.

Cell CreatedEdit

"Cell Created" is true when bit 1 (0x00000002) is set in a CELL record's overall Flags. No subrecords or data are added to the record when this flag is set.

It is possible that "Cell Created" is associated with bit 2 instead of bit 1 (see notes below). However, by analogy to other records where bit 1 is used for "Created", it is inferred that bit 1 is the correct assignment.

Name Type/Size Info
N/A 0 No data is added to the record

Unnamed (2)Edit

An unnamed value is true when bit 2 (0x00000004) is set in a CELL record's overall Flags. No subrecords or data are added to the record when this flag is set.

The name of this parameter is unknown, because the text dump files do not specify its name. More specifically, in all cases, bits 1 and 2 are set simultaneously. When bits 1 and 2 are set, the text dump files list only one additional change subrecord: "Cell Created". It is unknown whether "Cell Created" is associated with bit 1 or bit 2. However, by analogy to other records where bit 1 is used for "Created" (e.g., ACHR, ACRE and REFR), it is inferred that bit 1 is the correct assignment, leaving bit 2 unnamed.

The text dump files and analyses of the binary save file contents both show that no data is added to CELL records when these flags are set.

Name Type/Size Info
N/A 0 No data is added to the record

Unnamed (26)Edit

This unnamed subrecord is present when bit 26 (0x04000000) is set in the record's overall Flags. Its length is a constant 4 bytes. The meaning of the data contained in this subrecord is unknown.

The name of this parameter is unknown, because the text dump files do not specify its name: no additional change subrecords are listed when bit 26 is set.

Name Type/Size Info
unknown byte[4]

Detach TimeEdit

The Detach Time subrecord is present when bit 27 (0x08000000) is set in a CELL record's overall Flags. Its length is a constant 4 bytes. The meaning of the data contained in this subrecord is uncertain, but it might be a measure of the time that has passed since the player left the cell. Analysis of the CELL records is partially based on this assumption, assuming that "Detach Time" is a ulong value, and its value is normally less than 65000 (e.g., that bytes 3 and 4 of this subrecord are normally 0x00).

Name Type/Size Info
time ulong

Cell FlagsEdit

The Cell Flags subrecord is present when bit 3 (0x00000008) is set in a CELL record's overall Flags. Its length is a constant 1 byte. The meaning of the data contained in this subrecord is unknown.

Name Type/Size Info
flags ubyte

Seen DataEdit

The Seen Data subrecord is present when bit 28 (0x10000000) is set in a CELL record's overall Flags. Its length is variable, and the parameters controlling its length are only partially understood. The meaning of the data contained in this subrecord is unknown.

The subrecord can be 0, 32, 36, or 36+n*34 bytes in length. If the subrecord length is at least 36 bytes, then the following structure always describes the data. However, nothing in the save file appears to be an indicator for when the subrecord is less than 36 bytes. It is possible that information from the original mod data for the CELL record is necessary to predict the subrecord length. Otherwise, the correct length can be inferred based on how much data is available within the CELL change record.

Name Type/Size Info
unknown ubyte[32]
dataNum ushort This is one larger than the number of "data" structures that follow: the total size of the Seen Data subrecord is dataNum*34 + 2.
flags ushort
data struct[dataNum-1]
unknown
ubyte[34]

Full NameEdit

The Full Name subrecord is present when bit 4 (0x00000010) is set in a CELL record's overall Flags. It contains a variable-length string, providing the new name of the cell.

Note that NPC_ change records can also contain a "Full Name" subrecord with the same contents, but in NPC_ records, its presence is triggered by bit 7, not bit 4.

Name Type/Size Info
fullname bstring New cell name

OwnershipEdit

The Ownership subrecord is present when bit 5 (0x00000020) is set in a CELL record's overall Flags. Its length is a constant 4 bytes. Its contents are an iref pointing to the new owner of the cell (for example, after the player has purchased a house). In analyzed cases, the iref pointed to a NPC_ record, but presumably it could also be a FACT record (by analogy to other ownership subrecords).

Note that REFR and ACRE change records can contain a similar "Owner" subrecord. However, in REFR and ACRE records, its presence is triggered by bit 7, not bit 5, and the data is provided as a property rather than an independent subrecord.

Earlier documentation listed the contents as a formid, rather than an iref, but recent analyses have only found irefs.

Name Type/Size Info
owner iref iref pointing to new cell owner (NPC_ or FACT record type)

Pathgrid ModifiedEdit

The Pathgrid Modified subrecord is present when bit 24 (0x01000000) is set a CELL the record's overall Flags. Its length is variable, but the parameters controlling its length seem to be understood (based on a limited number of samples). The meaning of the data contained in this subrecord is unknown.

Earlier documentation listed the subrecord's length as constant 4 bytes, but in more recent analyses 2- and 6-byte length subrecords have been seen. The following structure correctly describes the length of the analyzed subrecords. However, this subrecord is fairly uncommon (maybe one or two occurrences in a savefile). Combined with the generally limited understanding of a CELL record's contents, this makes any conclusions about the Pathgrid Modified subrecord very uncertain.

Name Type/Size Info
dataLen ushort
data ushort[dataLen]