Difference between revisions of "Quest Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jog
imported>SarthesArai
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Script Objects]]
'''Extends:''' [[Form Script]]
'''Extends:''' [[Form Script]]


Line 12: Line 8:
</source>
</source>


== Properties ==
== Member Functions ==
None


== Global Functions ==
:'''[[CompleteAllObjectives - Quest|CompleteAllObjectives]]()'''
None
:*Completes all a quests objectives.


== Member Functions ==
:'''[[CompleteQuest - Quest|CompleteQuest]]()'''
'''Function [[CompleteAllObjectives - Quest|CompleteAllObjectives]]()'''
:*Flags this quest as completed.
*Completes all a quests objectives.
 
:'''[[FailAllObjectives - Quest|FailAllObjectives]]()'''
:*Flags all quest objects as failed.
 
:'''Alias [[GetAlias - Quest|GetAlias]](Int ''aiAliasID'')'''
:*Obtains the [[Alias Script|Alias]] attached to this quest associated with the specified ID.
 
:'''Int [[GetCurrentStageID - Quest|GetCurrentStageID]]()'''
:*Obtains the highest completed stage on this quest.
 
:'''Int [[GetStage - Quest|GetStage]]()'''
:*Alias for GetCurrentStageID().
 
:'''Bool [[GetStageDone - Quest|GetStageDone]](Int ''aiStage'')'''
:*Alias for IsStageDone().
 
:'''Bool [[IsActive - Quest|IsActive]]()'''
:*Is this quest "active"? (Tracked by the player).
 
:'''Bool [[IsCompleted - Quest|IsCompleted]]()'''
:*Returns whether this quest is completed or not.
 
:'''Bool [[IsObjectiveCompleted - Quest|IsObjectiveCompleted]](Int ''aiObjective'')'''
:*Obtains whether the specified objective is completed or not.
 
:'''Bool [[IsObjectiveDisplayed - Quest|IsObjectiveDisplayed]](Int ''aiObjective'')'''
:*Obtains whether the specified objective is displayed or not.


'''Function [[CompleteQuest - Quest|CompleteQuest]]()'''
:'''Bool [[IsObjectiveFailed - Quest|IsObjectiveFailed]](Int ''aiObjective'')'''
*Flags this quest as completed.
:*Obtains whether the specified objective is failed or not.


'''Function [[FailAllObjectives - Quest|FailAllObjectives]]()'''
:'''Bool [[IsRunning - Quest|IsRunning]]()'''
*Flags all quest objects as failed.
:*Returns whether this quest is currently running or not.


'''Alias Function [[GetAlias - Quest|GetAlias]](int aiAliasID)'''
:'''Bool [[IsStageDone - Quest|IsStageDone]](Int ''aiStage'')'''
*Obtains the [[Alias Script|Alias]] attached to this quest associated with the specified ID.
:*Checks to see if the specified stage is done or not.


'''int Function [[GetCurrentStageID - Quest|GetCurrentStageID]]()'''
:'''Bool [[IsStarting - Quest|IsStarting]]()'''
*Obtains the highest completed stage on this quest.
:*Returns whether this quest is currently enabled but not running yet.


'''int Function [[GetCurrentStageID - Quest|GetStage]]()'''
:'''Bool [[IsStopping- Quest|IsStopping]]()'''
*Alias for GetCurrentStageID().
:*Returns whether this quest is currently not enabled anymore but still shutting down.


'''bool Function [[IsStageDone - Quest|GetStageDone]](int aiStage)'''
:'''Bool [[IsStopped- Quest|IsStopped]]()'''
*Alias for IsStageDone().
:*Returns whether this quest is currently fully stopped.


'''bool Function [[IsActive - Quest|IsActive]]()'''
:'''Bool [[ModObjectiveGlobal - Quest|ModObjectiveGlobal]](Float ''afModValue'', GlobalVariable ''aModGlobal'', Int ''aiObjectiveID'', Float ''afTargetValue'', Bool ''abCountingUp'', Bool ''abCompleteObjective'', Bool ''abRedisplayObjective'')'''
*Is this quest "active"? (Tracked by the player).
:*Mods a global variable in a threadsafe way. Optional parameters allow automatic redisplay and completion (or failure) of a quest objective using this global variable.


