Characters & Social

Quests

Access the full dataset of Stardew Valley quests with details on who provides each quest, what is required, and what rewards are earned, using the chainable QuestQuery API.

Quick Start

import { quests } from 'stardew-valley-data'

// Get all quests
const all = quests().get()

// Find a specific quest by name
const quest = quests().findByName('Crop Research')

// Get all quests sorted alphabetically
const sorted = quests().sortByName().get()

// Count the total number of quests
const total = quests().count()

Type Definition

Each quest record conforms to the Quest interface:

FieldTypeDescription
idstringUnique identifier for the quest.
namestringDisplay name of the quest.
textstringThe quest description or story text.
providedBystringWho gives or triggers the quest (e.g., an NPC name or event).
requirementsstringWhat the player must do to complete the quest.
rewardsstringWhat the player receives upon completion.

Query Methods

QuestQuery extends QueryBase and inherits five terminal methods shared by all query builders:

MethodReturnsDescription
get()Quest[]Return all results as an array.
first()Quest | undefinedReturn the first result.
find(id)Quest | undefinedFind a quest by exact ID.
findByName(name)Quest | undefinedFind a quest by name (case-insensitive).
count()numberReturn the number of results.

Sort Methods

MethodReturnsDescription
sortByName(order?)QuestQuerySort alphabetically by name. Pass 'asc' (default) or 'desc'.

Examples

Look up a quest's details

import { quests } from 'stardew-valley-data'

const quest = quests().findByName('Initiation')

if (quest) {
  console.log(`Quest: ${quest.name}`)
  console.log(`Given by: ${quest.providedBy}`)
  console.log(`Requires: ${quest.requirements}`)
  console.log(`Reward: ${quest.rewards}`)
}

List all quests in reverse alphabetical order

import { quests } from 'stardew-valley-data'

const sorted = quests().sortByName('desc').get()

sorted.forEach((q) => {
  console.log(`${q.name}${q.providedBy}`)
})

Find a quest by ID

import { quests } from 'stardew-valley-data'

const quest = quests().find('quest-1')

if (quest) {
  console.log(quest.name)
}

Wrap a pre-filtered array

You can pass an existing Quest[] array into the quests() function to create a new query from it:

import { quests } from 'stardew-valley-data'

const myList = quests()
  .get()
  .filter((q) => q.providedBy.includes('Robin'))
const sorted = quests(myList).sortByName().get()
Previous
Events