Difference between revisions of "Quest Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jog
imported>CraftySentinel
m (Formatting Change)
Line 19: Line 19:


== Member Functions ==
== Member Functions ==
'''Function [[CompleteAllObjectives - Quest|CompleteAllObjectives]]()'''
*Completes all a quests objectives.


'''Function [[CompleteQuest - Quest|CompleteQuest]]()'''
{|class="wikitable" width =100%
*Flags this quest as completed.
!style="text-align:left;"|Function
!style="text-align:left;"|Description
|-
|[[CompleteAllObjectives - Quest|'''CompleteAllObjectives'''()]]
|Completes all a quests objectives.
|-


'''Function [[FailAllObjectives - Quest|FailAllObjectives]]()'''
|[[CompleteQuest - Quest|'''CompleteQuest'''()]]
*Flags all quest objects as failed.
|Flags this quest as completed.
|-


'''Alias Function [[GetAlias - Quest|GetAlias]](int aiAliasID)'''
|[[FailAllObjectives - Quest|'''FailAllObjectives'''()]]
*Obtains the [[Alias Script|Alias]] attached to this quest associated with the specified ID.
|Flags all quest objects as failed.
|-


'''int Function [[GetCurrentStageID - Quest|GetCurrentStageID]]()'''
|[[GetAlias - Quest|Alias '''GetAlias'''(Int ''aiAliasID'')]]
*Obtains the highest completed stage on this quest.
|Obtains the [[Alias Script|Alias]] attached to this quest associated with the specified ID.
|-


'''int Function [[GetCurrentStageID - Quest|GetStage]]()'''
|[[GetCurrentStageID - Quest|Int '''GetCurrentStageID'''()]]
*Alias for GetCurrentStageID().
|Obtains the highest completed stage on this quest.
|-


'''bool Function [[IsStageDone - Quest|GetStageDone]](int aiStage)'''
|[[GetCurrentStageID - Quest|Int '''GetCurrentStageID'''()]]
*Alias for IsStageDone().
|Alias for GetCurrentStageID().
|-


'''bool Function [[IsActive - Quest|IsActive]]()'''
|[[IsStageDone - Quest|Bool '''IsStageDone'''(Int ''aiStage'')]]
*Is this quest "active"? (Tracked by the player).
|Alias for IsStageDone().
|-


'''bool Function [[IsCompleted - Quest|IsCompleted]]()'''
|[[IsActive - Quest|Bool '''IsActive'''()]]
*Returns whether this quest is completed or not.
|Is this quest "active"? (Tracked by the player).
|-


'''bool Function [[IsObjectiveCompleted - Quest|IsObjectiveCompleted]](int aiObjective)'''
|[[IsCompleted - Quest|Bool '''IsCompleted'''()]]
*Obtains whether the specified objective is completed or not.
|Returns whether this quest is completed or not.
|-


'''bool Function [[IsObjectiveDisplayed - Quest|IsObjectiveDisplayed]](int aiObjective)'''
|[[IsObjectiveCompleted - Quest|Bool '''IsObjectiveCompleted'''(Int ''aiObjective'')]]
*Obtains whether the specified objective is displayed or not.
|Obtains whether the specified objective is completed or not.
|-


'''bool Function [[IsObjectiveFailed - Quest|IsObjectiveFailed]](int aiObjective)'''
|[[IsObjectiveDisplayed - Quest|Bool '''IsObjectiveDisplayed'''(Int ''aiObjective'')]]
*Obtains whether the specified objective is failed or not.
|Obtains whether the specified objective is displayed or not.
|-


'''bool Function [[IsRunning - Quest|IsRunning]]()'''
|[[IsObjectiveFailed - Quest|Bool '''IsObjectiveFailed'''(Int ''aiObjective'')]]
*Returns whether this quest is currently running or not.
|Obtains whether the specified objective is failed or not.
|-


'''bool Function [[IsStageDone - Quest|IsStageDone]](int aiStage)'''
|[[IsRunning - Quest|Bool '''IsRunning'''()]]
*Checks to see if the specified stage is done or not.
|Returns whether this quest is currently running or not.
|-


'''bool Function [[IsStarting - Quest|IsStarting]]()'''
|[[IsStageDone - Quest|Bool '''IsStageDone'''(Int ''aiStage'')]]
*Returns whether this quest is currently enabled but not running yet.
|Checks to see if the specified stage is done or not.
|-


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


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


'''bool Function [[ModObjectiveGlobal - Quest|ModObjectiveGlobal]](float afModValue, GlobalVariable aModGlobal, int aiObjectiveID, float afTargetValue, bool abCountingUp, bool abCompleteObjective, bool abRedisplayObjective)'''
|[[IsStopped- Quest|Bool '''IsStopped-'''()]]
*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.
|Returns whether this quest is currently fully stopped.
|-


'''Function [[Reset - Quest|Reset]]()'''
|[[ModObjectiveGlobal - Quest|Bool '''ModObjectiveGlobal'''(Float ''afModValue'', GlobalVariable ''aModGlobal'', Int ''aiObjectiveID'', Float ''afTargetValue'', Bool ''abCountingUp'', Bool ''abCompleteObjective'', Bool ''abRedisplayObjective'')]]
*Resets this quest.
|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.
|-


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


'''bool Function [[SetCurrentStageID - Quest|SetCurrentStageID]](int aiStageID)'''
|[[SetActive - Quest|'''SetActive'''(Bool ''abActive'')]]
*Sets the quest to the requested stage, returning true if it succeeded.
|Sets or clears this quest as "active". (Tracked by the player)
|-


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


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


'''Function [[SetObjectiveFailed - Quest|SetObjectiveFailed]](int aiObjective, bool abFailed)'''
|[[SetObjectiveDisplayed - Quest|'''SetObjectiveDisplayed'''(Int ''aiObjective'', Bool ''abDisplayed'')]]
*Sets whether the specified objective is failed or not.
|Sets whether the specified objective is displayed or not.
|-


'''bool Function [[SetCurrentStageID - Quest|SetStage]](int aiStage)'''
|[[SetObjectiveFailed - Quest|'''SetObjectiveFailed'''(Int ''aiObjective'', Bool ''abFailed'')]]
*Alias of SetCurrentStageID().
|Sets whether the specified objective is failed or not.
|-


'''bool Function [[Start - Quest|Start]]()'''
|[[SetCurrentStageID - Quest|Bool '''SetCurrentStageID'''(Int ''aiStage'')]]
*Starts this quest.
|Alias of SetCurrentStageID().
|-


'''Function [[Stop - Quest|Stop]]()'''
|[[Start - Quest|Bool '''Start'''()]]
*Stops the quest.
|Starts this quest.
|-


'''bool Function [[UpdateCurrentInstanceGlobal - Quest|UpdateCurrentInstanceGlobal]](GlobalVariable aUpdateGlobal)'''
|[[Stop - Quest|'''Stop'''()]]
*Updates the value for the given global for the quest's current instance.
|Stops the quest.
|-
 
|[[UpdateCurrentInstanceGlobal - Quest|Bool '''UpdateCurrentInstanceGlobal'''(GlobalVariable ''aUpdateGlobal'')]]
|Updates the value for the given global for the quest's current instance.
|-
 
|}


