Shops

Blacksmith

Access the complete stock list for Clint's Blacksmith shop with year-based pricing using the chainable BlacksmithQuery API.

Quick Start

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

// Get all blacksmith items
const all = blacksmith().get()

// Find an item by name
const coal = blacksmith().findByName('Coal')

// Sort by Year 1 price, cheapest first
const sorted = blacksmith().sortByPrice(1, 'asc').get()

Type Definition

Each item conforms to the BlacksmithItem interface:

FieldTypeDescription
idstringUnique identifier.
namestringDisplay name of the item.
descriptionstringIn-game description text.
priceYear1numberPurchase price during Year 1.
priceYear2numberPurchase price during Year 2 and beyond.
imagestringPath to the item's image.

Query Methods

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

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

Sort Methods

MethodReturnsDescription
sortByPrice(year?, order?)BlacksmithQuerySort by price for the given year (1 or 2, default 1). Pass 'asc' (default) or 'desc'.
sortByName(order?)BlacksmithQuerySort alphabetically by name. Pass 'asc' (default) or 'desc'.

Examples

Compare Year 1 and Year 2 prices

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

blacksmith()
  .get()
  .forEach((item) => {
    const diff = item.priceYear2 - item.priceYear1
    console.log(
      `${item.name}: ${item.priceYear1}g -> ${item.priceYear2}g (${diff > 0 ? '+' : ''}${diff}g)`,
    )
  })

Find the most expensive item by Year 2 price

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

const priciest = blacksmith().sortByPrice(2, 'desc').first()

if (priciest) {
  console.log(`${priciest.name} costs ${priciest.priceYear2}g in Year 2+`)
}
Previous
Shops overview