'''bool Function [[IsCompleted - Quest|IsCompleted]]()'''
:'''[[Reset - Quest|Reset]]()'''
*Returns whether this quest is completed or not.
:*Resets this quest.


'''bool Function [[IsObjectiveCompleted - Quest|IsObjectiveCompleted]](int aiObjective)'''
:'''[[SetActive - Quest|SetActive]](Bool ''abActive'')'''
*Obtains whether the specified objective is completed or not.
:*Sets or clears this quest as "active". (Tracked by the player)


'''bool Function [[IsObjectiveDisplayed - Quest|IsObjectiveDisplayed]](int aiObjective)'''
:'''Bool [[SetCurrentStageID - Quest|SetCurrentStageID]](Int ''aiStageID'')'''
*Obtains whether the specified objective is displayed or not.
:*Sets the quest to the requested stage, returning true if it succeeded.


'''bool Function [[IsObjectiveFailed - Quest|IsObjectiveFailed]](int aiObjective)'''
:'''[[SetObjectiveCompleted - Quest|SetObjectiveCompleted]](Int ''aiObjective'', Bool ''abCompleted'')'''
*Obtains whether the specified objective is failed or not.
:*Sets whether the specified objective is completed or not.


'''bool Function [[IsRunning - Quest|IsRunning]]()'''
:'''[[SetObjectiveDisplayed - Quest|SetObjectiveDisplayed]](Int ''aiObjective'', Bool ''abDisplayed'')'''
*Returns whether this quest is currently running or not.
:*Sets whether the specified objective is displayed or not.


'''bool Function [[IsStageDone - Quest|IsStageDone]](int aiStage)'''
:'''[[SetObjectiveFailed - Quest|SetObjectiveFailed]](Int ''aiObjective'', Bool ''abFailed'')'''
*Checks to see if the specified stage is done or not.
:*Sets whether the specified objective is failed or not.


'''bool Function [[IsStarting - Quest|IsStarting]]()'''
:'''Bool [[SetCurrentStageID - Quest|SetStage]](Int ''aiStage'')'''
*Returns whether this quest is currently enabled but not running yet.
:*Alias of SetCurrentStageID().


'''bool Function [[IsStopping- Quest|IsStopping]]()'''
:'''Bool [[Start - Quest|Start]]()'''
*Returns whether this quest is currently not enabled anymore but still shutting down.
:*Starts this quest.


'''bool Function [[IsStopped- Quest|IsStopped]]()'''
:'''[[Stop - Quest|Stop]]()'''
*Returns whether this quest is currently fully stopped.
:*Stops the quest.


'''bool Function [[ModObjectiveGlobal - Quest|ModObjectiveGlobal]](float afModValue, GlobalVariable aModGlobal, int aiObjectiveID, float afTargetValue, bool abCountingUp, bool abCompleteObjective, bool abRedisplayObjective)'''
:'''Bool [[UpdateCurrentInstanceGlobal - Quest|UpdateCurrentInstanceGlobal]](GlobalVariable ''aUpdateGlobal'')'''
*Mods a global variable in a threadsafe way. Optional parameters allow automatic redisplay and completion (or failure) of a quest objective using this global variable.
:*Updates the value for the given global for the quest's current instance.


'''Function [[Reset - Quest|Reset]]()'''
*Resets this quest.


'''Function [[SetActive - Quest|SetActive]](bool abActive)'''
== SKSE Global Functions ==
*Sets or clears this quest as "active". (Tracked by the player)


'''bool Function [[SetCurrentStageID - Quest|SetCurrentStageID]](int aiStageID)'''
:'''Quest [[GetQuest - Quest|GetQuest]](String ''editorID'')'''
*Sets the quest to the requested stage, returning true if it succeeded.
:*Returns the Quest with the specified editor id.


'''Function [[SetObjectiveCompleted - Quest|SetObjectiveCompleted]](int aiObjective, bool abCompleted)'''
*Sets whether the specified objective is completed or not.


