Modding:Monster data

From Stardew Valley Wiki
Jump to: navigation, search

Index

This page explains how the game stores and parses monster data. This is an advanced guide for mod developers.

Raw data

Monster data is stored in Content\Data\Monsters.xnb, which can be unpacked for editing. Here's the raw data as of 1.4.5 for reference:

Data 
{
  "Green Slime": "24/5/0/0/false/1000/766 .75 766 .05 153 .1 66 .015 92 .15 96 .005 99 .001/1/.01/4/2/.00/true/3/Green Slime",
  "Dust Spirit": "40/6/0/0/false/1000/382 .5 433 .01 336 .001 84 .02 414 .02 97 .005 99 .001/2/.00/4/3/.00/true/2/Dust Spirit",
  "Bat": "24/6/0/0/true/1000/767 .9 767 .4 108 .001 287 .02 96 .005 99 .001/1/.01/4/3/.00/true/3/Bat",
  "Frost Bat": "36/7/0/0/true/1000/767 .9 767 .55 108 .001 287 .02 97 .005 99 .001/1/.01/4/3/.00/true/7/Frost Bat",
  "Lava Bat": "80/15/0/0/true/1000/767 .9 767 .7 108 .001 287 .02 98 .005 99 .001/1/.01/4/3/.00/true/15/Lava Bat",
  "Iridium Bat": "300/30/0/0/true/1000/386 .9 386 .5 386 .25 386 .1 288 .05 768 .5 773 .05 349 .05 787 .05 337 .008/1/.01/4/3/.00/true/22/Iridium Bat",
  "Stone Golem": "45/5/0/0/false/1000/390 .9 80 .1 382 .1 380 .1 96 .005 99 .001/5/.01/3/2/.00/true/5/Stone Golem",
  "Wilderness Golem": "30/5/0/0/false/1000/771 .9 771 .5 770 .5 382 .1 86 .005 72 .001/1/.01/3/2/.00/true/5/Wilderness Golem",
  "Grub": "20/4/0/0/false/1000/684 .6 273 .05 273 .05 157 .02 114 .005 96 .005 99 .001/0/.005/3/1/.00/true/2/Grub",
  "Fly": "22/6/0/0/true/1000/684 .9 157 .02 114 .005 96 .005 99 .001/1/.005/13/2/.0/true/10/Fly",
  "Frost Jelly": "106/7/0/0/false/1000/766 .75 412 .08 70 .02 98 .015 92 .5 97 .005 99 .001/0/.01/4/2/.0/true/6/Frost Jelly",
  "Sludge": "205/16/0/0/false/1000/766 .8 157 .1 -4 .1 72 .01 92 .5 98 .005 99 .001/0/.01/4/2/.0/true/10/Sludge",
  "Shadow Guy": "125/20/0/0/false/0/769 .75 769 .1 329 .02 337 .002 336 .01 335 .02 334 .04 203 .04 293 .03 108 .003 -4 .1 98 .005 99 .001/2/.01/-1/2/.0/true/15/Shadow Guy",
  "Ghost": "96/10/0/3/false/0/768 .95 768 .1 156 .08 338 .08 -6 .2 97 .005 99 .001/3/.01/12/4/.0/true/15/Ghost",
  "Carbon Ghost": "190/25/0/3/false/0/749 .99 338 .1/3/.01/12/4/.0/true/20/Carbon Ghost",
  "Duggy": "40/6/0/0/false/0/286 .25 535 .25 280 .03 105 .02 86 .1 72 .01 96 .005 99 .001/0/.01/1/2/.0/true/10/Duggy",
  "Rock Crab": "30/5/0/0/false/0/717 .15 286 .4 96 .005 99 .001/1/0/1/2/.0/true/4/Rock Crab",
  "Lava Crab": "120/15/0/0/false/0/717 .25 287 .4 98 .005 99 .001/3/0/1/3/.0/true/12/Lava Crab",
  "Iridium Crab": "240/15/0/0/false/0/732 .5 386 .5 386 .5 386 .5/3/0/1/3/.0/true/20/Iridium Crab",
  "Fireball": "1/18/0/0/true/0/72 .0000001/0/0/-1/3/.00/false/0/Fireball",
  "Squid Kid": "1/18/0/0/true/0/768 .75 814 .2 336 .05 287 .1 288 .05 98 .005 99 .001/2/0/6/3/.0/true/15/Squid Kid",
  "Skeleton Warrior": "300/12/1/3/false/0/769 .25 105 .03 106 .03 166 .001 60 .04 232 .04 72 .03 74 .01 97 .005 99 .001/3/0/5/2/.0/true/15/Skeleton Warrior",
  "Crow": "1/0/0/1/false/0/-4 .9/3/0/5/2/.0/false/1/Crow",
  "Frog": "1/0/0/1/false/0/-4 .9/3/0/5/2/.0/false/1/Frog",
  "Cat": "300/0/0/0/false/0/-6 .001/3/0/6/2/.0/false/0/Cat",
  "Shadow Brute": "160/18/0/0/false/0/769 .75 769 .1 337 .002 336 .01 335 .02 334 .04 203 .04 108 .003 -4 .1 98 .005 99 .001 74 .0005/2/.01/8/3/.0/true/15/Shadow Brute",
  "Shadow Shaman": "80/17/0/0/false/0/769 .75 769 .2 337 .002 336 .01 335 .02 334 .04 108 .003 -4 .1 98 .005 99 .001 74 .0005/2/.01/8/3/.0/true/15/Shadow Shaman",
  "Skeleton": "140/10/0/2/false/2000/80 0/1/.01/8/2/.0/true/8/Skeleton",
  "Skeleton Mage": "60/5/0/2/false/2000/80 0/1/.01/8/2/.0/true/8/Skeleton Mage",
  "Metal Head": "40/15/0/0/false/2000/768 .65 378 .1 378 .1 380 .1 380 .1 382 .1 98 .005 99 .001/8/.01/8/2/.0/true/6/Metal Head",
  "Spiker": "5/5/0/0/false/2000/378 .1 378 .1 380 .1 380 .1 382 .1/4/.01/8/2/.0/true/1/Spiker",
  "Bug": "1/8/0/0/false/2000/684 .76 157 .02 114 .005 96 .005 99 .001/0/0/-1/2/.0/true/1/Bug",
  "Mummy": "260/30/0/3/false/1000/768 .99 428 .2 428 .05 768 .15 243 .04 99 .001 74 .001/0/.01/8/2/.0/true/20/Mummy",
  "Big Slime": "60/5/0/0/false/1000/766 .99 766 .9 766 .4 99 .001/0/.01/5/2/.0/true/7/Big Slime",
  "Serpent": "150/23/0/2/true/1000/769 .99 769 .15 287 .15 226 .06 446 .008 74 .001/0/.01/13/2/.0/true/20/Serpent",
  "Pepper Rex": "300/15/0/0/false/1000/80 0/5/.01/3/2/.0/true/7/Pepper Rex"
}

