esp_parser.group

Group (GRUP) of records.

Classes:

Group(label, group_type, stamp[, unknown, data])

A group of records.

GroupTypeEnum(value)

Enum for Group.group_type.

class Group(label, group_type, stamp, unknown=b'\x00\x00\x00\x00\x00\x00', data=[])[source]

Bases: object

A group of records.

Parameters
  • label (bytes) – The type of records within this group, e.g. INFO. Depending on group_type may be an integer.

  • group_type (GroupTypeEnum)

  • stamp (int) – A date stamp. The first byte is the day of the month, and the second byte is the number of months since some unknown point in time (perhaps July 2004, when Bethesda began development of Fallout 3).

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

  • data (List[Union[RecordType, Group]]) – Default [].

Attributes:

data

group_type

label

The type of records within this group, e.g.

stamp

A date stamp.

unknown

Methods:

parse(raw_bytes)

Parse this group.

unparse()

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

data

Type:    List[Union[RecordType, Group]]

group_type

Type:    GroupTypeEnum

label

Type:    bytes

The type of records within this group, e.g. INFO.

Depending on group_type may be an integer.

classmethod parse(raw_bytes)[source]

Parse this group.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record

Return type

Self

stamp

Type:    int

A date stamp.

The first byte is the day of the month, and the second byte is the number of months since some unknown point in time (perhaps July 2004, when Bethesda began development of Fallout 3).

unknown

Type:    bytes

unparse()[source]

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

Return type

bytes

class GroupTypeEnum(value)[source]

Bases: IntEnum

Enum for Group.group_type.