AMMO Record – Ammunition

AMMO record type.

Classes:

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

Ammunition.

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

Bases: Record

Ammunition.

Parameters
  • flags (int)

  • id (bytes)

  • revision (int) – Default 0.

  • version (int) – Default 15.

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

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

Classes:

DAT2(projectiles_per_shot, projectile, ...)

Data 2.

DATA(speed, flags, unused, value, clip_rounds)

Data.

FULL([cstring])

Name.

ICON([cstring])

Large Icon Filename.

MICO([cstring])

Small Icon FIlename.

ONAM([cstring])

Short Name.

QNAM([cstring])

Abbreviation.

RCIL([cstring])

Ammo Effect.

SCRI([cstring])

Script.

YNAM([cstring])

Sound - Pick Up.

ZNAM([cstring])

Sound - Drop.

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 DAT2(projectiles_per_shot, projectile, weight, consumed_ammo, consumed_percentage)[source]

Bases: StructRecord

Data 2.

Parameters
  • projectiles_per_shot (int)

  • projectile (bytes) – Form ID of a PROJ record, or null.

  • weight (float)

  • consumed_ammo (bytes) – Form ID of an AMMO or MISC record, or null.

  • consumed_percentage (float)

Attributes:

consumed_ammo

Form ID of an AMMO or MISC record, or null.

consumed_percentage

projectile

Form ID of a PROJ record, or null.

projectiles_per_shot

weight

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.

consumed_ammo

Type:    bytes

Form ID of an AMMO or MISC record, or null.

consumed_percentage

Type:    float

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]

projectile

Type:    bytes

Form ID of a PROJ record, or null.

projectiles_per_shot

Type:    int

weight

Type:    float

class DATA(speed, flags, unused, value, clip_rounds)[source]

Bases: StructRecord

Data.

Parameters

Attributes:

clip_rounds

flags

speed

unused

value

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.

clip_rounds

Type:    int

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]

speed

Type:    float

unused

Type:    bytes

value

Type:    int

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.

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

Bases: CStringRecord

Short Name.

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

Bases: CStringRecord

Abbreviation.

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

Bases: FormIDRecord

Ammo Effect.

Form ID of an AMEF record.

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

Bases: FormIDRecord

Script.

Form ID of a SCPT record.

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

Bases: FormIDRecord

Sound - Pick Up.

Form ID of a SOUN record.

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

Bases: FormIDRecord

Sound - Drop.

Form ID of a SOUN record.

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