== 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!).


{|class="wikitable" width =100%
!style="text-align:left;"|Function
!style="text-align:left;"|Description
|-
|[[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'')]]
|Sent when this quest is started by an activate actor story manager event.
|-


----
|[[OnStoryAddToPlayer - Quest|'''OnStoryAddToPlayer'''(ObjectReference ''akOwner'', ObjectReference ''akContainer'', Location ''akLocation'', Form ''akItemBase'', Int ''aiAcquireType'')]]
''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 add to player 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)'''
|[[OnStoryArrest - Quest|'''OnStoryArrest'''(ObjectReference ''akArrestingGuard'', ObjectReference ''akCriminal'', Location ''akLocation'', Int ''aiCrime'')]]
*Sent when this quest is started by an add to player story manager event.
|Sent when this quest is started by an arrest story manager event.
|-


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


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


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


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


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


'''Event [[OnStoryCraftItem - Quest|OnStoryCraftItem]](ObjectReference akBench, Location akLocation, Form akCreatedItem)'''
|[[OnStoryCrimeGold - Quest|'''OnStoryCrimeGold'''(ObjectReference ''akVictim'', ObjectReference ''akCriminal'', Faction ''akFaction'', Int ''aiGoldAmount'', Int ''aiCrime'')]]
*Sent when this quest is started by a craft item story manager event.
|Sent when this quest is started by a crime gold story manager event.
|-


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


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


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


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


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


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


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


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


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


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


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


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


'''Event [[OnStoryKillActor - Quest|OnStoryKillActor]](ObjectReference akVictim, ObjectReference akKiller, Location akLocation, int aiCrimeStatus, int aiRelationshipRank)'''
|[[OnStoryNewVoicePower - Quest|'''OnStoryNewVoicePower'''(ObjectReference ''akActor'', Form ''akVoicePower'')]]
*Sent when this quest is started by a kill actor story manager event.
|Sent when this quest is started by a new voice power story manager event.
|-


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


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


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


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


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


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


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


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


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


== Related Fragments ==
== Related Fragments ==
*[[Quest Stage Fragments]]
*[[Quest Stage Fragments]]

Revision as of 05:23, 24 October 2013


Extends: Form Script

Script for the manipulation of quests.

Definition

ScriptName Quest extends Form

Properties

None

Global Functions

None

Member Functions

Function Description
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 GetCurrentStageID() Alias for GetCurrentStageID().
Bool IsStageDone(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 SetCurrentStageID(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.

Events

Function Description
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(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