Background for Skyrim SE

The Quest Script

    The Quest script is a part of Skyrim SE’s Papyrus scripting ecosystem. It is included with the base game, and is extended/modified by modded sources such as Skyrim Script Extender x64 (SKSE).

    For this script, the Papyrus index knows about:

    • 30 events
    • 36 functions


    Inheritance Tree

    ScriptExtended By
    ScriptExtended By
    ScriptExtended By
    ScriptExtended By
    ScriptExtended By

    Properties

    No properties found.

      Events

      Functions

      • boolfunctionModObjectiveGlobal(floatafModValue, GlobalVariableaModGlobal, intaiObjectiveID=-1, floatafTargetValue=-1, boolabCountingUp=true, boolabCompleteObjective=true, boolabRedisplayObjective=true)

        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.

      • voidfunctionCompleteAllObjectives()Native

        Flags all objectives on this quest as complete.

      • voidfunctionCompleteQuest()Native

        Flags this quest as completed.

      • voidfunctionFailAllObjectives()Native

        Flags all objectives on this quest as failed.

      • AliasfunctionGetAlias(intaiAliasID)Native

        Obtains the alias with the specified ID that is attached to this quest.

      • intfunctionGetCurrentStageID()Native

        Obtains the highest completed stage in this quest.

      • intfunctionGetStage()

        Obtains the highest completed stage in this quest.

      • boolfunctionGetStageDone(intaiStage)

        Obtains whether the specified quest stage is done or not.

        A stage is "done" if it has ever been visited with the Quest.SetCurrentStageID(...) or Quest.SetCurrentStageID(...) functions.

        GetStageDone is an alias for IsStageDone.

      • boolfunctionIsActive()Native

        Checks to see if this quest is active (currently tracked by the player).

      • boolfunctionIsCompleted()Native

        Checks to see if this quest is completed.

      • boolfunctionIsObjectiveCompleted(intaiObjective)Native

        Obtains whether the specified quest objective is completed or not.

      • boolfunctionIsObjectiveDisplayed(intaiObjective)Native

        Obtains whether the specified quest objective is displayed or not.

      • boolfunctionIsObjectiveFailed(intaiObjective)Native

        Obtains whether the specified quest objective is failed or not.

      • boolfunctionIsRunning()Native

        Checks to see if this quest is running or not.

      • boolfunctionIsStageDone(intaiStage)Native

        Obtains whether the specified quest stage is done or not.

        A stage is "done" if it has ever been visited with the Quest.SetCurrentStageID(...) or Quest.SetCurrentStageID(...) functions.

        GetStageDone is an alias for IsStageDone.

      • boolfunctionIsStarting()Native

        Checks to see if this quest is in the process of starting up.

      • boolfunctionIsStopping()Native

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

      • boolfunctionIsStopped()Native

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

      • voidfunctionReset()Native

        Resets this quest.

      • voidfunctionSetActive(boolabActive=true)Native

        Flags this quest as active or not (tracked by the player).

      • boolfunctionSetCurrentStageID(intaiStageID)Native

        Attempts to set the quest's current stage. If the stage exists, and was successfully set, the function returns true. Otherwise, the function returns false and the stage is unchanged. Is latent and will wait for the quest to start if it has to start the quest. If the stage has any fragments attached to it, the function will also wait for those fragments to finish running before returning.

      • voidfunctionSetObjectiveCompleted(intaiObjective, boolabCompleted=true)Native

        Sets whether the specified quest objective is completed or not.

      • voidfunctionSetObjectiveDisplayed(intaiObjective, boolabDisplayed=true, boolabForce=false)Native

        Sets whether the specified quest objective is displayed or not.

      • voidfunctionSetObjectiveFailed(intaiObjective, boolabFailed=true)Native

        Sets whether the specified quest objective is failed or not.

        NOTE: This function does not work if called from a stage fragment script that is marked as "Complete Quest" or "Fail Quest".

      • boolfunctionSetStage(intaiStage)

        Attempts to set the quest's current stage. If the stage exists, and was successfully set, the function returns true. Otherwise, the function returns false and the stage is unchanged. Is latent and will wait for the quest to start if it has to start the quest. If the stage has any fragments attached to it, the function will also wait for those fragments to finish running before returning.

      • boolfunctionStart()Native

        Starts this quest. Is latent and will not return until the quest is actually started (and any start-up stage fragments run).

      • voidfunctionStop()Native

        Stops the quest.

      • boolfunctionUpdateCurrentInstanceGlobal(GlobalVariableaUpdateGlobal)Native

        Attempts to update the stored value of the given global in the instance data for the quest's current instance. The function only returns false on failure which can be caused by calling the function when there is no active instance on the quest or by passing a global not in the quest's text global list.

      • QuestfunctionGetQuest(stringeditorId)NativeGlobal

        Type: SKSE Global Function.

        Returns the quest of the specified editor id, or None if none match.

      • stringfunctionGetID()Native

        Type: SKSE Function.

        Returns the editor id of the Quest.

      • intfunctionGetPriority()Native

        Type: SKSE Function.

        Returns the quest's priority.

      • intfunctionGetNumAliases()Native

        returns the number of aliases associated with the quest

      • AliasfunctionGetNthAlias(intindex)Native

        Assuming the code below is a quest script getting it's own aliases.

        int idx  = self.GetNumAliases()
        while idx > 0
            idx -= 1
            Alias nthAlias = self.GetNthAlias(idx) as Alias
        
            ; LocationAlias or ReferenceAlias
            if nthAlias
                ; do stuff
            endIf
        endWhile
        
      • AliasfunctionGetAliasByName(stringname)Native

        Obtains the alias with the specified name that is attached to this quest. This is the name appearing in the Alias Name field of the Reference Alias form.

      • AliasfunctionGetAliasById(intaliasId)Native

        returns the alias by AlisID

      • Alias[]functionGetAliases()Native

        Returns all the aliases of this quest

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