Skills & Progression

Perfection

Access the Stardew Valley perfection tracker data, including all categories, their requirements, and percentage weights that sum to 100% completion using the PerfectionQuery API.

Quick Start

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

// Get all perfection categories
const all = perfection().get()

// Check the total weight (should be 100)
const total = perfection().totalWeight()

// Find a specific category
const shipping = perfection().findByName('Produce & Forage Shipped')

// Count the number of perfection categories
const count = perfection().count()

Type Definition

Each perfection category conforms to the PerfectionCategory interface:

FieldTypeDescription
idstringUnique identifier for the category.
namestringDisplay name of the perfection category.
requirementstringDescription of what must be completed.
countnumberNumber of items or tasks to complete in this category.
unitstringThe unit of measurement (e.g., "items", "fish", "friends").
weightnumberPercentage weight toward the 100% perfection total.

Query Methods

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

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

Additional Methods

MethodReturnsDescription
totalWeight()numberReturns the sum of all category weights in the current query. For the full dataset this equals 100.

Examples

Display all perfection categories with weights

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

const categories = perfection().get()

categories.forEach((cat) => {
  console.log(`${cat.name}: ${cat.weight}% (${cat.count} ${cat.unit})`)
})

console.log(`Total: ${perfection().totalWeight()}%`)

Look up a specific category

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

const category = perfection().findByName('Golden Walnuts')

if (category) {
  console.log(`${category.name}`)
  console.log(`Requirement: ${category.requirement}`)
  console.log(`Count: ${category.count} ${category.unit}`)
  console.log(`Weight: ${category.weight}%`)
}

Build a perfection progress tracker

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

const categories = perfection().get()

// Example: track player progress as a map of category ID to completed count
const playerProgress = {
  shipping: 100,
  obelisks: 4,
  // ... more categories
}

let totalPercent = 0

categories.forEach((cat) => {
  const completed = playerProgress[cat.id] ?? 0
  const percent = (completed / cat.count) * cat.weight
  totalPercent += Math.min(percent, cat.weight)
  console.log(`${cat.name}: ${completed}/${cat.count} (${percent.toFixed(1)}%)`)
})

console.log(`Overall Perfection: ${totalPercent.toFixed(1)}%`)

Verify total weight

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

const total = perfection().totalWeight()
console.log(`Total perfection weight: ${total}%`) // Should be 100
Previous
Achievements