Spell - powerof3/PapyrusExtenderSSE GitHub Wiki

Getters

GetSpellType

Type Value
None -1
Spell 0
Disease 1
Power 2
LesserPower 3
Ability 4
Poison 5
Enchantment 6
Potion 7
Ingredient 8
LeveledSpell 9
Addiction 10
Voice 11
  • Returns spell type.
int Function GetSpellType(Spell akSpell) global native

Setters

AddMagicEffectToSpell

  • Condition format : ConditionItemObject | Function ID | parameter 1 | parameter 2 | OPCode | float | ANDOR
  • eg. "Subject | HasMagicEffectKeyword | 0001EA6F ~ Skyrim.esm | NONE | == | 0.0 | AND"
  • Conditions which have no parameters (eg. IsSneaking) / take in forms (GetIsRace) work
  • Conditions which accept int/float/strings are skipped
Function AddMagicEffectToSpell(Spell akSpell, MagicEffect akMagicEffect, float afMagnitude, int aiArea, int aiDuration, float afCost = 0.0, String[] asConditionList) global native

AddEffectItemToSpell

  • Adds effectitem from spell to target spell, at given index. Same as above function, but less verbose, and preserves all conditions.
Function AddEffectItemToSpell(Spell akSpell, Spell akSpellToCopyFrom, int aiIndex, float afCost = -1.0) global native

RemoveMagicEffectFromSpell

  • Removes magic effect from spell that matches magnitude/area/duration/cost.
Function RemoveMagicEffectFromSpell(Spell akSpell, MagicEffect akMagicEffect, float afMagnitude, int aiArea, int aiDuration, float afCost = 0.0) global native

RemoveEffectItemFromSpell

  • Removes effectitem from spell that matches spell at index.
Function RemoveEffectItemFromSpell(Spell akSpell, Spell akSpellToMatchFrom, int aiIndex) global native

SetSpellCastingType

  • Sets casting type of spell (and all attached magic effects)
  • See Casting Type for list of casting types
Function SetSpellCastingType(Spell akSpell, int aiType) global native

SetSpellDeliveryType

  • Sets delivery type of spell (and all attached magic effects)
  • See Delivery Type for list of delivery types
Function SetSpellDeliveryType(Spell akSpell, int aiType) global native

SetSpellMagicEffect

Function SetSpellMagicEffect(Spell akSpell, MagicEffect akMagicEffect, int aiIndex) global native