'''Function [[SetObjectiveDisplayed - Quest|SetObjectiveDisplayed]](int aiObjective, bool abDisplayed)'''
== SKSE Functions ==
*Sets whether the specified objective is displayed or not.


'''Function [[SetObjectiveFailed - Quest|SetObjectiveFailed]](int aiObjective, bool abFailed)'''
:'''String [[GetID - Quest|GetID]]()'''
*Sets whether the specified objective is failed or not.
:*Returns the editor ID of the Quest.


'''bool Function [[SetCurrentStageID - Quest|SetStage]](int aiStage)'''
:'''Int [[GetPriority - Quest|GetPriority]]()'''
*Alias of SetCurrentStageID().
:*Returns the priority of the Quest.


'''bool Function [[Start - Quest|Start]]()'''
:'''Int [[GetNumAliases - Quest|GetNumAliases]]()'''
*Starts this quest.
:*Returns the number of aliases associated with the Quest.


'''Function [[Stop - Quest|Stop]]()'''
:'''Alias [[GetNthAlias - Quest|GetNthAlias]](Int ''index'')'''
*Stops the quest.
:*Returns the specified alias associated with the Quest.


'''bool Function [[UpdateCurrentInstanceGlobal - Quest|UpdateCurrentInstanceGlobal]](GlobalVariable aUpdateGlobal)'''
:'''Alias [[GetAliasByName - Quest|GetAliasByName]](String ''name'')'''
*Updates the value for the given global for the quest's current instance.
:*Returns the specified alias associated with the Quest.


== Events ==
== Events ==
'''Event [[OnReset - ObjectReference|OnReset]]()'''
*Event received when this quest is started up (either the first time or subsequent times - this will fire in parallel with your startup stage!).


----
:'''[[OnStoryActivateActor - Quest|OnStoryActivateActor]](Location ''akLocation'', ObjectReference ''akActor'')'''
''These events are fired in parallel with the quest's startup stage, and are only fired if this quest is started by a story manager event.''
:*Sent when this quest is started by an activate actor story manager event.
----
'''Event [[OnStoryActivateActor - Quest|OnStoryActivateActor]](Location akLocation, ObjectReference akActor)'''
*Sent when this quest is started by an activate actor story manager event.


'''Event [[OnStoryAddToPlayer - Quest|OnStoryAddToPlayer]](ObjectReference akOwner, ObjectReference akContainer, Location akLocation, Form akItemBase, int aiAcquireType)'''
:'''[[OnStoryAddToPlayer - Quest|OnStoryAddToPlayer]](ObjectReference ''akOwner'', ObjectReference ''akContainer'', Location ''akLocation'', Form ''akItemBase'', Int ''aiAcquireType'')'''
*Sent when this quest is started by an add to player story manager event.
:*Sent when this quest is started by an add to player story manager event.


'''Event [[OnStoryArrest - Quest|OnStoryArrest]](ObjectReference akArrestingGuard, ObjectReference akCriminal, Location akLocation, int aiCrime)'''
:'''[[OnStoryArrest - Quest|OnStoryArrest]](ObjectReference ''akArrestingGuard'', ObjectReference ''akCriminal'', Location ''akLocation'', Int ''aiCrime'')'''
*Sent when this quest is started by an arrest story manager event.
:*Sent when this quest is started by an arrest story manager event.


'''Event [[OnStoryAssaultActor - Quest|OnStoryAssaultActor]](ObjectReference akVictim, ObjectReference akAttacker, Location akLocation, int aiCrime)'''
:'''[[OnStoryAssaultActor - Quest|OnStoryAssaultActor]](ObjectReference ''akVictim'', ObjectReference ''akAttacker'', Location ''akLocation'', Int ''aiCrime'')'''
*Sent when this quest is started by an assault actor story manager event.
:*Sent when this quest is started by an assault actor story manager event.


