Skills & Progression

Stardrops

Access the complete dataset of Stardew Valley stardrops and filter by acquisition source using the chainable StarDropQuery API.

Quick Start

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

// Get all stardrops
const all = starDrops().get()

// Find a specific stardrop by name
const drop = starDrops().findByName('Museum Stardrop')

// Filter by source category
const purchased = starDrops().bySource('purchase').get()

// Get all stardrops sorted by name
const sorted = starDrops().sortByName().get()

Type Definition

Each stardrop record conforms to the StarDrop interface:

FieldTypeDescription
idstringUnique identifier for the stardrop.
namestringDisplay name of the stardrop.
descriptionstringHow to obtain this stardrop.
sourceStarDropSourceThe acquisition source category.
imagestringPath to the stardrop's image.

The StarDropSource type is a union of: 'purchase', 'exploration', 'friendship', 'achievement', 'collection'.

Query Methods

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

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

Filter Methods

MethodReturnsDescription
bySource(source)StarDropQueryFilter by acquisition source category. Accepts 'purchase', 'exploration', 'friendship', 'achievement', or 'collection'.

Sort Methods

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

Examples

List all stardrops with their sources

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

const all = starDrops().sortByName().get()

all.forEach((drop) => {
  console.log(`${drop.name} [${drop.source}]: ${drop.description}`)
})

Count stardrops by source

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

const sources = [
  'purchase',
  'exploration',
  'friendship',
  'achievement',
  'collection',
]

sources.forEach((source) => {
  const count = starDrops().bySource(source).count()
  console.log(`${source}: ${count} stardrop(s)`)
})

Build a stardrop checklist

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

const all = starDrops().get()

// Example: track which stardrops the player has collected
const collected = new Set(['stardrop-1', 'stardrop-3'])

all.forEach((drop) => {
  const status = collected.has(drop.id) ? '[x]' : '[ ]'
  console.log(`${status} ${drop.name}${drop.description}`)
})

console.log(`\nCollected: ${collected.size}/${all.length}`)

Find stardrops from friendship

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

const friendshipDrops = starDrops().bySource('friendship').get()

friendshipDrops.forEach((drop) => {
  console.log(`${drop.name}: ${drop.description}`)
})

Wrap a pre-filtered array

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

const filtered = starDrops().bySource('exploration').get()
const sorted = starDrops(filtered).sortByName('desc').get()
Previous
Grandpa's evaluation