NPC_ Record – Non-Player Character

NPC_ record type.

Classes:

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

Non-Player Character.

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

Bases: Record

Non-Player Character.

Parameters
  • flags (int)

  • id (bytes)

  • revision (int) – Default 0.

  • version (int) – Default 15.

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

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

Classes:

CNAM([cstring])

Class.

DATA(base_health, strength, perception, ...)

Health and SPECIAL attributes.

DNAM(barter, big_guns, energy_weapons, ...)

Skills.

EAMT(value)

Unarmed Attack Animation.

EITM([cstring])

Unarmed Attack Effect.

ENAM([cstring])

Eyes.

FGGA([iterable])

FaceGen Geometry-Asymmetric.

FGGS([iterable])

FaceGen Geometry-Symmetric.

FGTS([iterable])

FaceGen Texture-Symmetric.

FULL([cstring])

Name.

HCLR([cstring])

Hair Color.

HNAM([cstring])

Hair.

INAM([cstring])

Death Item.

LNAM(*args, **kwargs)

Hair Length.

NAM4(value)

Impact Material Type.

NAM5(*args, **kwargs)

Unknown.

NAM6(*args, **kwargs)

Height.

NAM7(*args, **kwargs)

Weight.

PKID([cstring])

Package.

PNAM([cstring])

Head Part.

RNAM([cstring])

Race.

SCRI([cstring])

Script.

SPLO([cstring])

Actor Effect.

TPLT([cstring])

Template.

VTCK([cstring])

Voice.

ZNAM([cstring])

Combat Style.

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 CNAM(cstring: Union[str, bytes] = b'')[source]

Bases: FormIDRecord

Class.

Form ID of a CLAS record.

namedtuple DATA(base_health, strength, perception, endurance, charisma, intelligence, agility, luck)[source]

Bases: NamedTuple

Health and SPECIAL attributes.

Fields
  1.  base_health (int) – Alias for field number 0

  2.  strength (int) – Alias for field number 1

  3.  perception (int) – Alias for field number 2

  4.  endurance (int) – Alias for field number 3

  5.  charisma (int) – Alias for field number 4

  6.  intelligence (int) – Alias for field number 5

  7.  agility (int) – Alias for field number 6

  8.  luck (int) – Alias for field number 7

classmethod parse(raw_bytes)[source]

Parse this subrecord.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record

Return type

Self

unparse()[source]

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

Return type

bytes

class DNAM(barter, big_guns, energy_weapons, explosives, lockpick, medicine, melee_weapons, repair, science, small_guns, sneak, speech, survival, unarmed, barter_offset, big_guns_offset, energy_weapons_offset, explosives_offset, lockpick_offset, medicine_offset, melee_weapons_offset, repair_offset, science_offset, small_guns_offset, sneak_offset, speech_offset, survival_offset, unarmed_offset)[source]

Bases: StructRecord

Skills.

Parameters
  • barter (int)

  • big_guns (int)

  • energy_weapons (int)

  • explosives (int)

  • lockpick (int)

  • medicine (int)

  • melee_weapons (int)

  • repair (int)

  • science (int)

  • small_guns (int) – ‘Guns’ in Fallout New Vegas

  • sneak (int)

  • speech (int)

  • survival (int) – Unused Throwing skill in Fallout 3

  • unarmed (int)

  • barter_offset (int)

  • big_guns_offset (int)

  • energy_weapons_offset (int)

  • explosives_offset (int)

  • lockpick_offset (int)

  • medicine_offset (int)

  • melee_weapons_offset (int)

  • repair_offset (int)

  • science_offset (int)

  • small_guns_offset (int)

  • sneak_offset (int)

  • speech_offset (int)

  • survival_offset (int) – Unused Throwing skill in Fallout 3

  • unarmed_offset (int)

Attributes:

barter

barter_offset

big_guns

big_guns_offset

energy_weapons

energy_weapons_offset

explosives

