Skip to content

Engine API for Papyrus

The Creation Engine implements these native functions and fires these events for the Papyrus runtime to drive game logic. Each section corresponds to one engine-bound class; see <ClassName>.md for the class's overall purpose.

Conventions

  • Native — declared native in .psc; engine provides the implementation.
  • Native global — declared native global; callers use ClassName.Func(...).
  • Event — Papyrus event signature; engine fires the call as game state changes.
  • Parameter prefixes: ak = object reference, af = float, ai = int, ab = bool, as = string, aa = array (Bethesda Hungarian convention).
  • A function flagged debugOnly is only callable in non-release builds; release builds may stub it. A function flagged betaOnly is only callable in beta builds.

Index


ScriptObject — universal base

Universal base of every Papyrus script in the game, even ones that don't explicitly extend anything. Provides event registration, custom-event dispatch, function reflection, timers, and state machinery. Every script instance receives its events.

Events (engine-fired)

  • OnAnimationEvent(ObjectReference akSource, string asEventName) — Fired when an object the script registered with via RegisterForAnimationEvent raises a matching animation event.
  • OnAnimationEventUnregistered(ObjectReference akSource, string asEventName) — Fired when the engine has had to drop an animation-event registration because the source object's animation graph was unloaded.
  • OnBeginState(string asOldState) — Fired after the script's state changes; passes the prior state name. Not fired for the auto state when the script is first initialised.
  • OnDistanceLessThan(ObjectReference akObj1, ObjectReference akObj2, float afDistance) — Fired once when two registered objects come within the registered distance.
  • OnDistanceGreaterThan(ObjectReference akObj1, ObjectReference akObj2, float afDistance) — Fired once when two registered objects move past the registered distance.
  • OnEndState(string asNewState) — Fired before the script's state changes; passes the new state name.
  • OnGainLOS(ObjectReference akViewer, ObjectReference akTarget) — Fired the first time a registered viewer gains line of sight to a target.
  • OnHit(ObjectReference akTarget, ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked, string asMaterialName) — Fired when a registered target is hit by a weapon, spell, explosion, or projectile.
  • OnInit() — Fired once when the script instance is created and its properties have all been bound. Used to initialise local state. World may not be fully loaded yet.
  • OnLostLOS(ObjectReference akViewer, ObjectReference akTarget) — Fired the first time a registered viewer loses line of sight to a target.
  • OnMagicEffectApply(ObjectReference akTarget, ObjectReference akCaster, MagicEffect akEffect) — Fired when a registered target has a magic effect applied to it.
  • OnMenuOpenCloseEvent(string asMenuName, bool abOpening) — Fired when a registered UI menu opens or closes.
  • OnPlayerSleepStart(float afSleepStartTime, float afDesiredSleepEndTime, ObjectReference akBed) — Fired when the player begins sleeping. Times are in game-time days.
  • OnPlayerSleepStop(bool abInterrupted, ObjectReference akBed) — Fired when the player stops sleeping (naturally or interrupted).
  • OnPlayerTeleport() — Fired when the player teleports via load door, fast travel, or MoveTo.
  • OnPlayerWaitStart(float afWaitStartTime, float afDesiredWaitEndTime) — Fired when the player begins waiting. Times are in game-time days.
  • OnPlayerWaitStop(bool abInterrupted) — Fired when the player stops waiting (naturally or interrupted).
  • OnRadiationDamage(ObjectReference akTarget, bool abIngested) — Fired when a registered target takes radiation damage.
  • OnTimer(int aiTimerID) — Fired once when a real-time timer started via StartTimer expires.
  • OnTimerGameTime(int aiTimerID) — Fired once when a game-time timer started via StartTimerGameTime expires.
  • OnTrackedStatsEvent(string arStatName, int aiStatValue) — Fired when a registered tracked stat reaches or passes its threshold.
  • OnLooksMenuEvent(int aiFlavor) — Fired by the looks menu to cue dialogue (0=general, 1=eyes, 2=nose, 3=mouth, 4=hair, 5=beard).
  • OnTutorialEvent(string asEventName, Message aMessage) — Fired when a tutorial event the script registered for occurs.

Native functions

  • Function AddInventoryEventFilter(Form akFilter) — Whitelist a form (or formlist) so this script will receive OnItemAdded/OnItemRemoved events for it. None passes everything. Without any filter the script gets nothing.
  • Var Function CallFunction(string asFuncName, Var[] aParams) — Reflectively call a member function on this script by name. Compiler does not type-check.
  • Function CallFunctionNoWait(string asFuncName, Var[] aParams) — Same as CallFunction but does not block on the call.
  • Function CancelTimer(int aiTimerID = 0) — Cancel a pending real-time timer with the given ID.
  • Function CancelTimerGameTime(int aiTimerID = 0) — Cancel a pending game-time timer with the given ID.
  • ScriptObject Function CastAs(string asScriptName) — Attempt to cast this object as the named script. Returns None if the type doesn't exist or the cast fails.
  • Var Function GetPropertyValue(string asPropertyName) — Reflectively get a named property value from this script. Errors on missing or write-only.
  • bool Function IsBoundGameObjectAvailable() — True if the script is attached to a live in-game object that can be operated on. Form/alias/effect natives will fail when this is false.
  • bool Function RegisterForAnimationEvent(ObjectReference akSender, string asEventName) — Register to receive OnAnimationEvent from the given object for the named animation event.
  • Function RegisterForCustomEvent(ScriptObject akSender, CustomEventName asEventName) — Register to receive a named custom event sent by the given script.
  • Function RegisterForDetectionLOSGain(Actor akViewer, ObjectReference akTarget) — Register for one-shot OnGainLOS based on detection. If the viewer isn't the player, target must be an actor.
  • Function RegisterForDetectionLOSLost(Actor akViewer, ObjectReference akTarget) — Register for one-shot OnLostLOS based on detection.
  • Function RegisterForDirectLOSGain(ObjectReference akViewer, ObjectReference akTarget, string asViewerNode = "", string asTargetNode = "") — Register for one-shot OnGainLOS based on direct line-of-sight from the given nodes (empty = root).
  • Function RegisterForDirectLOSLost(ObjectReference akViewer, ObjectReference akTarget, string asViewerNode = "", string asTargetNode = "") — Register for one-shot OnLostLOS based on direct line-of-sight.
  • Function RegisterForDistanceLessThanEvent(ScriptObject akObj1, ScriptObject akObj2, float afDistance) — Register for OnDistanceLessThan between two interchangeable objects/aliases. Re-registering with swapped args updates the threshold.
  • Function RegisterForDistanceGreaterThanEvent(ScriptObject akObj1, ScriptObject akObj2, float afDistance) — Register for OnDistanceGreaterThan between two objects/aliases.
  • Function RegisterForHitEvent(ScriptObject akTarget, ScriptObject akAggressorFilter = None, Form akSourceFilter = None, Form akProjectileFilter = None, int aiPowerFilter = -1, int aiSneakFilter = -1, int aiBashFilter = -1, int aiBlockFilter = -1, bool abMatch = true) — Register for OnHit with optional filters on aggressor, source, projectile, and four tri-state flags. abMatch=false inverts the filter. Without any registration, scripts cannot receive hit events.
  • Function RegisterForMagicEffectApplyEvent(ScriptObject akTarget, ScriptObject akCasterFilter = None, Form akEffectFilter = None, bool abMatch = true) — Register for OnMagicEffectApply with optional caster and effect filters.
  • Function RegisterForMenuOpenCloseEvent(string asMenuName) — Register for OnMenuOpenCloseEvent for the named menu.
  • Function RegisterForPlayerSleep() — Register for OnPlayerSleepStart/Stop.
  • Function RegisterForPlayerTeleport() — Register for OnPlayerTeleport.
  • Function RegisterForPlayerWait() — Register for OnPlayerWaitStart/Stop.
  • Function RegisterForRadiationDamageEvent(ScriptObject akTarget) — Register for one-shot OnRadiationDamage from the given target. Without any registration, scripts cannot receive radiation damage events.
  • bool Function RegisterForRemoteEvent(ScriptObject akEventSource, ScriptEventName asEventName) — Register for a named engine event coming from another script. Returns true on success.
  • Function RegisterForTrackedStatsEvent(string asStat, int aiThreshold) — Register for OnTrackedStatsEvent when the named stat reaches the threshold. Fires immediately if already past.
  • Function RegisterForLooksMenuEvent() — Register for OnLooksMenuEvent from the looks menu.
  • Function RegisterForTutorialEvent(string asEventName) — Register for OnTutorialEvent for the named event.
  • Function RemoveAllInventoryEventFilters() — Drop every inventory event filter on this script.
  • Function RemoveInventoryEventFilter(Form akFilter) — Drop a single inventory event filter.
  • Function SendCustomEvent(CustomEventName asEvent, Var[] akArgs = None) — Dispatch a custom event to all registered listeners.
  • Function SetPropertyValue(string asPropertyName, Var aValue) — Reflectively set a named property value. Errors on missing, read-only, or const auto-properties.
  • Function SetPropertyValueNoWait(string asPropertyName, Var aValue) — Same but does not block.
  • Function StartTimer(float afInterval, int aiTimerID = 0) — Start a one-shot real-time timer; fires OnTimer(aiTimerID) after afInterval seconds.
  • Function StartTimerGameTime(float afInterval, int aiTimerID = 0) — Start a one-shot game-time timer; fires OnTimerGameTime(aiTimerID) after afInterval game hours.
  • Function UnregisterForAllEvents() — Drop every event registration on this script.
  • Function UnregisterForAllCustomEvents() — Drop every custom event registration.
  • Function UnregisterForAllHitEvents(ScriptObject akTarget = None) — Drop all hit registrations against the given target, or every hit registration if None.
  • Function UnregisterForAllMagicEffectApplyEvents(ScriptObject akTarget = None) — Drop all magic effect apply registrations against the target, or all of them if None.
  • Function UnregisterForAllMenuOpenCloseEvents() — Drop every menu open/close registration.
  • Function UnregisterForAllRadiationDamageEvents() — Drop every radiation damage registration.
  • Function UnregisterForAllRemoteEvents() — Drop every remote event registration.
  • Function UnregisterForAllTrackedStatsEvents() — Drop every tracked stat registration.
  • Function UnregisterForAnimationEvent(ObjectReference akSender, string asEventName) — Drop a specific animation event registration.
  • Function UnregisterForCustomEvent(ScriptObject akSender, CustomEventName asEventName) — Drop a specific custom event registration.
  • Function UnregisterForDistanceEvents(ScriptObject akObj1, ScriptObject akObj2) — Drop both less-than and greater-than distance registrations between two objects.
  • Function UnregisterForHitEvent(ScriptObject akTarget, ScriptObject akAggressorFilter = None, Form akSourceFilter = None, Form akProjectileFilter = None, int aiPowerFilter = -1, int aiSneakFilter = -1, int aiBashFilter = -1, int aiBlockFilter = -1, bool abMatch = true) — Drop a hit registration matching the given filter.
  • Function UnregisterForLOS(ObjectReference akViewer, ObjectReference akTarget) — Drop both detection and direct LOS registrations between the two refs.
  • Function UnregisterForMagicEffectApplyEvent(ScriptObject akTarget, ScriptObject akCasterFilter = None, Form akEffectFilter = None, bool abMatch = true) — Drop a magic effect apply registration matching the filter.
  • Function UnregisterForMenuOpenCloseEvent(string asMenuName) — Drop a single menu open/close registration.
  • Function UnregisterForPlayerSleep() — Drop player sleep registrations.
  • Function UnregisterForPlayerTeleport() — Drop player teleport registrations.
  • Function UnregisterForPlayerWait() — Drop player wait registrations.
  • Function UnregisterForRadiationDamageEvent(ScriptObject akTarget) — Drop a single radiation damage registration.
  • Function UnregisterForRemoteEvent(ScriptObject akEventSource, ScriptEventName asEventName) — Drop a remote event registration.
  • Function UnregisterForTrackedStatsEvent(string asStat) — Drop a tracked stat registration.
  • Function UnregisterForLooksMenuEvent() — Drop the looks menu registration.
  • Function UnregisterForTutorialEvent(string asEventName) — Drop a tutorial event registration.

Form — base of all data records

Base class of every editor-defined data record. Carries form ID, gold value, and keyword membership.

Native functions

  • int Function GetFormID() — Returns the form's editor-assigned form ID.
  • int Function GetGoldValue() — Returns the form's value in caps. Returns -1 if not valuable (e.g. a quest).
  • bool Function HasKeyword(Keyword akKeyword) — True if this form has the given keyword attached.
  • bool Function HasKeywordInFormList(FormList akKeywordList) — True if this form has any keyword in the list attached.
  • bool Function PlayerKnows() — True if the form's "Known" flag is set on the player.
  • Function StartObjectProfiling() (debugOnly) — Start profiling this form and any scripts attached.
  • Function StopObjectProfiling() (debugOnly) — Stop profiling this form and any scripts attached.

ObjectReference — placed instance of a Form in the world

Extends Form. Represents an actual instance of a base object placed in a cell: its position, rotation, inventory, lock state, animation graph, and all the events that fire as it interacts with the world.

