Background for Starfield

The Quest Script

    The Quest script is a part of Starfield’s Papyrus scripting ecosystem. It is included with the base game.

    For this script, the Papyrus index knows about:

    • 54 events
    • 46 functions
    • 1 struct


    Inheritance Tree

    No indexed scripts extend this script.

    Structs

    The Papyrus Index is still under construction. Structs have not been implemented yet.

      Properties

      No properties found.

        Events

        Functions

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

          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.

        • voidfunctionSetAllStages(intlastStage)

          kmk- for testing - sets all stages up to lastStage

        • voidfunctionSetQuestStage(Quest:QuestStagequestStageToSet)Global

          Sets the quest stage on the specified quest.

        • boolfunctionGetQuestStageDone(Quest:QuestStagequestStageToCheck)Global

          Returns whether the specified quest stage is set.

        • voidfunctionSetObjectiveSkipped(intaiObjectiveID)

          Sets the specified objective as skipped (hidden in this case, if it wasn't completed)

        • voidfunctionSetObjectiveActive(intaiObjective, boolabForceRedisplay=true)

          jduvall - convenience function - uncompletes, unfails and displays the objective

        • 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.

        • Returns the array of object reference targets pertinent to the current quest stage

        • intfunctionGetStage()

          Obtains the highest completed stage in this Quest.

        • floatfunctionGetQuestTimeRemaining()Native

          gets the remaining time for the quest timer if any

        • boolfunctionGetStageDone(intaiStage)

          Obtains whether the specified stage is done or not.

        • boolfunctionHasObjective(intaiObjective)Native

          Returns whether or not the quest has the given objective.

        • 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.

        • voidfunctionSetObjectiveDisplayedAtTop(intaiObjective)Native

          Sets the specified objective to be displayed at the top of the player's objective list

        • boolfunctionIsQuestTimerPaused()Native

          Checks if the quest timer is paused; returns true if paused otherwise false which means the timer is running

        • boolfunctionIsRunning()Native

          Checks to see if this quest is running or not.

        • boolfunctionIsStageDone(intaiStage)Native

          Obtains whether the specified stage is done or not.

        • boolfunctionIsStarting()Native

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

        • boolfunctionIsStopping()Native

          Checks to see if this quest is in the process of shutting down.

        • boolfunctionIsStopped()Native

          Checks to see if this quest is completely stopped.

        • voidfunctionModQuestTimer(floatafModValue)Native

          Modifies a quest timer
          The timer is modified by the given afModValue can be negative or positive but not 0

        • voidfunctionPauseQuestTimer(boolabPause=true)Native

          Pauses the quest timer if abPause is true, resumes it if false. If the timer was already in the requested state nothing happens.

        • Removes PCM locations requested by this quest.

        • 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.

        • voidfunctionSetObjectiveFailedIfNotCompleted(intaiObjective)

          jduvall - convenience function
          fails the objective if it's not completed

        • 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.

        • voidfunctionSetStageNoWait(intaiStage)Native

          Sets the quest to the requested stage. Will NOT wait for the quest to start up, or for fragments to run. As such, it cannot return whether
          the stage was set or not, unlike SetStage or SetCurrentStageID

        • boolfunctionStart()Native

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

        • boolfunctionStartNoWait()Native

          Starts the quest - returns whether the quest was able to be started or not
          This function does not wait for aliases to fill or fragments to run and returns immediately

        • voidfunctionStartQuestTimer(floatafTimeInHours=-1)Native

          Starts this quests timer with the given time or the time saved on the quest itself if none was given.
          Will reset the timer with the new time if the timer was running.

        • voidfunctionStop()Native

          Stops the quest.

        • voidfunctionStopQuestTimer()Native

          stop the running quest timer
          Will trigger OnQuestTimerEnd

        • 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.

        Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.