ANDR PapyrusFunctions Script: Difference between revisions

From the CreationKit Wiki
Jump to navigation Jump to search
(1.10.0 update of APF)
(Added GetCollisionLayerFromRef())
 
Line 51: Line 51:
:'''ActiveMagicEffect [[GetActiveMagicEffectFromActor - ANDR_PapyrusFunctions|GetActiveMagicEffectFromActor]](Actor ''akActor'', MagicEffect ''akMagicEffect'')
:'''ActiveMagicEffect [[GetActiveMagicEffectFromActor - ANDR_PapyrusFunctions|GetActiveMagicEffectFromActor]](Actor ''akActor'', MagicEffect ''akMagicEffect'')
:*Gets an Active Magic Effect instance from the specified actor.  
:*Gets an Active Magic Effect instance from the specified actor.  
:'''Int [[GetCollisionLayerFromRef - ANDR_PapyrusFunctions|GetCollisionLayerFromRef]](ObjectReference ''akRef'')
:*Returns the integer of the collision layer of mesh of akRef.


:'''Float [[GetEffectiveEnchantmentCost - ANDR_PapyrusFunctions|GetEffectiveEnchantmentCost]](Actor ''akSource'', Enchantment ''akEnchantment'')'''
:'''Float [[GetEffectiveEnchantmentCost - ANDR_PapyrusFunctions|GetEffectiveEnchantmentCost]](Actor ''akSource'', Enchantment ''akEnchantment'')'''

Latest revision as of 11:16, 27 October 2026


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

Definition[edit | edit source]

scriptName ANDR_PapyrusFunctions hidden

Properties[edit | edit source]

None

SKSE Global Functions[edit | edit source]

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 GetCurrentTopicInfo()
  • Returns the TopicInfo that is currently being said by an NPC while in the dialogue menu. If not in the dialogue menu, 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.
ObjectReference GetOpenedContainerRef()
  • When in the container menu, returns the currently opened container ref. If not in the container 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.
Int GetCollisionLayerFromRef(ObjectReference akRef)
  • Returns the integer of the collision layer of mesh of akRef.
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.
Bool ApplyCommandEffect(Actor akCaster, Actor akTarget)
  • Makes akTarget a commanded actor of akCaster, so it follows and fights for them. Unlike vanilla, works on living, non-summoned actors and for non-player casters.
EndCommandEffect(Actor akCaster, Actor akTarget)
  • Releases akTarget from akCaster's command. Does nothing if akCaster is not the actor currently commanding akTarget.
Int GetFactionCrimeGoldValue(Faction CrimeFaction, int iCrimeType)
  • Returns the amount of gold a certain crime will result in, in a particular crime faction.

Member Functions[edit | edit source]

None

Events[edit | edit source]

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