TES4 Record – Plugin info

TES4 record type.

Classes:

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

Record for plugin info.

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

Bases: Record

Record for plugin info.

Parameters
  • flags (int)

  • id (bytes)

  • revision (int) – Default 0.

  • version (int) – Default 15.

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

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

Classes:

CNAM([cstring])

The plugin's author.

DATA([cstring])

HEDR(version, num_records, next_object_id)

Header.

MAST([cstring])

Name of a master plugin.

ONAM([iterable])

Form Overrides.

SNAM([cstring])

The plugin's description.

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.

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

Bases: CStringRecord

The plugin’s author.

Max 511 bytes.

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

Bases: BytesRecordType

Methods:

parse(raw_bytes)

Parse this subrecord.

unparse()

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

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

namedtuple HEDR(version, num_records, next_object_id)[source]

Bases: NamedTuple

Header.

Contains additional details about the plugin.

Fields
  1.  version (float) – Alias for field number 0

  2.  num_records (int) – Number of records and groups (not including TES4 record itself).

  3.  next_object_id (bytes) – Next available object ID.

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 MAST(cstring: Union[str, bytes] = b'')[source]

Bases: CStringRecord

Name of a master plugin.

May be repeated.

class ONAM(iterable=(), /)[source]

Bases: FormIDArrayRecord

Form Overrides.

Overridden records. An array of REFR, ACHR, ACRE, PMIS, PGRE, LAND and NAVM records.

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

Bases: CStringRecord

The plugin’s description.

Max 511 bytes.

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