Combat

Monsters

Access every monster in Stardew Valley with filters for location, loot, dangerous variants, and sorting by XP or HP.

Quick Start

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

// Get all monsters
const allMonsters = monsters().get()

// Find a specific monster by name
const bat = monsters().findByName('Bat')

// Get dangerous variants in the Skull Cavern
const dangerousCavern = monsters().dangerous().byLocation('skull cavern').get()

Type Definition

The Monster type represents a single monster entry.

FieldTypeDescription
idstringUnique identifier
namestringDisplay name
hpnumberHit points
damagenumberBase damage dealt
speednumberMovement speed
xpnumberExperience rewarded on kill
imagestringRelative path to the monster image
locationsstring[]Locations where the monster spawns
lootIdsstring[]IDs of loot items this monster drops
dangerousbooleanWhether this is a Dangerous variant
variantsMonsterVariant[] (optional)Named sub-variants of this monster

MonsterVariant

FieldTypeDescription
namestringVariant name
hpnumberHit points
damagenumberBase damage dealt
speednumberMovement speed
xpnumberExperience rewarded on kill
imagestringRelative path to the variant image
locationsstring[]Locations where this variant spawns
lootIdsstring[]IDs of loot items this variant drops
dangerousbooleanWhether this is a Dangerous variant

Query Methods

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

Filter Methods

MethodSignatureDescription
byLocationbyLocation(location: string): MonsterQueryFilter to monsters that spawn in the given location (case-insensitive substring match).
dropsLootdropsLoot(lootId: string): MonsterQueryFilter to monsters that drop the given loot item ID.
dangerousdangerous(): MonsterQueryFilter to Dangerous mode variants only.
standardstandard(): MonsterQueryFilter to standard (non-Dangerous) variants only.

Sort Methods

MethodSignatureDescription
sortByXpsortByXp(order?: 'asc' | 'desc'): MonsterQuerySort by XP rewarded on kill. Default: 'desc' (most XP first).
sortByHpsortByHp(order?: 'asc' | 'desc'): MonsterQuerySort by max HP. Default: 'desc' (tankiest first).

Terminal Methods

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

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

Examples

Get all monsters in the Mines

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

const mineMonsters = monsters().byLocation('mines').get()
console.log(`${mineMonsters.length} monsters found in the Mines`)

Find the tankiest standard monsters

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

const tanks = monsters().standard().sortByHp('desc').get().slice(0, 5)

tanks.forEach((m) => console.log(`${m.name}: ${m.hp} HP`))

Get dangerous monsters sorted by XP reward

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

const dangerousByXp = monsters().dangerous().sortByXp('desc').get()

dangerousByXp.forEach((m) => console.log(`${m.name}: ${m.xp} XP`))

Find monsters that drop a specific loot item

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

const dropsItem = monsters().dropsLoot('bat-wing').get()
dropsItem.forEach((m) => console.log(m.name))

Count monsters by location

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

const skullCavernCount = monsters().byLocation('skull cavern').count()
console.log(`Skull Cavern has ${skullCavernCount} monster types`)
Previous
Stardrops