MISC Record – Misc. Item

MISC record type.

Classes:

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

Misc item.

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

Bases: Record

Misc item.

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(value, weight)

Data.

FULL([cstring])

Name.

ICON([cstring])

Large icon filename.

MICO([cstring])

Small icon filename.

RNAM([cstring])

Sound - Random / Looping.

SCRI([cstring])

Script.

YNAM([cstring])

Sound - pick up.

ZNAM([cstring])

Sound - drop.

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(value, weight)[source]

Bases: NamedTuple

Data.

Fields
  1.  value (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

Name.

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

Bases: CStringRecord

Large icon filename.

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

Bases: CStringRecord

Small icon filename.

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

Bases: FormIDRecord

Sound - Random / Looping.

Form ID of a SOUN record.

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

Bases: FormIDRecord

Script.

Form ID of a SCPT record.

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

Bases: FormIDRecord

Sound - pick up.

Form ID of a SOUN record.

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

Bases: FormIDRecord

Sound - drop.

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