Combat

Monster Loot

Access every monster loot drop in Stardew Valley and filter by which monster drops a given item.

Quick Start

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

// Get all monster loot
const allLoot = monsterLoot().get()

// Find a specific loot item by name
const batWing = monsterLoot().findByName('Bat Wing')

// Get loot dropped by a specific monster
const slimeLoot = monsterLoot().droppedBy('green-slime').get()

Type Definition

The MonsterLoot type represents a single loot item that can be dropped by monsters.

FieldTypeDescription
idstringUnique identifier
namestringDisplay name
sellPricenumberSell price in gold
imagestringRelative path to the item image
droppedBystring[]Monster IDs that drop this item

Query Methods

Create a query with the monsterLoot() function. Every filter method returns a new MonsterLootQuery, so you can chain calls in any order.

Filter Methods

MethodSignatureDescription
droppedBydroppedBy(monsterId: string): MonsterLootQueryFilter to loot items dropped by the given monster ID.

Terminal Methods

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

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

Examples

List all loot dropped by a monster

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

const loot = monsterLoot().droppedBy('dust-sprite').get()
loot.forEach((item) =>
  console.log(`${item.name} (sells for ${item.sellPrice}g)`),
)

Look up a loot item by ID

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

const item = monsterLoot().find('bat-wing')
if (item) {
  console.log(`${item.name} is dropped by ${item.droppedBy.length} monster(s)`)
}

Cross-reference monsters and their loot

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

const monster = monsters().findByName('Shadow Brute')
if (monster) {
  const loot = monster.lootIds.map((id) => monsterLoot().find(id))
  loot.forEach((item) => {
    if (item) console.log(`${monster.name} drops ${item.name}`)
  })
}

Count total loot items

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

console.log(`There are ${monsterLoot().count()} unique monster loot items`)
Previous
Monsters