Events (engine-fired)

  • OnActivate(ObjectReference akActionRef) — Fired when this reference is activated by another.
  • OnCellAttach() — Fired when this object's parent cell is attached.
  • OnCellDetach() — Fired when this object's parent cell is detached.
  • OnCellLoad() — Fired when every object in this object's parent cell has finished loading.
  • OnClose(ObjectReference akActionRef) — Fired when this object is closed.
  • OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) — Fired when this object enters, leaves, or changes containers.
  • OnDestructionStageChanged(int aiOldStage, int aiCurrentStage) — Fired when the destruction stage changes.
  • OnEquipped(Actor akActor) — Fired when an actor equips this object.
  • OnExitFurniture(ObjectReference akActionRef) — Fired when a furniture marker on this is exited.
  • OnGrab() — Fired when the player grabs this object.
  • OnHolotapeChatter(string astrChatter, float afNumericData) — Fired when a flash program on a holotape wants to communicate with script.
  • OnHolotapePlay(ObjectReference aTerminalRef) — Fired when a holotape is played via Pipboy or terminal.
  • OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) — Fired when an item is added to this container's inventory. akItemReference is non-None only for persistent refs.
  • OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) — Fired when an item is removed from this container's inventory.
  • OnLoad() — Fired every time this object's 3D finishes loading.
  • OnLockStateChanged() — Fired when this object's lock state changes.
  • OnOpen(ObjectReference akActionRef) — Fired when this object is opened.
  • OnPipboyRadioDetection(bool abDetected) — Fired when the Pipboy enters or leaves the outer radius of this radio reference.
  • OnPlayerDialogueTarget() — Fired when this ref enters dialogue with the player.
  • OnPowerOn(ObjectReference akPowerGenerator) — Fired when a workshop item receives power.
  • OnPowerOff() — Fired when a workshop item loses all power.
  • OnRead() — Fired when this book is read.
  • OnRelease() — Fired when the player releases this object.
  • OnReset() — Fired when this reference is reset.
  • OnSell(Actor akSeller) — Fired when an actor sells this reference.
  • OnSpellCast(Form akSpell) — Fired when this object casts a spell.
  • OnTranslationAlmostComplete() — Fired when a TranslateTo is almost done (game-setting threshold, default 90%).
  • OnTranslationComplete() — Fired when a TranslateTo has finished.
  • OnTranslationFailed() — Fired when a translation is aborted via StopTranslation.
  • OnTrapHitStart(ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, bool abInitialHit, int aeMotionType) — Fired when this trap starts hitting a target.
  • OnTrapHitStop(ObjectReference akTarget) — Fired when this trap stops hitting a target.
  • OnTriggerEnter(ObjectReference akActionRef) — Fired when this trigger volume is entered.
  • OnTriggerLeave(ObjectReference akActionRef) — Fired when this trigger volume is left.
  • OnUnequipped(Actor akActor) — Fired when an actor unequips this object.
  • OnUnload() — Fired every time this object's 3D is unloaded.
  • OnWorkshopMode(bool aStart) — Fired when the player enters or leaves workshop mode at this workshop.
  • OnWorkshopObjectDestroyed(ObjectReference akReference) — Fired when a workshop item is destroyed.
  • OnWorkshopObjectGrabbed(ObjectReference akReference) — Fired when the player grabs an existing workshop object for edit.
  • OnWorkshopObjectMoved(ObjectReference akReference) — Fired when an existing workshop item is moved.
  • OnWorkshopObjectPlaced(ObjectReference akReference) — Fired when a workshop item is placed.
  • OnWorkshopObjectRepaired(ObjectReference akReference) — Fired when a workshop item is repaired.
  • OnWorkshopNPCTransfer(Location akNewWorkshop, Keyword akActionKW) — Fired when a workshop NPC is directed to another settlement.

