Quests
constQuests:object
Defined in: server/api.d.ts:2077
The game’s own quests, given to players as scripts decide. A player’s game lists the quests they have in the Pip-Boy, and tracks the active ones on the HUD with the data files’ quest name and objective texts. There is no quest logic here: scripts decide which quest a player has, which objectives they see, and when each is done. A player’s quests go when they disconnect.
Type Declaration
Section titled “Type Declaration”getObjective()
Section titled “getObjective()”getObjective(
player,quest,index):"hidden"|"displayed"|"completed"|"failed"|null
The state of one of the quest’s objectives for the player.
Parameters
Section titled “Parameters”player
Section titled “player”A connected player.
number
The quest’s form ID (QUST) in the game’s data files.
number
The objective’s index in the quest (its QOBJ value, as the data files give it).
Returns
Section titled “Returns”"hidden" | "displayed" | "completed" | "failed" | null
Null when they do not have the quest.
getShown()
Section titled “getShown()”getShown(
player):number[]
The quests the player has, by form ID.
Parameters
Section titled “Parameters”player
Section titled “player”A connected player.
Returns
Section titled “Returns”number[]
Empty when they have none.
hide()
Section titled “hide()”hide(
player,quest):boolean
Takes the quest and its objectives off the player.
Parameters
Section titled “Parameters”player
Section titled “player”A connected player.
number
The quest’s form ID (QUST) in the game’s data files.
Returns
Section titled “Returns”boolean
False when they did not have it.
isActive()
Section titled “isActive()”isActive(
player,quest):boolean|null
Whether the player’s HUD tracks the quest.
Parameters
Section titled “Parameters”player
Section titled “player”A connected player.
number
The quest’s form ID (QUST) in the game’s data files.
Returns
Section titled “Returns”boolean | null
Null when they do not have it.
setActive()
Section titled “setActive()”setActive(
player,quest,active):boolean
Tracks the quest on the player’s HUD, or stops tracking it.
Parameters
Section titled “Parameters”player
Section titled “player”A connected player.
number
The quest’s form ID (QUST) in the game’s data files.
active
Section titled “active”boolean
Whether the HUD tracks it.
Returns
Section titled “Returns”boolean
False when they do not have the quest.
setObjective()
Section titled “setObjective()”setObjective(
player,quest,index,state):boolean
Sets one of the quest’s objectives for the player. A quest holds 32 objectives at most.
Parameters
Section titled “Parameters”player
Section titled “player”A connected player.
number
The quest’s form ID (QUST) in the game’s data files.
number
The objective’s index in the quest (its QOBJ value, as the data files give it).
"hidden" | "displayed" | "completed" | "failed"
‘displayed’ shows it on the HUD tracker; ‘completed’ and ‘failed’ mark it in the Pip-Boy; ‘hidden’ takes it off.
Returns
Section titled “Returns”boolean
False when they do not have the quest, or it holds 32 objectives already.
show()
Section titled “show()”show(
player,quest):boolean
Gives the player the quest, with no objectives and not active. Nothing changes when they have it already.
Parameters
Section titled “Parameters”player
Section titled “player”A connected player.
number
The quest’s form ID (QUST) in the game’s data files.
Returns
Section titled “Returns”boolean
False when the player is gone.