PERK Record – Perk

PERK record type.

Classes:

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

Perk.

PerkEffect()

Effect subrecord collection for PERK.

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

Bases: Record

Perk.

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(trait, min_level, ranks, playable, hidden)

Data.

DESC([cstring])

Description.

FULL([cstring])

Name.

ICON([cstring])

Large icon filename.

MICO([cstring])

Small icon filename.

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 DATA(trait, min_level, ranks, playable, hidden)[source]

Bases: StructRecord

Data.

Parameters

Methods:

get_field_names()

Returns a list of attributes on this class in the order they should be packed.

get_struct_and_size()

Returns the pack/unpack struct string and the corresponding size.

parse(raw_bytes)

Parse this subrecord.

Attributes:

hidden

min_level

playable

ranks

trait

static get_field_names()[source]

Returns a list of attributes on this class in the order they should be packed.

Return type

Tuple[str, …]

static get_struct_and_size()[source]

Returns the pack/unpack struct string and the corresponding size.

Return type

Tuple[str, int]

hidden

Type:    int

min_level

Type:    int

classmethod parse(raw_bytes)[source]

Parse this subrecord.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record

Return type

RecordType

playable

Type:    int

ranks

Type:    int

trait

Type:    int

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

Bases: CStringRecord

Description.

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.

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

class PerkEffect[source]

Bases: Collection

Effect subrecord collection for PERK.

Classes:

DATAAbility([cstring])

Data (Ability).

DATAEntryPoint(entry_point, function, ...)

Data (Quest + Stage).

DATAQuestStage(quest, quest_stage, unused)

Data (Quest + Stage).

EPF2([cstring])

Button Label.

EPF3(*args, **kwargs)

Script Flags.

EPFD([cstring])

Entry Point Function Data.

EPFT(*args, **kwargs)

Entry Point Function Type.

PRKC(*args, **kwargs)

Run On.

PRKE(type, rank, priority)

Effect subrecord header.

PRKF(*args, **kwargs)

End Marker.

Attributes:

members

Names of subrecords in this collection.

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

Bases: FormIDRecord

Data (Ability).

Methods:

unparse()

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

unparse()[source]

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

Return type

bytes

class DATAEntryPoint(entry_point, function, perk_condition_tab_count)[source]

Bases: StructRecord

Data (Quest + Stage).

Parameters
  • entry_point (int)

  • function (int)

  • perk_condition_tab_count (int)

Attributes:

entry_point

function

perk_condition_tab_count

Methods:

get_field_names()

Returns a list of attributes on this class in the order they should be packed.

get_struct_and_size()

Returns the pack/unpack struct string and the corresponding size.

unparse()

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

entry_point

Type:    int

function

Type:    int

static get_field_names()[source]

Returns a list of attributes on this class in the order they should be packed.

Return type

Tuple[str, …]

static get_struct_and_size()[source]

Returns the pack/unpack struct string and the corresponding size.

Return type

Tuple[str, int]

perk_condition_tab_count

Type:    int

unparse()[source]

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

Return type

bytes

class DATAQuestStage(quest, quest_stage, unused)[source]

Bases: StructRecord

Data (Quest + Stage).

Parameters

Methods:

get_field_names()

Returns a list of attributes on this class in the order they should be packed.

get_struct_and_size()

Returns the pack/unpack struct string and the corresponding size.

unparse()

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

Attributes:

quest

Form ID of a QUST record.

quest_stage

unused

static get_field_names()[source]

Returns a list of attributes on this class in the order they should be packed.

Return type

Tuple[str, …]

static get_struct_and_size()[source]

Returns the pack/unpack struct string and the corresponding size.

Return type

Tuple[str, int]

quest

Type:    bytes

Form ID of a QUST record.

quest_stage

Type:    int

unparse()[source]

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

Return type

bytes

unused

Type:    bytes

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

Bases: CStringRecord

Button Label.

class EPF3(*args, **kwargs)[source]

Bases: Uint16Record

Script Flags.

See https://tes5edit.github.io/fopdoc/Fallout3/Records/PERK.html

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

Bases: FormIDRecord

Entry Point Function Data.

May be a uint8[] or float32 or formid or null

class EPFT(*args, **kwargs)[source]

Bases: Uint8Record

Entry Point Function Type.

Determines the data type of the EPFD record - see https://tes5edit.github.io/fopdoc/Fallout3/Records/PERK.html

class PRKC(*args, **kwargs)[source]

Bases: Int8Record

Run On.

class PRKE(type, rank, priority)[source]

Bases: StructRecord

Effect subrecord header.

Parameters

Methods:

get_field_names()

Returns a list of attributes on this class in the order they should be packed.

get_struct_and_size()

Returns the pack/unpack struct string and the corresponding size.

Attributes:

priority

rank

type

static get_field_names()[source]

Returns a list of attributes on this class in the order they should be packed.

Return type

Tuple[str, …]

static get_struct_and_size()[source]

Returns the pack/unpack struct string and the corresponding size.

Return type

Tuple[str, int]

priority

Type:    int

rank

Type:    int

type

Type:    int

class PRKF(*args, **kwargs)[source]

Bases: MarkerRecord

End Marker.

members: typing.Set[bytes] = {b'DATA', b'EPF2', b'EPF3', b'EPFD', b'EPFT', b'PRKC', b'PRKE', b'PRKF'}

Names of subrecords in this collection.