'''Event [[OnStoryBribeNPC - Quest|OnStoryBribeNPC]](ObjectReference akActor)'''
:'''[[OnStoryBribeNPC - Quest|OnStoryBribeNPC]](ObjectReference ''akActor'')'''
*Sent when this quest is started by a bribe NPC story manager event.
:*Sent when this quest is started by a bribe NPC story manager event.


'''Event [[OnStoryCastMagic - Quest|OnStoryCastMagic]](ObjectReference akCastingActor, ObjectReference akSpellTarget, Location akLocation, Form akSpell)'''
:'''[[OnStoryCastMagic - Quest|OnStoryCastMagic]](ObjectReference ''akCastingActor'', ObjectReference ''akSpellTarget'', Location ''akLocation'', Form ''akSpell'')'''
*Sent when this quest is started by a cast magic story manager event.
:*Sent when this quest is started by a cast magic story manager event.


'''Event [[OnStoryChangeLocation - Quest|OnStoryChangeLocation]](ObjectReference akActor, Location akOldLocation, Location akNewLocation)'''
:'''[[OnStoryChangeLocation - Quest|OnStoryChangeLocation]](ObjectReference ''akActor'', Location ''akOldLocation'', Location ''akNewLocation'')'''
*Sent when this quest is started by a change location story manager event.
:*Sent when this quest is started by a change location story manager event.


'''Event [[OnStoryCraftItem - Quest|OnStoryCraftItem]](ObjectReference akBench, Location akLocation, Form akCreatedItem)'''
:'''[[OnStoryCraftItem - Quest|OnStoryCraftItem]](ObjectReference ''akBench'', Location ''akLocation'', Form ''akCreatedItem'')'''
*Sent when this quest is started by a craft item story manager event.
:*Sent when this quest is started by a craft item story manager event.


'''Event [[OnStoryCrimeGold - Quest|OnStoryCrimeGold]](ObjectReference akVictim, ObjectReference akCriminal, Faction akFaction, int aiGoldAmount, int aiCrime)'''
:'''[[OnStoryCrimeGold - Quest|OnStoryCrimeGold]](ObjectReference ''akVictim'', ObjectReference ''akCriminal'', Faction ''akFaction'', Int ''aiGoldAmount'', Int ''aiCrime'')'''
*Sent when this quest is started by a crime gold story manager event.
:*Sent when this quest is started by a crime gold story manager event.


'''Event [[OnStoryCure - Quest|OnStoryCure]](Form akInfection)'''
:'''[[OnStoryCure - Quest|OnStoryCure]](Form ''akInfection'')'''
*Sent when this quest is started by a cure story manager event.
:*Sent when this quest is started by a cure story manager event.


'''Event [[OnStoryDialogue - Quest|OnStoryDialogue]](Location akLocation, ObjectReference akActor1, ObjectReference akActor2)'''
:'''[[OnStoryDialogue - Quest|OnStoryDialogue]](Location ''akLocation'', ObjectReference ''akActor1'', ObjectReference ''akActor2'')'''
*Sent when this quest is started by a dialogue story manager event.
:*Sent when this quest is started by a dialogue story manager event.


'''Event [[OnStoryDiscoverDeadBody - Quest|OnStoryDiscoverDeadBody]](ObjectReference akActor, ObjectReference akDeadActor, Location akLocation)'''
:'''[[OnStoryDiscoverDeadBody - Quest|OnStoryDiscoverDeadBody]](ObjectReference ''akActor'', ObjectReference ''akDeadActor'', Location ''akLocation'')'''
*Sent when this quest is started by a discover dead body story manager event.
:*Sent when this quest is started by a discover dead body story manager event.


'''Event [[OnStoryEscapeJail - Quest|OnStoryEscapeJail]](Location akLocation, Form akCrimeGroup)'''
:'''[[OnStoryEscapeJail - Quest|OnStoryEscapeJail]](Location ''akLocation'', Form ''akCrimeGroup'')'''
*Sent when this quest is started by an escape jail story manager event.
:*Sent when this quest is started by an escape jail story manager event.


