esp_parser.subrecords
Subrecord types used by multiple records.
Classes:
|
Configuration. |
|
AI Data. |
|
Enum for |
|
Enum for |
|
Enum for |
|
Enum for |
|
Biped Data. |
|
Condition. |
|
DNAM record type for |
Destruction subrecord collection. |
|
|
Enum for |
|
Editor ID. |
|
Effect Subrecord Collection. |
|
Enum for |
|
Subrecords for items. |
|
Subrecords for models. |
|
Object Bounds. |
Subrecord for position/rotation. |
|
|
Subrecords for scripts. |
|
Enum for Skills (e.g. |
|
|
|
Group Combat Reaction. |
-
class
ACBS(flags, fatigue, barter_gold, level_or_level_mult, calc_min, calc_max, speed_multiplier, karma, disposition_base, template_flags)[source] Bases:
RecordTypeConfiguration.
Used by the
CREAandNPC_record types.- Parameters
flags (
int)fatigue (
int)barter_gold (
int)level_or_level_mult (
int) – Level or level multiplier. If the 0x00000080 flag is set, the value is divided by 1000 to give a multiplier.calc_min (
int)calc_max (
int)speed_multiplier (
int)karma (
float) – Karma (Alignment)disposition_base (
int)template_flags (
int)
Attributes:
Karma (Alignment)
Level or level multiplier.
Methods:
parse(raw_bytes)Parse this subrecord.
unparse()Turn this subrecord back into raw bytes for an ESP file.
-
level_or_level_mult Type:
intLevel or level multiplier.
If the 0x00000080 flag is set, the value is divided by 1000 to give a multiplier.
-
class
AIDT(aggression, confidence, energy_level, responsibility, mood, unused, buys_sells_services_flags, teaches, max_training_level, assistance, aggro_radius_behaviour_flags, aggro_radius)[source] Bases:
RecordTypeAI Data.
Used by the
CREAandNPC_record types.- Parameters
aggression (
AidtAggroEnum)confidence (
AidtConfidenceEnum)energy_level (
int)responsibility (
int)mood (
AidtMoodEnum)unused (
bytes)buys_sells_services_flags (
int)teaches (
SkillEnum)max_training_level (
int)assistance (
AidtAssistanceEnum)aggro_radius_behaviour_flags (
int)aggro_radius (
int)
Attributes:
Methods:
parse(raw_bytes)Parse this subrecord.
unparse()Turn this subrecord back into raw bytes for an ESP file.
-
aggression Type:
AidtAggroEnum
-
assistance Type:
AidtAssistanceEnum
-
confidence Type:
AidtConfidenceEnum
-
mood Type:
AidtMoodEnum
-
class
BMDT(biped_flags, general_flags, unused)[source] Bases:
StructRecordBiped Data.
Used in the
ARMOandARMArecord types.Attributes:
Methods:
Returns a list of attributes on this class in the order they should be packed.
Returns the pack/unpack struct string and the corresponding size.
-
static
get_field_names()[source] Returns a list of attributes on this class in the order they should be packed.
-
static
-
class
CTDA(type, unused, comparison_value, function, param1, param2, run_on, reference)[source] Bases:
RecordTypeCondition.
- Parameters
type (
int)unused (
bytes)comparison_value (
bytes) – A form ID or a float32 valuefunction (
int) – Function index.param1 (
bytes) – First parameter to pass to the function.param2 (
bytes) – Second parameter to pass to the function.run_on (
int)reference (
bytes) – A form ID of aACHR,ACRE,REFR,PMISorPGREreference on which to apply the function, or null.
Attributes:
A form ID or a float32 value
Function index.
First parameter to pass to the function.
Second parameter to pass to the function.
A form ID of a
ACHR,ACRE,REFR,PMISorPGREreference on which to apply the function, or null.Methods:
parse(raw_bytes)Parse this subrecord.
unparse()Turn this subrecord back into raw bytes for an ESP file.
-
class
DNAM(ar, flags)[source] Bases:
StructRecordDNAM record type for
ARMAandARMOin Fallout 3 only.In New Vegas
ARMAandARMOhave their own versions.Attributes:
Value is divided by 100.
Methods:
Returns a list of attributes on this class in the order they should be packed.
Returns the pack/unpack struct string and the corresponding size.
-
class
Destruction[source] Bases:
CollectionDestruction subrecord collection.
Classes:
DEST(health, count, flags, unknown)Destruction data header.
DSTD(health_percentage, index, damage_stage, ...)Destruction Stage Data.
DSTF(*args, **kwargs)Stage End Marker.
Attributes:
Names of subrecords in this collection.
-
class
DEST(health, count, flags, unknown)[source] Bases:
RecordTypeDestruction data header.
Attributes:
Methods:
parse(raw_bytes)Parse this subrecord.
unparse()Turn this subrecord back into raw bytes for an ESP file.
-
class
DSTD(health_percentage, index, damage_stage, flags, self_dps, explosion, debris, debris_count)[source] Bases:
RecordTypeDestruction Stage Data.
- Parameters
Attributes:
Form ID of an
DEBRrecord or null.Form ID of an
EXPLrecord or null.Methods:
parse(raw_bytes)Parse this subrecord.
unparse()Turn this subrecord back into raw bytes for an ESP file.
-
class
DSTF(*args, **kwargs)[source] Bases:
MarkerRecordStage End Marker.
-
members:typing.Set[bytes] = {b'DEST', b'DSTD', b'DSTF'} Names of subrecords in this collection.
-
class
-
class
Effect[source] Bases:
CollectionEffect Subrecord Collection.
Classes:
EFID([cstring])Base effect.
EFIT(magnitude, area, duration, type, ...)Effect Data.
EfitTypeEnum(value)Enum for
SPEL.EFIT.Attributes:
Names of subrecords in this collection.
-
class
EFID(cstring: Union[str, bytes] = b'')[source] Bases:
FormIDRecordBase effect.
Form ID of a
MGEFrecord.
-
class
EFIT(magnitude, area, duration, type, actor_value)[source] Bases:
StructRecordEffect Data.
Attributes:
Methods:
Returns a list of attributes on this class in the order they should be packed.
Returns the pack/unpack struct string and the corresponding size.
-
static
get_field_names()[source] Returns a list of attributes on this class in the order they should be packed.
-
static
get_struct_and_size()[source] Returns the pack/unpack struct string and the corresponding size.
-
type Type:
EfitTypeEnum
-
static
-
members:typing.Set[bytes] = {b'EFID', b'EFIT'} Names of subrecords in this collection.
-
class
-
class
Item[source] Bases:
CollectionSubrecords for items.
Classes:
CNTO(item, item_count)Item.
COED(owner, glob_var_req_rank, condition)Extra item data.
Attributes:
Names of subrecords in this collection.
-
namedtuple
CNTO(item, item_count)[source] Bases:
NamedTupleItem.
- Fields
-
namedtuple
COED(owner, glob_var_req_rank, condition)[source] Bases:
NamedTupleExtra item data.
- Fields
owner (
bytes) – Form ID of the owner. Form ID of anNPC_orFACTrecord, or null.glob_var_req_rank (
bytes) – Form ID of aGLOBrecord, an integer representing the required rank, or null. If an integer representing the required rank it will be stored as the 4 bytes of a uint32 (little endian).condition (
float) – Alias for field number 2
-
members:typing.Set[bytes] = {b'CNTO', b'COED'} Names of subrecords in this collection.
-
namedtuple
-
class
Model[source] Bases:
CollectionSubrecords for models.
Classes:
AlternateTexture(name, texture, index)A texture in a
MODS.MO2S([iterable])List of alternate textures (2nd instance).
MO2T([iterable])Texture File Hashes (2nd instance).
MO3S([iterable])List of alternate textures (2nd instance).
MO3T([iterable])Texture File Hashes (3rd instance).
MO4S([iterable])List of alternate textures (2nd instance).
MO4T([iterable])Texture File Hashes (4th instance).
MOD2([cstring])Model Filename (2nd instance).
MOD3([cstring])Model Filename (3rd instance).
MOD4([cstring])Model Filename (4th instance).
MODB([cstring])MODL([cstring])Model Filename.
MODS([iterable])List of alternate textures.
MODT([iterable])Texture File Hashes.
Attributes:
Names of subrecords in this collection.
-
class
AlternateTexture(name, texture, index)[source] Bases:
objectA texture in a
MODS.- Parameters
Attributes:
3D Name
New Texture.
Methods:
pack()Pack the
AlternateTextureto bytes.unpack(raw_bytes)Unpack bytes for the
AlternateTexture.-
pack()[source] Pack the
AlternateTextureto bytes.- Return type
-
classmethod
unpack(raw_bytes)[source] Unpack bytes for the
AlternateTexture.
-
class
MODS(iterable=(), /)[source] Bases:
List[AlternateTexture],RecordTypeList of alternate textures.
Methods:
parse(raw_bytes)Parse this subrecord.
unparse()Turn this subrecord back into raw bytes for an ESP file.
-
class
MODT(iterable=(), /)[source] Bases:
List[int],RecordTypeTexture File Hashes.
Methods:
parse(raw_bytes)Parse this subrecord.
unparse()Turn this subrecord back into raw bytes for an ESP file.
-
members:typing.Set[bytes] = {b'MO2S', b'MO2T', b'MO3S', b'MO3T', b'MO4S', b'MO4T', b'MOD2', b'MOD3', b'MOD4', b'MODB', b'MODL', b'MODS', b'MODT'} Names of subrecords in this collection.
-
class
-
namedtuple
OBND(X1=0, Y1=0, Z1=0, X2=0, Y2=0, Z2=0)[source] Bases:
NamedTupleObject Bounds.
- Fields
-
class
PositionRotation[source] Bases:
objectSubrecord for position/rotation.
Classes:
DATA([xp, yp, zp, xr, yr, zr])Position / Rotation.
-
namedtuple
DATA(xp=0.0, yp=0.0, zp=0.0, xr=0.0, yr=0.0, zr=0.0)[source] Bases:
NamedTuplePosition / Rotation.
- Fields
-
namedtuple
-
class
Script[source] Bases:
objectSubrecords for scripts.
Classes:
SCDA([cstring])Compiled Script Source.
SCHR([unused, ref_count, compiled_size, ...])Basic Script Data.
SCRO([cstring])Reference.
SCRV(*args, **kwargs)Referenced Variable.
SCTX([cstring])Script Source.
SCVR([cstring])Local Variable Name.
SLSD(index[, unused, flags, unused_])Local Variable Data.
-
class
SCDA(cstring: Union[str, bytes] = b'')[source] Bases:
BytesRecordTypeCompiled Script Source.
Methods:
parse(raw_bytes)Parse this subrecord.
unparse()Turn this subrecord back into raw bytes for an ESP file.
-
class
SCHR(unused=b'\x00\x00\x00\x00', ref_count=0, compiled_size=0, variable_count=0, type=0, flags=1)[source] Bases:
RecordTypeBasic Script Data.
- Parameters
Attributes:
Methods:
parse(raw_bytes)Parse this subrecord.
unparse()Turn this subrecord back into raw bytes for an ESP file.
-
class
SCRO(cstring: Union[str, bytes] = b'')[source] Bases:
FormIDRecordReference.
A local variable reference, or the form ID of an
ACTI,DOOR,STAT,FURN,CREA,SPEL,NPC_,CONT,ARMO,AMMO,MISC,WEAP,IMAD,BOOK,KEYM,ALCH,LIGH,QUST,PACK,LVLI,ECZN,EXPL,FLST,IDLM,PMIS,FACT,ACHR,REFR,ACRE,GLOB,DIAL,CELL,SOUN,MGEF,WTHR,CLAS,EFSH,RACE,LVLC,CSTY,WRLD,SCPT,IMGS,MESG,MSTT,MUSC,NOTE,PERK,PGRE,PROJ,LVLN,WATR,ENCH,TREE,TERM,HAIR,EYES,ADDNrecord, or null.
-
class
SCRV(*args, **kwargs)[source] Bases:
Int32RecordReferenced Variable.
-
class
SCTX(cstring: Union[str, bytes] = b'')[source] Bases:
BytesRecordTypeScript Source.
Methods:
parse(raw_bytes)Parse this subrecord.
unparse()Turn this subrecord back into raw bytes for an ESP file.
-
class
SLSD(index, unused=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', flags=1, unused_=b'\x00\x00\x00\x00\x00\x00\x00')[source] Bases:
RecordTypeLocal Variable Data.
- Parameters
Attributes:
Methods:
parse(raw_bytes)Parse this subrecord.
unparse()Turn this subrecord back into raw bytes for an ESP file.
-
class
-
class
XNAM(faction, modifier, group_combat_reaction)[source] Bases:
RecordTypeRelation used for
FACTandRACErecords.- Parameters
modifier (
int)group_combat_reaction (
XnamCombatReactionEnum)
Attributes:
Methods:
parse(raw_bytes)Parse this subrecord.
unparse()Turn this subrecord back into raw bytes for an ESP file.
-
group_combat_reaction Type:
XnamCombatReactionEnum