ANDR PapyrusFunctions Script

From the CreationKit Wiki
Jump to navigation Jump to search


Collection of various global functions, added by AndrealletiusVIII in this mod: https://www.nexusmods.com/skyrimspecialedition/mods/85252. (These global functions require SKSE.)

Definition

scriptName ANDR_PapyrusFunctions hidden

Properties

None

SKSE Global Functions

String GetAndrealphusExtenderVersion()
  • Returns the current installed version of Andrealletius' Papyrus Functions as a string. (e.g.: "1.5.2")
String GetBookText(Book akBook)
  • Returns the body text of a book as a string.
Int GetCurrentBookPage()
  • When in the book menu, returns the current page of the book as an Int. If not in the book menu, returns -1.
TopicInfo GetCurrentDialogueTopic()
  • Returns the TopicInfo that is currently being said by an NPC. If no NPC is speaking, returns None.
Book GetOpenedBook()
  • When in the book menu, returns the currently opened book in the book menu. If not in book menu, returns None.
CastEnchantment(Actor akSource, Enchantment akEnchantment, Actor akTarget)
  • Casts this enchantment's effects from the specified actor, to a target actor.
CastIngredient(Actor akSource, Potion akPotion, Actor akTarget)
  • Casts this ingredient's effects from the specified actor, to a target actor.
CastPotion(Actor akSource, Potion akPotion, Actor akTarget)
  • Casts this potion's effects from the specified actor, to a target actor.
CastSpellFromPointToPoint(Actor akSource, Spell akSpell, Float StartPoint_X, Float StartPoint_Y, Float StartPoint_Z, Float EndPoint_X, Float EndPoint_Y, Float EndPoint_Z)
  • Have an actor cast a spell from a certain point (x, y and z coordinates) to another point (x, y and z coordinates).
CastSpellFromRef(Actor akSource, Spell akSpell, ObjectReference akTarget, ObjectReference akOriginRef)
  • Have an actor cast a spell from one ref to another ref.
ActiveMagicEffect GetActiveMagicEffectFromActor(Actor akActor, MagicEffect akMagicEffect)
  • Gets an Active Magic Effect instance from the specified actor.
Float GetEffectiveEnchantmentCost(Actor akSource, Enchantment akEnchantment)
  • Returns the effective enchantment cost of the given enchantment for the given caster.
Float GetEffectiveIngredientCost(Actor akSource, Ingredient akIngredient)
  • Returns the effective effects cost of the given ingredient for the given caster.
Float GetEffectivePotionCost(Actor akSource, Potion akPotion)
  • Returns the effective effects cost of the given potion for the given caster.
Float GetEffectiveScrollCost(Actor akSource, Scroll akScroll)
  • Returns the effective effects cost of the given scroll for the given caster.
LaunchAmmo(Actor akCaster, Ammo akAmmo, Weapon akWeapon, String sNodeName = "", ObjectReference akTarget = None, Projectile akProjectile, ObjectReference OriginSecondRef = None)
  • Have an actor launch a piece of ammunition to a target.
LaunchMagicSpell(Actor akCaster, Spell akSpell, String sNodeName = "", ObjectReference akTarget = None, Projectile akProjectile, ObjectReference OriginSecondRef = None)
  • Have an actor launch a spell to a target.
Int MakeDiceRoll(int iNumberOfDice, int iNumberOfSides, int iModifier = 0)
  • Rolls a certain number of dies, with an optional modifier, and returns the result as an Int.
MoveRefToCrosshairLoc(Actor akActor, ObjectReference markerRef, float fDistance, float fHeight, bool UseLeftRightOffsets = false, bool isLeft = false)
  • Move the specified markerRef at the crosshair location.

Member Functions

None

Events

OnBookFullyRead()
  • Event that gets triggered after being on the last page of a book for 10 seconds, aka "fully read".