Interface IEntityEffect
Interface to an entity effect.
Assembly: Assembly-CSharp.dll
Syntax
public interface IEntityEffect : IMacroContextProvider
Properties
|
Improve this Doc
View Source
BypassSavingThrows
True if spell effect always lands regardless of saving throws.
Declaration
bool BypassSavingThrows { get; }
Property Value
|
Improve this Doc
View Source
Caster
Gets the caster entity behaviour of this effect (can return null).
Declaration
DaggerfallEntityBehaviour Caster { get; }
Property Value
|
Improve this Doc
View Source
ChanceSuccess
Gets flag stating if effect passed a chance check on start.
If always false if effect does not support chance component.
Declaration
bool ChanceSuccess { get; }
Property Value
|
Improve this Doc
View Source
CurrentVariant
Sets current variant for multi-effects.
Declaration
int CurrentVariant { get; set; }
Property Value
|
Improve this Doc
View Source
DisplayName
Gets display name from properties or construct one from Group+SubGroup text in properties.
This allows effects to set a custom display name or just roll with automatic names.
Daggerfall appears to use first token of spellmaker/spellbook description, but we want more control for effect mods.
Declaration
string DisplayName { get; }
Property Value
|
Improve this Doc
View Source
EnchantmentParam
Gets or sets enchantment param for enchantment effects.
If this property is null then effect is not a live enchantment.
Declaration
EnchantmentParam? EnchantmentParam { get; set; }
Property Value
|
Improve this Doc
View Source
GroupName
Group display name (used by crafting stations).
Declaration
string GroupName { get; }
Property Value
|
Improve this Doc
View Source
HasEnded
True if effect has ended by calling End();
Declaration
Property Value
|
Improve this Doc
View Source
Key
Gets key from properties.
Declaration
Property Value
|
Improve this Doc
View Source
ParentBundle
Gets or sets parent bundle for this effect.
Will be null for template effects.
Declaration
LiveEffectBundle ParentBundle { get; set; }
Property Value
|
Improve this Doc
View Source
PotionProperties
Gets effect potion properties (if any).
Declaration
PotionProperties PotionProperties { get; }
Property Value
|
Improve this Doc
View Source
Properties
Declaration
EffectProperties Properties { get; }
Property Value
|
Improve this Doc
View Source
ResistanceMods
Gets array DaggerfallResistances.Count items wide.
Array items represent Fire, Cold, Poison/Disease, Shock, Magic.
Effect implementation should set modifier values for resistances when part of payload.
For example, a "Resist Fire" effect would set the current modifier for Fire resistance (such as +30 to Fire resistance).
Use (int)DFCareer.Resistances.ResistanceName to get index.
Declaration
int[] ResistanceMods { get; }
Property Value
|
Improve this Doc
View Source
RoundsRemaining
Gets or sets number of magic rounds remaining.
Declaration
int RoundsRemaining { get; set; }
Property Value
|
Improve this Doc
View Source
Settings
Gets or sets current effect settings.
Declaration
EffectSettings Settings { get; set; }
Property Value
|
Improve this Doc
View Source
SkillMods
Get array DaggerfallSkills.Count items wide.
Array items represent Medical, Etiquette, Streetwise, etc.
Effect implementation should set modifier values for skills when part of payload.
For example, a "Tongues" effect would set the current modifier for all language skills (such as +5 to Dragonish, +5 to Giantish, and so on).
Use (int)DFCareer.Skills.SkillName to get index.
Declaration
Property Value
|
Improve this Doc
View Source
SpellBookDescription
Description for spellbook.
Declaration
TextFile.Token[] SpellBookDescription { get; }
Property Value
|
Improve this Doc
View Source
SpellMakerDescription
Description for spellmaker.
Declaration
TextFile.Token[] SpellMakerDescription { get; }
Property Value
|
Improve this Doc
View Source
StatMaxMods
Gets array DaggerfallStats.Count items wide.
Array items represent Strength, Intelligence, Willpower, etc.
Allows an effect to temporarily override stat maximum value.
Declaration
int[] StatMaxMods { get; }
Property Value
|
Improve this Doc
View Source
StatMods
Gets array DaggerfallStats.Count items wide.
Array items represent Strength, Intelligence, Willpower, etc.
Effect implementation should set modifier values for stats when part of payload.
For example, a "Damage Strength" effect would set the current modifier for Strength (such as -5 to Strength).
Use (int)DFCareer.State.StatName to get index.
Declaration
Property Value
|
Improve this Doc
View Source
SubGroupName
SubGroup display name (used by crafting stations).
Declaration
string SubGroupName { get; }
Property Value
|
Improve this Doc
View Source
VariantCount
Gets total number of variants for multi-effects.
Declaration
int VariantCount { get; }
Property Value
Methods
|
Improve this Doc
View Source
ConstantEffect()
Use this for work performed every frame.
Declaration
|
Improve this Doc
View Source
EnchantmentPayloadCallback(EnchantmentPayloadFlags, Nullable<EnchantmentParam>, DaggerfallEntityBehaviour, DaggerfallEntityBehaviour, DaggerfallUnityItem, Int32)
Enchantment payload callback for enchantment to perform custom execution based on context.
These callbacks are performed directly from template, not from a live instance of effect. Do not store state in effect during callbacks.
Not used by EnchantmentPayloadFlags.Held - rather, an effect instance bundle is assigned to entity's effect manager to execute as normal.
Declaration
PayloadCallbackResults? EnchantmentPayloadCallback(EnchantmentPayloadFlags context, EnchantmentParam? param = null, DaggerfallEntityBehaviour sourceEntity = null, DaggerfallEntityBehaviour targetEntity = null, DaggerfallUnityItem sourceItem = null, int sourceDamage = 0)
Parameters
Returns
|
Improve this Doc
View Source
End()
Called when bundle lifetime is at an end.
Use this for any wrap-up work.
Declaration
|
Improve this Doc
View Source
GetEnchantmentSettings()
Gets array of enchantment settings supported by this effect.
Can return a null or empty array, especially if effect not an enchantment.
Declaration
EnchantmentSettings[] GetEnchantmentSettings()
Returns
|
Improve this Doc
View Source
GetEnchantmentSettings(EnchantmentParam)
Helper to get a specific enchantment setting based on param.
Can return null if enchantment with param not found.
Declaration
EnchantmentSettings? GetEnchantmentSettings(EnchantmentParam param)
Parameters
Returns
|
Improve this Doc
View Source
GetForcedEnchantments(Nullable<EnchantmentParam>)
Gets related enchantments that will be forced onto item along with this enchantment.
Only used by Soul Bound in classic gameplay.
Declaration
ForcedEnchantmentSet? GetForcedEnchantments(EnchantmentParam? param = null)
Parameters
Returns
|
Improve this Doc
View Source
GetSaveData()
Get effect state data to serialize.
Declaration
Returns
|
Improve this Doc
View Source
HasEnchantmentPayloadFlags(EnchantmentPayloadFlags)
Helper to check if properties contain the specified enchantment payload flags
Declaration
bool HasEnchantmentPayloadFlags(EnchantmentPayloadFlags flags)
Parameters
Returns
|
Improve this Doc
View Source
HasItemMakerFlags(ItemMakerFlags)
Helper to check if properties contain the specified item maker flags.
Declaration
bool HasItemMakerFlags(ItemMakerFlags flags)
Parameters
Returns
|
Improve this Doc
View Source
IsEnchantmentExclusiveTo(EnchantmentSettings[], Nullable<EnchantmentParam>)
Enchantment can flag that it is exclusive to one or more enchantments in array provided.
Used by enchanting window to prevent certain enchantments from being selected together.
Declaration
bool IsEnchantmentExclusiveTo(EnchantmentSettings[] settingsToTest, EnchantmentParam? comparerParam = null)
Parameters
Returns
|
Improve this Doc
View Source
MagicRound()
Use this for any work performed every magic round.
Declaration
|
Improve this Doc
View Source
RestoreSaveData(Object)
Restore effect state from serialized data.
Declaration
void RestoreSaveData(object dataIn)
Parameters
Type |
Name |
Description |
Object |
dataIn |
|
|
Improve this Doc
View Source
Resume(EntityEffectManager.EffectSaveData_v1, EntityEffectManager, DaggerfallEntityBehaviour)
Called by an EntityEffect manage when parent bundle is resumed from save.
Declaration
void Resume(EntityEffectManager.EffectSaveData_v1 effectData, EntityEffectManager manager, DaggerfallEntityBehaviour caster = null)
Parameters
|
Improve this Doc
View Source
RollChance()
Perform a chance roll on this effect based on chance settings.
Can be used by custom chance effects that need to roll chance other than at start.
Declaration
Returns
|
Improve this Doc
View Source
Start(EntityEffectManager, DaggerfallEntityBehaviour)
Called by an EntityEffectManager when parent bundle is attached to host entity.
Use this for setup or immediate work performed only once.
Declaration
void Start(EntityEffectManager manager, DaggerfallEntityBehaviour caster = null)
Parameters