explosives_offset

lockpick

lockpick_offset

medicine

medicine_offset

melee_weapons

melee_weapons_offset

repair

repair_offset

science

science_offset

small_guns

'Guns' in Fallout New Vegas

small_guns_offset

sneak

sneak_offset

speech

speech_offset

survival

Unused Throwing skill in Fallout 3

survival_offset

Unused Throwing skill in Fallout 3

unarmed

unarmed_offset

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.

barter

Type:    int

barter_offset

Type:    int

big_guns

Type:    int

big_guns_offset

Type:    int

energy_weapons

Type:    int

energy_weapons_offset

Type:    int

explosives

Type:    int

explosives_offset

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]

lockpick

Type:    int

lockpick_offset

Type:    int

medicine

Type:    int

medicine_offset

Type:    int

melee_weapons

Type:    int

melee_weapons_offset

Type:    int

repair

Type:    int

repair_offset

Type:    int

science

Type:    int

science_offset

Type:    int

small_guns

Type:    int

‘Guns’ in Fallout New Vegas

small_guns_offset

Type:    int

sneak

Type:    int

sneak_offset

Type:    int

speech

Type:    int

speech_offset

Type:    int

survival

Type:    int

Unused Throwing skill in Fallout 3

survival_offset

Type:    int

Unused Throwing skill in Fallout 3

unarmed

Type:    int

unarmed_offset

Type:    int

class EAMT(value)[source]

Bases: IntEnumField

Unarmed Attack Animation.

Methods:

parse(raw_bytes)

Parse this subrecord.

unparse()

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

classmethod parse(raw_bytes)[source]

Parse this subrecord.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record

Return type

Self

unparse()[source]

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

Return type

bytes

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

Bases: FormIDRecord

Unarmed Attack Effect.

Form ID of an ENCH or SPEL.

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

Bases: FormIDRecord

Eyes.

Form ID of a EYES record.

class FGGA(iterable=(), /)[source]

Bases: FaceGenRecord

FaceGen Geometry-Asymmetric.

class FGGS(iterable=(), /)[source]

Bases: FaceGenRecord

FaceGen Geometry-Symmetric.

class FGTS(iterable=(), /)[source]

Bases: FaceGenRecord

FaceGen Texture-Symmetric.

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

Bases: CStringRecord

Name.

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

Bases: BytesRecordType

Hair Color.

RGBA as bytes.

Methods:

parse(raw_bytes)

Parse this subrecord.

unparse()

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

classmethod parse(raw_bytes)[source]

Parse this subrecord.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record

Return type

Self

unparse()[source]

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

Return type

bytes

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

Bases: FormIDRecord

Hair.

Form ID of a HAIR record.

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

Bases: FormIDRecord

Death Item.

Form ID of a LVLI record.

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

Bases: Float32Record

Hair Length.

class NAM4(value)[source]

Bases: IntEnumField

Impact Material Type.

Methods:

parse(raw_bytes)

Parse this subrecord.

unparse()

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

classmethod parse(raw_bytes)[source]

Parse this subrecord.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record

Return type

Self

unparse()[source]

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

Return type

bytes

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

Bases: Uint16Record

Unknown.

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

Bases: Float32Record

Height.

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

Bases: Float32Record

Weight.

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

Bases: FormIDRecord

Package.

Form ID of a PACK record.

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

Bases: FormIDRecord

Head Part.

Form ID of a HDPT record.

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

Bases: FormIDRecord

Race.

Form ID of a RACE.

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

Bases: FormIDRecord

Script.

Form ID of a SCPT record.

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

Bases: FormIDRecord

Actor Effect.

Form ID of a SPEL record.

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

Bases: FormIDRecord

Template.

Form ID of an NPC_ or LVLN record.

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

Bases: FormIDRecord

Voice.

Form ID of a VTYP record.

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

Bases: FormIDRecord

Combat Style.

Form ID of a CSTY 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