Native functions

  • bool Function Activate(ObjectReference akActivator, bool abDefaultProcessingOnly = false) — Have akActivator activate this reference. Returns true if default processing ran successfully; false if blocked.
  • bool Function AddDependentAnimatedObjectReference(ObjectReference akDependent) — Set up a dependent animated object. Use only with engineer supervision; can produce dangling pointers.
  • Function AddItem(Form akItemToAdd, int aiCount = 1, bool abSilent = false) — Add a base object or reference to this container's inventory.
  • Function AddKeyword(Keyword apKeyword) — Add a keyword to this reference instance.
  • Function AddTextReplacementData(string asTokenLabel, Form akForm) — Bind a token name to a form for text-replacement substitution on this ref.
  • Function AddToMap(bool abAllowFastTravel = false) — Add this map-marker ref to the world map, optionally enabling fast travel to it.
  • Function ApplyConveyorBelt(string aTarget, float aLinVelX, float aLinVelY, float aLinVelZ, bool abOn = true, bool abReverse = false) — Configure this reference as a conveyor belt.
  • Function ApplyHavokImpulse(float afX, float afY, float afZ, float afMagnitude) — Apply a havok impulse to this reference.
  • Function ApplyFanMotor(string aTarget, float aAxisX, float aAxisY, float aAxisZ, float aForce, bool abOn = true) — Configure this reference as a fan motor.
  • Function FanMotorOn(bool abOn = true) — Turn this fan motor on or off.
  • bool Function IsFanMotorOn() — True if this fan motor is currently on.
  • bool Function AttachMod(ObjectMod akMod, int aiAttachIndex = 0) — Attach an object mod to this reference. Returns success.
  • bool Function AttachModToInventoryItem(Form akItem, ObjectMod akMod) — Attach a mod to an inventory item in this ref.
  • Function AttachTo(ObjectReference akParent) — Parent this reference (created refs only).
  • Function BlockActivation(bool abBlocked = true, bool abHideActivateText = false) — Block or unblock activation. OnActivate still fires.
  • int Function CalculateEncounterLevel(int aiDifficulty = 4) — Compute encounter level for the given difficulty (0=Easy, 1=Medium, 2=Hard, 3=Very Hard, 4=None).
  • bool Function CanFastTravelToMarker() — True if this map marker is fast-travel enabled.
  • bool Function CanProduceForWorkshop() — True if this reference can produce workshop resources.
  • Function ClearDestruction() — Clear all destruction stages from this object.
  • Function ClearFromOldLocations() — Remove this object's data from invalid locations.
  • Function ConveyorBeltOn(bool abOn = true) — Turn the conveyor belt on or off.
  • int Function CountActorsLinkedToMe(Keyword apLinkKeyword = None, Keyword apExcludeKeyword = None) — Count instantiated actors that link to this ref via the given keyword (and optionally not via another).
  • int Function CountLinkedRefChain(Keyword apKeyword = None, int maxExpectedLinkedRefs = 100) — Count refs in the linked-ref chain from this ref. Aborts on loops.
  • int Function CountRefsLinkedToMe(Keyword apLinkKeyword = None, Keyword apExcludeKeyword = None) — Count instantiated refs that link to this ref via the keyword.
  • Function CreateDetectionEvent(Actor akOwner, int aiSoundLevel = 0) — Generate a detection event at this ref attributed to akOwner. Sound level 0–100.
  • Function DamageObject(float afDamage) — Apply damage to this object and advance the destruction stage. Latent.
  • Function DamageValue(ActorValue akAV, float afDamage) — Damage the given actor value on this ref.
  • Function Delete() — Mark this object for deletion.
  • Function Disable(bool abFadeOut = false) — Disable this object, optionally fading out. Latent.
  • Function DisableLinkChain(Keyword apKeyword = None, bool abFadeOut = false) — Disable every ref in the chain linked from this one (excludes self). Does not wait.
  • Function DisableNoWait(bool abFadeOut = false) — Disable this object without waiting for fade or disable to finish.
  • Function Drop(bool abSilent = false) — Drop this reference from its container.
  • ObjectReference Function DropFirstObject(bool abInitiallyDisabled = false) — Drop the first object from this container's inventory.
  • ObjectReference Function DropObject(Form akObject, int aiCount = 1) — Drop the given object from this container's inventory.
  • Function Enable(bool abFadeIn = false) — Enable this object. Latent.
  • Function EnableFastTravel(bool abEnable = true) — Enable or disable fast travel to this map marker.
  • Function EnableLinkChain(Keyword apKeyword = None, bool abFadeIn = false) — Enable every ref in the linked chain from this one (excludes self). Does not wait.
  • Function EnableNoWait(bool abFadeIn = false) — Enable this object without waiting.
  • ObjectReference[] Function FindAllReferencesOfType(Form akObjectOrList, float afRadius) — Find all loaded refs of the given base in radius around this ref.
  • ObjectReference[] Function FindAllReferencesWithKeyword(Form akKeywordOrList, float afRadius) — Find all loaded refs in radius with the given keyword(s).
  • Function ForceAddRagdollToWorld() — Force this reference's ragdoll into the world.
  • Function ForceRemoveRagdollFromWorld() — Force this reference's ragdoll out of the world.
  • ActorBase Function GetActorOwner() — ActorBase that owns this object, or None. If owned by an actor ref, returns that ref's base.
  • Actor Function GetActorRefOwner() — Actor reference that owns this object, or None.
  • Actor[] Function GetActorsLinkedToMe(Keyword apLinkKeyword = None, Keyword apExcludeKeyword = None) — Array of actors linked to this ref via keyword.
  • float Function GetAngleX() — Current X-angle in degrees.
  • float Function GetAngleY() — Current Y-angle in degrees.
  • float Function GetAngleZ() — Current Z-angle in degrees.
  • bool Function GetAnimationVariableBool(string arVariableName) — Read a bool variable from this ref's animation graph.
  • int Function GetAnimationVariableInt(string arVariableName) — Read an int variable from this ref's animation graph.
  • float Function GetAnimationVariableFloat(string arVariableName) — Read a float variable from this ref's animation graph.
  • Form Function GetBaseObject() — Returns the base form this reference instances.
  • float Function GetBaseValue(ActorValue akAV) — Base value of an actor value on this ref. Returns 0 + log error if unknown.
  • int Function GetCurrentDestructionStage() — Current destruction stage index.
  • Location Function GetCurrentLocation() — This reference's current location.
  • Scene Function GetCurrentScene() — Scene this reference is currently in, or None.
  • float Function GetDistance(ObjectReference akOther) — Distance to another ref. Both must be in the same interior or worldspace.
  • Location Function GetEditorLocation() — This reference's editor-assigned location.
  • EncounterZone Function GetEncounterZone() — Encounter zone this object belongs to, or None.
  • Faction Function GetFactionOwner() — Faction that owns this object, or None.
  • float Function GetHeadingAngle(ObjectReference akOther) — Angle from this object's heading to the other in degrees, range -180..180.
  • float Function GetHeight() — Current height.
  • int Function GetInventoryValue() — Total caps value of all items in this container.
  • int Function GetItemCount(Form akItem = None) — Count of given item in inventory; None counts everything.
  • int Function GetComponentCount(Form akItem = None) — Count of components in inventory; None counts every component.
  • ObjectReference Function GetContainer() — Container this reference is in, or None.
  • float Function GetItemHealthPercent() — Smithed health percentage (1.0 = 100%).
  • Key Function GetKey() — The key base form that unlocks this object.
  • float Function GetLength() — Current length.
  • ObjectReference Function GetLinkedRef(Keyword apKeyword = None) — Single linked reference for the given keyword.
  • ObjectReference[] Function GetLinkedRefChain(Keyword apKeyword = None, int iMaxExpectedLinkedRefs = 100) — Chain of linked refs as an array. Aborts on loops.
  • ObjectReference[] Function GetLinkedRefChildren(Keyword apKeyword) — Refs that link back to this one with the given keyword.
  • int Function GetLockLevel() — Lock level of this object.
  • LocationRefType[] Function GetLocRefTypes() — Location ref types for this object.
  • ObjectReference Function GetNthLinkedRef(int aiLinkedRef, Keyword apKeyword = None) — Nth ref in the linked chain (0 = self, 1 = linked, 2 = linked.linked).
  • float Function GetMass() — This object's mass.
  • int Function GetOpenState() — Open state: 0=None, 1=Open, 2=Opening, 3=Closed, 4=Closing.
  • Cell Function GetParentCell() — Cell containing this object.
  • float Function GetPositionX() — Current world X position.
  • float Function GetPositionY() — Current world Y position.
  • float Function GetPositionZ() — Current world Z position.
  • float Function GetRadioFrequency() — Frequency of this radio receiver.
  • float Function GetRadioVolume() — Volume of this radio receiver.
  • float Function GetResourceDamage(ActorValue akValue = None) — Total damage of the given resource AV (or all if None).
  • float[] Function GetSafePosition(float aSearchRadius = -1.0, float aSafeRadius = -1.0) — Find a safe position of the given clearance radius near this ref. Empty array on failure.
  • ObjectReference[] Function GetRefsLinkedToMe(Keyword apLinkKeyword = None, Keyword apExcludeKeyword = None) — All refs linked to this one via keyword.
  • ObjectReference[] Function GetWorkshopOwnedObjects(Actor akActor) — Workshop objects on this workbench owned by the given actor.
  • float Function GetWorkshopResourceDamage(ActorValue akValue) — Damage of the given resource on this workshop.
  • ObjectReference[] Function GetWorkshopResourceObjects(ActorValue akAV = None, int aiOption = 0) — Resource-producing objects on this workshop. aiOption: 0=all, 1=damaged, 2=undamaged.
  • float Function GetScale() — Current scale.
  • Cell Function GetTeleportCell() — Target cell for this teleport ref.
  • Cell Function GetTransitionCell() — Transition cell for this teleport ref.
  • float Function GetTransmitterDistance() — Distance from this radio transmitter to the player.
  • int Function GetTriggerObjectCount() — Count of objects inside this trigger.
  • float Function GetValue(ActorValue akAV) — Current actor value. Returns 0 + log error if unknown.
  • float Function GetValuePercentage(ActorValue akAV) — Actor value as fraction of max (0..1).
  • VoiceType Function GetVoiceType() — Voice type of this ref. None unless actor or talking activator.
  • float Function GetWidth() — Current width.
  • WorldSpace Function GetWorldSpace() — Worldspace this object is in.
  • bool Function HasActorRefOwner() — True if any actor ref was ever set as owner (even if since gone).
  • bool Function HasDirectLOS(ObjectReference akTarget, string asSourceNode = "", string asTargetNode = "") — Direct line of sight check between named nodes (empty = root).
  • bool Function HasEffectKeyword(Keyword akKeyword) — True if any active magic effect on this ref has the keyword.
  • bool Function HasKeyword(Keyword apKeyword) — True if this ref (instance or base) has the keyword.
  • bool Function HasKeywordInFormList(FormList akKeywordList) — True if this ref has any keyword in the list.
  • bool Function HasLocRefType(LocationRefType akRefType) — True if this ref has the given location ref type.
  • bool Function HasNode(string asNodeName) — True if this ref has the named node in its 3D.
  • bool Function HasSharedPowerGrid(ObjectReference akCompare) — True if both refs share a power grid.
  • Function IgnoreFriendlyHits(bool abIgnore = true) — Toggle the friendly-fire-immunity flag on this ref.
  • Function InterruptCast() — Interrupt any spell-casting on this object.
  • bool Function IsActivateChild(ObjectReference akChild) — True if akChild is the activate-child of this ref.
  • bool Function IsActivationBlocked() — True if activation is currently blocked.
  • bool Function Is3DLoaded() — True if this ref's 3D is currently loaded.
  • bool Function IsConveyorBeltOn() — True if this conveyor belt is on.
  • bool Function IsCreated() — True if this ref was created in-game (rather than from the editor).
  • bool Function IsDeleted() — True if this ref is flagged for delete.
  • bool Function IsDestroyed() — True if destroyed.
  • bool Function IsDisabled() — True if disabled.
  • bool Function IsFurnitureInUse(bool abIgnoreReserved = false) — True if any marker on this furniture is in use.
  • bool Function IsFurnitureMarkerInUse(int aiMarker, bool abIgnoreReserved = false) — True if a specific marker on this furniture is in use.
  • bool Function IsIgnoringFriendlyHits() — True if friendly-fire-immunity flag is set.
  • bool Function IsInDialogueWithPlayer() — True if this actor or talking activator is talking to the player.
  • bool Function IsLockBroken() — True if the lock is broken.
  • bool Function IsLocked() — True if locked.
  • bool Function IsMapMarkerVisible() — True if visible on the world map.
  • bool Function IsOwnedBy(Actor akOwner) — True if owned by the given actor.
  • bool Function IsPowered() — True if this workshop object is currently powered.
  • bool Function IsQuestItem() — True if this is a quest item.
  • bool Function IsRadioOn() — True if this radio receiver is on.
  • bool Function IsRefInTransitionCell(ObjectReference akRef) — True if akRef is inside this teleport's transition cell.
  • bool Function IsTeleportAreaLoaded() — True if this teleport's destination area is fully loaded.
  • bool Function IsWithinBuildableArea(ObjectReference akRef) — True if akRef is inside this workshop's buildable volume.
  • Function KnockAreaEffect(float afMagnitude, float afRadius) — Knock area effect with magnitude and radius.
  • Function Lock(bool abLock = true, bool abAsOwner = false) — Lock or unlock this object. Adds a lock if there isn't one. Locking as owner toggles public/private on adjoining cells.
  • Function MakeRadioReceiver(float afFrequency, float afVolume = 1.0, OutputModel aOverrideModel = None, bool abActive = true, bool abNoStatic = false) — Configure this object as a radio receiver.
  • Function MakeTransmitterRepeater(ObjectReference akTransmitterToRepeat, float afInnerRadius, float afOuterRadius, bool abUnlimitedRange = false) — Configure this object as a transmitter that repeats another transmitter.
  • Function ModValue(ActorValue akAV, float afAmount) — Modify an actor value by an amount.
  • Function MoveTo(ObjectReference akTarget, float afXOffset = 0.0, float afYOffset = 0.0, float afZOffset = 0.0, bool abMatchRotation = true) — Move to the position of another object with optional offset and rotation match.
  • Function MoveToMyEditorLocation() — Move to this object's editor-defined location.
  • Function MoveToNearestNavmeshLocation() — Snap to nearest point on a navmesh.
  • Function MoveToNode(ObjectReference akTarget, string asNodeName, string asMatchNodeName = "") — Move this object (or a named node) to a node on another ref.
  • Location Function OpenWorkshopSettlementMenu(Keyword akActionKW, Message astrConfirm = None, Location aLocToHighlight = None) — Open the workshop caravan submenu for sending this NPC to another settlement; returns the chosen Location or None.
  • Location Function OpenWorkshopSettlementMenuEx(Keyword akActionKW, Message astrConfirm = None, Location aLocToHighlight = None, FormList akIncludeKeywordList = None, FormList akExcludeKeywordList = None, bool abExcludeZeroPopulation = false, bool abOnlyOwnedWorkshops = true, bool abTurnOffHeader = false, bool abOnlyPotentialVassalSettlements = false, bool abDisableReservedByQuests = false) — Extended workshop caravan submenu with additional filters.
  • int Function RaidTargetsAvailable(Keyword akActionKW, Message astrConfirm = None, Location aLocToHighlight = None, FormList akIncludeKeywordList = None, FormList akExcludeKeywordList = None, bool abExcludeZeroPopulation = false, bool abOnlyOwnedWorkshops = true, bool abTurnOffHeader = false, bool abOnlyPotentialVassalSettlements = false, bool abDisableReservedByQuests = false) — Returns true if at least one workshop would qualify in OpenWorkshopSettlementMenuEx.
  • ObjectReference Function PlaceAtMe(Form akFormToPlace, int aiCount = 1, bool abForcePersist = false, bool abInitiallyDisabled = false, bool abDeleteWhenAble = true) — Spawn N copies of akFormToPlace at this ref. Returns the last spawn.
  • Actor Function PlaceActorAtMe(ActorBase akActorToPlace, int aiLevelMod = 4, EncounterZone akZone = None) — Spawn an actor at this ref. Level mod 0=Easy, 1=Medium, 2=Hard, 3=Boss, 4=None.
  • ObjectReference Function PlaceAtNode(string asNodeName, Form akFormToPlace, int aiCount = 1, bool abForcePersist = false, bool abInitiallyDisabled = false, bool abDeleteWhenAble = true, bool abAttach = false) — Spawn N copies of a form at the given node on this ref's 3D.
  • bool Function PlayAnimation(string asAnimation) — Start an animation. Returns success.
  • bool Function PlayAnimationAndWait(string asAnimation, string asEventName) — Start animation and wait for the named event.
  • bool Function PlayGamebryoAnimation(string asAnimation, bool abStartOver = false, float afEaseInTime = 0.0) — Start a Gamebryo (legacy) animation.
  • bool Function PlayImpactEffect(ImpactDataSet akImpactEffect, string asNodeName = "", float afPickDirX = 0.0, float afPickDirY = 0.0, float afPickDirZ = -1.0, float afPickLength = 512.0, bool abApplyNodeRotation = false, bool abUseNodeLocalRotation = false) — Play an impact effect data set, raycasting from a node.
  • bool Function PlaySyncedAnimationSS(string asAnimation1, ObjectReference akObj2, string asAnimation2) — Play two synced animations: one on self, one on akObj2.
  • bool Function PlaySyncedAnimationAndWaitSS(string asAnimation1, string asEvent1, ObjectReference akObj2, string asAnimation2, string asEvent2) — Play two synced animations and wait for both events.
  • Function PlayTerrainEffect(string asEffectModelName, string asAttachBoneName) — Play a terrain effect attached to the given bone.
  • Function PauseAudio() — Pause this scene-ref's audio.
  • Function PreloadExteriorCell() — Preload only the exterior cell containing this ref.
  • Function PreloadTargetArea() — Preload the target interior or exterior area for this ref.
  • Function ProcessTrapHit(ObjectReference akTrap, float afDamage, float afPushback, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, float afStagger) — Process a trap hitting this object.
  • Function PushActorAway(Actor akActorToPush, float aiKnockbackForce) — Push an actor away from this object using a knockback force.
  • Function RecalculateResources() — Recalculate this workshop's resources.
  • Function RemoveAllItems(ObjectReference akTransferTo = None, bool abKeepOwnership = false) — Remove every item from this container, optionally transferring to another.
  • Function RemoveComponents(Component akComponent, int aiCount, bool abSilent = false) — Remove items from container worth N components, scrapping items.
  • Function RemoveItem(Form akItemToRemove, int aiCount = 1, bool abSilent = false, ObjectReference akOtherContainer = None) — Remove the item from inventory, optionally moving to another container.
  • Function RemoveItemByComponent(Form akComponentToRemove, int aiCount = 1, bool abSilent = false, ObjectReference akOtherContainer = None) — Remove items containing up to N of the given component.
  • Function RemoveKeyword(Keyword apKeyword) — Remove a keyword from this ref.
  • Function RemoveAllMods() — Remove every mod from this ref's 3D. May leave nothing rendered.
  • Function RemoveAllModsFromInventoryItem(Form akItem) — Remove every mod from an inventory item.
  • Function RemoveMod(ObjectMod akMod) — Remove a specific mod from this ref.
  • Function RemoveModFromInventoryItem(Form akItem, ObjectMod akMod) — Remove a specific mod from an inventory item.
  • bool Function RemoveDependentAnimatedObjectReference(ObjectReference akDependent) — Drop a previously added dependent animated object.
  • Function Repair() — Repair this object.
  • Function Reset(ObjectReference akTarget = None) — Reset this object, optionally placing it at a new location.
  • Function ResetKeyword(Keyword apKeyword) — Reset a keyword's add/remove status; data falls back to base+aliases.
  • Function RestoreValue(ActorValue akAV, float afAmount) — Restore damage to an actor value (up to zero damage).
  • Function ResumeAudio() — Resume this scene-ref's paused audio.
  • Function ReverseConveyorBelt(bool abReverse = true) — Reverse the conveyor belt direction.
  • Function Say(Topic akTopicToSay, Actor akActorToSpeakAs = None, bool abSpeakInPlayersHead = false, ObjectReference akTarget = None) — Have this ref speak a topic, optionally as another actor and/or in the player's head.
  • Function SayCustom(Keyword akKeywordToSay, Actor akActorToSpeakAs = None, bool abSpeakInPlayersHead = false, ObjectReference akTarget = None) — Have this ref speak a keyword-bound topic.
  • Function SendStealAlarm(Actor akThief) — Behave as if akThief tried to steal this object.
  • Function SetActivateTextOverride(Message akText) — Override the activation text shown in the HUD with the message's name.
  • Function SetActorCause(Actor akActor) — Set the actor cause for any consequences this object generates.
  • Function SetActorOwner(ActorBase akActorBase, bool abNoCrime = false) — Set ActorBase as owner; None clears.
  • Function SetActorRefOwner(Actor akActor, bool abNoCrime = false) — Set Actor reference as owner; None clears.
  • Function SetAngle(float afXAngle, float afYAngle, float afZAngle) — Set orientation in degrees.
  • Function SetAnimationVariableBool(string arVariableName, bool abNewValue) — Write a bool to this ref's animation graph.
  • Function SetAnimationVariableInt(string arVariableName, int aiNewValue) — Write an int to this ref's animation graph.
  • Function SetAnimationVariableFloat(string arVariableName, float afNewValue) — Write a float to this ref's animation graph.
  • Function SetAttractionActive(Keyword apKeyword, bool abActive = true) — Toggle whether this ref emits attraction-object story events for the keyword.
  • Function SetConveyorBeltVelocity(float afLinVelX, float afLinVelY, float afLinVelZ) — Set the linear velocity of this conveyor belt.
  • Function SetDestroyed(bool abDestroyed = true) — Mark this object destroyed or not.
  • Function SetDirectAtTarget(ObjectReference akTarget) — Set the direct-at target. Object must have a direct-at modifier in its animation graph.
  • Function SetFactionOwner(Faction akFaction, bool abNoCrime = false) — Set faction as owner.
  • Function SetHarvested(bool abHarvested) — Mark a Flora object as harvested or not.
  • Function SetLinkedRef(ObjectReference akLinkedRef, Keyword apKeyword = None) — Set the linked ref under a keyword.
  • Function SetLockLevel(int aiLockLevel) — Set the lock level on this object. Adds a lock if there isn't one.
  • Function SetLocRefType(Location akLoc, LocationRefType akRefType) — Set the location ref type for an in-game-created reference.
  • Function SetMotionType(int aeMotionType, bool abAllowActivate = true) — Set the motion type (Motion_Fixed/Motion_Dynamic/Motion_Keyframed); when changing to dynamic, allow simulation activation if requested.
  • Function SetNoFavorAllowed(bool abNoFavor = true) — Mark this ref as one teammates won't do favors on.
  • Function SetOpen(bool abOpen = true) — Open or close this object.
  • Function SetPersistLoc(Location akLoc) — Set the persist location on an in-game created reference.
  • Function SetPlayerHasTaken(bool abTaken = true) — Toggle the player-has-taken flag on this ref.
  • Function SetPosition(float afX, float afY, float afZ) — Teleport to the given world position.
  • Function SetRadioOn(bool abOn = true) — Turn this radio receiver on or off.
  • Function SetRadioFrequency(float afFrequency) — Set this radio receiver's frequency.
  • Function SetRadioVolume(float afVolume) — Set this radio receiver's volume.
  • Function SetScale(float afScale) — Set the current scale.
  • Function SetValue(ActorValue akAV, float afValue) — Set an actor value.
  • Function TranslateTo(float afX, float afY, float afZ, float afXAngle, float afYAngle, float afZAngle, float afSpeed, float afMaxRotationSpeed = 0.0) — Smoothly translate (and rotate) the ref to the target pose at the given speed.
  • Function SplineTranslateTo(float afX, float afY, float afZ, float afXAngle, float afYAngle, float afZAngle, float afTangentMagnitude, float afSpeed, float afMaxRotationSpeed = 0.0) — Smoothly translate to the target pose along a spline.
  • Function SplineTranslateToRefNode(ObjectReference arTarget, string arNodeName, float afTangentMagnitude, float afSpeed, float afMaxRotationSpeed = 0.0) — Spline-translate to a named node on a target ref.
  • Function StartWorkshop(bool abStart = true) — Start or stop workshop mode at this workshop ref.
  • Function StopTranslation() — Halt any current translation; fires OnTranslationFailed.
  • Function StoreInWorkshop(Form akBaseItem, int aiCount = 1) — Store an item in this workshop.
  • Function TetherToHorse(ObjectReference akHorse) — Tether this prisoner cart to the given horse.
  • bool Function WaitForAnimationEvent(string asEventName) — Latent: wait for the animation graph to send the named event.
  • bool Function WaitFor3DLoad() — Latent: wait for this object's 3D to load. Returns false if disabled or unable to load.
  • Function WaitForWorkshopResourceRecalc() — Latent: wait for workshop resource recalc to complete.

