User:Scrivener07/Sandbox/Script Object

From Starfield Wiki
Jump to: navigation, search


Quest
Script Quest
Extends Form


No documentation provided.


Definition[edit]

The script header definition.

ScriptName Quest Extends Form Native Hidden


Members[edit]

The members that belong to this script.

  • bool Function ModObjectiveGlobal(float afModValue, GlobalVariable aModGlobal, int aiObjectiveID = -1, float afTargetValue = -1.0, bool abCountingUp = true, bool abCompleteObjective = true, bool abRedisplayObjective = true, bool abAllowRollbackObjective = false)
    • non-native functions

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 abAllowRollbackObjective = by default, function assumes you do not want to rollback a completed objective; make this TRUE to reopen an already completed objective if aModGlobal goes below/above target value

  • Function SetAllStages(int lastStage)
    • kmk- for testing - sets all stages up to lastStage
  • Struct QuestStage
    • No documentation provided.
  • Function SetQuestStage(QuestStage questStageToSet) Global
    • No documentation provided.
  • bool Function GetQuestStageDone(QuestStage questStageToCheck) Global
    • No documentation provided.
  • Function SetObjectiveSkipped(int aiObjectiveID)
    • WJS - function to handle objectives that might have been skipped over. For now, hide them
  • Function SetObjectiveActive(int aiObjective, bool abForceRedisplay = true)
    • jduvall - convenience function - uncompletes, unfails and displays the objective
  • Function CompleteAllObjectives() Native
    • native functions

Flags all objectives as complete

  • Function CompleteQuest() Native
    • Flags this quest as completed
  • Function FailAllObjectives() Native
    • Flags all objectives as failed
  • Alias Function GetAlias(int aiAliasID) Native
    • Obtains the specified alias on the quest
  • int Function GetCurrentStageID() Native
    • Obtains the id of the highest completed stage on this quest
  • ObjectReference[] Function GetCurrentStageTargets() Native
    • Returns the array of object reference targets pertinent to the current quest stage
  • int Function GetStage()
    • Alias for GetCurrentStage - obtains the highest completed stage on this quest
  • float Function GetQuestTimeRemaining() Native
    • gets the remaining time for the quest timer if any
  • bool Function GetStageDone(int aiStage)
    • Alias for IsStageDone - checks to see whether the given stage is done or not
  • bool Function HasObjective(int aiObjective) Native
    • Checks to see if the specified objective exists on the quest
  • bool Function IsActive() Native
    • Is this quest "active" (tracked by the player)?
  • bool Function IsCompleted() Native
    • Checks to see if the quest is completed
  • bool Function IsObjectiveCompleted(int aiObjective) Native
    • Checks to see if the specified objective is completed
  • bool Function IsObjectiveDisplayed(int aiObjective) Native
    • Checks to see if the specified objective is displayed
  • bool Function IsObjectiveFailed(int aiObjective) Native
    • Checks to see if the specified objective is failed
  • Function SetObjectiveDisplayedAtTop(int aiObjective) Native
    • Sets the specified objective to be displayed at the top of the player's objective list
  • bool Function IsQuestTimerPaused() Native
    • Checks if the quest timer is paused; returns true if paused otherwise false which means the timer is running
  • bool Function IsRunning() Native
    • Checks to see if the quest is running
  • bool Function IsStageDone(int aiStage) Native
    • Obtains whether the specified stage is done or not
  • bool Function IsStarting() Native
    • Checks to see if the quest is enabled but not running yet
  • bool Function IsStopping() Native
    • Checks to see if the quest is not enabled anymore but still shutting down
  • bool Function IsStopped() Native
    • Checks to see if the quest is no longer enabled or running
  • Function ModQuestTimer(float afModValue) Native
    • Modifies a quest timer

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

  • Function PauseQuestTimer(bool abPause = 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.
  • Function RemoveRequestedPCMQuestLocations() Native
    • Removes PCM locations requested by this quest.
  • Function Reset() Native
    • Resets the quest
  • Function SetActive(bool abActive = true) Native
    • Flags this quest as "active" (tracked by the player)
  • bool Function SetCurrentStageID(int aiStageID) Native
    • 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)

  • Function SetObjectiveCompleted(int aiObjective, bool abCompleted = true) Native
    • Sets the specified objective to completed or not
  • Function SetObjectiveDisplayed(int aiObjective, bool abDisplayed = true, bool abForce = false) Native
    • Sets the specified objective to displayed or hidden - if abForce is true, will display the objective even if it has already been displayed
  • Function SetObjectiveFailed(int aiObjective, bool abFailed = true) Native
    • Sets the specified objective to failed or not
  • Function SetObjectiveFailedIfNotCompleted(int aiObjective)
    • jduvall - convenience function

