LVLI Record – Leveled Item

LVLI record type.

Classes:

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

Leveled Item.

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

Bases: Record

Leveled Item.

Parameters
  • flags (int)

  • id (bytes)

  • revision (int) – Default 0.

  • version (int) – Default 15.

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

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

Classes:

LVLD(*args, **kwargs)

Chance.

LVLF(*args, **kwargs)

Flags.

LVLG([cstring])

Global.

LVLO(level, unused, reference, count, unused_)

Levelled list base data.

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 LVLD(*args, **kwargs)[source]

Bases: Uint8Record

Chance.

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

Bases: Uint8Record

Flags.

See below for values.

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

Bases: FormIDRecord

Global.

Form ID of a GLOB record.

class LVLO(level, unused, reference, count, unused_)[source]

Bases: StructRecord

Levelled list base data.

Parameters

Attributes:

count

level

reference

Form ID of an ARMO, AMMO, MISC, WEAP, BOOK, LVLI, KEYM, ALCH, NOTE, IMOD, CMNY, CCRD or CHIP record.

unused

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.

count

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]

level

Type:    int

reference

Type:    bytes

Form ID of an ARMO, AMMO, MISC, WEAP, BOOK, LVLI, KEYM, ALCH, NOTE, IMOD, CMNY, CCRD or CHIP record.

unused

Type:    bytes

unused_

Type:    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