Read-only properties

  • int Property Motion_Fixed = 0 — Motion type constant for SetMotionType.
  • int Property Motion_Dynamic = 1 — Motion type constant for SetMotionType.
  • int Property Motion_Keyframed = 2 — Motion type constant for SetMotionType.

Actor — animated character (extends ObjectReference)

Animated character with AI, combat, factions, perks, spells, and equipment. Inherits all of ObjectReference's natives and events, plus a large set of actor-only ones below.

Events (engine-fired)

  • OnCombatStateChanged(Actor akTarget, int aeCombatState) — Fired when this actor's combat state changes (0=not in combat, 1=in combat, 2=searching).
  • OnCommandModeCompleteCommand(int aeCommandType, ObjectReference akTarget) — Fired when this actor completes a command (0=None, 1=Call, 2=Follow, 3=Move, 4=Attack, 5=Inspect, 6=Retrieve, 7=Stay, 8=Release, 9=Heal).
  • OnCommandModeEnter() — Fired when the player begins commanding this actor.
  • OnCommandModeExit() — Fired when the player ends commanding this actor.
  • OnCommandModeGiveCommand(int aeCommandType, ObjectReference akTarget) — Fired when the player gives this actor a command.
  • OnCompanionDismiss() — Fired when the player dismisses this teammate companion.
  • OnConsciousnessStateChanged(bool abUnconscious) — Fired when this actor's consciousness state changes.
  • OnCripple(ActorValue akActorValue, bool abCrippled) — Fired when a limb is crippled or uncrippled.
  • OnDeferredKill(Actor akKiller) — Fired when this actor in deferred kill mode is "killed".
  • OnDeath(Actor akKiller) — Fired when this actor finishes dying.
  • OnDifficultyChanged(int aOldDifficulty, int aNewDifficulty) — Fired when the player changes difficulty (0=Very Easy ... 6=Survival w/ Hardcore).
  • OnDying(Actor akKiller) — Fired when this actor begins dying.
  • OnEnterBleedout() — Fired when this actor enters bleedout.
  • OnEnterSneaking() — Fired when this actor enters sneaking.
  • OnEscortWaitStart() — Fired when this actor begins waiting for the escorted actor to catch up.
  • OnEscortWaitStop() — Fired when this actor stops waiting (escortee caught up).
  • OnGetUp(ObjectReference akFurniture) — Fired when this actor leaves furniture.
  • OnItemEquipped(Form akBaseObject, ObjectReference akReference) — Fired when this actor equips something. akReference may be None for non-persistent.
  • OnItemUnequipped(Form akBaseObject, ObjectReference akReference) — Fired when this actor unequips something.
  • OnKill(Actor akVictim) — Fired when this actor kills another.
  • OnLocationChange(Location akOldLoc, Location akNewLoc) — Fired when this actor changes location.
  • OnPackageChange(Package akOldPackage) — Fired when this actor's AI package changes.
  • OnPackageEnd(Package akOldPackage) — Fired when this actor's AI package ends.
  • OnPackageStart(Package akNewPackage) — Fired when this actor begins a new AI package.
  • OnPartialCripple(ActorValue akActorValue, bool abCrippled) — Fired when a robot limb (or similar sub-segment) is partially crippled or uncrippled.
  • OnPickpocketFailed() — Fired when the player fails to pickpocket this actor.
  • OnPlayerCreateRobot(Actor akNewRobot) — Fired (on the player) when the player creates a new robot.
  • OnPlayerEnterVertibird(ObjectReference akVertibird) — Fired when the player enters a vertibird.
  • OnPlayerFallLongDistance(float afDamage) — Fired when the player takes fall damage.
  • OnPlayerFireWeapon(Form akBaseObject) — Fired when the player fires a weapon out of combat (timer-throttled).
  • OnPlayerHealTeammate(Actor akTeammate) — Fired when the player heals a teammate.
  • OnPlayerLoadGame() — Fired immediately after a save game has loaded.
  • OnPlayerModArmorWeapon(Form akBaseObject, ObjectMod akModBaseObject) — Fired when the player mods a weapon or armor in the menu.
  • OnPlayerModRobot(Actor akRobot, ObjectMod akModBaseObject) — Fired when the player mods a robot.
  • OnPlayerSwimming() — Fired when the player begins swimming.
  • OnPlayerUseWorkBench(ObjectReference akWorkBench) — Fired when the player uses a workbench.
  • OnRaceSwitchComplete() — Fired when this actor finishes changing race.
  • OnSit(ObjectReference akFurniture) — Fired when this actor sits in furniture.
  • OnSpeechChallengeAvailable(ObjectReference akSpeaker) — Fired when the player gets a speech challenge in dialogue.