fails the objective if it's not completed

  • bool Function SetStage(int aiStage)
    • 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)

  • Function SetStageNoWait(int aiStage) 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

  • bool Function Start() Native
    • 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

  • bool Function StartNoWait() 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

  • Function StartQuestTimer(float afTimeInHours = -1.0) 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.

  • Function Stop() Native
    • Stops the quest
  • Function StopQuestTimer() Native
    • stop the running quest timer

Will trigger OnQuestTimerEnd

  • bool Function UpdateCurrentInstanceGlobal(GlobalVariable aUpdateGlobal) Native
    • Updates current instance's value for the given global
  • Event OnMissionAccepted()
    • Event received when a mission-type quest is accepted via the mission board
  • Event OnQuestInit()
    • Event received when the quest is initalized, aliases are filled, and it is about to run the startup stage
  • Event OnQuestShutdown()
    • Event received when the quest has been shut down

Note that the aliases will be empty by the time this event is received

  • Event OnQuestStarted()
    • Event received when the quest has been started
  • Event OnQuestRejected()
    • Event received when the quest is rejected
  • Event OnQuestTimerStart(int aiReason)
    • aiReason values for OnQuestTimer***** are 0=timer expired, 1=stage triggered, 2=script

Event received when the quest timer has started

  • Event OnQuestTimerEnd(int aiReason)
    • Event received when the quest timer has ended
  • Event OnQuestTimerPause(int aiReason)
    • Event received when the quest timer has been paused
  • Event OnQuestTimerResume(int aiReason)
    • Event received when the quest timer has resumed
  • Event OnQuestTimerMod(int aiReason)
    • Event received when the quest timer has be modded
  • Event OnReset()
    • Event received when the quest owning this alias is reset
  • Event OnStageSet(int auiStageID, int auiItemID)
    • Event received when a quest stage is set (in parallel with the fragment)
  • Event OnSpeechChallengeCompletion(SpeechChallengeObject akSpeechChallenge, bool abSuccess)
    • Event called when a speech challenge is completed (won or lost).
  • Event OnStoryActivateActor(Location akLocation, ObjectReference akActor)
    • Story manager events - fired in parallel with the quest startup stage
  • Event OnStoryActorAttach(ObjectReference akActor, Location akLocation)
    • No documentation provided.
  • Event OnStoryAddToPlayer(ObjectReference akOwner, ObjectReference akContainer, Location akLocation, Form akItemBase, int aiAcquireType, int aiValue)
    • No documentation provided.
  • Event OnStoryArrest(ObjectReference akArrestingGuard, ObjectReference akCriminal, Location akLocation, int aiCrime)
    • No documentation provided.
  • Event OnStoryAssaultActor(ObjectReference akVictim, ObjectReference akAttacker, Location akLocation, bool abCrime)
    • No documentation provided.
  • Event OnStoryAttractionObject(ObjectReference akActor, ObjectReference akObject, Location akLocation, bool abCommanded)
    • No documentation provided.
  • Event OnStoryBribeNPC(ObjectReference akActor, int aiAmount)
    • No documentation provided.
  • Event OnStoryCastMagic(ObjectReference akCastingActor, ObjectReference akSpellTarget, Location akLocation, Form akSpell)
    • No documentation provided.
  • Event OnStoryChangeLocation(ObjectReference akActor, Location akOldLocation, Location akNewLocation)
    • No documentation provided.
  • Event OnStoryExploredLocation(Location akOldLocation)
    • No documentation provided.
  • Event OnStoryCraftItem(ObjectReference akBench, Location akLocation, Form akCreatedItem)
    • No documentation provided.
  • Event OnStoryCrimeGold(ObjectReference akVictim, ObjectReference akCriminal, Form akFaction, int aiGoldAmount, int aiCrime)
    • No documentation provided.
  • Event OnStoryCure(Form akInfection)
    • No documentation provided.
  • Event OnStoryDialogue(Location akLocation)
    • No documentation provided.
  • Event OnStoryDiscoverDeadBody(ObjectReference akActor, ObjectReference akDeadActor, Location akLocation)
    • No documentation provided.
  • Event OnStoryEscapeJail(Location akLocation, Form akCrimeGroup)
    • No documentation provided.
  • Event OnStoryFlatterNPC(ObjectReference akActor)
    • No documentation provided.
  • Event OnStoryHackTerminal(ObjectReference akComputer, bool abSucceeded)
    • No documentation provided.
  • Event OnStoryHello(Location akLocation, ObjectReference akActor1, ObjectReference akActor2)
    • No documentation provided.
  • Event OnStoryIncreaseLevel(int aiNewLevel)
    • No documentation provided.
  • Event OnStoryInfection(ObjectReference akTransmittingActor, Form akInfection)
    • No documentation provided.
  • Event OnStoryIntimidateNPC(ObjectReference akActor)
    • No documentation provided.
  • Event OnStoryIronSights(ObjectReference akActor, Form akWeapon)
    • No documentation provided.
  • Event OnStoryJail(ObjectReference akGuard, Form akCrimeGroup, Location akLocation, int aiCrimeGold)
    • No documentation provided.
  • Event OnStoryKillActor(ObjectReference akVictim, ObjectReference akKiller, Location akLocation, int aiCrimeStatus, int aiRelationshipRank)
    • No documentation provided.
  • Event OnStoryLocationLoaded(Location akLocation)
    • No documentation provided.
  • Event OnStoryMineExplosion(ObjectReference akVictim, ObjectReference akAttacker)
    • No documentation provided.
  • Event OnStoryNewVoicePower(ObjectReference akActor, Form akVoicePower)
    • No documentation provided.
  • Event OnStoryPayFine(ObjectReference akCriminal, ObjectReference akGuard, Form akCrimeGroup, int aiCrimeGold)
    • No documentation provided.
  • Event OnStoryPickLock(ObjectReference akActor, ObjectReference akLock, bool abCrime)
    • No documentation provided.
  • Event OnStoryPickPocket(ObjectReference akVictim, bool abSuccess)
    • No documentation provided.
  • Event OnStoryPiracyActor(ObjectReference akVictim, ObjectReference akAttacker, Location akLocation, bool abCrime)
    • No documentation provided.
  • Event OnStoryPlayerGetsFavor(ObjectReference akActor)
    • No documentation provided.
  • Event OnStoryRelationshipChange(ObjectReference akActor1, ObjectReference akActor2, int aiOldRelationship, int aiNewRelationship)
    • No documentation provided.
  • Event OnStoryRemoveFromPlayer(ObjectReference akOwner, ObjectReference akItem, Location akLocation, Form akItemBase, int aiRemoveType, int aiValue)
    • No documentation provided.
  • Event OnStoryScript(Keyword akKeyword, Location akLocation, ObjectReference akRef1, ObjectReference akRef2, int aiValue1, int aiValue2)
    • No documentation provided.
  • Event OnStoryServedTime(Location akLocation, Form akCrimeGroup, int aiCrimeGold, int aiDaysJail)
    • No documentation provided.
  • Event OnStoryShipDock(ObjectReference akDockingShip, ObjectReference akDockTargetShip, bool abDocking)
    • No documentation provided.
  • Event OnStoryShipLanding(ObjectReference akLandingShip, ObjectReference akLandingMarker)
    • No documentation provided.
  • Event OnStorySpeechChallengeCompletion(SpeechChallengeObject akChallenge, bool abSuccess)
    • No documentation provided.
  • Event OnStoryTrespass(ObjectReference akVictim, ObjectReference akTrespasser, Location akLocation, bool abCrime)
    • No documentation provided.