Class DaggerfallEntity
Base entity type for all living GameObjects in the world.
The Effect system (spells, diseases, etc.) operates on entities.
Inheritance
DaggerfallEntity
Assembly: Assembly-CSharp.dll
Syntax
[Serializable]
public abstract class DaggerfallEntity
Constructors
|
Improve this Doc
View Source
DaggerfallEntity(DaggerfallEntityBehaviour)
Declaration
public DaggerfallEntity(DaggerfallEntityBehaviour entityBehaviour)
Parameters
Fields
|
Improve this Doc
View Source
armorValues
Declaration
protected sbyte[] armorValues
Field Value
|
Improve this Doc
View Source
career
Declaration
protected DFCareer career
Field Value
|
Improve this Doc
View Source
currentBreath
Declaration
protected int currentBreath
Field Value
|
Improve this Doc
View Source
currentFatigue
Declaration
protected int currentFatigue
Field Value
|
Improve this Doc
View Source
currentHealth
Declaration
protected int currentHealth
Field Value
|
Improve this Doc
View Source
currentMagicka
Declaration
protected int currentMagicka
Field Value
|
Improve this Doc
View Source
entityBehaviour
Declaration
protected DaggerfallEntityBehaviour entityBehaviour
Field Value
|
Improve this Doc
View Source
equipTable
Declaration
protected ItemEquipTable equipTable
Field Value
|
Improve this Doc
View Source
FatigueMultiplier
Declaration
public const int FatigueMultiplier = 64
Field Value
|
Improve this Doc
View Source
gender
Declaration
Field Value
|
Improve this Doc
View Source
items
Declaration
protected ItemCollection items
Field Value
|
Improve this Doc
View Source
level
Declaration
Field Value
|
Improve this Doc
View Source
maxHealth
Declaration
Field Value
|
Improve this Doc
View Source
maxMagicka
Declaration
Field Value
|
Improve this Doc
View Source
Declaration
protected WeaponMaterialTypes minMetalToHit
Field Value
|
Improve this Doc
View Source
name
Declaration
Field Value
|
Improve this Doc
View Source
NumberBodyParts
Declaration
public const int NumberBodyParts = 7
Field Value
|
Improve this Doc
View Source
resistances
Declaration
protected DaggerfallResistances resistances
Field Value
|
Improve this Doc
View Source
skills
Declaration
protected DaggerfallSkills skills
Field Value
|
Improve this Doc
View Source
spellbook
Declaration
protected List<EffectBundleSettings> spellbook
Field Value
|
Improve this Doc
View Source
stats
Declaration
protected DaggerfallStats stats
Field Value
|
Improve this Doc
View Source
team
Declaration
protected MobileTeams team
Field Value
|
Improve this Doc
View Source
worldContext
Declaration
protected WorldContext worldContext
Field Value
Properties
|
Improve this Doc
View Source
ArmorValues
Declaration
public sbyte[] ArmorValues { get; set; }
Property Value
|
Improve this Doc
View Source
Career
Declaration
public DFCareer Career { get; set; }
Property Value
|
Improve this Doc
View Source
ChanceToHitModifier
Declaration
public int ChanceToHitModifier { get; }
Property Value
|
Improve this Doc
View Source
CurrentBreath
Declaration
public int CurrentBreath { get; set; }
Property Value
|
Improve this Doc
View Source
CurrentFatigue
Declaration
public int CurrentFatigue { get; set; }
Property Value
|
Improve this Doc
View Source
CurrentHealth
Declaration
public int CurrentHealth { get; set; }
Property Value
|
Improve this Doc
View Source
CurrentHealthPercent
Declaration
public float CurrentHealthPercent { get; }
Property Value
|
Improve this Doc
View Source
CurrentMagicka
Declaration
public int CurrentMagicka { get; set; }
Property Value
|
Improve this Doc
View Source
DamageModifier
Declaration
public int DamageModifier { get; }
Property Value
|
Improve this Doc
View Source
DecreasedArmorValueModifier
Declaration
public int DecreasedArmorValueModifier { get; }
Property Value
|
Improve this Doc
View Source
EntityBehaviour
Gets the DaggerfallEntityBehaviour related to this DaggerfallEntity.
Declaration
public DaggerfallEntityBehaviour EntityBehaviour { get; }
Property Value
|
Improve this Doc
View Source
Gender
Declaration
public Genders Gender { get; set; }
Property Value
|
Improve this Doc
View Source
HealingRateModifier
Declaration
public int HealingRateModifier { get; }
Property Value
|
Improve this Doc
View Source
HitPointsModifier
Declaration
public int HitPointsModifier { get; }
Property Value
|
Improve this Doc
View Source
ImprovedAcuteHearing
Declaration
public bool ImprovedAcuteHearing { get; set; }
Property Value
|
Improve this Doc
View Source
ImprovedAdrenalineRush
Declaration
public bool ImprovedAdrenalineRush { get; set; }
Property Value
|
Improve this Doc
View Source
ImprovedAthleticism
Declaration
public bool ImprovedAthleticism { get; set; }
Property Value
|
Improve this Doc
View Source
IncreasedArmorValueModifier
Declaration
public int IncreasedArmorValueModifier { get; }
Property Value
|
Improve this Doc
View Source
IncreasedWeightAllowanceMultiplier
Declaration
public float IncreasedWeightAllowanceMultiplier { get; }
Property Value
|
Improve this Doc
View Source
IsAbsorbingSpells
Declaration
public bool IsAbsorbingSpells { get; set; }
Property Value
|
Improve this Doc
View Source
IsAShade
True if entity is a shadow (normal or true).
Declaration
public bool IsAShade { get; }
Property Value
|
Improve this Doc
View Source
IsBlending
True if entity is blending (normal or true).
Declaration
public bool IsBlending { get; }
Property Value
|
Improve this Doc
View Source
IsEnhancedClimbing
Declaration
public bool IsEnhancedClimbing { get; set; }
Property Value
|
Improve this Doc
View Source
IsEnhancedJumping
Declaration
public bool IsEnhancedJumping { get; set; }
Property Value
|
Improve this Doc
View Source
IsImmuneToDisease
Declaration
public bool IsImmuneToDisease { get; set; }
Property Value
|
Improve this Doc
View Source
IsImmuneToParalysis
Declaration
public bool IsImmuneToParalysis { get; set; }
Property Value
|
Improve this Doc
View Source
IsInvisible
True if entity is invisible (normal or true).
Declaration
public bool IsInvisible { get; }
Property Value
|
Improve this Doc
View Source
IsMagicallyConcealed
True if entity is magically concealed by invisibility/chameleon/shadow (normal or true).
Declaration
public bool IsMagicallyConcealed { get; }
Property Value
|
Improve this Doc
View Source
IsMagicallyConcealedNormalPower
True if entity is magically concealed by invisibility/chameleon/shadow (normal only).
Declaration
public bool IsMagicallyConcealedNormalPower { get; }
Property Value
|
Improve this Doc
View Source
IsMagicallyConcealedTruePower
True if entity is magically concealed by invisibility/chameleon/shadow (true only).
Declaration
public bool IsMagicallyConcealedTruePower { get; }
Property Value
|
Improve this Doc
View Source
IsParalyzed
Gets or sets paralyzation flag.
Always returns false when isImmuneToParalysis is true.
Each entity type will need to act on paralyzation in their own unique way.
Note: This value is intentionally not serialized. It should only be set by live effects.
Declaration
public bool IsParalyzed { get; set; }
Property Value
|
Improve this Doc
View Source
IsResistingDiseaseOrPoison
Gets or sets resisting disease or poison flag.
Note: This value is intentionally not serialized. It should only be set by live effects.
Declaration
public bool IsResistingDiseaseOrPoison { get; set; }
Property Value
|
Improve this Doc
View Source
IsResistingFire
Gets or sets resisting fire flag.
Note: This value is intentionally not serialized. It should only be set by live effects.
Declaration
public bool IsResistingFire { get; set; }
Property Value
|
Improve this Doc
View Source
IsResistingFrost
Gets or sets resisting frost flag.
Note: This value is intentionally not serialized. It should only be set by live effects.
Declaration
public bool IsResistingFrost { get; set; }
Property Value
|
Improve this Doc
View Source
IsResistingMagic
Gets or sets resisting magic flag.
Note: This value is intentionally not serialized. It should only be set by live effects.
Declaration
public bool IsResistingMagic { get; set; }
Property Value
|
Improve this Doc
View Source
IsResistingShock
Gets or sets resisting shock flag.
Note: This value is intentionally not serialized. It should only be set by live effects.
Declaration
public bool IsResistingShock { get; set; }
Property Value
|
Improve this Doc
View Source
IsSilenced
Declaration
public bool IsSilenced { get; set; }
Property Value
|
Improve this Doc
View Source
IsSlowFalling
Declaration
public bool IsSlowFalling { get; set; }
Property Value
|
Improve this Doc
View Source
IsWaterBreathing
Declaration
public bool IsWaterBreathing { get; set; }
Property Value
|
Improve this Doc
View Source
IsWaterWalking
Declaration
public bool IsWaterWalking { get; set; }
Property Value
|
Improve this Doc
View Source
ItemEquipTable
Declaration
public ItemEquipTable ItemEquipTable { get; }
Property Value
|
Improve this Doc
View Source
Items
Declaration
public ItemCollection Items { get; set; }
Property Value
|
Improve this Doc
View Source
Level
Declaration
public int Level { get; set; }
Property Value
|
Improve this Doc
View Source
MagicalConcealmentFlags
Declaration
public MagicalConcealmentFlags MagicalConcealmentFlags { get; set; }
Property Value
|
Improve this Doc
View Source
MagicResist
Declaration
public int MagicResist { get; }
Property Value
|
Improve this Doc
View Source
MaxBreath
Declaration
public int MaxBreath { get; }
Property Value
|
Improve this Doc
View Source
MaxEncumbrance
Declaration
public int MaxEncumbrance { get; }
Property Value
|
Improve this Doc
View Source
MaxFatigue
Declaration
public int MaxFatigue { get; }
Property Value
|
Improve this Doc
View Source
MaxHealth
Declaration
public int MaxHealth { get; set; }
Property Value
|
Improve this Doc
View Source
MaxHealthLimiter
Declaration
public int MaxHealthLimiter { get; }
Property Value
|
Improve this Doc
View Source
MaxMagicka
Declaration
public int MaxMagicka { get; set; }
Property Value
|
Improve this Doc
View Source
MaxMagickaModifier
Declaration
public int MaxMagickaModifier { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public WeaponMaterialTypes MinMetalToHit { get; set; }
Property Value
|
Improve this Doc
View Source
Name
Declaration
public string Name { get; set; }
Property Value
|
Improve this Doc
View Source
Quiesce
Set true to suppress events during state restore.
Declaration
public bool Quiesce { get; set; }
Property Value
|
Improve this Doc
View Source
RawMaxHealth
Declaration
public int RawMaxHealth { get; }
Property Value
|
Improve this Doc
View Source
RawMaxMagicka
Declaration
public int RawMaxMagicka { get; }
Property Value
|
Improve this Doc
View Source
Resistances
Declaration
public DaggerfallResistances Resistances { get; set; }
Property Value
|
Improve this Doc
View Source
Skills
Declaration
public DaggerfallSkills Skills { get; set; }
Property Value
|
Improve this Doc
View Source
Stats
Declaration
public DaggerfallStats Stats { get; set; }
Property Value
|
Improve this Doc
View Source
Team
Declaration
public MobileTeams Team { get; set; }
Property Value
|
Improve this Doc
View Source
ToHitModifier
Declaration
public int ToHitModifier { get; }
Property Value
|
Improve this Doc
View Source
WorldContext
Gets or sets world context of this entity for floating origin support.
Not required by all systems but this is a nice central place for mobiles.
Declaration
public WorldContext WorldContext { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
AddSpell(EffectBundleSettings)
Declaration
public void AddSpell(EffectBundleSettings spell)
Parameters
|
Improve this Doc
View Source
ChangeChanceToHitModifier(Int32)
Declaration
public void ChangeChanceToHitModifier(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
|
Improve this Doc
View Source
ChangeMaxMagickaModifier(Int32)
Declaration
public void ChangeMaxMagickaModifier(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
|
Improve this Doc
View Source
ClearConstantEffects()
Constant effects are cleared each frame by peered entity effect manager and must be actively set by effects maintaining them.
Declaration
public virtual void ClearConstantEffects()
|
Improve this Doc
View Source
DecreaseFatigue(Int32, Boolean)
Declaration
public int DecreaseFatigue(int amount, bool assignMultiplier = false)
Parameters
Returns
|
Improve this Doc
View Source
DecreaseHealth(Int32)
Declaration
public int DecreaseHealth(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
Returns
|
Improve this Doc
View Source
DecreaseMagicka(Int32)
Declaration
public int DecreaseMagicka(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
Returns
|
Improve this Doc
View Source
DeleteSpell(Int32)
Declaration
public void DeleteSpell(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
|
Improve this Doc
View Source
DeleteTaggedSpells(String)
Declaration
public void DeleteTaggedSpells(string tag)
Parameters
Type |
Name |
Description |
String |
tag |
|
|
Improve this Doc
View Source
DeserializeSpellbook(EffectBundleSettings[])
Declaration
public void DeserializeSpellbook(EffectBundleSettings[] otherSpellbook)
Parameters
|
Improve this Doc
View Source
FillVitalSigns()
Declaration
public void FillVitalSigns()
|
Improve this Doc
View Source
FixedUpdate()
Called by DaggerfallEntityBehaviour at regular intervals.
Declaration
public virtual void FixedUpdate()
|
Improve this Doc
View Source
GetClassCareerTemplate(ClassCareers)
Gets class career template.
Currently read from CLASS??.CFG. Would like to migrate this to a custom JSON format later.
Declaration
public static DFCareer GetClassCareerTemplate(ClassCareers career)
Parameters
Returns
|
Improve this Doc
View Source
GetCustomCareerTemplate(Int32)
Gets the career template for a custom (ie: mod-provided) enemy type
Declaration
public static DFCareer GetCustomCareerTemplate(int enemyId)
Parameters
Type |
Name |
Description |
Int32 |
enemyId |
ID, as defined in EnemyBasics.Enemies
|
Returns
Type |
Description |
DFCareer |
The custom DFCareer template registered for this id, or null
|
|
Improve this Doc
View Source
GetMajorSkills()
Gets list of major skills.
Declaration
public List<DFCareer.Skills> GetMajorSkills()
Returns
|
Improve this Doc
View Source
GetMinorSkills()
Gets list of minor skills.
Declaration
public List<DFCareer.Skills> GetMinorSkills()
Returns
|
Improve this Doc
View Source
GetMiscSkills()
Gets list of miscellaneous skills.
Declaration
public List<DFCareer.Skills> GetMiscSkills()
Returns
|
Improve this Doc
View Source
GetMonsterCareerTemplate(MonsterCareers)
Gets monster career template.
Currently read from MONSTER.BSA. Would like to migrate this to a custom JSON format later.
Declaration
public static DFCareer GetMonsterCareerTemplate(MonsterCareers career)
Parameters
Returns
|
Improve this Doc
View Source
GetPrimarySkills()
Gets list of primary skills.
Declaration
public List<DFCareer.Skills> GetPrimarySkills()
Returns
|
Improve this Doc
View Source
GetRaceGenderAttackSound(Races, Genders, Boolean)
Declaration
public static SoundClips GetRaceGenderAttackSound(Races race, Genders gender, bool isPlayerAttack = false)
Parameters
Returns
|
Improve this Doc
View Source
GetRaceGenderPainSound(Races, Genders, Boolean)
Declaration
public static SoundClips GetRaceGenderPainSound(Races race, Genders gender, bool heavyDamage)
Parameters
Returns
|
Improve this Doc
View Source
GetResistanceChance(DFCareer.Elements)
Gets current total resistance chance for an element.
This is only used when corresponding elemental resistance flag is raised by effect.
Declaration
public int GetResistanceChance(DFCareer.Elements elementType)
Parameters
Type |
Name |
Description |
DFCareer.Elements |
elementType |
Element type to check total resistance value of.
|
Returns
Type |
Description |
Int32 |
Resistance chance for that element.
|
|
Improve this Doc
View Source
GetSpell(Int32, out EffectBundleSettings)
Declaration
public bool GetSpell(int index, out EffectBundleSettings spell)
Parameters
Returns
|
Improve this Doc
View Source
GetSpells()
Declaration
public EffectBundleSettings[] GetSpells()
Returns
|
Improve this Doc
View Source
HasConcealment(MagicalConcealmentFlags)
Helper to check if specific magical concealment flags are active on player.
Declaration
public bool HasConcealment(MagicalConcealmentFlags flags)
Parameters
Returns
Type |
Description |
Boolean |
True if matching.
|
|
Improve this Doc
View Source
HasResistanceFlag(DFCareer.Elements)
Check if entity has a specific resistance flag raised.
Declaration
public bool HasResistanceFlag(DFCareer.Elements elementType)
Parameters
Returns
|
Improve this Doc
View Source
IncreaseFatigue(Int32, Boolean)
Declaration
public int IncreaseFatigue(int amount, bool assignMultiplier = false)
Parameters
Returns
|
Improve this Doc
View Source
IncreaseHealth(Int32)
Declaration
public int IncreaseHealth(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
Returns
|
Improve this Doc
View Source
IncreaseMagicka(Int32)
Declaration
public int IncreaseMagicka(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
Returns
|
Improve this Doc
View Source
RaiseOnDeathEvent()
Declaration
protected void RaiseOnDeathEvent()
|
Improve this Doc
View Source
RaiseResistanceChance(DFCareer.Elements, Int32)
Raise resistance chance total for an element.
This is only used when corresponding element resistance flag is raised by effect.
Resistance chance is reset each frame so multiple effects can contribute to total resistance chance.
Declaration
public void RaiseResistanceChance(DFCareer.Elements elementType, int value)
Parameters
Type |
Name |
Description |
DFCareer.Elements |
elementType |
Element type to raise resistance of.
|
Int32 |
value |
Amount to raise resist chance for element.
|
|
Improve this Doc
View Source
RegisterCustomCareerTemplate(Int32, DFCareer)
Sets the career template for a custom (ie: mod-provided) enemy type.
Declaration
public static void RegisterCustomCareerTemplate(int enemyId, DFCareer career)
Parameters
Type |
Name |
Description |
Int32 |
enemyId |
ID, as defined in EnemyBasics.Enemies
|
DFCareer |
career |
The custom DFCareer template to register
|
|
Improve this Doc
View Source
ResetEntityState()
Called when starting a new game or when a game starts to load.
Used to clear out any state that should not persist to a new game session.
Declaration
protected virtual void ResetEntityState()
|
Improve this Doc
View Source
SerializeSpellbook()
Declaration
public EffectBundleSettings[] SerializeSpellbook()
Returns
|
Improve this Doc
View Source
SetBreath(Int32)
Declaration
public virtual int SetBreath(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
Returns
|
Improve this Doc
View Source
SetDecreasedArmorValueModifier(Int32)
Declaration
public void SetDecreasedArmorValueModifier(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
|
Improve this Doc
View Source
SetEntityDefaults()
Sets entity defaults during scene startup.
Defaults should be overwritten by normal processes such as
character creation, monster instantiation, and save game deserialization.
Declaration
public abstract void SetEntityDefaults()
|
Improve this Doc
View Source
SetFatigue(Int32, Boolean)
Declaration
public virtual int SetFatigue(int amount, bool restoreMode = false)
Parameters
Returns
|
Improve this Doc
View Source
SetHealth(Int32, Boolean)
Declaration
public virtual int SetHealth(int amount, bool restoreMode = false)
Parameters
Returns
|
Improve this Doc
View Source
SetIncreasedArmorValueModifier(Int32)
Declaration
public void SetIncreasedArmorValueModifier(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
|
Improve this Doc
View Source
SetIncreasedWeightAllowanceMultiplier(Single)
Declaration
public void SetIncreasedWeightAllowanceMultiplier(float amount)
Parameters
Type |
Name |
Description |
Single |
amount |
|
|
Improve this Doc
View Source
SetMagicka(Int32, Boolean)
Declaration
public virtual int SetMagicka(int amount, bool restoreMode = false)
Parameters
Returns
|
Improve this Doc
View Source
SetMaxHealthLimiter(Int32)
Declaration
public void SetMaxHealthLimiter(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
|
Improve this Doc
View Source
SetResistanceFlag(DFCareer.Elements, Boolean)
Raise or lower a specific resistance flag.
Declaration
public void SetResistanceFlag(DFCareer.Elements elementType, bool value)
Parameters
|
Improve this Doc
View Source
SetSpell(Int32, EffectBundleSettings)
Declaration
public void SetSpell(int index, EffectBundleSettings spell)
Parameters
|
Improve this Doc
View Source
SortSpellsAlpha()
Declaration
public void SortSpellsAlpha()
|
Improve this Doc
View Source
SortSpellsPointCost()
Declaration
public void SortSpellsPointCost()
|
Improve this Doc
View Source
SpellbookCount()
Declaration
public int SpellbookCount()
Returns
|
Improve this Doc
View Source
SwapSpells(Int32, Int32)
Declaration
public void SwapSpells(int indexA, int indexB)
Parameters
|
Improve this Doc
View Source
TallySkill(DFCareer.Skills, Int16)
Declaration
public virtual void TallySkill(DFCareer.Skills skill, short amount)
Parameters
|
Improve this Doc
View Source
Update(DaggerfallEntityBehaviour)
Called by DaggerfallEntityBehaviour each frame.
Declaration
public virtual void Update(DaggerfallEntityBehaviour sender)
Parameters
|
Improve this Doc
View Source
UpdateEquippedArmorValues(DaggerfallUnityItem, Boolean)
Update armor values after equipping or unequipping a piece of armor.
Declaration
public void UpdateEquippedArmorValues(DaggerfallUnityItem armor, bool equipping)
Parameters
Events
|
Improve this Doc
View Source
OnDeath
Declaration
public event DaggerfallEntity.OnDeathHandler OnDeath
Event Type
|
Improve this Doc
View Source
OnExhausted
Declaration
public event DaggerfallEntity.OnExhaustedHandler OnExhausted
Event Type
|
Improve this Doc
View Source
OnMagickaDepleted
Declaration
public event DaggerfallEntity.OnMagickaDepletedHandler OnMagickaDepleted
Event Type