Native functions

  • Function AddPerk(Perk akPerk, bool abNotify = false) — Add the perk to this actor.
  • bool Function AddSpell(Spell akSpell, bool abVerbose = true) — Add the spell. Returns success.
  • Function AllowBleedoutDialogue(bool abCanTalk) — Allow this essential actor to talk while bleeding out.
  • Function AllowPCDialogue(bool abTalk) — Override the race flag controlling whether this actor can be addressed in dialogue.
  • Function AttachAshPile(Form akAshPileBase = None) — Attach an ash-pile object to this actor at its location; None uses the default.
  • Function AttemptAnimationSetSwitch() — Try to swap the actor's loaded animation set.
  • bool Function CanFlyHere() — True if this actor can fly here.
  • bool Function ChangeAnimArchetype(Keyword apKeyword = None) — Change the anim archetype keyword.
  • bool Function ChangeAnimFlavor(Keyword apKeyword = None) — Change the anim flavor keyword.
  • Function ChangeHeadPart(HeadPart apHeadPart, bool abRemovePart = false, bool abRemoveExtraParts = false) — Swap a head part.
  • Function ClearArrested() — Clear the arrested state on this actor.
  • Function ClearExpressionOverride() — Clear any expression override.
  • Function ClearExtraArrows() — Clear extra arrows from the actor's 3D.
  • Function ClearLookAt() — Clear the look-at target.
  • bool Function Dismount() — Begin dismounting. Returns success.
  • Function DispelAllSpells() — Dispel every spell on this actor.
  • bool Function DispelSpell(Spell akSpell) — Dispel a specific spell.
  • Function DoCombatSpellApply(Spell akSpell, ObjectReference akTarget) — Apply a spell to a target during combat.
  • Function EnableAI(bool abEnable = true, bool abPauseVoice = false) — Enable or disable AI; optionally pause voice mid-line.
  • Function EndDeferredKill() — End a deferred kill state. Must be called after StartDeferredKill or actor stays invulnerable.
  • Function EquipItem(Form akItem, bool abPreventRemoval = false, bool abSilent = false) — Force-equip an item.
  • Function EquipSpell(Spell akSpell, int aiSource) — Equip a spell in a casting source (0=left hand, 1=right hand).
  • Function EvaluatePackage(bool abResetAI = false) — Force the AI to re-evaluate its package stack.
  • int Function GetBribeAmount() — Cost in caps to bribe this actor.
  • Actor[] Function GetAllCombatTargets() — All current combat targets for this actor.
  • Faction Function GetCrimeFaction() — Faction this actor reports crimes to.
  • int Function GetCombatState() — Current combat state (0=not in combat, 1=in combat, 2=searching).
  • Actor Function GetCombatTarget() — Current combat target.
  • Package Function GetCurrentPackage() — Current AI package.
  • Actor Function GetDialogueTarget() — Current dialogue target.
  • int Function GetEquippedItemType(int aiEquipIndex) — Type code of the item in an equip slot. Codes documented in .psc: -1=Error, 0=Nothing, 1..7 melee, 8 staff, 9 gun, 10 grenade, 11 mine, 24 magic, 25 shield, 26 torch.
  • Weapon Function GetEquippedWeapon(int aiEquipIndex = 0) — Equipped weapon in the given slot.
  • Armor Function GetEquippedShield() — Equipped shield.
  • Spell Function GetEquippedSpell(int aiSource) — Equipped spell in the given source (0=left, 1=right, 2=other, 3=instant).
  • int Function GetFactionRank(Faction akFaction) — This actor's rank with the faction; -1 if not a member.
  • int Function GetFactionReaction(Actor akOther) — Faction-based reaction (0=Neutral, 1=Enemy, 2=Ally, 3=Friend).
  • int Function GetFlyingState() — Flight state (0=not flying, 1=taking off, 2=cruising, 3=hovering, 4=landing).
  • ObjectReference Function GetForcedLandingMarker() — Marker this actor must land at, or None.
  • int Function GetGoldAmount() — Amount of gold/caps this actor carries.
  • int Function GetHighestRelationshipRank() — Highest relationship rank this actor holds; 0 if none.
  • Actor Function GetKiller() — Killer of this actor, or None if alive.
  • int Function GetLevel() — Current level.
  • float Function GetLightLevel() — Current light level.
  • int Function GetLowestRelationshipRank() — Lowest relationship rank this actor holds; 0 if none.
  • ActorBase Function GetLeveledActorBase() — Engine-generated leveled "fake" base for this actor.
  • bool Function GetNoBleedoutRecovery() — True if no-bleedout-recovery flag is set.
  • bool Function GetPlayerControls() — True if this actor receives player input.
  • Race Function GetRace() — Current race.
  • int Function GetRelationshipRank(Actor akOther) — Relationship rank with another actor (4=Lover, 3=Ally, 2=Confidant, 1=Friend, 0=Acquaintance, -1=Rival, -2=Foe, -3=Enemy, -4=Archnemesis).
  • int Function GetSitState() — Sit state (0=not sitting, 2=wants to sit, 3=sitting, 4=wants to stand).
  • int Function GetSleepState() — Sleep state (0=not sleeping, 2=wants to sleep, 3=sleeping, 4=wants to wake).
  • bool Function HasAssociation(AssociationType akAssociation, Actor akOther = None) — True if this actor has the association with akOther, or with anyone if None.
  • bool Function HasFamilyRelationship(Actor akOther = None) — True if family-related.
  • bool Function HasDetectionLOS(ObjectReference akOther) — Detection-based line-of-sight check. Only the player can check non-actor targets.
  • bool Function HasMagicEffect(MagicEffect akEffect) — True if currently affected by the given magic effect.
  • bool Function HasMagicEffectWithKeyword(Keyword akKeyword) — True if any active magic effect has the keyword.
  • bool Function HasParentRelationship(Actor akOther) — True if parent-related.
  • bool Function HasPerk(Perk akPerk) — True if has the perk.
  • bool Function HasSpell(Form akForm) — True if has the spell.
  • bool Function IsAIEnabled() — True if AI is enabled.
  • bool Function IsAlarmed() — True if alarmed.
  • bool Function IsAlerted() — True if alerted.
  • bool Function IsAllowedToFly() — True if allowed to fly.
  • bool Function IsArrested() — True if currently arrested.
  • bool Function IsArrestingTarget() — True if currently arresting target (must be guard and alarmed).
  • bool Function IsBeingRidden() — True if this actor is being ridden.
  • bool Function IsBeingRiddenBy(Actor akActor) — True if akActor is riding this one.
  • bool Function IsBleedingOut() — True if bleeding out.
  • bool Function IsBribed() — True if bribe flag is set.
  • bool Function IsChild() — True if a child.
  • bool Function IsCommandedActor() — True if commanded by another.
  • bool Function IsDead() — True if dead.
  • bool Function IsDetectedBy(Actor akOther) — True if detected by akOther.
  • bool Function IsDismembered(string asBodyPart = "") — True if the named limb is dismembered (empty = any).
  • bool Function IsDoingFavor() — True if doing a favor for the player.
  • bool Function IsEquipped(Form akItem) — True if akItem is equipped.
  • bool Function IsEssential() — True if essential.
  • bool Function IsFlying() — True if currently flying.
  • bool Function IsGuard() — True if a guard.
  • bool Function IsGhost() — True if flagged as a ghost.
  • bool Function IsHostileToActor(Actor akActor) — True if hostile to akActor.
  • bool Function IsInCombat() — True if in combat.
  • bool Function IsInFaction(Faction akFaction) — True if a member of the faction.
  • bool Function IsInIronSights() — True if in iron sights.
  • bool Function IsInKillMove() — True if in a kill move.
  • bool Function IsInScene() — True if in a scene.
  • bool Function IsIntimidated() — True if intimidated by the player.
  • bool Function IsOnMount() — True if mounted.
  • bool Function IsOverEncumbered() — True if over-encumbered.
  • bool Function IsPlayersLastRiddenHorse() — True if this is the player's last-ridden horse.
  • bool Function IsPlayerTeammate() — True if currently a teammate.
  • bool Function IsRunning() — True if running.
  • bool Function IsSeatOccupied(Keyword apKeyword) — True if the seat keyword is occupied.
  • bool Function IsSneaking() — True if sneaking.
  • bool Function IsSprinting() — True if sprinting.
  • bool Function IsTalking() — True if speaking.
  • bool Function IsTrespassing() — True if trespassing.
  • bool Function IsUnconscious() — True if unconscious.
  • bool Function IsWeaponDrawn() — True if weapon and/or magic drawn.
  • Function Kill(Actor akKiller = None) — Kill this actor with optional guilty party.
  • Function KillSilent(Actor akKiller = None) — Kill without firing the kill event.
  • Function Dismember(string asBodyPart, bool abForceExplode = false, bool abForceDismember = false, bool abForceBloodyMess = false) — Dismember a named limb. Body part names listed in .psc (e.g. "Torso", "LeftLeg1"). Force flags ignore the editor's random odds.
  • Function MarkItemAsFavorite(Form akItem, int aiSlot = -1) — Mark an item as a favorite, optionally in a specific slot.
  • Function ModFactionRank(Faction akFaction, int aiMod) — Modify rank with a faction.
  • Function MoveToPackageLocation() — Snap this actor to its package's initial location. Useful for disabled actors.
  • Function OpenInventory(bool abForceOpen = false) — Open this actor's inventory pickpocket-style. Limited to teammates unless forced.
  • bool Function PathToReference(ObjectReference aTarget, float afWalkRunPercent) — Latent: path to a ref. Returns when goal reached, failed, or interrupted.
  • bool Function PlayIdle(Idle akIdle) — Play an idle animation.
  • bool Function PlayIdleAction(Action aAction, ObjectReference aTarget = None) — Run an action on this actor.
  • bool Function PlayIdleWithTarget(Idle akIdle, ObjectReference akTarget) — Play an idle, overriding target.
  • Function PlaySubGraphAnimation(string asEventName) — Send an event to this actor's animation subgraphs.
  • Function RemoveFromFaction(Faction akFaction) — Remove from a faction.
  • Function RemoveFromAllFactions() — Remove from every faction.
  • Function RemovePerk(Perk akPerk) — Remove a perk.
  • bool Function RemoveSpell(Spell akSpell) — Remove a spell. Returns success.
  • Function ResetHealthAndLimbs() — Reset health and limb state.
  • Function Resurrect() — Resurrect this actor.
  • Function SendAssaultAlarm() — Behave as if assaulted.
  • Function SendTrespassAlarm(Actor akCriminal) — Behave as if akCriminal was caught trespassing.
  • Function SetAlert(bool abAlerted = true) — Set alert state.
  • Function SetAllowFlying(bool abAllowed = true, bool abAllowCrash = true, bool abAllowSearch = false) — Toggle whether this actor can fly; will land if disallowed.
  • Function SetAlpha(float afTargetAlpha, bool abFade = false) — Set actor alpha (0..1), optionally fading.
  • Function SetAttackActorOnSight(bool abAttackOnSight = true) — Make every other actor attack this one on sight.
  • Function SetAvoidPlayer(bool abAvoid = true) — Whether pathing should avoid the player.
  • Function SetCommandState(bool abStartCommandMode) — Toggle command mode. Requires SetCanDoCommand first.
  • Function SetBribed(bool abBribe = true) — Toggle the bribed flag.
  • Function SetCanDoCommand(bool abCanCommand = true) — Toggle whether this actor can be commanded.
  • Function SetCombatStyle(CombatStyle akCombatStyle) — Set the combat style.
  • Function SetCrimeFaction(Faction akFaction) — Set the crime-reporting faction.
  • Function SetCriticalStage(int aiStage) — Set the critical death stage (0=None, 1=Goo start ... 6=Freeze end). See CritStage_* constants.
  • Function SetDoingFavor(bool abDoingFavor = true, bool abWorkShopMode = false) — Toggle the favor-for-player flag.
  • Function ChangeAnimFaceArchetype(Keyword apKeyword = None) — Change anim face archetype.
  • Function SetEyeTexture(TextureSet akNewTexture) — Override the eye texture.
  • Function SetEssential(bool abEssential) — Toggle essential.
  • Function SetFactionRank(Faction akFaction, int aiRank) — Set rank with a faction.
  • Function SetForcedLandingMarker(ObjectReference aMarker) — Force this actor to land at the given marker.
  • Function SetGhost(bool abIsGhost = true) — Toggle the ghost flag.
  • Function SetHasCharGenSkeleton(bool abCharGen = true) — Toggle the chargen-skeleton flag.
  • Function SetHeadTracking(bool abEnable = true) — Toggle head tracking.
  • Function SetIntimidated(bool abIntimidate = true) — Toggle intimidated flag.
  • Function SetLookAt(ObjectReference akTarget, bool abPathingLookAt = false) — Set head-track target, optionally also pathing look-at.
  • Function SetNoBleedoutRecovery(bool abAllowed) — Set the no-bleedout-recovery flag.
  • Function SetNotShowOnStealthMeter(bool abNotShow) — Hide non-hostile actor from the stealth meter.
  • Function SetOutfit(Outfit akOutfit, bool abSleepOutfit = false) — Set outfit; actor will wear it.
  • Function SetOverrideVoiceType(VoiceType akVoiceType) — Override voice type.
  • Function SetPlayerControls(bool abControls) — Toggle whether player input is sent to this actor.
  • Function SetPlayerResistingArrest() — Mark the player as resisting arrest from this actor's faction.
  • Function SetPlayerTeammate(bool abTeammate = true, bool abCanDoFavor = true, bool abGivePlayerXP = false) — Toggle teammate status, with options for favor allowance and player XP.
  • Function SetProtected(bool abProtected) — Toggle protected.
  • Function SetRace(Race akRace = None) — Change race; None reverts to original.
  • Function SetRelationshipRank(Actor akOther, int aiRank) — Set relationship rank with another actor.
  • bool Function SetRestrained(bool abRestrained = true) — Toggle restrained. Returns true if state changed.
  • Function SetSubGraphFloatVariable(string asVariableName, float afValue) — Set a float on every animation subgraph of this actor.
  • bool Function SetUnconscious(bool abUnconscious = true) — Toggle unconscious. Returns true if state changed.
  • Function SetVehicle(Actor akVehicle) — Mount on a vehicle/horse. None or self detaches.
  • Function ShowBarterMenu() — Open the barter menu with this actor.
  • Function StartCannibal(Actor akTarget) — Begin cannibal feed on akTarget.
  • Function StartCombat(Actor akTarget, bool abPreferredTarget = false) — Begin combat with the target.
  • Function StartDeferredKill() — Enter deferred kill state. Must be paired with EndDeferredKill.
  • Function StartVampireFeed(Actor akTarget) — Begin vampire feed on akTarget.
  • Function StartFrenzyAttack(float aChance = 0.1, float aInterval = 0.5) — Begin a frenzy-attack target selector.
  • Function StopCombat() — Remove this actor from combat.
  • Function StopCombatAlarm() — Stop all combat and alarms against this actor.
  • Function SwitchToPowerArmor(ObjectReference aArmorFurniture) — Snap into power armor without animation or repositioning.
  • bool Function SnapIntoInteraction(ObjectReference akTarget) — Near-instant snap into furniture or onto a mount.
  • bool Function TrapSoul(Actor akTarget) — Try to trap the target's soul.
  • Function UnequipAll() — Unequip everything.
  • Function UnequipItem(Form akItem, bool abPreventEquip = false, bool abSilent = false) — Unequip a specific item.
  • Function UnequipItemSlot(int aiSlot) — Unequip everything in a slot.
  • Function UnequipSpell(Spell akSpell, int aiSource) — Unequip a spell from a source (0=left, 1=right).
  • Function UnLockOwnedDoorsInCell() — Unlock every door this actor qualifies to own in the current parent cell.
  • bool Function WillIntimidateSucceed() — Predict whether intimidate would succeed.
  • bool Function WornHasKeyword(Keyword akKeyword) — True if any worn item has the keyword.
  • bool Function WouldBeStealing(ObjectReference akObject) — True if taking the ref would be stealing.
  • int Function WouldRefuseCommand(ObjectReference akObject) — Would this actor refuse the command on the ref? (0=will do, 1=other refusal, 2=impossible, 3=morale).
  • Function StartSneaking() — Make this actor start sneaking.
  • Function DrawWeapon() — Draw weapon.
  • Function DogPlaceInMouth(Form akItem) — Place an item in this dog's mouth.
  • Function DogDropItems() — Drop the dog's mouth items.
  • Function ForceMovementDirection(float afXAngle = 0.0, float afYAngle = 0.0, float afZAngle = 0.0) (debugOnly) — Force movement direction in degrees.
  • Function ForceMovementSpeed(float afSpeedMult) (debugOnly) — Force movement speed multiplier.
  • Function ForceMovementRotationSpeed(float afXMult = 0.0, float afYMult = 0.0, float afZMult = 0.0) (debugOnly) — Force per-axis rotation speed multipliers.
  • Function ForceMovementDirectionRamp(float afXAngle = 0.0, float afYAngle = 0.0, float afZAngle = 0.0, float afRampTime = 0.1) (debugOnly) — Ramp to forced movement direction over afRampTime seconds.
  • Function ForceMovementSpeedRamp(float afSpeedMult, float afRampTime = 0.1) (debugOnly) — Ramp to forced movement speed.
  • Function ForceMovementRotationSpeedRamp(float afXMult = 0.0, float afYMult = 0.0, float afZMult = 0.0, float afRampTime = 0.1) (debugOnly) — Ramp to forced rotation speeds.
  • Function ForceTargetDirection(float afXAngle = 0.0, float afYAngle = 0.0, float afZAngle = 0.0) (debugOnly) — Set target movement direction.
  • Function ForceTargetSpeed(float afSpeed) (debugOnly) — Set target movement speed.
  • Function ForceTargetAngle(float afXAngle = 0.0, float afYAngle = 0.0, float afZAngle = 0.0) (debugOnly) — Set target facing angle.
  • Function ClearForcedMovement() (debugOnly) — Clear all forced movement.
  • bool Function CanMoveVertical() (debugOnly) — True if actor can move vertically.
  • bool Function CanStrafe() (debugOnly) — True if actor can strafe.

Read-only properties

  • int Property CritStage_None = 0 — Critical stage constant.
  • int Property CritStage_GooStart = 1 — Critical stage constant.
  • int Property CritStage_GooEnd = 2 — Critical stage constant.
  • int Property CritStage_DisintegrateStart = 3 — Critical stage constant.
  • int Property CritStage_DisintegrateEnd = 4 — Critical stage constant.
  • int Property CritStage_FreezeStart = 5 — Critical stage constant.
  • int Property CritStage_FreezeEnd = 6 — Critical stage constant.

ActorBase — editor-defined actor template

Extends Form. The base record an Actor reference instances; carries class, race, sex, level, essential/protected/invulnerable flags, and an optional unique-actor binding.

Native functions

  • Class Function GetClass() — This actor's class.
  • int Function GetDeadCount() — Number of actors of this base type killed.
  • FormList Function GetGiftFilter() — Gift filter formlist.
  • Race Function GetRace() — This actor's race.
  • int Function GetLevel() — Level (player-scaled).
  • int Function GetLevelExact() — Level unmodified by player-level matching.
  • int Function GetSex() — Sex (-1=None, 0=Male, 1=Female).
  • Actor Function GetUniqueActor() — The unique actor reference if this is a UniqueNPC.
  • bool Function IsEssential() — True if essential.
  • bool Function IsInvulnerable() — True if invulnerable.
  • bool Function IsProtected() — True if protected (only player can kill).
  • bool Function IsUnique() — True if unique.
  • Function SetEssential(bool abEssential = true) — Toggle essential. Setting essential clears protected.
  • Function SetInvulnerable(bool abInvulnerable = true) — Toggle invulnerable.
  • Function SetProtected(bool abProtected = true) — Toggle protected. Setting protected clears essential.
  • Function SetOutfit(Outfit akOutfit, bool abSleepOutfit = false) — Set the actor base's outfit.

ActiveMagicEffect — running magic effect instance

Extends ScriptObject. A live magic effect attached to an actor. Receives the target's ObjectReference events and the actor's Actor events while bound.

Events (engine-fired)

  • OnEffectStart(Actor akTarget, Actor akCaster) — Fired when this effect first starts. May fire before OnInit.
  • OnEffectFinish(Actor akTarget, Actor akCaster) — Fired when this effect finishes. The effect may already be deleted; calling functions on it will fail.
  • All ObjectReference and Actor events listed above are also delivered to the effect from the bound actor.

Native functions

  • Function Dispel() — Dispel this effect.
  • MagicEffect Function GetBaseObject() — Base MagicEffect record this effect uses.
  • Actor Function GetCasterActor() — Actor that cast this spell.
  • Actor Function GetTargetActor() — Actor this spell is targeting.
  • Function StartObjectProfiling() (debugOnly) — Start profiling this effect.
  • Function StopObjectProfiling() (debugOnly) — Stop profiling this effect.

Activator — activatable static form

Extends Form. Static form that can be activated; covers radios and similar.

Native functions

  • bool Function IsRadio() — True if this activator is a radio.

Alias — quest alias base

Extends ScriptObject. Base of all quest aliases. The alias holds a binding that gets filled when the owning quest starts.

Events (engine-fired)

  • OnAliasInit() — Fired when this alias is initialised and filled, before the quest's startup stage runs.
  • OnAliasReset() — Fired when the owning quest is reset.
  • OnAliasShutdown() — Fired when the alias has been shut down because the quest stopped. Alias is empty by this point.

Native functions

  • Quest Function GetOwningQuest() — Quest this alias belongs to.
  • Function StartObjectProfiling() (debugOnly) — Start profiling this alias.
  • Function StopObjectProfiling() (debugOnly) — Stop profiling this alias.

ReferenceAlias — alias pointing at an ObjectReference

Extends Alias. Receives a copy of every ObjectReference event (and every Actor event when the ref is an actor) that fires on the bound ref.

Events (engine-fired)

Mirrors the entire ObjectReference event list and the entire Actor event list above. Each event is fired on the alias whenever it would fire on the underlying reference. The signatures match exactly except sender info is implicit. See ObjectReference and Actor for the complete catalogue.

Native functions

  • Function ApplyToRef(ObjectReference akRef) — Apply the alias data to the given ref without actually putting that ref into the alias slot.
  • Function Clear() — Clear the alias. Fails on non-optional aliases.
  • ObjectReference Function GetReference() — The reference this alias points at.
  • Function ForceRefTo(ObjectReference akNewRef) — Force this alias to use the given ref.
  • Function RemoveFromRef(ObjectReference akRef) — Remove this alias data from the ref.

