Table of Contents

Class SpellScript

Namespace
SkyrimForge.Papyrus
Assembly
SkyrimForge.Game.dll

Functions and comments from Spell.psc.

public static class SpellScript
Inheritance
SpellScript
Inherited Members

Properties

Dispatcher

The dispatcher that binds this script to a form and calls the functions and properties that have no generated member.

public static PapyrusScriptDispatcher Dispatcher { get; }

Property Value

PapyrusScriptDispatcher

Methods

Cast<T>(PapyrusScript<T>, IObjectReference, IObjectReference?)

Cast this spell from an ObjectReference, optionally toward another.

public static Task Cast<T>(this PapyrusScript<T> self, IObjectReference akSource, IObjectReference? akTarget = null) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>
akSource IObjectReference
akTarget IObjectReference

Returns

Task

Type Parameters

T

GetCastTime<T>(PapyrusScript<T>)

SKSE64 additions built 2024-01-17 20:01:40.731000 UTC return the casting time

public static Task<float> GetCastTime<T>(this PapyrusScript<T> self) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>

Returns

Task<float>

Type Parameters

T

GetCostliestEffectIndex<T>(PapyrusScript<T>)

return the index of the costliest effect

public static Task<int> GetCostliestEffectIndex<T>(this PapyrusScript<T> self) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>

Returns

Task<int>

Type Parameters

T

GetEffectAreas<T>(PapyrusScript<T>)

Returns all the areas of this object in order

public static Task<int[]> GetEffectAreas<T>(this PapyrusScript<T> self) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>

Returns

Task<int[]>

Type Parameters

T

GetEffectDurations<T>(PapyrusScript<T>)

Returns all the durations of this object in order

public static Task<int[]> GetEffectDurations<T>(this PapyrusScript<T> self) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>

Returns

Task<int[]>

Type Parameters

T

GetEffectMagnitudes<T>(PapyrusScript<T>)

Returns all the magnitudes of this object in order

public static Task<float[]> GetEffectMagnitudes<T>(this PapyrusScript<T> self) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>

Returns

Task<float[]>

Type Parameters

T

GetEffectiveMagickaCost<T>(PapyrusScript<T>, IActor)

return the effective magicka cost of the spell for given caster

[Obsolete("Uses the Papyrus virtual machine. Prefer MagicItem.CalculateMagickaCost(Actor).", DiagnosticId = "SKYRIMFORGE0002")]
public static Task<int> GetEffectiveMagickaCost<T>(this PapyrusScript<T> self, IActor caster) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>
caster IActor

Returns

Task<int>

Type Parameters

T

GetEquipType<T>(PapyrusScript<T>)

public static Task<EquipSlot?> GetEquipType<T>(this PapyrusScript<T> self) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>

Returns

Task<EquipSlot?>

Type Parameters

T

GetMagicEffects<T>(PapyrusScript<T>)

Returns all the magic effects of this object in order

public static Task<MagicEffect[]> GetMagicEffects<T>(this PapyrusScript<T> self) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>

Returns

Task<MagicEffect[]>

Type Parameters

T

GetMagickaCost<T>(PapyrusScript<T>)

return the base magicka cost of the spell

public static Task<int> GetMagickaCost<T>(this PapyrusScript<T> self) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>

Returns

Task<int>

Type Parameters

T

GetNthEffectArea<T>(PapyrusScript<T>, int)

return the area of the specified effect

public static Task<int> GetNthEffectArea<T>(this PapyrusScript<T> self, int index) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>
index int

Returns

Task<int>

Type Parameters

T

GetNthEffectDuration<T>(PapyrusScript<T>, int)

return the duration of the specified effect

public static Task<int> GetNthEffectDuration<T>(this PapyrusScript<T> self, int index) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>
index int

Returns

Task<int>

Type Parameters

T

GetNthEffectMagicEffect<T>(PapyrusScript<T>, int)

return the magic effect of the specified effect

public static Task<MagicEffect?> GetNthEffectMagicEffect<T>(this PapyrusScript<T> self, int index) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>
index int

Returns

Task<MagicEffect?>

Type Parameters

T

GetNthEffectMagnitude<T>(PapyrusScript<T>, int)

return the magnitude of the specified effect

public static Task<float> GetNthEffectMagnitude<T>(this PapyrusScript<T> self, int index) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>
index int

Returns

Task<float>

Type Parameters

T

GetNumEffects<T>(PapyrusScript<T>)

return the number of the effects

public static Task<int> GetNumEffects<T>(this PapyrusScript<T> self) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>

Returns

Task<int>

Type Parameters

T

GetPerk<T>(PapyrusScript<T>)

return the perk associated with the spell

public static Task<Perk?> GetPerk<T>(this PapyrusScript<T> self) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>

Returns

Task<Perk?>

Type Parameters

T

IsHostile<T>(PapyrusScript<T>)

Is this spell classified as hostile?

public static Task<bool> IsHostile<T>(this PapyrusScript<T> self) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>

Returns

Task<bool>

Type Parameters

T

Preload<T>(PapyrusScript<T>)

Preload the art for this spell. Useful for spells you equip & unequip on the player. Warning: Misuse of this function can lead to erroneous behavior as well as excessive memory consumption. It's best to avoid using this. This function will likely be deprecated in the future.

public static Task Preload<T>(this PapyrusScript<T> self) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>

Returns

Task

Type Parameters

T

RemoteCast<T>(PapyrusScript<T>, IObjectReference, IActor, IObjectReference?)

Cast this spell from an ObjectReference, optionally toward another, and blame it on a particular actor.

public static Task RemoteCast<T>(this PapyrusScript<T> self, IObjectReference akSource, IActor akBlameActor, IObjectReference? akTarget = null) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>
akSource IObjectReference
akBlameActor IActor
akTarget IObjectReference

Returns

Task

Type Parameters

T

SetEquipType<T>(PapyrusScript<T>, EquipSlot)

public static Task SetEquipType<T>(this PapyrusScript<T> self, EquipSlot type) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>
type EquipSlot

Returns

Task

Type Parameters

T

SetNthEffectArea<T>(PapyrusScript<T>, int, int)

sets the area of the specified effect

public static Task SetNthEffectArea<T>(this PapyrusScript<T> self, int index, int value) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>
index int
value int

Returns

Task

Type Parameters

T

SetNthEffectDuration<T>(PapyrusScript<T>, int, int)

sets the duration of the specified effect

public static Task SetNthEffectDuration<T>(this PapyrusScript<T> self, int index, int value) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>
index int
value int

Returns

Task

Type Parameters

T

SetNthEffectMagnitude<T>(PapyrusScript<T>, int, float)

sets the magnitude of the specified effect

public static Task SetNthEffectMagnitude<T>(this PapyrusScript<T> self, int index, float value) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>
index int
value float

Returns

Task

Type Parameters

T

Unload<T>(PapyrusScript<T>)

Unload the art for this spell. Call this only if you've previously called Preload. Warning: Misuse of this function can lead to erroneous behavior including spell art being unloaded while in use, and excessive memory consumption. It's best to avoid using this. This function will likely be deprecated in the future.

public static Task Unload<T>(this PapyrusScript<T> self) where T : notnull, IPapyrusSpell

Parameters

self PapyrusScript<T>

Returns

Task

Type Parameters

T