CONT Record – Container

CONT record type.

Classes:

CONT(flags, id[, revision, version, ...])

Container.

class CONT(flags, id, revision=0, version=15, unknown=b'\x00\x00', data=[])[source]

Bases: Record

Container.

Parameters
  • flags (int)

  • id (bytes)

  • revision (int) – Default 0.

  • version (int) – Default 15.

  • unknown (bytes) – Default b'\x00\x00'.

  • data (List[RecordType]) – Default [].

Classes:

DATA(flags, weight)

Data.

FULL([cstring])

Container name.

QNAM([cstring])

Sound - close.

RNAM([cstring])

Sound - random/looping (New Vegas only).

SCRI([cstring])

Script.

SNAM([cstring])

Sound - open.

Attributes:

data

Subrecords of this record.

flags

Record flags

id

4-byte form ID

revision

Used for revision control by the Creation Kit, if enabled.

unknown

version

Form version

Methods:

parse_subrecords(raw_bytes)

Parse this record's subrecords.

namedtuple DATA(flags, weight)[source]

Bases: NamedTuple

Data.

Fields
  1.  flags (int) – Alias for field number 0

  2.  weight (float) – Alias for field number 1

classmethod parse(raw_bytes)[source]

Parse this subrecord.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record

Return type

Self

unparse()[source]

Turn this subrecord back into raw bytes for an ESP file.

Return type

bytes

class FULL(cstring: Union[str, bytes] = b'')[source]

Bases: CStringRecord

Container name.

class QNAM(cstring: Union[str, bytes] = b'')[source]

Bases: FormIDRecord

Sound - close.

Form ID of a SOUN record.

class RNAM(cstring: Union[str, bytes] = b'')[source]

Bases: FormIDRecord

Sound - random/looping (New Vegas only).

Form ID of a SOUN record.

class SCRI(cstring: Union[str, bytes] = b'')[source]

Bases: FormIDRecord

Script.

Form ID of a SCPT record.

class SNAM(cstring: Union[str, bytes] = b'')[source]

Bases: FormIDRecord

Sound - open.

Form ID of a SOUN record.

data

Type:    List[RecordType]

flags

Type:    int

id

Type:    bytes

classmethod parse_subrecords(raw_bytes)[source]

Parse this record’s subrecords.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record’s subrecords

Return type

Iterator[RecordType]

revision

Type:    int

unknown

Type:    bytes

version

Type:    int