MGEF Record – Base Effect

MGEF record type.

Classes:

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

Magic Effect.

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

Bases: Record

Magic Effect.

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(flags, base_cost, associated_item, ...)

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(flags, base_cost, associated_item, magic_school, resistance_type, unknown, unused, light, projectile_speed, effect_shader, object_display_shader, effect_sound, bold_sound, hit_sound, area_sound, constant_effect_enchantment_factor, constant_effect_barter_factor, archtype, actor_value)[source]

Bases: StructRecord

Data.

Parameters
  • flags (int)

  • base_cost (float)

  • associated_item (bytes) – A form ID

  • magic_school (int) – Unused. A value of -1 means none.

  • resistance_type (int)

  • unknown (int)

  • unused (bytes)

  • light (bytes) – Form ID of a LIGH record, or null.

  • projectile_speed (float)

  • effect_shader (bytes) – Form ID of an EFSH record, or null.

  • object_display_shader (bytes) – Form ID of an EFSH record, or null.

  • effect_sound (bytes) – Form ID of an SOUN record, or null.

  • bold_sound (bytes) – Form ID of an SOUN record, or null.

  • hit_sound (bytes) – Form ID of an SOUN record, or null.

  • area_sound (bytes) – Form ID of an SOUN record, or null.

  • constant_effect_enchantment_factor (float) – Unused.

  • constant_effect_barter_factor (float) – Unused.

  • archtype (int)

  • actor_value (int)

Attributes:

actor_value

archtype

area_sound

Form ID of an SOUN record, or null.

associated_item

A form ID

base_cost

bold_sound

Form ID of an SOUN record, or null.

constant_effect_barter_factor

Unused.

constant_effect_enchantment_factor

Unused.

effect_shader

Form ID of an EFSH record, or null.

effect_sound

Form ID of an SOUN record, or null.

flags

hit_sound

Form ID of an SOUN record, or null.

light

Form ID of a LIGH record, or null.

magic_school

Unused.

object_display_shader

Form ID of an EFSH record, or null.

projectile_speed

resistance_type

unknown

unused

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.

actor_value

Type:    int

archtype

Type:    int

area_sound

Type:    bytes

Form ID of an SOUN record, or null.

associated_item

Type:    bytes

A form ID

base_cost

Type:    float

bold_sound

Type:    bytes

Form ID of an SOUN record, or null.

constant_effect_barter_factor

Type:    float

Unused.

constant_effect_enchantment_factor

Type:    float

Unused.

effect_shader

Type:    bytes

Form ID of an EFSH record, or null.

effect_sound

Type:    bytes

Form ID of an SOUN record, or null.

flags

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]

hit_sound

Type:    bytes

Form ID of an SOUN record, or null.

light

Type:    bytes

Form ID of a LIGH record, or null.

magic_school

Type:    int

Unused. A value of -1 means none.

object_display_shader

Type:    bytes

Form ID of an EFSH record, or null.

projectile_speed

Type:    float

resistance_type

Type:    int

unknown

Type:    int

unused

Type:    bytes

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