esp_parser.utils

General utilities.

Data:

TES4_0_94

Helper for 0.94 (as a float) for TES4 headers' version attributes.

Functions:

create_tes4(version, num_records, next_object_id)

Helper to create a TES4 record.

namedtuple_qualname_repr(namedtuple)

Produce a repr() of a NamedTuple showing the __qualname__.

TES4_0_94 = 0.9399999976158142

Type:    float

Helper for 0.94 (as a float) for TES4 headers’ version attributes.

create_tes4(version, num_records, next_object_id, author='DEFAULT', description=None, masters=('Fallout3.esm',))[source]

Helper to create a TES4 record.

Parameters
  • version (float) – 0.94 in most files; 1.7 in recent versions of Update.esm.

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

  • next_object_id (bytes) – Next available object ID, as a 4-byte sequence.

  • author (str) – Optional author’s name. Default 'DEFAULT'.

  • description (Optional[str]) – Default None.

  • masters (Sequence[str]) – List the plugin’s master files, listed in the order they were present in when the plugin was created. Default ('Fallout3.esm',).

Return type

TES4

namedtuple_qualname_repr(namedtuple)[source]

Produce a repr() of a NamedTuple showing the __qualname__.

Parameters

namedtuple (NamedTuple)

Return type

str