'''Event [[OnStoryFlatterNPC - Quest|OnStoryFlatterNPC]](ObjectReference akActor)'''
:'''[[OnStoryFlatterNPC - Quest|OnStoryFlatterNPC]](ObjectReference ''akActor'')'''
*Sent when this quest is started by a flatter NPC story manager event.
:*Sent when this quest is started by a flatter NPC story manager event.


'''Event [[OnStoryHello - Quest|OnStoryHello]](Location akLocation, ObjectReference akActor1, ObjectReference akActor2)'''
:'''[[OnStoryHello - Quest|OnStoryHello]](Location ''akLocation'', ObjectReference ''akActor1'', ObjectReference ''akActor2'')'''
*Sent when this quest is started by a hello story manager event.
:*Sent when this quest is started by a hello story manager event.


'''Event [[OnStoryIncreaseLevel - Quest|OnStoryIncreaseLevel]](int aiNewLevel)'''
:'''[[OnStoryIncreaseLevel - Quest|OnStoryIncreaseLevel]](Int ''aiNewLevel'')'''
*Sent when this quest is started by an increase level story manager event.
:*Sent when this quest is started by an increase level story manager event.


'''Event [[OnStoryIncreaseSkill - Quest|OnStoryIncreaseSkill]](string asSkill)'''
:'''[[OnStoryIncreaseSkill - Quest|OnStoryIncreaseSkill]](String ''asSkill'')'''
*Sent when this quest is started by an increase skill story manager event.
:*Sent when this quest is started by an increase skill story manager event.


'''Event [[OnStoryInfection - Quest|OnStoryInfection]](ObjectReference akTransmittingActor, Form akInfection)'''
:'''[[OnStoryInfection - Quest|OnStoryInfection]](ObjectReference ''akTransmittingActor'', Form ''akInfection'')'''
*Sent when this quest is started by an infection story manager event.
:*Sent when this quest is started by an infection story manager event.


'''Event [[OnStoryIntimidateNPC - Quest|OnStoryIntimidateNPC]](ObjectReference akActor)'''
:'''[[OnStoryIntimidateNPC - Quest|OnStoryIntimidateNPC]](ObjectReference ''akActor'')'''
*Sent when this quest is started by an intimidate NPC story manager event.
:*Sent when this quest is started by an intimidate NPC story manager event.


'''Event [[OnStoryJail - Quest|OnStoryJail]](ObjectReference akGuard, Form akCrimeGroup, Location akLocation, int aiCrimeGold)'''
:'''[[OnStoryJail - Quest|OnStoryJail]](ObjectReference ''akGuard'', Form ''akCrimeGroup'', Location ''akLocation'', Int ''aiCrimeGold'')'''
*Sent when this quest is started by a jail story manager event.
:*Sent when this quest is started by a jail story manager event.


'''Event [[OnStoryKillActor - Quest|OnStoryKillActor]](ObjectReference akVictim, ObjectReference akKiller, Location akLocation, int aiCrimeStatus, int aiRelationshipRank)'''
:'''[[OnStoryKillActor - Quest|OnStoryKillActor]](ObjectReference ''akVictim'', ObjectReference ''akKiller'', Location ''akLocation'', Int ''aiCrimeStatus'', Int ''aiRelationshipRank'')'''
*Sent when this quest is started by a kill actor story manager event.
:*Sent when this quest is started by a kill actor story manager event.


'''Event [[OnStoryNewVoicePower - Quest|OnStoryNewVoicePower]](ObjectReference akActor, Form akVoicePower)'''
:'''[[OnStoryNewVoicePower - Quest|OnStoryNewVoicePower]](ObjectReference ''akActor'', Form ''akVoicePower'')'''
*Sent when this quest is started by a new voice power story manager event.
:*Sent when this quest is started by a new voice power story manager event.


'''Event [[OnStoryPickLock - Quest|OnStoryPickLock]](ObjectReference akActor, ObjectReference akLock)'''
:'''[[OnStoryPickLock - Quest|OnStoryPickLock]](ObjectReference ''akActor'', ObjectReference ''akLock'')'''
*Sent when this quest is started by a pick lock story manager event.
:*Sent when this quest is started by a pick lock story manager event.