Format

Index Field Example Value
0 health (hit points) 24
1 damage (attack) 5
2 minimum coins to drop (unimplemented) 0
3 maximum coins to drop (unimplemented) 0
4 whether a "glider" false
5 duration of random movements 1000
6 objects to drop 766 .75 766 .05 153 .1 66 .015 92 .15 96 .005 99 .001
7 resilience (defense) 1
8 jitteriness .01
9 distance threshold for moving towards player 4
10 speed 2
11 chance of attacks missing .00
12 whether a "mine monster" true
13 experience gained 3
14 display name Green Slime

Index 4 designates "gliders". These include most, but not all, of the flying monsters.

Index 6 contains a list of object ID numbers, each followed by the probability of that object being chosen. Multiple objects can be chosen from the list. "Extra drop items" in the game code supplement this list for several monster types.

Index 12 designates "mine monsters": monsters whose stats and drops are buffed for players who have reached the bottom of the mines. These include the Wilderness Golem and other monsters that do not actually occur in the mines. This field is false only for non-monsters that use the monster data file, such as the fireball projectile launched by the Squid Kid.

Note that many of the values stored in the monster data are altered by the game code under specific circumstances. These include being in different parts of the mines, having reached the bottom of the mines, and having a higher combat skill level.

Slimes

Main article: Slimes

Sprites

Green Slime Notes.png

Slime sprites are entirely modular, with the associated parts spread out across the sprite sheet. Every slime uses the same grey sprite, coloring it with a tint mask based on the type of slime, along with a random transparency value. Row 1 is used for the idle state and normal movement. Rows 2 through 4, while apparently identical, appear unused in most cases (row 2 appears sporadically at the end of certain attacks, but further testing is needed for exact conditions). Row 5 is used for the attack animation.

Area 6 on the sprite sheet contains assets for the "mating ritual" slimes can go through, as well as their death particles. The mating particles (going clockwise) are used for seeking a mate, rejecting a mate, and receiving a rejection.

Area 7 contains the assets for the eyes. Slime eyes are placed dynamically on their sprite based on their current action. When the slime is facing down, the eyes are placed directly on top of the sprite; when facing left, only the right eye is rendered, and moved slightly left; when facing right, only the left eye is rendered and moved slightly right; when facing up, the eyes are rendered directly behind the slime. The eyes, going clockwise, are used for their idle state, during attacks, during the "evil" state (each slime has a chance to turn "evil" when first hit, and gains a stat boost), and taking damage.

Area 8 is the antenna attached to "male" slimes. It appears to animate independently of the slime itself, rocking back and forth somewhat at random. As with the main sprite, this uses a tint mask to take on the color of the slime variant.

Area 9 is the antenna attached to "special" slimes, and animates in the same way as the "male" antenna. However, this one doesn't use the tint mask, instead using whatever raw color is on the sprite sheet.