RefCollectionAlias — alias pointing at a collection of references

Extends Alias. Holds a dynamic collection of refs. Like ReferenceAlias, mirrors every ObjectReference and Actor event for any ref in the collection — but each event has an extra leading ObjectReference akSenderRef parameter identifying which member of the collection fired.

Events (engine-fired)

Mirrors the entire ObjectReference event list and Actor event list with an added leading akSenderRef parameter. Examples:

  • OnActivate(ObjectReference akSenderRef, ObjectReference akActionRef)
  • OnDeath(ObjectReference akSenderRef, Actor akKiller)
  • OnHolotapePlay(ObjectReference akSenderRef, ObjectReference aTerminalRef)
  • ... and so on for every event in ObjectReference and Actor.

Native functions

  • Function AddRef(ObjectReference akNewRef) — Add a ref to the collection.
  • int Function Find(ObjectReference akFindRef) — Index of akFindRef in the collection; negative if not found.
  • ObjectReference Function GetAt(int aiIndex) — Ref at the given index.
  • int Function GetCount() — Number of refs in the collection.
  • Function RemoveAll() — Empty the collection.
  • Function RemoveRef(ObjectReference akRemoveRef) — Remove a specific ref.

LocationAlias — alias pointing at a Location

Extends Alias. Quest alias whose binding is a Location rather than a reference.

Native functions

  • Function Clear() — Clear the alias. Fails on non-optional aliases.
  • Location Function GetLocation() — Location this alias points at.
  • Function ForceLocationTo(Location akNewLocation) — Force this alias onto a specific location.

Cell — interior or exterior cell

Extends Form. Container for refs in the world; carries fast-travel toggle, fog, and ownership flags.

Native functions

  • Function EnableFastTravel(bool abEnable = true) — Toggle fast travel in this cell.
  • ActorBase Function GetActorOwner() — ActorBase that owns this cell, or None.
  • Faction Function GetFactionOwner() — Faction that owns this cell, or None.
  • bool Function IsAttached() — True if attached (in the loaded area).
  • bool Function IsInterior() — True if interior.
  • bool Function IsLoaded() — True if loaded.
  • Function Reset() — Flag this cell for reset on next load.
  • Function SetActorOwner(ActorBase akActor) — Set ActorBase as owner.
  • Function SetFactionOwner(Faction akFaction) — Set faction as owner.
  • Function SetFogColor(int aiNearRed, int aiNearGreen, int aiNearBlue, int aiFarRed, int aiFarGreen, int aiFarBlue) — Set near and far fog colors. Interior, non-sky-lit cells only.
  • Function SetFogPlanes(float afNear, float afFar) — Set fog near and far planes.
  • Function SetFogPower(float afPower) — Set fog power.
  • Function SetPublic(bool abPublic = true) — Mark cell as public or private.

Debug — debug and developer statics

Native DebugOnly Hidden. Static-only; all functions are global. Most do nothing on release console builds. Use Debug.Trace(...), Debug.Notification(...), etc.

Native globals

  • Function CenterOnCell(string asCellname)coc console function: teleport the player to the named cell.
  • float Function CenterOnCellAndWait(string asCellname)coc blocking variant; returns when teleport completes.
  • float Function PlayerMoveToAndWait(string asDestRef)player.moveto-style blocking move.
  • Function CloseUserLog(string asLogName) — Close a user log.
  • Function DumpAliasData(Quest akQuest) — Dump all alias fill info for a quest to the AliasDump log.
  • Function DumpEventRegistrations(ScriptObject akScript) — Dump every event registration on a script to the Papyrus log.
  • Function EnableAI(bool abEnable = true) — Toggle AI processing.
  • Function EnableCollisions(bool abEnable = true) — Toggle collision detection.
  • Function EnableDetection(bool abEnable = true) — Toggle AI detection.
  • Function EnableMenus(bool abEnable = true) — Toggle menu rendering.
  • string Function GetConfigName() — Build config name.
  • string Function GetPlatformName() — Platform name.
  • string Function GetVersionNumber() — Version string.
  • Function MessageBox(string asMessageBoxText) — Show an in-game message box.
  • Function Notification(string asNotificationText) — Show an in-game corner notification.
  • bool Function OpenUserLog(string asLogName) — Open a user log. Fails if already open.
  • Function QuitGame() — Quit the game.
  • Function SetFootIK(bool abFootIK) — Toggle foot IK.
  • Function SetGodMode(bool abGodMode)tgm: toggle god mode.
  • Function StartScriptProfiling(string asScriptName) — Start profiling a named script.
  • Function StartStackProfiling() — Start profiling the calling stack.
  • Function StartStackRootProfiling(string asScriptName, ScriptObject akObj = None) — Profile every stack rooted in the named script (and optional object).
  • Function StopScriptProfiling(string asScriptName) — Stop profiling a named script.
  • Function StopStackProfiling() — Stop profiling the calling stack.
  • Function StopStackRootProfiling(string asScriptName, ScriptObject akObj = None) — Stop stack-root profiling.
  • Function Trace(string asTextToPrint, int aiSeverity = 0) — Write to the script log (0=Info, 1=Warning, 2=Error).
  • Function TraceFunction(string asTextToPrint = "Tracing function on request", int aiSeverity = 0) — Trace the calling function with all variable values.
  • Function TraceStack(string asTextToPrint = "Tracing stack on request", int aiSeverity = 0) — Trace the current stack.
  • bool Function TraceUser(string asUserLog, string asTextToPrint, int aiSeverity = 0) — Trace to a user log; fails if log not opened.
  • Function ShowRefPosition(ObjectReference arRef) — Add a tripod at a reference's position. Non-release builds only.
  • Function DBSendPlayerPosition() — Send player position to the dev database. Non-release PC/Xenon builds only.

EncounterZone — reset and level zone

Extends Form. Aggregates actors that share a level/reset behaviour.

Native functions

  • int Function CountActors(Keyword apRequiredLinkedRefKeyword = None, Keyword apExcludeLinkedRefKeyword = None) — Count instantiated actors in this zone, filtered by linked-ref keywords.
  • Actor[] Function GetActors(Keyword apRequiredLinkedRefKeyword = None, Keyword apExcludeLinkedRefKeyword = None) — Array of those actors.
  • Function Reset() — Mark this zone for reset on next player entry.

Enchantment — weapon or armor enchantment

Extends Form.

Native functions

  • bool Function IsHostile() — True if this enchantment is classified as hostile.

Faction — actor faction and crime group

Extends Form. Tracks actor membership, crime gold, infamy, reactions to other factions, and the player's relationship to the faction.

Native functions

  • bool Function CanPayCrimeGold() — True if the player can afford the faction's crime gold.
  • int Function GetCrimeGold() — Total crime gold owed.
  • int Function GetCrimeGoldNonViolent() — Non-violent crime gold owed.
  • int Function GetCrimeGoldViolent() — Violent crime gold owed.
  • int Function GetInfamy() — Player's accumulated crime gold (infamy).
  • int Function GetInfamyNonViolent() — Non-violent infamy.
  • int Function GetInfamyViolent() — Violent infamy.
  • int Function GetFactionReaction(Actor akOther) — Reaction to an actor (0=Neutral, 1=Enemy, 2=Ally, 3=Friend).
  • int Function GetStolenItemValueCrime() — Witnessed stolen-item value from this faction.
  • int Function GetStolenItemValueNoCrime() — Unwitnessed stolen-item value.
  • bool Function IsFactionInCrimeGroup(Faction akOther) — True if akOther is in this faction's crime group.
  • bool Function IsPlayerEnemy() — True if the player is flagged enemy.
  • bool Function IsPlayerExpelled() — True if the player is expelled.
  • Function ModCrimeGold(int aiAmount, bool abViolent = false) — Modify crime gold.
  • Function PlayerPayCrimeGold(bool abRemoveStolenItems = true, bool abGoToJail = true) — Make the player pay crime gold; optionally remove stolen items and send to jail.
  • Function SendAssaultAlarm() — Find a nearby member and trigger an assault alarm.
  • Function SendPlayerToJail(bool abRemoveInventory = true, bool abRealJail = true) — Send the player to this faction's jail.
  • Function SetAlly(Faction akOther, bool abSelfIsFriendToOther = false, bool abOtherIsFriendToSelf = false) — Set this faction and another as allies (or friends per flag).
  • Function SetCrimeGold(int aiGold) — Set non-violent crime gold.
  • Function SetCrimeGoldViolent(int aiGold) — Set violent crime gold.
  • Function SetEnemy(Faction akOther, bool abSelfIsNeutralToOther = false, bool abOtherIsNeutralToSelf = false) — Set this faction and another as enemies (or neutral per flag).
  • Function SetPlayerEnemy(bool abIsEnemy = true) — Toggle player-enemy.
  • Function SetPlayerExpelled(bool abIsExpelled = true) — Toggle player-expelled.

FormList — ordered list of forms

Extends Form. Mutable ordered list of form references.

Native functions

  • Function AddForm(Form apForm) — Add a form.
  • int Function Find(Form apForm) — Index of a form; negative if not found.
  • int Function GetSize() — Element count.
  • Form Function GetAt(int aiIndex) — Form at index.
  • bool Function HasForm(Form akForm) — True if the list contains the form.
  • Function RemoveAddedForm(Form apForm) — Remove a script-added form.
  • Function Revert() — Remove every script-added form.

Furniture — interactable furniture (extends Activator)