'''Event [[OnStoryPayFine - Quest|OnStoryPayFine]](ObjectReference akCriminal, ObjectReference akGuard, Form akCrimeGroup, int aiCrimeGold)'''
:'''[[OnStoryPayFine - Quest|OnStoryPayFine]](ObjectReference ''akCriminal'', ObjectReference ''akGuard'', Form ''akCrimeGroup'', Int ''aiCrimeGold'')'''
*Sent when this quest is started by a pay fine story manager event.
:*Sent when this quest is started by a pay fine story manager event.


'''Event [[OnStoryPlayerGetsFavor - Quest|OnStoryPlayerGetsFavor]](ObjectReference akActor)'''
:'''[[OnStoryPlayerGetsFavor - Quest|OnStoryPlayerGetsFavor]](ObjectReference ''akActor'')'''
*Sent when this quest is started by a player gets favor story manager event.
:*Sent when this quest is started by a player gets favor story manager event.


'''Event [[OnStoryRelationshipChange - Quest|OnStoryRelationshipChange]](ObjectReference akActor1, ObjectReference akActor2, int aiOldRelationship, int aiNewRelationship)'''
:'''[[OnStoryRelationshipChange - Quest|OnStoryRelationshipChange]](ObjectReference ''akActor1'', ObjectReference ''akActor2'', Int ''aiOldRelationship'', Int ''aiNewRelationship'')'''
*Sent when this quest is started by a relationship change story manager event.
:*Sent when this quest is started by a relationship change story manager event.


'''Event [[OnStoryRemoveFromPlayer - Quest|OnStoryRemoveFromPlayer]](ObjectReference akOwner, ObjectReference akItem, Location akLocation, Form akItembase, int aiRemoveType)'''
:'''[[OnStoryRemoveFromPlayer - Quest|OnStoryRemoveFromPlayer]](ObjectReference ''akOwner'', ObjectReference ''akItem'', Location ''akLocation'', Form ''akItembase'', Int ''aiRemoveType'')'''
*Sent when this quest is started by a remove from player story manager event.
:*Sent when this quest is started by a remove from player story manager event.


'''Event [[OnStoryScript - Quest|OnStoryScript]](Keyword akKeyword, Location akLocation, ObjectReference akRef1, ObjectReference akRef2, int aiValue1, int aiValue2)'''
:'''[[OnStoryScript - Quest|OnStoryScript]](Keyword ''akKeyword'', Location ''akLocation'', ObjectReference ''akRef1'', ObjectReference ''akRef2'', Int ''aiValue1'', Int ''aiValue2'')'''
*Sent when this quest is started by a script story manager event.
:*Sent when this quest is started by a script story manager event.


'''Event [[OnStoryServedTime - Quest|OnStoryServedTime]](Location akLocation, Form akCrimeGroup, int aiCrimeGold, int aiDaysJail)'''
:'''[[OnStoryServedTime - Quest|OnStoryServedTime]](Location ''akLocation'', Form ''akCrimeGroup'', Int ''aiCrimeGold'', Int ''aiDaysJail'')'''
*Sent when this quest is started by a served time story manager event.
:*Sent when this quest is started by a served time story manager event.


'''Event [[OnStoryTrespass - Quest|OnStoryTrespass]](ObjectReference akVictim, ObjectReference akTrespasser, Location akLocation, int aiCrime)'''
:'''[[OnStoryTrespass - Quest|OnStoryTrespass]](ObjectReference ''akVictim'', ObjectReference ''akTrespasser'', Location ''akLocation'', Int ''aiCrime'')'''
*Sent when this quest is started by a trespass story manager event.
:*Sent when this quest is started by a trespass story manager event.


== Related Fragments ==
== Related Fragments ==
*[[Quest Stage Fragments]]
*[[Quest Stage Fragments]]
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Script Objects]]

Latest revision as of 08:39, 3 April 2016

Extends: Form Script

Script for the manipulation of quests.

Definition[edit | edit source]

ScriptName Quest extends Form

Member Functions[edit | edit source]

CompleteAllObjectives()
  • Completes all a quests objectives.
