Table of Contents

Class QuestScript

Namespace
SkyrimForge.Papyrus
Assembly
SkyrimForge.Game.dll

Functions and comments from Quest.psc.

non-native functions

public static class QuestScript
Inheritance
QuestScript
Inherited Members

Properties

Dispatcher

The dispatcher that binds this script to a form and calls the functions and properties that have no generated member.

public static PapyrusScriptDispatcher Dispatcher { get; }

Property Value

PapyrusScriptDispatcher

Methods

CompleteAllObjectives(PapyrusScript<Quest>)

Flags all objectives as complete

public static Task CompleteAllObjectives(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task

CompleteQuest(PapyrusScript<Quest>)

Flags this quest as completed

public static Task CompleteQuest(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task

FailAllObjectives(PapyrusScript<Quest>)

Flags all objectives as failed

public static Task FailAllObjectives(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task

GetCurrentStageID(PapyrusScript<Quest>)

Obtains the id of the highest completed stage on this quest

public static Task<int> GetCurrentStageID(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task<int>

GetID(PapyrusScript<Quest>)

returns the editor ID of the quest

public static Task<string> GetID(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task<string>

GetNumAliases(PapyrusScript<Quest>)

returns the number of aliases associated with the quest

public static Task<int> GetNumAliases(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task<int>

GetPriority(PapyrusScript<Quest>)

returns the priority of the quest

public static Task<int> GetPriority(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task<int>

GetQuest(string)

returns the quest with the specified editor id

public static Task<Quest?> GetQuest(string editorId)

Parameters

editorId string

Returns

Task<Quest?>

GetStage(PapyrusScript<Quest>)

Alias for GetCurrentStage - obtains the highest completed stage on this quest

public static Task<int> GetStage(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task<int>

GetStageDone(PapyrusScript<Quest>, int)

Alias for IsStageDone - checks to see whether the given stage is done or not

public static Task<bool> GetStageDone(this PapyrusScript<Quest> self, int aiStage)

Parameters

self PapyrusScript<Quest>
aiStage int

Returns

Task<bool>

IsActive(PapyrusScript<Quest>)

Is this quest "active" (tracked by the player)?

[Obsolete("Uses the Papyrus virtual machine. Prefer Quest.IsActive().", DiagnosticId = "SKYRIMFORGE0002")]
public static Task<bool> IsActive(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task<bool>

IsCompleted(PapyrusScript<Quest>)

Checks to see if the quest is completed

[Obsolete("Uses the Papyrus virtual machine. Prefer Quest.IsCompleted().", DiagnosticId = "SKYRIMFORGE0002")]
public static Task<bool> IsCompleted(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task<bool>

IsObjectiveCompleted(PapyrusScript<Quest>, int)

Checks to see if the specified objective is completed

public static Task<bool> IsObjectiveCompleted(this PapyrusScript<Quest> self, int aiObjective)

Parameters

self PapyrusScript<Quest>
aiObjective int

Returns

Task<bool>

IsObjectiveDisplayed(PapyrusScript<Quest>, int)

Checks to see if the specified objective is displayed

public static Task<bool> IsObjectiveDisplayed(this PapyrusScript<Quest> self, int aiObjective)

Parameters

self PapyrusScript<Quest>
aiObjective int

Returns

Task<bool>

IsObjectiveFailed(PapyrusScript<Quest>, int)

Checks to see if the specified objective is failed

public static Task<bool> IsObjectiveFailed(this PapyrusScript<Quest> self, int aiObjective)

Parameters

self PapyrusScript<Quest>
aiObjective int

Returns

Task<bool>

IsRunning(PapyrusScript<Quest>)

Checks to see if the quest is running

[Obsolete("Uses the Papyrus virtual machine. Prefer Quest.IsRunning().", DiagnosticId = "SKYRIMFORGE0002")]
public static Task<bool> IsRunning(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task<bool>

IsStageDone(PapyrusScript<Quest>, int)

Obtains whether the specified stage is done or not

public static Task<bool> IsStageDone(this PapyrusScript<Quest> self, int aiStage)

Parameters

self PapyrusScript<Quest>
aiStage int

Returns

Task<bool>

IsStarting(PapyrusScript<Quest>)

Checks to see if the quest is enabled but not running yet

[Obsolete("Uses the Papyrus virtual machine. Prefer Quest.IsStarting().", DiagnosticId = "SKYRIMFORGE0002")]
public static Task<bool> IsStarting(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task<bool>

IsStopped(PapyrusScript<Quest>)

Checks to see if the quest is no longer enabled or running

[Obsolete("Uses the Papyrus virtual machine. Prefer Quest.IsStopped().", DiagnosticId = "SKYRIMFORGE0002")]
public static Task<bool> IsStopped(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task<bool>

IsStopping(PapyrusScript<Quest>)

Checks to see if the quest is not enabled anymore but still shutting down

[Obsolete("Uses the Papyrus virtual machine. Prefer Quest.IsStopping().", DiagnosticId = "SKYRIMFORGE0002")]
public static Task<bool> IsStopping(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task<bool>

ModObjectiveGlobal(PapyrusScript<Quest>, float, GlobalVariable, int, float, bool, bool, bool)

thread-safe way to modify a global value optional parameters: aiObjectiveID = objective ID to redisplay afTargetValue = value you're counting up (or down) towards -- if included, function will return TRUE when the global reaches the target value abCountingUp = by default, function assumes you're counting up towards the target value; make this false to count DOWN towards target value abCompleteObjective = by default, function assumes you're completing the objective once you reach the target value; make this false to FAIL the objective abRedisplayObjective = by default, function asssume you want to redisplay the objective every time the global is incremeneted; make this FALSE to only display the objectives on complete or failure

public static Task<bool> ModObjectiveGlobal(this PapyrusScript<Quest> self, float afModValue, GlobalVariable aModGlobal, int aiObjectiveID = -1, float afTargetValue = -1, bool abCountingUp = true, bool abCompleteObjective = true, bool abRedisplayObjective = true)

Parameters

self PapyrusScript<Quest>
afModValue float
aModGlobal GlobalVariable
aiObjectiveID int
afTargetValue float
abCountingUp bool
abCompleteObjective bool
abRedisplayObjective bool

Returns

Task<bool>

Reset(PapyrusScript<Quest>)

Resets the quest

[Obsolete("Uses the Papyrus virtual machine. Prefer Quest.Reset().", DiagnosticId = "SKYRIMFORGE0002")]
public static Task Reset(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task

SetActive(PapyrusScript<Quest>, bool)

Flags this quest as "active" (tracked by the player)

public static Task SetActive(this PapyrusScript<Quest> self, bool abActive = true)

Parameters

self PapyrusScript<Quest>
abActive bool

Returns

Task

SetCurrentStageID(PapyrusScript<Quest>, int)

Set the quest to the requested stage ID - returns true if stage exists and was set. This function is latent and will wait for the quest to start up before returning (if it needed to be started)

public static Task<bool> SetCurrentStageID(this PapyrusScript<Quest> self, int aiStageID)

Parameters

self PapyrusScript<Quest>
aiStageID int

Returns

Task<bool>

SetObjectiveCompleted(PapyrusScript<Quest>, int, bool)

Sets the specified objective to completed or not

public static Task SetObjectiveCompleted(this PapyrusScript<Quest> self, int aiObjective, bool abCompleted = true)

Parameters

self PapyrusScript<Quest>
aiObjective int
abCompleted bool

Returns

Task

SetObjectiveDisplayed(PapyrusScript<Quest>, int, bool, bool)

Sets the specified objective to displayed or hidden - if abForce is true, will display the objective even if it has already been displayed

public static Task SetObjectiveDisplayed(this PapyrusScript<Quest> self, int aiObjective, bool abDisplayed = true, bool abForce = false)

Parameters

self PapyrusScript<Quest>
aiObjective int
abDisplayed bool
abForce bool

Returns

Task

SetObjectiveFailed(PapyrusScript<Quest>, int, bool)

Sets the specified objective to failed or not

public static Task SetObjectiveFailed(this PapyrusScript<Quest> self, int aiObjective, bool abFailed = true)

Parameters

self PapyrusScript<Quest>
aiObjective int
abFailed bool

Returns

Task

SetStage(PapyrusScript<Quest>, int)

Alias of SetCurrentStage - Set the quest to the requested stage This function is latent and will wait for the quest to start up before returning (if it needed to be started)

public static Task<bool> SetStage(this PapyrusScript<Quest> self, int aiStage)

Parameters

self PapyrusScript<Quest>
aiStage int

Returns

Task<bool>

Start(PapyrusScript<Quest>)

Starts the quest - returns whether the quest was able to be started or not This function is latent and will wait for the quest to start up before returning

[Obsolete("Uses the Papyrus virtual machine. Prefer Quest.Start().", DiagnosticId = "SKYRIMFORGE0002")]
public static Task<bool> Start(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task<bool>

Stop(PapyrusScript<Quest>)

Stops the quest

[Obsolete("Uses the Papyrus virtual machine. Prefer Quest.Stop().", DiagnosticId = "SKYRIMFORGE0002")]
public static Task Stop(this PapyrusScript<Quest> self)

Parameters

self PapyrusScript<Quest>

Returns

Task

UpdateCurrentInstanceGlobal(PapyrusScript<Quest>, GlobalVariable)

Updates current instance's value for the given global

public static Task<bool> UpdateCurrentInstanceGlobal(this PapyrusScript<Quest> self, GlobalVariable aUpdateGlobal)

Parameters

self PapyrusScript<Quest>
aUpdateGlobal GlobalVariable

Returns

Task<bool>