Native functions

  • Form Function GetAssociatedForm() — Form associated with this furniture (e.g. the workbench's recipe form).

Game — global game statics

Native Hidden. Static-only; all functions are global. Use Game.GetPlayer(), Game.FastTravel(...), etc.

Native globals

  • Function AddAchievement(int aiAchievementID) — Award an achievement.
  • Function AddPerkPoints(int aiPerkPoints) — Add perk points to the player.
  • Function AdvanceSkill(string asSkillName, float afMagnitude) — Advance a skill on the player.
  • Function ClearPrison() — Clear prison variables on the player.
  • Function ClearTempEffects() — Clear temporary effects.
  • Function EnablePipboyHDRMask(bool abEnable = true) — Toggle HDR mask on the Pipboy screen.
  • Function Error(string asMessage) (betaOnly) — Log an error with stack trace.
  • Function FadeOutGame(bool abFadingOut, bool abBlackFade, float afSecsBeforeFade, float afFadeDuration, bool abStayFaded = false) — Fade the game to/from black.
  • Function FastTravel(ObjectReference akDestination) — Fast-travel the player to a destination.
  • ObjectReference Function FindClosestReferenceOfType(Form arBaseObject, float afX, float afY, float afZ, float afRadius) — Closest ref of a base in radius around a point.
  • ObjectReference Function FindRandomReferenceOfType(Form arBaseObject, float afX, float afY, float afZ, float afRadius) — Random ref of a base in radius.
  • ObjectReference Function FindClosestReferenceOfAnyTypeInList(FormList arBaseObjects, float afX, float afY, float afZ, float afRadius) — Closest ref of any base in the list.
  • ObjectReference Function FindRandomReferenceOfAnyTypeInList(FormList arBaseObjects, float afX, float afY, float afZ, float afRadius) — Random ref of any base in the list.
  • Actor Function FindClosestActor(float afX, float afY, float afZ, float afRadius) — Closest actor in radius.
  • Actor Function FindRandomActor(float afX, float afY, float afZ, float afRadius) — Random actor in radius.
  • Function ForceDisableSSRGodraysDirLight(bool abDisableSSR, bool abDisableGodrays, bool abDisableDirLight) — Disable SSR, godrays, and/or directional lighting. Reset after 240 frames if not continually called.
  • Function ForceThirdPerson() — Force player to third person.
  • Function ForceFirstPerson() — Force player to first person.
  • int Function GetXPForLevel(int auiLevel) — Total XP needed to reach a level (not the gap).
  • Function ShowFirstPersonGeometry(bool abShow = true) — Toggle the player's first-person geometry.
  • Function ShowAllMapMarkers() — Reveal every map marker.
  • ActorValue Function GetAggressionAV() — Aggression actor value.
  • ActorValue Function GetAgilityAV() — Agility actor value.
  • ActorValue Function GetCharismaAV() — Charisma actor value.
  • ActorValue Function GetConfidenceAV() — Confidence actor value.
  • int Function GetDifficulty() — Current difficulty (0=Very Easy ... 6=Survival w/ Hardcore).
  • ActorValue Function GetEnduranceAV() — Endurance actor value.
  • Form Function GetForm(int aiFormID) — Form by raw ID.
  • Form Function GetFormFromFile(int aiFormID, string asFilename) — Form by ID from a specific plugin.
  • float Function GetGameSettingFloat(string asGameSetting) — Get a float game setting.
  • int Function GetGameSettingInt(string asGameSetting) — Get an int game setting.
  • string Function GetGameSettingString(string asGameSetting) — Get a string game setting.
  • ActorValue Function GetHealthAV() — Health actor value.
  • ActorValue Function GetIntelligenceAV() — Intelligence actor value.
  • ActorValue Function GetLuckAV() — Luck actor value.
  • ActorValue Function GetPerceptionAV() — Perception actor value.
  • Actor Function GetPlayer() — The player actor.
  • Actor[] Function GetPlayerFollowers() — Actors currently following the player.
  • ObjectReference Function GetPlayerGrabbedRef() — Reference the player is currently grabbing.
  • float Function GetPlayerRadioFrequency() — Player's current radio frequency.
  • Actor Function GetPlayersLastRiddenHorse() — Last horse the player rode.
  • float Function GetRealHoursPassed() — Real hours of play time.
  • ActorValue Function GetSuspiciousAV() — Suspicious actor value.
  • ActorValue Function GetStrengthAV() — Strength actor value.
  • Function IncrementSkill(ActorValue akActorValue, int aiCount = 1) — Increment a skill on the player.
  • Function IncrementStat(string asStatName, int aiModAmount = 1) — Modify a misc stat by an amount.
  • Function InitializeMarkerDistances() — Refresh compass marker distances after game settings change.
  • bool Function IsActivateControlsEnabled() — Activate controls on/off.
  • bool Function IsVATSControlsEnabled() — VATS controls on/off.
  • bool Function IsVATSPlaybackActive() — True if VATS playback is running.
  • bool Function IsCamSwitchControlsEnabled() — Cam-switch controls on/off.
  • bool Function IsFastTravelControlsEnabled() — Fast-travel controls on/off.
  • bool Function IsFastTravelEnabled() — Fast travel enabled at all.
  • bool Function IsFavoritesControlsEnabled() — Favorites menu enabled.
  • bool Function IsFightingControlsEnabled() — Fighting controls enabled.
  • bool Function IsJournalControlsEnabled() — Journal controls enabled.
  • bool Function IsJumpingControlsEnabled() — Jumping controls enabled.
  • bool Function IsLookingControlsEnabled() — Looking controls enabled.
  • bool Function IsMenuControlsEnabled() — Menu controls enabled.
  • bool Function IsMovementControlsEnabled() — Movement controls enabled.
  • bool Function IsPluginInstalled(string asName) — True if a plugin is installed.
  • bool Function IsPlayerInRadioRange(float afFrequency) — True if player is in a transmitter's outer radius for the frequency.
  • bool Function IsPlayerListening(float afFrequency) — True if Pipboy is on, set to a matching frequency, and in range.
  • bool Function IsPlayerRadioOn() — Player's radio on.
  • bool Function IsSneakingControlsEnabled() — Sneaking controls enabled.
  • Function PassTime(int aiHours) — Pass time as if player waited.
  • Function PlayBink(string asFileName, bool abInterruptible = false, bool abMuteAudio = true, bool abMuteMusic = true, bool abLetterbox = true, bool abIsNewGameBink = false) — Play a Bink video. Blocking.
  • Function PrecacheCharGen() — Precache character-generation data.
  • Function PrecacheCharGenClear() — Clear precached chargen data.
  • int Function QueryStat(string asStat) — Read a stat's value.
  • Function QuitToMainMenu() — Quit to main menu.
  • Function RequestAutoSave() — Request an auto-save.
  • Function RequestModel(string asModelName) — Request a model load.
  • Function RequestSave() — Request a normal save.
  • Function RewardPlayerXP(int auiXPAmount, bool abDirect = false) — Award XP. abDirect skips entry-point and intelligence adjustments.
  • Function ServeTime() — Have the player serve their prison time.
  • Function SetCameraTarget(Actor arTarget) — Set camera target actor.
  • Function SetCharGenHUDMode(int aiCGHUDMode) — Set or clear chargen-specific HUD modes.
  • Function SetInsideMemoryHUDMode(bool aInsideMemory) — Set or clear the InsideMemory HUD mode.
  • Function ShowPerkVaultBoyOnHUD(string aVaultBoySwf, Sound aSoundDescriptor = None) — Play a perk Vault Boy SWF on the HUD.
  • Function SetInChargen(bool abDisableSaving, bool abDisableWaiting, bool abShowControlsDisabledMessage) — Inform the engine whether we're in chargen.
  • Function SetPlayerAIDriven(bool abAIDriven = true) — Toggle the AI-driven flag on the player.
  • Function SetPlayerOnElevator(bool abOnElevator = true) — Toggle the player-on-elevator flag.
  • Function SetPlayerRadioFrequency(float afFrequency) — Set the player's radio frequency.
  • Function SetPlayerReportCrime(bool abReportCrime = true) — Toggle whether the player reports crime.
  • Function SetSittingRotation(float afValue) — Set the sitting camera rotation in degrees offset.
  • Function ShakeCamera(ObjectReference akSource = None, float afStrength = 0.5, float afDuration = 0.0) — Shake the camera from a source. Strength clamped 0..1; duration in seconds.
  • Function ShakeController(float afSmallMotorStrength, float afBigMotorStreangth, float afDuration) — Rumble the controller for a duration.
  • Function ShowFatigueWarningOnHUD() — Show fatigue warning.
  • Function ShowRaceMenu(ObjectReference akMenuTarget = None, int uiMode = 0, ObjectReference akMenuSpouseFemale = None, ObjectReference akMenuSpouseMale = None, ObjectReference akVendor = None) — Open the race/sex menu.
  • Function ShowSPECIALMenu() — Open the SPECIAL menu.
  • Function ShowTitleSequenceMenu() — Show the title-sequence menu.
  • Function HideTitleSequenceMenu() — Hide the title-sequence menu.
  • Function StartTitleSequence(string asSequenceName) — Start a named title sequence.
  • Function ShowPipboyBootSequence(string asAnimationName) — Play a Pipboy boot sequence.
  • Function ShowPipboyPlugin() — Show the Pipboy plugin sequence.
  • Function ShowTrainingMenu(Actor aTrainer) — Show the training menu with the given trainer.
  • Function TriggerScreenBlood(int aiValue) — Trigger screen blood effect.
  • Function PlayEventCamera(CameraShot akCamera, ObjectReference akRef) — Play an event camera.
  • Function StartDialogueCameraOrCenterOnTarget(ObjectReference akCameraTarget = None) — Start dialogue camera or center on the target.
  • Function StopDialogueCamera(bool abConsiderResume = false, bool abSwitchingTo1stP = false) — Stop dialogue camera.
  • Function TurnPlayerRadioOn(bool abRadioOn = true) — Turn the player's radio on or off.
  • bool Function UsingGamepad() — True if a gamepad is in use.
  • Function Warning(string asMessage) (betaOnly) — Log a warning.

GlobalVariable — engine-tracked numeric variable

Extends Form. Single named float (the engine internally treats some as int).

Native functions

  • float Function GetValue() — Current value.
  • Function SetValue(float afNewValue) — Set value.

Ingredient — alchemy ingredient

Extends Form.

Native functions

  • bool Function IsHostile() — True if this ingredient is hostile.
  • Function LearnEffect(int aiIndex) — Mark the 0-based effect as known by the player.
  • int Function LearnNextEffect() — Mark the next unknown effect as known; returns its index.
  • Function LearnAllEffects() — Mark every effect as known.

InputEnableLayer — player input enable/disable layer

Extends ScriptObject. One layer of player-input enable/disable. The combined state of every layer determines whether the player can move, fight, etc. Layers are limited; dispose by clearing all variables that point at one.

Native functions

  • InputEnableLayer Function Create() (global) — Create a new layer.
  • Function Delete() — Force-delete this layer. Variables pointing at it become invalid.
  • Function DisablePlayerControls(bool abMovement = true, bool abFighting = true, bool abCamSwitch = false, bool abLooking = false, bool abSneaking = false, bool abMenu = true, bool abActivate = true, bool abJournalTabs = false, bool abVATS = true, bool abFavorites = true, bool abRunning = false) — Disable a set of controls on this layer.
  • Function EnableActivate(bool abEnable = true) — Toggle activation.
  • Function EnableVATS(bool abEnable = true) — Toggle VATS.
  • Function EnableCamSwitch(bool abEnable = true) — Toggle camera switch.
  • Function EnableFastTravel(bool abEnable = true) — Toggle fast travel.
  • Function EnableFavorites(bool abEnable = true) — Toggle favorites menu.
  • Function EnableFighting(bool abEnable = true) — Toggle fighting.
  • Function EnableJournal(bool abEnable = true) — Toggle journal menu.
  • Function EnableJumping(bool abEnable = true) — Toggle jumping.
  • Function EnableLooking(bool abEnable = true) — Toggle looking.
  • Function EnableMenu(bool abEnable = true) — Toggle main menu.
  • Function EnableMovement(bool abEnable = true) — Toggle movement.
  • Function EnableRunning(bool abEnable = true) — Toggle running.
  • Function EnableSprinting(bool abEnable = true) — Toggle sprinting.
  • Function EnableZKey(bool abEnable = true) — Toggle z-key (height adjust).
  • Function EnablePlayerControls(bool abMovement = true, bool abFighting = true, bool abCamSwitch = true, bool abLooking = true, bool abSneaking = true, bool abMenu = true, bool abActivate = true, bool abJournalTabs = true, bool abVATS = true, bool abFavorites = true, bool abRunning = true) — Enable a set of controls on this layer.
  • Function EnableSneaking(bool abEnable = true) — Toggle sneaking.
  • bool Function IsActivateEnabled() — Activation enabled on this layer.
  • bool Function IsVATSEnabled() — VATS enabled.
  • bool Function IsCamSwitchEnabled() — Cam switch enabled.
  • bool Function IsFastTravelEnabled() — Fast travel enabled.
  • bool Function IsFavoritesEnabled() — Favorites enabled.
  • bool Function IsFightingEnabled() — Fighting enabled.
  • bool Function IsJournalEnabled() — Journal enabled.
  • bool Function IsJumpingEnabled() — Jumping enabled.
  • bool Function IsLookingEnabled() — Looking enabled.
  • bool Function IsMenuEnabled() — Menu enabled.
  • bool Function IsMovementEnabled() — Movement enabled.
  • bool Function IsRunningEnabled() — Running enabled.
  • bool Function IsSprintingEnabled() — Sprinting enabled.
  • bool Function IsZKeyEnabled() — Z-key enabled.
  • bool Function IsSneakingEnabled() — Sneaking enabled.
  • Function Reset() — Re-enable every disabled control on this layer.

Location — named game location

Extends Form. Hierarchical named place with linked-location relationships and keyword-driven data.

Events (engine-fired)

  • OnLocationCleared() — Fired when this location becomes cleared.
  • OnLocationLoaded() — Fired when this location loads.

Native functions

  • Function AddLinkedLocation(Location akLoc, Keyword akKeyword) — Link another location under a keyword.
  • Location[] Function GetAllLinkedLocations(Keyword akKeyword) — All locations linked under a keyword.
  • float Function GetKeywordData(Keyword akKeyword) — Float value attached to a keyword on this location.
  • int Function GetRefTypeAliveCount(LocationRefType akRefType) — Count of alive refs matching a ref type.
  • int Function GetRefTypeDeadCount(LocationRefType akRefType) — Count of dead refs matching a ref type.
  • bool Function HasCommonParent(Location akOther, Keyword akFilter = None) — True if both locations share a parent (optionally filtered by keyword).
  • bool Function HasEverBeenCleared() — True if cleared at any point.
  • bool Function HasRefType(LocationRefType akRefType) — True if has the ref type.
  • bool Function IsCleared() — True if currently cleared.
  • bool Function IsChild(Location akOther) — True if akOther is a child of this location.
  • bool Function IsLinkedLocation(Location akLocation, Keyword akKeyword) — True if linked under a keyword.
  • bool Function IsLoaded() — True if loaded in-game.
  • Function RemoveLinkedLocation(Location akLoc, Keyword akKeyword) — Drop a linked-location entry.
  • Function Reset() — Force reset on every encounter zone and interior cell using this location.
  • Function SetKeywordData(Keyword akKeyword, float afData) — Set the keyword's float data.
  • Function SetCleared(bool abCleared = true) — Toggle the cleared flag.

MagicEffect — magic effect base record

Extends Form.

Native functions

  • string Function GetAssociatedSkill() — Skill associated with this effect.

Math — math statics

Native Hidden. Static-only; all functions are global. Trigonometry takes and returns degrees.

Native globals

  • float Function abs(float afValue) — Absolute value.
  • float Function acos(float afValue) — Arccosine, in degrees.
  • float Function asin(float afValue) — Arcsine, in degrees.
  • float Function atan(float afValue) — Arctangent, in degrees.
  • int Function Ceiling(float afValue) — Ceiling.
  • float Function cos(float afValue) — Cosine, value in degrees.
  • float Function DegreesToRadians(float afDegrees) — Convert degrees to radians.
  • int Function Floor(float afValue) — Floor.
  • float Function pow(float x, float y)x raised to y.
  • float Function RadiansToDegrees(float afRadians) — Convert radians to degrees.
  • float Function sin(float afValue) — Sine, value in degrees.
  • float Function sqrt(float afValue) — Square root.
  • float Function tan(float afValue) — Tangent, value in degrees.

Message — UI message or message box

Extends Form. Either a HUD notification, message box with buttons, or a help-message overlay.

Native functions

  • int Function Show(float afArg1 = 0.0, float afArg2 = 0.0, float afArg3 = 0.0, float afArg4 = 0.0, float afArg5 = 0.0, float afArg6 = 0.0, float afArg7 = 0.0, float afArg8 = 0.0, float afArg9 = 0.0) — Show this message, substituting up to 9 numeric tokens. For message boxes, blocks until the user closes it; returns the button index, or -1.
  • Function ShowAsHelpMessage(string asEvent, float afDuration, float afInterval, int aiMaxTimes, string asContext = "", int aiPriority = 0) — Show as a help message tied to a user-action event.
  • Function UnshowAsHelpMessage() — End the help message and mark it inactive.
  • Function ClearHelpMessages() (global) — Hide every help message without marking complete.
  • Function ResetHelpMessage(string asEvent) (global) — Reset help-message status for an input event so a new one can fire.

MiscObject — misc inventory object

Extends Form.

Native functions

  • int Function GetObjectComponentCount(Component akComponent) — How many of the given component this base form contains.

Package — AI package

Extends Form. AI package definition.

Events (engine-fired)

  • OnStart(Actor akActor) — Fired when the package first starts.
  • OnEnd(Actor akActor) — Fired when the package ends.
  • OnChange(Actor akActor) — Fired when the running package changes.

Native functions

  • Quest Function GetOwningQuest() — Quest that owns this package.
  • Package Function GetTemplate() — Parent template package, if any.

Potion — consumable alchemy item

Extends Form.

Native functions

  • bool Function IsHostile() — True if classified as hostile.

Quest — quest form

Extends Form. The driving construct for game progression: stages, objectives, aliases, and story-manager hooks.

Events (engine-fired)

  • OnQuestInit() — Fired when the quest is initialised, aliases are filled, and it's about to run the startup stage.
  • OnQuestShutdown() — Fired when the quest has been shut down. Aliases are empty by this point.
  • OnReset() — Fired when the quest owning this is reset.
  • OnStageSet(int auiStageID, int auiItemID) — Fired in parallel with the stage fragment when a stage is set.
  • OnStoryActivateActor(Location akLocation, ObjectReference akActor) — Story manager event, fired in parallel with quest startup.
  • OnStoryActorAttach(ObjectReference akActor, Location akLocation) — Story manager event.
  • OnStoryAddToPlayer(ObjectReference akOwner, ObjectReference akContainer, Location akLocation, Form akItemBase, int aiAcquireType) — Story manager event.
  • OnStoryArrest(ObjectReference akArrestingGuard, ObjectReference akCriminal, Location akLocation, int aiCrime) — Story manager event.
  • OnStoryAssaultActor(ObjectReference akVictim, ObjectReference akAttacker, Location akLocation, int aiCrime) — Story manager event.
  • OnStoryAttractionObject(ObjectReference akActor, ObjectReference akObject, Location akLocation, bool abCommanded) — Story manager event.
  • OnStoryBribeNPC(ObjectReference akActor) — Story manager event.
  • OnStoryCastMagic(ObjectReference akCastingActor, ObjectReference akSpellTarget, Location akLocation, Form akSpell) — Story manager event.
  • OnStoryChangeLocation(ObjectReference akActor, Location akOldLocation, Location akNewLocation) — Story manager event.
  • OnStoryClearLocation(Location akOldLocation) — Story manager event.
  • OnStoryCraftItem(ObjectReference akBench, Location akLocation, Form akCreatedItem) — Story manager event.
  • OnStoryCrimeGold(ObjectReference akVictim, ObjectReference akCriminal, Form akFaction, int aiGoldAmount, int aiCrime) — Story manager event.
  • OnStoryCure(Form akInfection) — Story manager event.
  • OnStoryDialogue(Location akLocation, ObjectReference akActor1, ObjectReference akActor2) — Story manager event.
  • OnStoryDiscoverDeadBody(ObjectReference akActor, ObjectReference akDeadActor, Location akLocation) — Story manager event.
  • OnStoryEscapeJail(Location akLocation, Form akCrimeGroup) — Story manager event.
  • OnStoryFlatterNPC(ObjectReference akActor) — Story manager event.
  • OnStoryHackTerminal(ObjectReference akComputer, bool abSucceeded) — Story manager event.
  • OnStoryHello(Location akLocation, ObjectReference akActor1, ObjectReference akActor2) — Story manager event.
  • OnStoryIncreaseLevel(int aiNewLevel) — Story manager event.
  • OnStoryInfection(ObjectReference akTransmittingActor, Form akInfection) — Story manager event.
  • OnStoryIntimidateNPC(ObjectReference akActor) — Story manager event.
  • OnStoryIronSights(ObjectReference akActor, Form akWeapon) — Story manager event.
  • OnStoryJail(ObjectReference akGuard, Form akCrimeGroup, Location akLocation, int aiCrimeGold) — Story manager event.
  • OnStoryKillActor(ObjectReference akVictim, ObjectReference akKiller, Location akLocation, int aiCrimeStatus, int aiRelationshipRank) — Story manager event.
  • OnStoryLocationLoaded(Location akLocation) — Story manager event.
  • OnStoryMineExplosion(ObjectReference akVictim, ObjectReference akAttacker) — Story manager event.
  • OnStoryNewVoicePower(ObjectReference akActor, Form akVoicePower) — Story manager event.
  • OnStoryPickLock(ObjectReference akActor, ObjectReference akLock) — Story manager event.
  • OnStoryPickPocket(ObjectReference akVictim, bool abSuccess) — Story manager event.
  • OnStoryPayFine(ObjectReference akCriminal, ObjectReference akGuard, Form akCrimeGroup, int aiCrimeGold) — Story manager event.
  • OnStoryPlayerGetsFavor(ObjectReference akActor) — Story manager event.
  • OnStoryRelationshipChange(ObjectReference akActor1, ObjectReference akActor2, int aiOldRelationship, int aiNewRelationship) — Story manager event.
  • OnStoryRemoveFromPlayer(ObjectReference akOwner, ObjectReference akItem, Location akLocation, Form akItemBase, int aiRemoveType) — Story manager event.
  • OnStoryScript(Keyword akKeyword, Location akLocation, ObjectReference akRef1, ObjectReference akRef2, int aiValue1, int aiValue2) — Generic script-driven story event.
  • OnStoryServedTime(Location akLocation, Form akCrimeGroup, int aiCrimeGold, int aiDaysJail) — Story manager event.
  • OnStoryTrespass(ObjectReference akVictim, ObjectReference akTrespasser, Location akLocation, int aiCrime) — Story manager event.

Native functions

  • Function CompleteAllObjectives() — Mark every objective complete.
  • Function CompleteQuest() — Mark this quest complete.
  • Function FailAllObjectives() — Mark every objective failed.
  • Alias Function GetAlias(int aiAliasID) — Alias by ID.
  • int Function GetCurrentStageID() — Highest completed stage.
  • bool Function HasObjective(int aiObjective) — True if the objective exists.
  • bool Function IsActive() — True if tracked by the player.
  • bool Function IsCompleted() — True if completed.
  • bool Function IsObjectiveCompleted(int aiObjective) — True if completed.
  • bool Function IsObjectiveDisplayed(int aiObjective) — True if currently shown.
  • bool Function IsObjectiveFailed(int aiObjective) — True if failed.
  • bool Function IsRunning() — True if running.
  • bool Function IsStageDone(int aiStage) — True if the stage has been completed.
  • bool Function IsStarting() — True if enabled but not yet running.
  • bool Function IsStopping() — True if shutting down.
  • bool Function IsStopped() — True if no longer running.
  • Function Reset() — Reset the quest.
  • Function ResetSpeechChallenges() — Reset speech-challenge topic infos.
  • Function SetActive(bool abActive = true) — Set tracked state.
  • bool Function SetCurrentStageID(int aiStageID) — Latent: set the stage. Waits for quest startup if needed. Returns true if the stage existed and was set.
  • Function SetObjectiveCompleted(int aiObjective, bool abCompleted = true) — Toggle completion of an objective.
  • Function SetObjectiveDisplayed(int aiObjective, bool abDisplayed = true, bool abForce = false) — Toggle display of an objective; abForce re-shows even if previously shown.
  • Function SetObjectiveFailed(int aiObjective, bool abFailed = true) — Toggle failure of an objective.
  • bool Function Start() — Latent: start the quest. Returns success.
  • Function Stop() — Stop the quest.
  • bool Function UpdateCurrentInstanceGlobal(GlobalVariable aUpdateGlobal) — Update this instance's value for the given global.

Scene — scripted scene

Extends Form. A directed scene driving multiple actors via aliases, organised into phases and actions.

Events (engine-fired)

  • OnAction(int auiActionID, ReferenceAlias akAlias) — Fired when a scene action runs on an alias (in parallel with the fragment).
  • OnBegin() — Fired when this scene starts up.
  • OnEnd() — Fired when this scene ends.
  • OnPhaseBegin(int auiPhaseIndex) — Fired when a phase starts.
  • OnPhaseEnd(int auiPhaseIndex) — Fired when a phase ends.

Native functions

  • Function ForceStart() — Force this scene to start, killing any other scenes on its refs.
  • Function Start() — Start this scene.
  • Function Stop() — Stop this scene.
  • bool Function IsPlaying() — True if currently playing.
  • Quest Function GetOwningQuest() — Quest that owns this scene.
  • bool Function IsActionComplete(int aiActionID) — True if the named action has completed.
  • Function Pause(bool abPause) — Pause or unpause this scene.

Sound — sound base object

Extends Form.

Native functions

  • int Function Play(ObjectReference akSource) — Play this sound from the source. Returns the playback instance handle.
  • bool Function PlayAndWait(ObjectReference akSource) — Latent: play and wait for it to finish.
  • Function StopInstance(int aiPlaybackInstance) (global) — Stop a specific playback instance.
  • Function SetInstanceVolume(int aiPlaybackInstance, float afVolume) (global) — Set the volume of a playback instance (clamped 0..1).

Spell — castable spell

Extends Form. Magic spell or magic-like ability.

Native functions

  • Function Cast(ObjectReference akSource, ObjectReference akTarget = None) — Cast this spell from a source, optionally toward a target.
  • Function RemoteCast(ObjectReference akSource, Actor akBlameActor, ObjectReference akTarget = None) — Cast from a source but blame an actor for the cast.
  • bool Function IsHostile() — True if this spell is classified as hostile.

TopicInfo — single dialogue line

Extends Form. A single line within a dialogue topic.

Events (engine-fired)

  • OnBegin(ObjectReference akSpeakerRef, bool abHasBeenSaid) — Fired in parallel with the fragment when this topic info begins.
  • OnEnd(ObjectReference akSpeakerRef, bool abHasBeenSaid) — Fired in parallel with the fragment when this topic info ends.

Native functions

  • Quest Function GetOwningQuest() — Quest that owns this topic info.
  • bool Function HasBeenSaid() — True if this line has been said to the player.

Utility — utility statics

Native Hidden. Static-only; all functions are global. Reflection, time, RNG, INI access, and frame-rate/memory profiling.

Native globals

  • Var Function CallGlobalFunction(string asScriptName, string asFuncName, Var[] aParams) — Reflectively call a global by script and name.
  • Function CallGlobalFunctionNoWait(string asScriptName, string asFuncName, Var[] aParams) — Same but does not block.
  • string Function GameTimeToString(float afGameTime) — Latent: format game time (in days) as "MM/DD/YYYY HH:MM".
  • float Function GetCurrentGameTime() — Current game time in days.
  • float Function GetCurrentRealTime() — Real seconds since application start (excludes menu mode and VM-frozen time).
  • int Function GetCurrentStackID() (debugOnly) — ID of the current running Papyrus stack.
  • bool Function IsInMenuMode() — True if currently in menu mode.
  • int Function RandomInt(int aiMin = 0, int aiMax = 100) — Random int in [aiMin, aiMax].
  • float Function RandomFloat(float afMin = 0.0, float afMax = 1.0) — Random float in [afMin, afMax].
  • Function SetINIFloat(string ini, float value) (debugOnly) — Set an INI float.
  • Function SetINIInt(string ini, int value) (debugOnly) — Set an INI int.
  • Function SetINIBool(string ini, bool value) (debugOnly) — Set an INI bool.
  • Function SetINIString(string ini, string value) (debugOnly) — Set an INI string.
  • Function Wait(float afSeconds) — Latent: wait real-time seconds. Pauses during menu mode.
  • Function WaitGameTime(float afHours) — Latent: wait game-time hours.
  • Function WaitMenuMode(float afSeconds) — Latent: wait real-time seconds; runs through menu mode.
  • string Function CaptureFrameRate(int numFrames) (debugOnly) — Capture frame rate over N frames as a comma-separated string (≤1KB).
  • Function EnterTestData(string astestType, string astestMatter, string astestDetails, string astestResultContext, string astestResult) (debugOnly) — Send test data to the tests website.
  • Function PostStartUpTimes() (debugOnly) — Send startup times to the tests website.
  • Function StartFrameRateCapture() (debugOnly) — Start a frame-rate capture window.
  • Function EndFrameRateCapture() (debugOnly) — End the frame-rate capture window.
  • float Function GetAverageFrameRate() (debugOnly) — Average frame rate since capture start.
  • float Function GetMinFrameRate() (debugOnly) — Min frame rate since capture start.
  • float Function GetMaxFrameRate() (debugOnly) — Max frame rate since capture start.
  • string Function GetCurrentMemory() (debugOnly) — Snapshot the memory stats. Must be called before the budget queries.
  • int Function GetBudgetCount() (debugOnly) — Number of memory budgets.
  • string Function GetCurrentBudget(int aiBudgetNumber) (debugOnly) — Current usage of a budget.
  • string Function GetBudgetLimit(int aiBudgetNumber) (debugOnly) — Limit of a budget.
  • bool Function OverBudget(int aiBudgetNumber) (debugOnly) — True if over budget.
  • string Function GetBudgetName(int aiBudgetNumber) (debugOnly) — Name of a budget.

Weapon — weapon base object

Extends Form.

Native functions

  • Function Fire(ObjectReference akSource, Ammo akAmmo = None) — Fire this weapon from a source ref with optional ammo override.
  • Ammo Function GetAmmo() — Default ammo type.

Weather — weather base object

Extends Form. Wraps the engine sky and weather machinery; mixes instance and static functions.

Native functions

  • Function EnableAmbientParticles(bool abEnable = true) (global) — Toggle ambient sky particles.
  • Weather Function FindWeather(int auiType) (global) — Find a weather in the active region/climate matching a classification (0=Pleasant, 1=Cloudy, 2=Rainy, 3=Snow).
  • Function ForceActive(bool abOverride = false) — Force this weather as the sky's active weather.
  • int Function GetClassification() — Classification (-1=none, 0=Pleasant, 1=Cloudy, 2=Rainy, 3=Snow).
  • Weather Function GetCurrentWeather() (global) — Current sky weather.
  • float Function GetCurrentWeatherTransition() (global) — Transition fraction of the current weather.
  • Weather Function GetOutgoingWeather() (global) — Outgoing sky weather.
  • int Function GetSkyMode() (global) — Sky mode (0=None, 1=Interior, 2=Skydome only, 3=Full).
  • Function ReleaseOverride() (global) — Release the sky's overriding weather.
  • Function SetActive(bool abOverride = false, bool abAccelerate = false) — Set this weather as the sky's active weather.