Abrir menu principal

UESPWiki β

Oblivion Mod:Save File Format/CELL

< 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 Created

"Cell Created" is true when byte 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 byte 2 instead of byte 1 (see notes below). However, by analogy to other records where byte 1 is used for "Created", it is inferred that byte 1 is the correct assignment.

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

Unnamed (2)

An unnamed value is true when byte 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, bytes 1 and 2 are set simultaneously. When bytes 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 byte 1 or byte 2. However, by analogy to other records where byte 1 is used for "Created" (e.g., ACHR, ACRE and REFR), it is inferred that byte 1 is the correct assignment, leaving byte 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)

This unnamed subrecord is present when byte 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 byte 26 is set.

Name Type/Size Info
unknown byte[4]

Detach Time

The Detach Time subrecord is present when byte 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 Flags

The Cell Flags subrecord is present when byte 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 Data

The Seen Data subrecord is present when byte 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 Name

The Full Name subrecord is present when byte 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 byte 7, not byte 4.

Name Type/Size Info
fullname bstring New cell name

Ownership

The Ownership subrecord is present when byte 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 byte 7, not byte 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 Modified

The Pathgrid Modified subrecord is present when byte 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]