CompleteQuest()
  • Flags this quest as completed.
FailAllObjectives()
  • Flags all quest objects as failed.
Alias GetAlias(Int aiAliasID)
  • Obtains the Alias attached to this quest associated with the specified ID.
Int GetCurrentStageID()
  • Obtains the highest completed stage on this quest.
Int GetStage()
  • Alias for GetCurrentStageID().
Bool GetStageDone(Int aiStage)
  • Alias for IsStageDone().
Bool IsActive()
  • Is this quest "active"? (Tracked by the player).
Bool IsCompleted()
  • Returns whether this quest is completed or not.
Bool IsObjectiveCompleted(Int aiObjective)
  • Obtains whether the specified objective is completed or not.
Bool IsObjectiveDisplayed(Int aiObjective)
  • Obtains whether the specified objective is displayed or not.
Bool IsObjectiveFailed(Int aiObjective)
  • Obtains whether the specified objective is failed or not.
Bool IsRunning()
  • Returns whether this quest is currently running or not.
Bool IsStageDone(Int aiStage)
  • Checks to see if the specified stage is done or not.
Bool IsStarting()
  • Returns whether this quest is currently enabled but not running yet.
Bool IsStopping()
  • Returns whether this quest is currently not enabled anymore but still shutting down.
Bool IsStopped()
  • Returns whether this quest is currently fully stopped.
Bool ModObjectiveGlobal(Float afModValue, GlobalVariable aModGlobal, Int aiObjectiveID, Float afTargetValue, Bool abCountingUp, Bool abCompleteObjective, Bool abRedisplayObjective)
  • Mods a global variable in a threadsafe way. Optional parameters allow automatic redisplay and completion (or failure) of a quest objective using this global variable.
Reset()
  • Resets this quest.
SetActive(Bool abActive)
  • Sets or clears this quest as "active". (Tracked by the player)
Bool SetCurrentStageID(Int aiStageID)
  • Sets the quest to the requested stage, returning true if it succeeded.
SetObjectiveCompleted(Int aiObjective, Bool abCompleted)
  • Sets whether the specified objective is completed or not.
SetObjectiveDisplayed(Int aiObjective, Bool abDisplayed)
  • Sets whether the specified objective is displayed or not.
SetObjectiveFailed(Int aiObjective, Bool abFailed)
  • Sets whether the specified objective is failed or not.
Bool SetStage(Int aiStage)
  • Alias of SetCurrentStageID().
Bool Start()
  • Starts this quest.
Stop()
  • Stops the quest.
Bool UpdateCurrentInstanceGlobal(GlobalVariable aUpdateGlobal)
  • Updates the value for the given global for the quest's current instance.


SKSE Global Functions[edit | edit source]

Quest GetQuest(String editorID)
  • Returns the Quest with the specified editor id.


SKSE Functions[edit | edit source]

String GetID()
  • Returns the editor ID of the Quest.
Int GetPriority()
  • Returns the priority of the Quest.
Int GetNumAliases()
  • Returns the number of aliases associated with the Quest.
Alias GetNthAlias(Int index)
  • Returns the specified alias associated with the Quest.
Alias GetAliasByName(String name)
  • Returns the specified alias associated with the Quest.

Events[edit | edit source]

OnStoryActivateActor(Location akLocation, ObjectReference akActor)
  • Sent when this quest is started by an activate actor story manager event.
OnStoryAddToPlayer(ObjectReference akOwner, ObjectReference akContainer, Location akLocation, Form akItemBase, Int aiAcquireType)
  • Sent when this quest is started by an add to player story manager event.
OnStoryArrest(ObjectReference akArrestingGuard, ObjectReference akCriminal, Location akLocation, Int aiCrime)
  • Sent when this quest is started by an arrest story manager event.
OnStoryAssaultActor(ObjectReference akVictim, ObjectReference akAttacker, Location akLocation, Int aiCrime)
  • Sent when this quest is started by an assault actor story manager event.
OnStoryBribeNPC(ObjectReference akActor)
  • Sent when this quest is started by a bribe NPC story manager event.
