Equipment & Items

Special Items

Access every special item, book, skill book, and mastery power in Stardew Valley with filters for type and associated skill.

Quick Start

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

// Get all special items and powers
const all = specialItems().get()

// Get only books
const books = specialItems().byType('book').get()

// Get mastery powers for combat
const combatMastery = specialItems().byType('mastery').bySkill('combat').get()

Type Definition

The SpecialItem type represents a special item, book, skill book, or mastery power.

FieldTypeDescription
idstringUnique identifier
namestringDisplay name
typeSpecialItemTypeCategory of the item
effectstringDescription of the item's effect
obtainedFromstringHow to obtain this item
imagestringRelative path to the item image
skillMasterySkill (optional)Associated mastery skill, if applicable
mailFlagsstring[] (optional)Mail flags associated with this item
eventFlagsstring[] (optional)Event flags associated with this item

SpecialItemType

type SpecialItemType = 'special-item' | 'book' | 'skill-book' | 'mastery'

MasterySkill

type MasterySkill = 'farming' | 'mining' | 'foraging' | 'fishing' | 'combat'

Query Methods

Create a query with the specialItems() function. Every filter and sort method returns a new SpecialItemQuery, so you can chain calls in any order.

Filter Methods

MethodSignatureDescription
byTypebyType(type: SpecialItemType): SpecialItemQueryFilter to entries of the given type ('special-item', 'book', 'skill-book', or 'mastery').
bySkillbySkill(skill: MasterySkill): SpecialItemQueryFilter mastery items by associated skill.

Sort Methods

MethodSignatureDescription
sortByNamesortByName(order?: 'asc' | 'desc'): SpecialItemQuerySort alphabetically by name. Default: 'asc'.

Terminal Methods

These methods are inherited from the base query and return actual values instead of a new query.

MethodSignatureDescription
getget(): SpecialItem[]Return all results as an array.
firstfirst(): SpecialItem | undefinedReturn the first result, or undefined if empty.
findfind(id: string): SpecialItem | undefinedFind an item by its exact ID.
findByNamefindByName(name: string): SpecialItem | undefinedFind an item by name (case-insensitive exact match).
countcount(): numberReturn the number of results.

Examples

List all books and their effects

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

const books = specialItems().byType('book').sortByName().get()
books.forEach((b) => console.log(`${b.name}: ${b.effect}`))

Get all mastery powers grouped by skill

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

const skills = ['farming', 'mining', 'foraging', 'fishing', 'combat']
skills.forEach((skill) => {
  const masteries = specialItems().byType('mastery').bySkill(skill).get()
  console.log(`\n${skill.toUpperCase()}:`)
  masteries.forEach((m) => console.log(`  ${m.name}: ${m.effect}`))
})

Find all skill books

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

const skillBooks = specialItems().byType('skill-book').get()
skillBooks.forEach((sb) =>
  console.log(`${sb.name}${sb.effect} (from: ${sb.obtainedFrom})`),
)

Look up a special item by name

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

const item = specialItems().findByName('Dark Talisman')
if (item) {
  console.log(`${item.name}: ${item.effect}`)
  console.log(`Obtained from: ${item.obtainedFrom}`)
}

Count items by type

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

console.log(`Total: ${specialItems().count()}`)
console.log(`Special items: ${specialItems().byType('special-item').count()}`)
console.log(`Books: ${specialItems().byType('book').count()}`)
console.log(`Skill books: ${specialItems().byType('skill-book').count()}`)
console.log(`Mastery powers: ${specialItems().byType('mastery').count()}`)
Previous
Hats