Background for Skyrim SE

The ReferenceAlias Script

    The ReferenceAlias script is a part of Skyrim SE’s Papyrus scripting ecosystem. It is included with the base game.

    For this script, the Papyrus index knows about:

    • 53 events
    • 22 functions


    Inheritance Tree

    Properties

    No properties found.

      Events

      • eventOnActivate(ObjectReferenceakActionRef)

        Event received when this reference is activated

      • Event received when this object has moved to an attached cell from a detached one

      • Event received when this object's parent cell is attached

      • Event received when this object's parent cell is detached

      • eventOnCellLoad()

        Event received when every object in this object's parent cell is loaded (TODO: Find restrictions)

      • eventOnClose(ObjectReferenceakActionRef)

        Event received when this object is closed

      • eventOnContainerChanged(ObjectReferenceakNewContainer, ObjectReferenceakOldContainer)

        Event received when this object enters, exits, or changes containers

      • eventOnDestructionStageChanged(intaiOldStage, intaiCurrentStage)

        Event received when this reference's destruction stage has changed

      • Event recieved when this object moves to a detached cell from an attached one

      • eventOnEquipped(ActorakActor)

        Event received when this object is equipped by an actor

      • eventOnGrab()

        Event received when this object is grabbed by the player

      • eventOnHit(ObjectReferenceakAggressor, FormakSource, ProjectileakProjectile, boolabPowerAttack, boolabSneakAttack, boolabBashAttack, boolabHitBlocked)

        Event received when this object is hit by a source (weapon, spell, explosion) or projectile attack

      • eventOnItemAdded(FormakBaseItem, intaiItemCount, ObjectReferenceakItemReference, ObjectReferenceakSourceContainer)

        Event received when an item is added to this object's inventory. If the item is a persistant reference, akItemReference will
        point at it - otherwise the parameter will be None

      • eventOnItemRemoved(FormakBaseItem, intaiItemCount, ObjectReferenceakItemReference, ObjectReferenceakDestContainer)

        Event received when an item is removed from this object's inventory. If the item is a persistant reference, akItemReference
        will point at it - otherwise the parameter will be None

      • eventOnLoad()

        Event recieved when this object is completely loaded - will be fired every time this object is loaded

      • Event received when the lock on this object changes

      • Event received when a magic affect is being applied to this object

      • eventOnOpen(ObjectReferenceakActionRef)

        Event received when this object is opened

      • eventOnRead()

        Event received when this object, if a book, is read

      • eventOnRelease()

        Event received when this object is released by the player

      • eventOnReset()

        Event received when this reference is reset

      • eventOnSell(ActorakSeller)

        Event received when this reference is sold by an actor

      • eventOnSpellCast(FormakSpell)

        Event received when a spell is cast by this object

      • Event received when translation is complete (from a call to TranslateTo)

      • Event received when translation is aborted (from a call to StopTranslateTo)

      • eventOnTrapHit(ObjectReferenceakTarget, floatafXVel, floatafYVel, floatafZVel, floatafXPos, floatafYPos, floatafZPos, intaeMaterial, boolabInitialHit, intaeMotionType)

        Event recieved when this reference hits a target

      • eventOnTrapHitStart(ObjectReferenceakTarget, floatafXVel, floatafYVel, floatafZVel, floatafXPos, floatafYPos, floatafZPos, intaeMaterial, boolabInitialHit, intaeMotionType)

        Event recieved when this starts hitting a target

      • Event recieved when this stops hitting a target

      • eventOnTrigger(ObjectReferenceakActionRef)

        Event received when a this trigger is tripped

      • Event received when this trigger volume is entered

      • Event received when this trigger volume is left

      • eventOnUnequipped(ActorakActor)

        Event received when this object is unequipped by an actor

      • eventOnUnload()

        Event recieved when this object is being unloaded - will be fired every time this object is unloaded

      • eventOnCombatStateChanged(ActorakTarget, intaeCombatState)

        Event that is triggered when this actor's combat state against the target changes
        State is as follows:
        0 - not in combat
        1 - in combat
        2 - searching

      • eventOnSit(ObjectReferenceakFurniture)

        Event that is triggered when this actor sits in the furniture

      • eventOnGetUp(ObjectReferenceakFurniture)

        Event that is triggered when this actor leaves the furniture

      • eventOnDeath(ActorakKiller)

        Event that is triggered when this actor finishes dying (only if this alias points at an actor)

      • eventOnDying(ActorakKiller)

        Event that is triggered when this actor begins dying (only if this alias points at an actor)

      • Event received when an actor enters bleedout. (only if this alias points at an actor)

      • eventOnLocationChange(LocationakOldLoc, LocationakNewLoc)

        Event that is triggered when this actor changes from one location to another (only if this alias points at an actor)

      • eventOnLycanthropyStateChanged(boolabIsWerewolf)

        Received when the lycanthropy state of this actor changes (when SendLycanthropyStateChanged is called)

      • eventOnObjectEquipped(FormakBaseObject, ObjectReferenceakReference)

        Event received when this actor equips something - akReference may be None if object is not persistent (only if this alias points at an actor)

      • eventOnObjectUnequipped(FormakBaseObject, ObjectReferenceakReference)

        Event received when this actor unequips something - akReference may be None if object is not persistent (only if this alias points at an actor)

      • eventOnPackageStart(PackageakNewPackage)

        Event received when this actor starts a new package (only if this alias points at an actor)

      • eventOnPackageChange(PackageakOldPackage)

        Event received when this actor's package changes (only if this alias points at an actor)

      • eventOnPackageEnd(PackageakOldPackage)

        Event received when this actor's package ends (only if this alias points at an actor)

      • Event received when this actor finishes changing its race

      • eventOnWardHit(ObjectReferenceakCaster, SpellakSpell, intaiStatus)

        Event received when this object's Ward is hit by a spell

      • eventOnPlayerBowShot(WeaponakWeapon, AmmoakAmmo, floatafPower, boolabSunGazing)

        Received when the player fires a bow. akWeapon will be a bow, akAmmo is the ammo or None,
        afPower will be 1.0 for a full-power shot, less for a dud, and abSunGazing will be true if the player is looking at the sun.

      • eventOnPlayerFastTravelEnd(floatafTravelGameTimeHours)

        Received when the player finishes fast travel, gives the duration of game time the travel took

      • Received immediately after the player has loaded a save game. A good time to check for additional content.

      • eventOnVampireFeed(ActorakTarget)

        Received when StartVampireFeed is called on an actor

      • eventOnVampirismStateChanged(boolabIsVampire)

        Received when the vampirism state of this actor changes (when SendVampirismStateChanged is called)

      Functions

      • voidfunctionAddInventoryEventFilter(FormakFilter)Native

        Add an inventory event filter to this alias. Item added/removed events matching the
        specified form (or in the specified form list) will now be let through.

      • voidfunctionClear()Native

        Clears any reference out of this alias. Will error if this alias is not optional.

      • Attempts to retrive the object reference this alias is pointing at. If it has not been resolved to a reference, it will return None.

      • voidfunctionForceRefTo(ObjectReferenceakNewRef)Native

        Forces this alias to use the specified reference.

      • voidfunctionRemoveAllInventoryEventFilters()Native

        Remove all inventory event filters from this alias - all item added/removed events will now be received

      • voidfunctionRemoveInventoryEventFilter(FormakFilter)Native

        Remove an inventory event filter from this alias. Item added/removed events matching the
        specified form (or in the specified form list) will no longer be let through.

      • boolfunctionForceRefIfEmpty(ObjectReferenceakNewRef)

        Forces this alias to use the specified reference, but only if the alias is currently empty

      • Attempts to retrieve the actor this alias is pointing at. If it has not been resolved to a reference, or the reference is not an Actor, it will return None.

      • Attempts to retrive the object reference this alias is pointing at. If it has not been resolved to a reference, it will return None.

      • Attempts to retrieve the actor this alias is pointing at. If it has not been resolved to a reference, or the reference is not an Actor, it will return None.

      • boolfunctionTryToAddToFaction(FactionFactionToAddTo)

        This is a convenient way to add an actor in an alias to a faction without calling ReferenceAlias.GetActorReference() on it. It's mostly useful in cases where you have lots of aliases that may or may not be filled and you want to call Actor.AddToFaction(...) on them without having to test for a reference being present first.

      • boolfunctionTryToRemoveFromFaction(FactionFactionToRemoveFrom)

        This is a convenient way to remove an actor in an alias from a faction without calling ReferenceAlias.GetActorReference() on it. It's mostly useful in cases where you have lots of aliases that may or may not be filled and you want to call Actor.RemoveFromFaction(...) on them without having to test for a reference being present first.

      • boolfunctionTryToStopCombat()

        This is a convenient way to have an actor in an alias stop combat without calling ReferenceAlias.GetActorReference() on it. It's mostly useful in cases where you have lots of aliases that may or may not be filled and you want to call Actor.StopCombat() on them without having to test for an actor being present first.

      • boolfunctionTryToDisable()

        This is a convenient way to disable a reference in an alias without calling ReferenceAlias.GetReference() on it. It's mostly useful in cases where you have lots of aliases that may or may not be filled and you want to call ObjectReference.Disable(...) on them without having to test for a reference being present first.

      • boolfunctionTryToDisableNoWait()

        This is a convenient way to disable a reference (without waiting for it to diable) in an alias without calling ReferenceAlias.GetReference() on it. It's mostly useful in cases where you have lots of aliases that may or may not be filled and you want to call ObjectReference.DisableNoWait(...) on them without having to test for a reference being present first.

      • boolfunctionTryToEnable()

        This is a convenient way to enable a reference in an alias without calling ReferenceAlias.GetReference() on it. It's mostly useful in cases where you have lots of aliases that may or may not be filled and you want to call ObjectReference.Enable(...) on them without having to test for a reference being present first.

      • boolfunctionTryToEnableNoWait()

        This is a convenient way to enable a reference (without waiting on it to finish enabling) in an alias without calling ReferenceAlias.GetReference() on it. It's mostly useful in cases where you have lots of aliases that may or may not be filled and you want to call ObjectReference.EnableNoWait(...) on them without having to test for a reference being present first.

      • boolfunctionTryToEvaluatePackage()

        This is a convenient way to tell an actor in an alias to reevaluate his package stack without calling ReferenceAlias.GetActorReference() on it. It's mostly useful in cases where you have lots of aliases that may or may not be filled and you want to call Actor.EvaluatePackage() on them without having to test for an actor being present first.

      • boolfunctionTryToKill()

        This is a convenient way to kill an actor in an alias without calling ReferenceAlias.GetActorReference() on it. It's mostly useful in cases where you have lots of aliases that may or may not be filled and you want to call Actor.Kill(...) on them without having to test for an actor being present first.

      • boolfunctionTryToMoveTo(ObjectReferenceRefToMoveTo)

        This is a convenient way to move a reference in an alias without calling ReferenceAlias.GetReference() on it. It's mostly useful in cases where you have lots of aliases that may or may not be filled and you want to call ObjectReference.MoveTo(...) on them without having to test for a object reference being present first.

      • boolfunctionTryToReset()

        This is a convenient way to reset a reference in an alias without calling ReferenceAlias.GetReference() on it. It's mostly useful in cases where you have lots of aliases that may or may not be filled and you want to call ObjectReference.Reset(...) on them without having to test for a reference being present first.

      • boolfunctionTryToClear()

        Clears this alias and returns whether anything was in it to begin with.

      Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.