OnStoryCastMagic(ObjectReference akCastingActor, ObjectReference akSpellTarget, Location akLocation, Form akSpell)
  • Sent when this quest is started by a cast magic story manager event.
OnStoryChangeLocation(ObjectReference akActor, Location akOldLocation, Location akNewLocation)
  • Sent when this quest is started by a change location story manager event.
OnStoryCraftItem(ObjectReference akBench, Location akLocation, Form akCreatedItem)
  • Sent when this quest is started by a craft item story manager event.
OnStoryCrimeGold(ObjectReference akVictim, ObjectReference akCriminal, Faction akFaction, Int aiGoldAmount, Int aiCrime)
  • Sent when this quest is started by a crime gold story manager event.
OnStoryCure(Form akInfection)
  • Sent when this quest is started by a cure story manager event.
OnStoryDialogue(Location akLocation, ObjectReference akActor1, ObjectReference akActor2)
  • Sent when this quest is started by a dialogue story manager event.
OnStoryDiscoverDeadBody(ObjectReference akActor, ObjectReference akDeadActor, Location akLocation)
  • Sent when this quest is started by a discover dead body story manager event.
OnStoryEscapeJail(Location akLocation, Form akCrimeGroup)
  • Sent when this quest is started by an escape jail story manager event.
OnStoryFlatterNPC(ObjectReference akActor)
  • Sent when this quest is started by a flatter NPC story manager event.
OnStoryHello(Location akLocation, ObjectReference akActor1, ObjectReference akActor2)
  • Sent when this quest is started by a hello story manager event.
OnStoryIncreaseLevel(Int aiNewLevel)
  • Sent when this quest is started by an increase level story manager event.
OnStoryIncreaseSkill(String asSkill)
  • Sent when this quest is started by an increase skill story manager event.
OnStoryInfection(ObjectReference akTransmittingActor, Form akInfection)
  • Sent when this quest is started by an infection story manager event.
OnStoryIntimidateNPC(ObjectReference akActor)
  • Sent when this quest is started by an intimidate NPC story manager event.
OnStoryJail(ObjectReference akGuard, Form akCrimeGroup, Location akLocation, Int aiCrimeGold)
  • Sent when this quest is started by a jail story manager event.
OnStoryKillActor(ObjectReference akVictim, ObjectReference akKiller, Location akLocation, Int aiCrimeStatus, Int aiRelationshipRank)
  • Sent when this quest is started by a kill actor story manager event.
OnStoryNewVoicePower(ObjectReference akActor, Form akVoicePower)
  • Sent when this quest is started by a new voice power story manager event.
OnStoryPickLock(ObjectReference akActor, ObjectReference akLock)
  • Sent when this quest is started by a pick lock story manager event.
OnStoryPayFine(ObjectReference akCriminal, ObjectReference akGuard, Form akCrimeGroup, Int aiCrimeGold)
  • Sent when this quest is started by a pay fine story manager event.
OnStoryPlayerGetsFavor(ObjectReference akActor)
  • Sent when this quest is started by a player gets favor story manager event.
OnStoryRelationshipChange(ObjectReference akActor1, ObjectReference akActor2, Int aiOldRelationship, Int aiNewRelationship)
  • Sent when this quest is started by a relationship change story manager event.
OnStoryRemoveFromPlayer(ObjectReference akOwner, ObjectReference akItem, Location akLocation, Form akItembase, Int aiRemoveType)
  • Sent when this quest is started by a remove from player story manager event.
OnStoryScript(Keyword akKeyword, Location akLocation, ObjectReference akRef1, ObjectReference akRef2, Int aiValue1, Int aiValue2)
  • Sent when this quest is started by a script story manager event.
OnStoryServedTime(Location akLocation, Form akCrimeGroup, Int aiCrimeGold, Int aiDaysJail)
  • Sent when this quest is started by a served time story manager event.
OnStoryTrespass(ObjectReference akVictim, ObjectReference akTrespasser, Location akLocation, Int aiCrime)
  • Sent when this quest is started by a trespass story manager event.

Related Fragments[edit | edit source]