Collections & Knowledge

Cooking

Access the complete dataset of Stardew Valley cooked dishes with typed ingredient, buff, and recipe source information using the chainable CookingQuery API.

Quick Start

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

// Get all cooked dishes
const all = cooking().get()

// Find a specific dish by name
const soup = cooking().findByName('Pumpkin Soup')

// Get dishes sorted by sell price (most valuable first)
const valuable = cooking().sortBySellPrice('desc').get()

// Get the most energizing dishes
const energizing = cooking().sortByEnergy('desc').get()

// Find all dishes that use a specific ingredient
const eggDishes = cooking().withIngredient('egg').get()

Type Definition

Each cooked dish conforms to the CookedDish interface:

FieldTypeDescription
idstringUnique identifier for the dish.
namestringDisplay name of the dish.
descriptionstringIn-game description of the dish.
sellPricenumberGold value when sold.
energyHealthEnergyHealthEnergy and health restoration values (see below).
ingredientsIngredient[]Array of ingredients required to cook the dish (see below).
imagestringPath to the dish image.
buffsCookingBuff[]Array of stat buffs applied when eaten (see below).
buffDurationnumber | nullDuration of buffs in minutes, or null if no buffs.
recipeSourcesRecipeSource[]How the recipe can be obtained (see below).

EnergyHealth

FieldTypeDescription
energynumber | undefinedEnergy restored when consumed.
healthnumber | undefinedHealth restored when consumed.
poisonboolean | undefinedWhether the item causes a poison debuff.

Ingredient

FieldTypeDescription
namestringDisplay name of the ingredient.
idstringUnique identifier for the ingredient item.
quantitynumberNumber of this ingredient required.

CookingBuff

FieldTypeDescription
statstringThe stat that is buffed (e.g., "Farming", "Speed").
valuenumberThe buff value applied.

RecipeSource

RecipeSource is a union type describing how a recipe is obtained:

TypeFieldsDescription
{ type: 'default' }--Known by default at the start of the game.
{ type: 'friendship' }villager: string, hearts: numberReceived from a villager at a friendship level.
{ type: 'skill' }skill: string, level: numberLearned upon reaching a skill level.
{ type: 'queen-of-sauce' }season: Season, day: number, year: numberLearned from the Queen of Sauce TV show.
{ type: 'purchase' }from: string, price: number, currency: stringPurchased from a shop.
{ type: 'cutscene' }description: stringObtained through a cutscene event.

Query Methods

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

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

Filter Methods

MethodReturnsDescription
withIngredient(ingredientId)CookingQueryFilter to dishes that require a specific ingredient by item ID.

Sort Methods

MethodReturnsDescription
sortByName(order?)CookingQuerySort alphabetically by name. Pass 'asc' (default) or 'desc'.
sortBySellPrice(order?)CookingQuerySort by sell price. Pass 'desc' (default) or 'asc'.
sortByEnergy(order?)CookingQuerySort by energy restored. Dishes with no energy value sort as 0. Pass 'desc' (default) or 'asc'.

Examples

Find the most valuable dishes

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

const topDishes = cooking().sortBySellPrice('desc').get()

topDishes.slice(0, 5).forEach((d) => {
  console.log(`${d.name}: ${d.sellPrice}g`)
})

Get the best energy-restoring dishes

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

const energizing = cooking().sortByEnergy('desc').get()

energizing.slice(0, 5).forEach((d) => {
  const energy = d.energyHealth.energy ?? 0
  console.log(`${d.name}: +${energy} energy`)
})

Find dishes that use a specific ingredient

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

const milkDishes = cooking().withIngredient('milk').sortByName().get()

milkDishes.forEach((d) => {
  console.log(
    `${d.name} — Ingredients: ${d.ingredients.map((i) => i.name).join(', ')}`,
  )
})

List dishes with buffs

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

const buffDishes = cooking()
  .get()
  .filter((d) => d.buffs.length > 0)

buffDishes.forEach((d) => {
  const buffStr = d.buffs.map((b) => `${b.stat} +${b.value}`).join(', ')
  console.log(`${d.name}: ${buffStr} (${d.buffDuration} min)`)
})

View recipe sources for a dish

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

const dish = cooking().findByName('Pumpkin Soup')

if (dish) {
  dish.recipeSources.forEach((source) => {
    switch (source.type) {
      case 'friendship':
        console.log(`${source.villager} at ${source.hearts} hearts`)
        break
      case 'queen-of-sauce':
        console.log(
          `Queen of Sauce: ${source.season} ${source.day}, Year ${source.year}`,
        )
        break
      case 'default':
        console.log('Known by default')
        break
    }
  })
}

Wrap a pre-filtered array

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

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

const myList = cooking().withIngredient('egg').get()
const sorted = cooking(myList).sortBySellPrice('desc').get()
Previous
Concessions