Jump to content

Modding:Objects: Difference between revisions

From Stardew Valley Wiki
imported>Pathoschild
merge Modding:Big craftables data into page as-is (content authors: Margotbean with data updates by Jessebot + Metalax + Pathoschild)
imported>Zeltron0012
m removed a duplicate mention of CombatLevel in custom attributes
 
(184 intermediate revisions by 23 users not shown)
Line 1: Line 1:
← [[Modding:Index|Index]]
← [[Modding:Items|Items]]


This page explains how the game stores and parses item data. This is an advanced guide for mod developers.
This page explains how the game stores and parses object-type item data. For items in general, see [[Modding:Items]].


==Introduction==
==Overview==
===Overview===
Objects are the default type for items in inventories or in the world. Depending on their data, they can be placed, picked up, eaten, sold to shops, etc.
Items are divided into several types:


They have [[Modding:Items#Item types|item type]] <code>(O)</code> (or <code>ItemRegistry.type_object</code> in C# code), their data in <samp>Data/Objects</samp>, their icon sprites in <samp>Maps/springobjects</samp> or <samp>TileSheets/Objects_2</samp> by default, and their code in <samp>StardewValley.Object</samp>. See [[/Object sprites|a table of sprites and their corresponding indexes]].
==Data format==
The object data in <samp>Data/Objects</samp> consists of a string → model lookup, where...
* The key is the unqualified [[Modding:Common data field types#Item ID|item ID]].
* The value is a model with the fields listed below.
===Basic info===
{| class="wikitable"
{| class="wikitable"
|-
|-
! item type
! field
! data asset
! purpose
! texture name
! summary
|-
|-
| <samp>Object</samp>
| <samp>Name</samp>
| <samp>Data/ObjectInformation</samp>
| The internal item name.
| <samp>Maps/springobjects</samp>
| The default type for items in inventories or placed in the world.
|-
|-
| <samp>Object</samp> (big craftable)
| <samp>DisplayName</samp><br /><samp>Description</samp>
| <samp>Data/BigCraftablesInformation</samp>
| A [[Modding:Tokenizable strings|tokenizable string]] for the item's in-game display name and description.
| <samp>TileSheets/Craftables</samp>
| Craftable items which can be placed in the world and are two tiles tall (instead of one like objects).
|-
|-
| <Samp>Boots</samp>
| <samp>Type</samp>
| <samp>Data/Boots</samp>
| The item's general type, like Arch (artifact) or Minerals. The vanilla types are: <samp>Basic</samp>, <samp>Arch</samp> (artifact), <samp>Litter</samp> (e.g. debris), <samp>Minerals</samp>, <samp>Quest</samp>, <samp>Crafting</samp>, <samp>Fish</samp>, <samp>Cooking</samp>, <samp>Seeds</samp>, <samp>Ring</samp>, <samp>interactive</samp>, and some placeholder values like <samp>asdf</samp>.
| item sprite: <samp>Maps/springobjects</samp><br />shoe color: <samp>Characters/Farmer/shoeColors</samp>
 
| Equippable boots.
'''Caution:''' adding custom items with the <samp>Arch</samp> type is inadvisable as it often leads to [[Artifact Spot|artifact spot]]s becoming broken and not giving any items.
|-
 
| <samp>Clothing</samp>
'''Note:''' The "Type" affects whether an item shows up in the collections menu. For example, items with <samp>Type: Cooking</samp> will show up as silhouettes in the cooked items collection menu, items with <samp>Type: Minerals</samp> will show up as silhouettes in the mineral collection menu, etc. However, the [[Modding:Items#Categories|Category]] of the item must also be the correct number or the item will not count toward Perfection/Achievements. For example, if an item has Type: Cooking, it must also be "Category": -7 in order to count toward the "Gourmet Chef" achievement and Perfection.  
| <samp>Data/ClothingInformation</samp>
| <samp>Characters/Farmer/pants</samp><br /><samp>Characters/Farmer/shirts</samp>
| Equippable pants and shirts.
|-
|-
| <samp>Furniture</samp>
| <samp>Category</samp>
| <samp>Data/Furniture</samp>
| The [[Modding:Items#Categories|item category]].
| <samp>TileSheets/furniture</samp>
| Decorative furniture items, including chairs which the player can sit on.
|-
|-
| <samp>Hat</samp>
| <samp>Price</samp>
| <samp>Data/Hats</samp>
| ''(Optional)'' The price when sold by the player. This is not the price when bought from a shop. Default 0.
| <samp>Characters/Farmer/hats</samp>
| Equippable hat items.
|-
| <samp>Tool</samp>
| &mdash;
| <samp>TileSheets/Tools</samp>
| Tools that can be used by the player.
|-
| <samp>MeleeWeapon</samp>
| <samp>Data/Weapons</samp>
| <samp>TileSheets/weapons</samp>
| Weapons that can be used by the player to damage monsters.
|}
|}


The game has two files in its <samp>Content</samp> folder (which can be [[Modding:Editing XNB files#unpacking|unpacked for editing]]) for each item type:
===Appearance===
* a ''data asset'' for the text data for its items (names, descriptions, prices, etc);
{| class="wikitable"
* and a ''spritesheet'' for the in-game item icons.
 
Each item has a <samp>ParentSheetIndex</samp> field which is its position in the item type's spritesheet, starting at 0 in the top-left and incrementing by one as you move across and then down. For example, hat #0 is the first sprite in <samp>Characters/Farmer/hats</samp>. The <samp>ParentSheetIndex</samp> is also used to identify the item itself; since spritesheet indexes aren't unique (''e.g.'' there's both a hat #10 and object #10), code needs to check the type too like <code>item is Weapon weapon && weapon.ParentSheetIndex == 4</code>.
 
See the sections below for details on each item type.
 
===Categories===
Each item also has a category (represented by a negative integer). In code, you can get an item's category value from <samp>item.Category</samp>, and its translated name from <samp>item.getCategoryName()</samp>. Here are the valid categories:
 
{| class="wikitable sortable"
|-
|-
! value
! field
! internal constant
! purpose
! English translation
|-
|-
| -2
| <samp>Texture</samp>
| <samp>Object.GemCategory</samp>
| The asset name for the texture containing the item's sprite. Defaults to <samp>Maps/springobjects</samp>.
| Mineral
|-
|-
| -4
| <samp>SpriteIndex</samp>
| <samp>Object.FishCategory</samp>
| The sprite's index within the <samp>Texture</samp>, where 0 is the top-left sprite.
| Fish
|-
|-
| -5
| <samp>ColorOverlayFromNextIndex</samp>
| <samp>Object.EggCategory</samp>
| ''(Optional)'' When drawn as a colored object, whether to apply the color to the next sprite in the spritesheet and draw that over the main sprite. If false, the color is applied to the main sprite instead. Default false.
| Animal Product
|}
 
===Edibility===
{| class="wikitable"
|-
|-
| -6
! field
| <samp>Object.MilkCategory</samp>
! purpose
| Animal Product
|-
|-
| -7
| <samp>Edibility</samp>
| <samp>Object.CookingCategory</samp>
| ''(Optional)'' A numeric value that determines how much energy (edibility × 2.5) and health (edibility × 1.125) is restored when this item is eaten. An item with an edibility of -300 can't be eaten, values from -299 to -1 reduce health and energy, and zero can be eaten but doesn't change health/energy. Default -300.
| Cooking
|-
|-
| -8
| <samp>IsDrink</samp>
| <samp>Object.CraftingCategory</samp>
| ''(Optional)'' Whether to drink the item instead of eating it. Default false.
| Crafting
|-
|-
| -9
| <samp>Buffs</samp>
| <samp>Object.BigCraftableCategory</samp>
| ''(Optional)'' The buffs to apply to the player when this item is eaten, if any. Default none.
|  
 
This consists of a list of models with these fields:
{| class="wikitable"
|-
|-
| -12
! field
| <samp>Object.mineralsCategory</samp>
! purpose
| Mineral
|-
|-
| -14
| <samp>Id</samp>
| <samp>Object.meatCategory</samp>
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the list.
| Animal Product
|-
|-
| -15
| <samp>Duration</samp>
| <samp>Object.metalResources</samp>
| ''(Optional if <samp>BuffId</samp> is set)'' The buff duration measured in in-game minutes. This can be set to <samp>-2</samp> for a buff that should last for the rest of the day.
| Resource
|-
|-
| -16
| <samp>BuffId</samp>
| <samp>Object.buildingResources</samp>
| ''(Optional)'' The unique ID of a buff from <samp>Data/Buffs</samp> to apply, or <samp>null</samp> to ignore <samp>Data/Buffs</samp> and set the ID to <samp>food</samp> or <samp>drink</samp> depending on the item's <samp>IsDrink</samp> field.
| Resource
 
If a buff from <samp>Data/Buffs</samp> is applied and you also specify other fields, here's how the buff data is combined:
{| class="wikitable"
|-
|-
| -17
! field
| <samp>Object.sellAtPierres</samp>
! result
|
|-
|-
| -18
| <samp>Duration</samp><br /><samp>IconTexture</samp><br /><samp>IconSpriteIndex</samp><br /><samp>GlowColor</samp>
| <samp>Object.sellAtPierresAndMarnies</samp>
| If specified, the value in <samp>Data/Objects</samp> is used instead of the one in <samp>Data/Buffs</samp>. If omitted, defaults to the value from <samp>Data/Buffs</samp>.
| Animal Product
|-
|-
| -19
| <samp>CustomAttributes</samp>
| <samp>Object.fertilizerCategory</samp>
| The values from both entries are combined (e.g. +1 speed in <samp>Data/Objects</samp> and +1 speed in <samp>Data/Buffs</samp> results in +2 speed).
| Fertilizer
|-
|-
| -20
| <samp>IsDebuff</samp>
| <samp>Object.junkCategory</samp>
| The value in <samp>Data/Objects</samp> is used.
| Trash
|}
|-
|-
| -21
| <samp>IsDebuff</samp>
| <samp>Object.baitCategory</samp>
| ''(Optional)'' Whether this buff counts as a debuff, so its duration should be halved when wearing a Sturdy Ring. Default false.
| Bait
|-
|-
| -22
| <samp>IconTexture</samp>
| <samp>Object.tackleCategory</samp>
| ''(Optional)'' The asset name for the icon texture to load. This must contain one or more 16x16 icons in a grid of any size. If omitted, the game will draw a default icon based on the <samp>BuffId</samp> and <samp>CustomAttributes</samp> fields.
| Fishing Tackle
|-
|-
| -23
| <samp>IconSpriteIndex</samp>
| <samp>sellAtFishShopCategory</samp>
| ''(Optional)'' The buff's icon index within the <samp>IconTexture</samp>, where 0 is the top-left icon. Default 0.
|
|-
|-
| -24
| <samp>GlowColor</samp>
| <samp>Object.furnitureCategory</samp>
| ''(Optional)'' The glow color to apply to the player. See [[Modding:Common data field types#Color|color format]]. Default none.
| Decor
|-
|-
| -25
| <samp>CustomAttributes</samp>
| <samp>Object.ingredientsCategory</samp>
| The custom buff attributes to apply, if any.
| Cooking
 
This consists of a model with any combination of these fields:
{| class="wikitable"
|-
|-
| -26
! field
| <samp>Object.artisanGoodsCategory</samp>
! purpose
| Artisan Goods
|-
|-
| -27
| <samp>CombatLevel</samp><br /><samp>FarmingLevel</samp><br /><samp>FishingLevel</samp><br /><samp>ForagingLevel</samp><br /><samp>LuckLevel</samp><br /><samp>MiningLevel</samp>
| <samp>Object.syrupCategory</samp>
| ''(Optional)'' An amount applied to the matching [[Skills|skill level]] while the buff is active. This can be negative for a debuff. Default 0.
| Artisan Goods
|-
|-
| -28
| <samp>Attack</samp><br /><samp>AttackMultiplier</samp><br /><samp>CriticalChanceMultiplier</samp><br /><samp>CriticalPowerMultiplier</samp><br /><samp>Defense</samp><br /><samp>Immunity</samp><br /><samp>KnockbackMultiplier</samp><br /><samp>MagneticRadius</samp><br /><samp>MaxStamina</samp><br /><samp>Speed</samp><br /><samp>WeaponPrecisionMultiplier</samp><br /><samp>WeaponSpeedMultiplier</samp>
| <samp>Object.monsterLootCategory</samp>
| ''(Optional)'' An amount applied to the player's [[attack]], [[Crit. Chance|critical chance]] and  [[Crit. Power|critical power]], [[defense]], [[immunity]], knockback (i.e. [[weight]]), [[Magnetism|magnetic radius]], maximum [[Energy|stamina]], [[speed]], or weapon precision/[[speed|speed]] while the buff is active. This can be negative for a debuff. Default 0.
| Monster Loot
|}
|-
|-
| -29
| <samp>CustomFields</samp>
| <samp>Object.equipmentCategory</samp>
| ''(Optional)'' The [[Modding:Common data field types#Custom fields|custom fields]] for this entry.
|  
|}
|}
 
===Geodes & artifact spots===
{| class="wikitable"
|-
|-
| -74
! field
| <samp>Object.SeedsCategory</samp>
! purpose
| Seed
|-
|-
| -75
| <samp>GeodeDrops</samp><br /><samp><samp>GeodeDropsDefaultItems</samp>
| <samp>Object.VegetableCategory</samp>
| ''(Optional)'' The items that can be dropped when breaking open this item as a [[Minerals#Geodes|geode]]. Specifying either or both fields automatically enables geode behavior for this item.
| Vegetable
 
You can specify one or both fields:
<ul>
<li><samp>GeodeDrops</samp> can be set to the specific items to drop. Default none. This consists of a list of models with these fields:
{| class="wikitable"
|-
|-
| -79
! field
| <samp>Object.FruitsCategory</samp>
! purpose
| Fruit
|-
|-
| -80
| <samp>Object.flowersCategory</samp>
| Flower
|-
|-
| -81
| ''common fields''
| <samp>Object.GreensCategory</samp>
| See [[Modding:Item queries#Item spawn fields|item spawn fields]] for the generic item fields supported by geode drops.
| Forage
 
If set to an [[Modding:Item queries|item query]] which returns multiple items, one of them will be selected at random.
|-
|-
| -95
| <samp>Chance</samp>
| <samp>Object.hatCategory</samp>
| ''(Optional)'' The probability that the item will be dropped if the other fields match, as a decimal value between 0 (never) and 1 (always). Default 1.
|  
|-
|-
| -96
| <samp>SetFlagOnPickup</samp>
| <samp>Object.ringCategory</samp>
| ''(Optional)'' The mail flag to set for the current player when this drop is picked up.
|  
|-
|-
| -98
| <samp>Precedence</samp>
| <samp>Object.weaponCategory</samp>
| ''(Optional)'' The order in which this entry should be checked, where lower values are checked first. This can be a negative value. Geode drops with the same precedence are checked in the order listed. Default 0.
|  
|-
| -99
| <samp>Object.toolCategory</samp>
|
|}


{{collapse|Console commands|content=
For consistency, vanilla drops mostly use these values:
With the {{nexus mod|3101|Console Code}} mod installed, you can run this command in the SMAPI console to see a list of objects by category:
* <samp>-1000</samp>: special overrides like the [[Golden Helmet|golden helmet]];
* <samp>0</samp>: normal items.
|}</li>
<li><samp>GeodeDropsDefaultItems</samp> chooses a predefined list of possible geode drops like [[clay]], [[coal]], [[Copper Ore|copper]], [[Iridium Ore|iridium]], etc. Default false.</li>
</ul>


<pre>cs return string.Join(`\n`, Game1.objectInformation.Keys.Select(key => new StardewValley.Object(key, 1)).GroupBy(item => item.Category, item => item.Name).OrderByDescending(p => p.Key).Select(p => $`{p.Key}: {string.Join(`, `, p.OrderBy(name => name))}`));</pre>
If both fields are specified, each geode will choose between them with an equal 50% chance. If <samp>GeodeDrops</samp> is specified but no entries match, the geode will use the <samp>GeodeDropsDefaultItems</samp> regardless of whether it's true.
}}
|-
| <samp>ArtifactSpotChances</samp>
| ''(Optional)'' If this is an artifact (i.e. the <samp>Type</samp> field is <samp>Arch</samp>), the chance that it can be found by digging [[Artifact Spot|artifact spots]] in each location.


===Define a custom item===
This consists of a string → model lookup, where:
Every item must be assigned a unique <samp>ParentSheetIndex</samp> within its type, and that index must fit within the item type's spritesheet.
* the key is the internal location name;
 
* the value is the probability the item will spawn if checked, as a decimal value between 0 (never) and 1 (always).
Adding custom items to the data assets and spritesheets directly is '''not recommended''', since it's very easy to conflict with other mods or cause game errors. Instead you should create a content pack for {{nexus mod|1720|Json Assets}}, which coordinates dynamic item ID assignment so multiple custom item mods can work together.
|}
 
==Objects==
Objects are the default type for items in inventories or placed in the world.
 
They have their data in <samp>Data/ObjectInformation</samp>, their icon sprites in <samp>Maps/springobjects</samp>, and their code in <samp>StardewValley.Object</samp>. See [[Modding:Items/Object sprites|a table of sprites and their corresponding indexes]].
 
===Data format===
The object data in <samp>Data/ObjectInformation</samp> consists of an integer→string dictionary with entries like this:
<syntaxhighlight lang="json">
  "18": "Daffodil/30/0/Basic -81/Daffodil/A traditional spring flower that makes a nice gift."
</syntaxhighlight>
 
For each entry in the data asset, the key is the item's <samp>ParentSheetIndex</samp> and the value is a slash-delimited string with the fields listed below. Fields 0–5 are used by rings and most other objects; fields 6–11 are only used for food buffs. The objects with keys 516–534 (<samp>Ring.ringLowerIndexRange</samp> through <samp>Ring.ringUpperIndexRange</samp>) and 801 (wedding ring) are hardcoded as rings.


===Context tags & exclusions===
{| class="wikitable"
{| class="wikitable"
|-
|-
! index
! field
! field
! effect
! purpose
|-
| <samp>ContextTags</samp>
| ''(Optional)'' The custom [[Modding:Context tags|context tags]] to add for this item (in addition to the tags added automatically based on the other object data). This is formatted as a list; for example:
<syntaxhighlight lang="json">
"ContextTags": [ "color_yellow", "fish_ocean", "fish_upright", "season_summer" ]
</syntaxhighlight>
|-
|-
!style="text-align: left;" colspan="3"| all objects
| <samp>CanBeGivenAsGift</samp>
| ''(Optional)'' Whether this item can be gifted to NPCs. Default true.
|-
|-
| 0
| <samp>CanBeTrashed</samp>
| name
| ''(Optional)'' Whether this item can be trashed from the player's inventory. Also affects whether the item can be shipped but not whether it can be sold to shops. Default true.
| The internal item name (and display name in English).
|-
|-
| 1
| <samp>ExcludeFromRandomSale</samp>
| price
| ''(Optional)'' Whether to exclude this item from shops when selecting random items to sell. Default false.
| The gold price of the item when sold by the player.
|-
|-
| 2
| <samp>ExcludeFromFishingCollection</samp><br /><samp>ExcludeFromShippingCollection</samp>
| edibility
| ''(Optional)'' Whether to exclude this item from the fishing/shipping collection and their respective effect on the [[perfection|perfection score]]. Default false, in which case the normal requirements apply (e.g., artifacts are always excluded from the shipping collection).
| A numeric value that determines how much health (edibility × 2.5) and energy (edibility × 1.125) is restored. An item with an edibility of -300 can't be eaten.
|}


This is ignored for rings.
===Advanced===
{| class="wikitable"
|-
|-
| 3
! field
| type and category
! purpose
| &#32;
* For a ring: the value <samp>Ring</samp>. Rings have a hardcoded category of -96 (<samp>Object.ringCategory</samp>).
* For other objects: the item's type (string) and category (negative integer), separated by a space like <samp>Fish -4</samp>.
|-
| 4
| display name
| The translated item name.
|-
| 5
| description
| The translated item description.
|-
!style="text-align: left;" colspan="3"| food & drink only
|-
| 6
| miscellaneous
| &#32;
* For a food or drink item, set this to <samp>food</samp> or <samp>drink</samp> respectively. This enables the remaining fields, and changes which animation/sound is played when the player consumes the item. Any other value is ignored.
* For a geode item ([[Geode|535]], [[Frozen Geode|536]], [[Magma Geode|537]], or [[Omni Geode|749]]) is broken, a space-delimited list of object IDs. There's a roughly 50% chance that the geode item will drop one of these items (the other drops are hardcoded).
|-
| 7
| buffs
| The bonuses to apply to the player's attribute when the item is consumed. This consists of a space-delimited list of these numbers:
{|class="wikitable"
|-
! index
! buff
|-
| 0
| [[Skills#Farming|farming]]
|-
| 1
| [[Skills#Fishing|fishing]]
|-
| 2
| [[Skills#Mining|mining]]
|-
| 3
| ''unused''
|-
| 4
| [[Luck|luck]]
|-
| 5
| [[Skills#Foraging|foraging]]
|-
| 6
| ''unused''
|-
| 7
| max [[energy]]
|-
| 8
| [[magnetism]]
|-
| 9
| [[speed]]
|-
| 10
| [[defense]]
|-
| 11
| [[attack]]
|}
|-
|-
| 8
| <samp>CustomFields</samp>
| buff duration
| ''(Optional)'' The [[Modding:Common data field types#Custom fields|custom fields]] for this entry.  
| How long the buffs provided by the previous field last. This is converted into in-game minutes using the formula <samp>(''duration'' × 0.7) / 60</samp>. The buff duration number shown in-game will always be one second less than the calculated value.
|}
|}


===Notes===
==Unobtainable items==
* Items that have a number in the "Crafting" field show buggy information in-game (''e.g.,'' Bean Hotpot prior to version 1.4). Items that have a number in the "Attack" field display the Attack icon and a number, but no description. It's unclear how these buffs work (if at all).
The spritesheet and data have items that can't normally be found in the player inventory (like twigs and lumber), and some sprites have no corresponding item data. There are also multiple entries for ''weeds'' and ''stone'' corresponding to different sprites, but the player can only normally obtain one ''stone'' item (index 390) and no ''weeds'' items.
* Named [[buffs]] (like [[Oil of Garlic]], [[Life Elixir]], or [[Tipsy]]) are implemented in code and can't be set in the food buff fields.
* The spritesheet and data have items that can't normally be found in the player inventory (like twigs and lumber), and some sprites have no corresponding item data. There are also multiple entries for ''weeds'' and ''stone'' corresponding to different sprites, but the player can only normally obtain one ''stone'' item (index 390) and no ''weeds'' items.
 
=Objects (big craftables)=
This page explains how the game stores and parses Craftables data. This is an advanced guide for mod developers.


==Raw data==
==For C# mods==
Big craftables data is stored in <samp>Content\Data\BigCraftablesInformation.xnb</samp>, which can be [[Modding:Editing XNB files#unpacking|unpacked for editing]]. Here's the raw data as of {{version|1.5.1}} for reference:
Object-type items are represented by the <samp>StardewValley.Object</samp> type.


{{collapse|Data|content=<syntaxhighlight lang="json">
This provides many methods to simplify common logic. Some notable examples:
{
  "0": "House Plant/50/-300/Crafting -9/Adds some character to your home or farm./true/true/0/House Plant",
  "1": "House Plant/50/-300/Crafting -9/Adds some character to your home or farm./true/true/0/House Plant",
  "2": "House Plant/50/-300/Crafting -9/Adds some character to your home or farm./true/true/0/House Plant",
  "3": "House Plant/50/-300/Crafting -9/Adds some character to your home or farm./true/true/0/House Plant",
  "4": "House Plant/50/-300/Crafting -9/Adds some character to your home or farm./true/true/0/House Plant",
  "5": "House Plant/50/-300/Crafting -9/Adds some character to your home or farm./true/true/0/House Plant",
  "6": "House Plant/50/-300/Crafting -9/Adds some character to your home or farm./true/true/0/House Plant",
  "7": "House Plant/50/-300/Crafting -9/Adds some character to your home or farm./true/true/0/House Plant",
  "8": "Scarecrow/50/-300/Crafting -9/Prevents crows from attacking your crops. Has a limited radius (about 8 \"tiles\")./true/true/0/Scarecrow",
  "9": "Lightning Rod/50/-300/Crafting -9/Collects energy from lightning storms and turns it into battery packs./true/true/0/Lightning Rod",
  "10": "Bee House/50/-300/Crafting -9/Place outside and wait for delicious honey! (Except in Winter)./true/true/0/Bee House",
  "12": "Keg/50/-300/Crafting -9/Place a fruit or vegetable in here. Eventually it will turn into a beverage./true/true/0/Keg",
  "13": "Furnace/50/-300/Crafting -9/Turns ore and coal into metal bars./true/true/0/Furnace",
  "15": "Preserves Jar/50/-300/Crafting -9/Turns vegetables into pickles and fruit into jam./true/true/0/Preserves Jar",
  "16": "Cheese Press/50/-300/Crafting -9/Turns milk into cheese./true/true/0/Cheese Press",
  "17": "Loom/50/-300/Crafting -9/Turns raw wool into fine cloth./true/true/0/Loom",
  "19": "Oil Maker/50/-300/Crafting -9/Makes gourmet truffle oil./true/true/0/Oil Maker",
  "20": "Recycling Machine/50/-300/Crafting -9/Turns fishing trash into resources./true/true/0/Recycling Machine",
  "21": "Crystalarium/50/-300/Crafting -9/Insert a gem of your choice and it will grow copies./true/true/0/Crystalarium",
  "22": "Table Piece L/50/-300/Crafting -9/The left side of a big table./true/true/0/Table Piece L",
  "23": "Table Piece R/50/-300/Crafting -9/The right side of a big table/true/true/0/Table Piece R",
  "24": "Mayonnaise Machine/50/-300/Crafting -9/Turns eggs into mayonnaise./true/true/0/Mayonnaise Machine",
  "25": "Seed Maker/50/-300/Crafting -9/Place crops inside to produce a varying amount of seeds. Doesn't work with fruit tree crops./true/true/0/Seed Maker",
  "26": "Wood Chair/50/-300/Crafting -9/A chair that can be oriented in 4 different ways./true/true/0/Wood Chair",
  "27": "Wood Chair/50/-300/Crafting -9/A chair that can be oriented in 4 different ways./true/true/0/Wood Chair",
  "28": "Skeleton Model/50/-300/Crafting -9/A model of a skeleton./true/true/0/Skeleton Model",
  "29": "Obelisk/50/-300/Crafting -9/A sinister-looking portal that radiates with evil energy./false/true/0/Obelisk",
  "31": "Chicken Statue/50/-300/Crafting -9/A wooden statue of a chicken./true/true/0/Chicken Statue",
  "32": "Stone Cairn/50/-300/Crafting -9/A decorative piece for your farm./true/true/0/Stone Cairn",
  "33": "Suit Of Armor/50/-300/Crafting -9/A decorative piece for your farm./true/true/0/Suit Of Armor",
  "34": "Sign Of The Vessel/50/-300/Crafting -9/A decorative piece for your farm./true/true/0/Sign Of The Vessel",
  "35": "Basic Log/125/-300/Crafting -9/A decorative piece for your farm./true/true/0/Basic Log",
  "36": "Lawn Flamingo/50/-300/Crafting -9/A decorative piece for your farm./true/true/0/Lawn Flamingo",
  "37": "Wood Sign/5/-300/Crafting -9/Use an item on this to change what's displayed. The item won't be consumed./true/true/0/Wood Sign",
  "38": "Stone Sign/5/-300/Crafting -9/Use an item on this to change what's displayed. The item won't be consumed./true/true/0/Stone Sign",
  "39": "Dark Sign/5/-300/Crafting -9/Use an item on this to change what's displayed. The item won't be consumed./true/true/0/Dark Sign",
  "40": "Big Green Cane/50/-300/Crafting -9/A decorative piece for your farm./true/true/0/Big Green Cane",
  "41": "Green Canes/50/-300/Crafting -9/A decorative piece for your farm./true/true/0/Green Canes",
  "42": "Mixed Cane/50/-300/Crafting -9/A decorative piece for your farm./true/true/0/Mixed Cane",
  "43": "Red Canes/50/-300/Crafting -9/A decorative piece for your farm./true/true/0/Red Canes",
  "44": "Big Red Cane/50/-300/Crafting -9/A decorative piece for your farm./true/true/0/Big Red Cane",
  "45": "Ornamental Hay Bale/50/-300/Crafting -9/A decorative piece for your farm./true/true/0/Ornamental Hay Bale",
  "46": "Log Section/175/-300/Crafting -9/A decorative piece for your farm./true/true/0/Log Section",
  "47": "Grave Stone/50/-300/Crafting -9/A decorative piece for your farm./true/true/0/Grave Stone",
  "48": "Seasonal Decor/50/-300/Crafting -9/This decoration changes with the seasons./true/true/0/Seasonal Decor",
  "52": "Stone Frog/50/-300/Crafting -9/Garden art for your farm./true/true/0/Stone Frog",
  "53": "Stone Parrot/50/-300/Crafting -9/Garden art for your farm./true/true/0/Stone Parrot",
  "54": "Stone Owl/50/-300/Crafting -9/Garden art for your farm./true/true/0/Stone Owl",
  "55": "Stone Junimo/50/-300/Crafting -9/Garden art for your farm./true/true/0/Stone Junimo",
  "56": "Slime Ball/50/-300/Crafting -9/Filled with slime./true/true/2/Slime Ball",
  "62": "Garden Pot/1000/-300/Crafting -9/Grows crops from any season when indoors. Outdoors, it can only house seasonal crops./true/false/0/Garden Pot",
  "64": "Bookcase/50/-300/Crafting -9/A home for books./true/false/1/Bookcase",
  "65": "Fancy Table/50/-300/Crafting -9/A finely crafted round table./true/false/1/Fancy Table",
  "66": "Ancient Table/50/-300/Crafting -9/It's covered in the thickest cobwebs./true/false/1/Ancient Table",
  "67": "Ancient Stool/50/-300/Crafting -9/It smells like Grandma's apartment./true/false/1/Ancient Stool",
  "68": "Grandfather Clock/50/-300/Crafting -9/It's so old... looks like the pendulum is rusted in place./true/false/1/Grandfather Clock",
  "69": "Teddy Timer/50/-300/Crafting -9/It's a grandfather clock shaped like a teddy./true/false/1/Teddy Timer",
  "70": "Dead Tree/0/-300/Crafting -9/It's been petrified for a long time, poor thing./true/false/1/Dead Tree",
  "71": "Staircase/0/-300/Crafting -9/Use this to move down a level in the mines./true/false/1/Staircase",
  "72": "Tall Torch/0/-300/Crafting -9/The stem is made from bamboo./true/false/1/Tall Torch",
  "73": "Ritual Mask/0/-300/Crafting -9/It's way too large to wear./true/false/1/Ritual Mask",
  "74": "Bonfire/0/-300/Crafting -9/The red embers glow softly./true/false/1/Bonfire",
  "75": "Bongo/0/-300/Crafting -9/A decorative percussion instrument with a rich sound./true/false/1/Bongo",
  "76": "Decorative Spears/0/-300/Crafting -9/Not a very safe decoration./true/false/1/Decorative Spears",
  "78": "Boulder/0/-300/Crafting -9/An extremely dense piece of stone./true/false/1/Boulder",
  "79": "Door/0/-300/Crafting -9/A hidden mechanism causes it to retract into the ground./true/false/1/Door",
  "80": "Door/0/-300/Crafting -9/A hidden mechanism causes it to retract into the ground./true/false/1/Door",
  "81": "Locked Door/0/-300/Crafting -9/A hidden mechanism causes it to retract into the ground./true/false/2/Locked Door",
  "82": "Locked Door/0/-300/Crafting -9/A hidden mechanism causes it to retract into the ground./true/false/2/Locked Door",
  "83": "Wicked Statue/0/-300/Crafting -9/There's something unsettling about the looks of this statue./true/false/0/Wicked Statue",
  "84": "Wicked Statue/0/-300/Crafting -9/Something's not right with this statue./true/false/2/Wicked Statue",
  "85": "Sloth Skeleton L/0/-300/Crafting -9/This extinct sloth roamed the lush, prehistoric forests of Stardew Valley. Its powerful jaw tore through the toughest plant fibers./true/false/0/Sloth Skeleton L",
  "86": "Sloth Skeleton M/0/-300/Crafting -9/The ribs of a prehistoric sloth. /true/false/0/Sloth Skeleton M",
  "87": "Sloth Skeleton R/0/-300/Crafting -9/The hind legs and tail of a prehistoric sloth./true/false/0/Sloth Skeleton R",
  "88": "Standing Geode/0/-300/Crafting -9/It's a huge geode mounted on a stand. Hundreds of purple crystals shimmer within./true/false/0/Standing Geode",
  "89": "Obsidian Vase/0/-300/Crafting -9/A beautifully crafted ornamental vase made from obsidian and gold./true/false/0/Obsidian Vase",
  "94": "Singing Stone/0/-300/Crafting -9/It rings out with a pure tone when struck./true/false/0/Singing Stone",
  "95": "Stone Owl/0/-300/Crafting -9/It's not clear where this came from, but it looks very fine./true/false/0/Stone Owl",
  "96": "Strange Capsule/0/-300/Crafting -9/There's something fleshy bobbing around in the fluid.../true/false/0/Strange Capsule",
  "98": "Empty Capsule/0/-300/Crafting -9/Part of the glass is shattered./true/false/0/Empty Capsule",
  "99": "Feed Hopper/0/-300/Crafting -9/Provides convenient access to silo fodder./true/false/0/Feed Hopper",
  "101": "Incubator/0/-300/Crafting -9/Hatches eggs into baby chickens and ducks./true/false/2/Incubator",
  "104": "Heater/0/-300/Crafting -9/Keeps your animals warmer and happier during the winter./true/false/0/Heater",
  "105": "Tapper/0/-300/Crafting -9/Place on a maple, oak, or pine tree and wait for the reservoir to fill with product!/true/false/0/Tapper",
  "106": "Camera/0/-300/Crafting -9/An old camera mounted on a tripod./true/false/0/Camera",
  "107": "Plush Bunny/0/-300/Crafting -9/It's big, it's soft, and it's cute./false/true/0/Plush Bunny",
  "108": "Tub o' Flowers/0/-300/Crafting -9/Flowers planted in an oak barrel. Blooms in spring and summer./true/true/0/Tub o' Flowers",
  "109": "Tub o' Flowers/0/-300/Crafting -9/Flowers planted in an oak barrel. Blooms in spring and summer./true/true/0/Tub o' Flowers",
  "110": "Rarecrow/0/-300/Crafting -9/Collect them all! (1 of 8)/true/true/0/Rarecrow",
  "111": "Decorative Pitcher/0/-300/Crafting -9/Hand-made out of brass./true/true/0/Decorative Pitcher",
  "112": "Dried Sunflowers/0/-300/Crafting -9/A vibrant home decoration./true/true/0/Dried Sunflowers",
  "113": "Rarecrow/0/-300/Crafting -9/Collect them all! (2 of 8)/true/true/0/Rarecrow",
  "114": "Charcoal Kiln/0/-300/Crafting -9/Turns 10 pieces of wood into one piece of coal./true/true/0/Charcoal Kiln",
  "116": "Stardew Hero Trophy/0/-300/Crafting -9/The most prestigious award a Stardew Valley resident could receive!/true/true/0/Stardew Hero Trophy",
  "117": "Soda Machine/0/-300/Crafting -9/Keeps pumping out the good stuff./true/true/0/Soda Machine",
  "118": "Barrel/0/-300/Crafting -9/.../true/true/0/Barrel",
  "119": "Crate/0/-300/Crafting -9/.../true/true/0/Crate",
  "120": "Barrel/0/-300/Crafting -9/.../true/true/0/Barrel",
  "121": "Crate/0/-300/Crafting -9/.../true/true/0/Crate",
  "122": "Barrel/0/-300/Crafting -9/.../true/true/0/Barrel",
  "123": "Crate/0/-300/Crafting -9/.../true/true/0/Crate",
  "124": "Barrel/0/-300/Crafting -9/.../true/true/0/Barrel",
  "125": "Crate/0/-300/Crafting -9/.../true/true/0/Crate",
  "126": "Rarecrow/0/-300/Crafting -9/Collect them all! (3 of 8)/true/true/0/Rarecrow",
  "127": "Statue Of Endless Fortune/0/-300/Crafting -9/It's made of solid gold. What's it for?/true/true/0/Statue Of Endless Fortune",
  "128": "Mushroom Box/0/-300/Crafting -9/Mushrooms grow every few days/true/true/2/Mushroom Box",
  "130": "Chest/0/-300/Crafting -9/A place to store your items./true/true/0/Chest",
  "136": "Rarecrow/0/-300/Crafting -9/Collect them all! (4 of 8)/true/true/0/Rarecrow",
  "137": "Rarecrow/0/-300/Crafting -9/Collect them all! (5 of 8)/true/true/0/Rarecrow",
  "138": "Rarecrow/0/-300/Crafting -9/Collect them all! (6 of 8)/true/true/0/Rarecrow",
  "139": "Rarecrow/0/-300/Crafting -9/Collect them all! (7 of 8)/true/true/0/Rarecrow",
  "140": "Rarecrow/0/-300/Crafting -9/Collect them all! (8 of 8)/true/true/0/Rarecrow",
  "141": "Prairie King Arcade System/0/-300/Crafting -9/Play 'Journey Of The Prairie King' at home!/true/true/0/Prairie King Arcade System",
  "143": "Wooden Brazier/25/-300/Crafting -9/Provides a moderate amount of light./true/true/0/Wooden Brazier",
  "144": "Stone Brazier/40/-300/Crafting -9/Provides a moderate amount of light./true/true/0/Stone Brazier",
  "145": "Gold Brazier/100/-300/Crafting -9/Provides a moderate amount of light./true/true/0/Gold Brazier",
  "146": "Campfire/0/-300/Crafting -9/Provides a moderate amount of light./true/true/0/Campfire",
  "147": "Stump Brazier/80/-300/Crafting -9/Provides a moderate amount of light./true/true/0/Stump Brazier",
  "148": "Carved Brazier/200/-300/Crafting -9/Provides a moderate amount of light./true/true/0/Carved Brazier",
  "149": "Skull Brazier/300/-300/Crafting -9/Provides a moderate amount of light./true/true/0/Skull Brazier",
  "150": "Barrel Brazier/80/-300/Crafting -9/Provides a moderate amount of light./true/true/0/Barrel Brazier",
  "151": "Marble Brazier/500/-300/Crafting -9/Provides a moderate amount of light./true/true/0/Marble Brazier",
  "152": "Wood Lamp-post/50/-300/Crafting -9/Provides a good amount of light./true/true/0/true/Wood Lamp-post",
  "153": "Iron Lamp-post/100/-300/Crafting -9/Provides a good amount of light./true/true/0/true/Iron Lamp-post",
  "154": "Worm Bin/0/-300/Crafting -9/Produces bait on a regular basis. The worms are self-sufficient./true/true/0/Worm Bin",
  "155": "??HMTGF??/0/-300/Crafting -9/??HMTGF??/true/true/0/??HMTGF??",
  "156": "Slime Incubator/0/-300/Crafting -9/Hatches slimes eggs into slimes. Allows you to raise slimes outdoors./true/false/0/Slime Incubator",
  "158": "Slime Egg-Press/0/-300/Crafting -9/Compresses 100 pieces of slime into a slime egg. It's a miracle of science!/true/false/0/Slime Egg-Press",
  "159": "Junimo Kart Arcade System/0/-300/Crafting -9/Play 'Junimo Kart' at home!/true/true/0/Junimo Kart Arcade System",
  "160": "Statue Of Perfection/0/-300/Crafting -9/It's made of pure iridium./true/true/0/Statue Of Perfection",
  "161": "??Pinky Lemon??/0/-300/Crafting -9/??Pinky Lemon??/true/true/0/??Pinky Lemon??",
  "162": "??Foroguemon??/0/-300/Crafting -9/??Foroguemon??/true/true/0/??Foroguemon??",
  "163": "Cask/0/-300/Crafting -9/Use in the cellar to age products like wine and cheese./true/true/0/Cask",
  "164": "Solid Gold Lewis/0/-300/Crafting -9/Mayor's secret project./true/true/0/Solid Gold Lewis",
  "165": "Auto-Grabber/0/-300/Crafting -9/Automatically harvests from your animals each morning. Must be placed inside a coop or barn./true/true/0/Auto-Grabber",
  "167": "Deluxe Scarecrow/50/-300/Crafting -9/Prevents crows from attacking your crops. Has a large radius (about 16 \"tiles\")./true/true/0/Deluxe Scarecrow",
  "174": "Barrel/0/-300/Crafting -9/.../true/true/0/Barrel",
  "175": "Crate/0/-300/Crafting -9/.../true/true/0/Crate",
  "184": "Seasonal Plant/50/-300/Crafting -9/An ornamental plant that changes with each season. It doesn't need to be watered./true/true/0/Seasonal Plant",
  "188": "Seasonal Plant/50/-300/Crafting -9/An ornamental plant that changes with each season. It doesn't need to be watered./true/true/0/Seasonal Plant",
  "192": "Seasonal Plant/50/-300/Crafting -9/An ornamental plant that changes with each season. It doesn't need to be watered./true/true/0/Seasonal Plant",
  "196": "Seasonal Plant/50/-300/Crafting -9/An ornamental plant that changes with each season. It doesn't need to be watered./true/true/0/Seasonal Plant",
  "200": "Seasonal Plant/200/-300/Crafting -9/An ornamental plant that changes with each season. It doesn't need to be watered./true/true/0/Seasonal Plant",
  "204": "Seasonal Plant/50/-300/Crafting -9/An ornamental plant that changes with each season. It doesn't need to be watered./true/true/0/Seasonal Plant",
  "208": "Workbench/1000/-300/Crafting -9/When crafting here, you'll have access to materials in any adjacent chests./true/true/0/Workbench",
  "209": "Mini-Jukebox/1500/-300/Crafting -9/Allows you to play your favorite tunes./true/true/0/Mini-Jukebox",
  "211": "Wood Chipper/500/-300/Crafting -9/Insert a piece of hardwood to break it down into regular wood./true/true/0/Wood Chipper",
  "214": "Telephone/1000/-300/Crafting -9/Can be used to check store hours and inventory./true/true/0/Telephone",
  "216": "Mini-Fridge/1500/-300/Crafting -9/Allows you to store additional ingredients for cooking./true/true/0/Mini-Fridge",
  "219": "Cursed P.K. Arcade System/0/-300/Crafting -9/Something's not right with this Prairie King Arcade System.../true/true/0/Cursed P.K. Arcade System",
  "232": "Stone Chest/0/-300/Crafting -9/A place to store your items./true/true/0/Stone Chest",
  "238": "Mini-Obelisk/0/-300/Crafting -9/Place two on the farm to warp between them./true/true/0/Mini-Obelisk",
  "239": "Farm Computer/0/-300/Crafting -9/Scans the farm and displays useful information./true/true/0/Farm Computer",
  "248": "Mini-Shipping Bin/0/-300/Crafting -9/Items placed in it will be included in the nightly shipment./true/true/0/Mini-Shipping Bin",
  "254": "Ostrich Incubator/0/-300/Crafting -9/Hatches ostrich eggs into baby ostriches. Place in a barn./true/true/0/Ostrich Incubator",
  "182": "Geode Crusher/0/-300/Crafting -9/Breaks geodes open automatically. Requires coal to operate./true/true/0/Geode Crusher",
  "246": "Coffee Maker/0/-300/Crafting -9/Automatically brews a fresh cup every morning./true/true/0/Coffee Maker",
  "247": "Sewing Machine/0/-300/Crafting -9/Use to tailor clothes from the convenience of your home!/true/true/0/Sewing Machine",
  "231": "Solar Panel/0/-300/Crafting -9/Slowly generates batteries when left in the sun./true/true/0/Solar Panel",
  "90": "Bone Mill/0/-300/Crafting -9/Turns bone items into fertilizers./true/true/0/Bone Mill",
  "256": "Junimo Chest/0/-300/Crafting -9/Through the power of forest magic, every Junimo Chest links to the same stash./true/true/0/Junimo Chest",
  "264": "Heavy Tapper/0/-300/Crafting -9/Place on a maple, oak, or pine tree and wait for the reservoir to fill with product! Works twice as fast as a normal tapper./true/false/0/Heavy Tapper",
  "265": "Deconstructor/0/-300/Crafting -9/Destroys crafted items, but salvages their most valuable material./true/true/0/Deconstructor",
  "272": "Auto-Petter/0/-300/Crafting -9/Joja Co. patented technology for coops and barns. Keeps your animals content, but can't replace the full benefit of human touch. Hand-petting can be provided to supplement./true/true/0/Auto-Petter",
  "275": "Hopper/0/-300/Crafting -9/Items placed inside will automatically be loaded into the machine in front of it./true/true/0/Hopper",
  "278": "Campfire/0/-300/Crafting -9/Cook on the go!/true/true/1/Campfire",
  "280": "Statue Of True Perfection/0/-300/Crafting -9/It's made of pure iridium./true/true/0/Statue Of True Perfection"
}
</syntaxhighlight>}}


==Format==
{| class="wikitable"
{| class="wikitable"
|-
|-
! Index
! method
! Field
! effect
! Example Value
|-
|-
|0
| <samp>Object.GetRadiusForScarecrow()</samp>
|Name
| The tile radius that Object protects as a scarecrow. Default behavior: Checks for the value in the <samp>crow_scare_radius_{{t|radius}}</samp> [[Modding:Context tags|context tag]] if applicable, then defaults to 17 if the internal name contains "Deluxe" and 9 otherwise. Can be patched to support custom scarecrows.
|''Worm Bin''
|-
|-
|1
| <samp>Object.IsBar()</samp>
|Price
| Whether the item is a [[Copper Bar|copper bar]], [[Iron Bar|iron bar]], [[Gold Bar|gold bar]], [[Iridium Bar|iridium bar]], or [[Radioactive Bar|radioactive bar]].
|''0''
|-
|-
|2
| <samp>Object.IsBreakableStone()</samp>
|Edibility
| Whether the item is a stone debris item which can be broken by a pickaxe.
|''-300''
|-
|-
|3
| <samp>Object.IsFence()</samp>
|Type &amp; Category
| Whether the item is a [[Crafting#Fences|fence]].
|''Crafting -9''
|-
|-
|4
| <samp>Object.IsFruitTreeSapling()</samp>
|Description
| Whether the item is a [[Fruit Trees|fruit tree]] sapling. This checks the <samp>Data\fruitTrees</samp> keys, so it works with custom fruit trees too.
|''Produces bait on a regular basis. The worms are self-sufficient.''
|-
|-
|5
| <samp>Object.IsHeldOverHead()</samp>
|Can be set outdoors
| Whether the player is shown holding up the item when it's selected in their toolbar. Default true (except for furniture).
|''true''
|-
|-
|6
| <samp>Object.IsIncubator()</samp>
|Can be set indoors
| Whether the item can incubate [[Animals|farm animal]] eggs when placed in a building.
|''true''
|-
|-
|7
| <samp>Object.IsScarecrow()</samp>
|Fragility
| Whether the item is a scarecrow. Default: <samp>true</samp> if the object has the <samp>crow_scare</samp> [[Modding:Context_tags|context tag]]. Otherwise, returns whether the object's internal name contains "arecrow". Can be patched to support custom scarecrows.
|''0''
|-
|-
|8
| <samp>Object.IsTapper()</samp>
|isLamp
| Whether the item is a [[Tapper|tapper]] or [[Heavy Tapper|heavy tapper]].
|''0''
|-
|-
|9
| <samp>Object.IsTeaSapling()</samp>
|Name (for language files other than English)
| Whether the item is a [[Tea Sapling|tea sapling]].
|''Vivero de cebo''
|-
| <samp>Object.IsTwig()</samp>
| Whether the item is a twig debris item.
|-
| <samp>Object.IsWeeds()</samp>
| Whether the item is a weed debris item.
|}
|}
Note that many of the Big Craftables listed are not implemented in the game.  Some are completely absent from the game; others are unused as craftables, and instead appear in <samp>ObjectInformation.xnb</samp> (see [[Modding:Object data|Object data]]) or <samp>Furniture.xnb</samp> (see [[Modding:Furniture data|Furniture data]]).


==See also==
==See also==
* [[Modding:Index]] for related content like [[Modding:Crop data|crops]], [[Modding:Fish data|fish]], [[Modding:Gift taste data|gift tastes]], and [[Modding:Recipe data|recipes]]
* [[Modding:Items]] for item data in general


[[Category:Modding]]
[[Category:Modding]]


[[ru:Модификации:Объекты]]
[[ru:Модификации:Объекты]]
[[zh:模组:物体]]

Latest revision as of 10:59, 8 August 2026

← Items

This page explains how the game stores and parses object-type item data. For items in general, see Modding:Items.

Overview

Objects are the default type for items in inventories or in the world. Depending on their data, they can be placed, picked up, eaten, sold to shops, etc.

They have item type (O) (or ItemRegistry.type_object in C# code), their data in Data/Objects, their icon sprites in Maps/springobjects or TileSheets/Objects_2 by default, and their code in StardewValley.Object. See a table of sprites and their corresponding indexes.

Data format

The object data in Data/Objects consists of a string → model lookup, where...

  • The key is the unqualified item ID.
  • The value is a model with the fields listed below.

Basic info

field purpose
Name The internal item name.
DisplayName
Description
A tokenizable string for the item's in-game display name and description.
Type The item's general type, like Arch (artifact) or Minerals. The vanilla types are: Basic, Arch (artifact), Litter (e.g. debris), Minerals, Quest, Crafting, Fish, Cooking, Seeds, Ring, interactive, and some placeholder values like asdf.

Caution: adding custom items with the Arch type is inadvisable as it often leads to artifact spots becoming broken and not giving any items.

Note: The "Type" affects whether an item shows up in the collections menu. For example, items with Type: Cooking will show up as silhouettes in the cooked items collection menu, items with Type: Minerals will show up as silhouettes in the mineral collection menu, etc. However, the Category of the item must also be the correct number or the item will not count toward Perfection/Achievements. For example, if an item has Type: Cooking, it must also be "Category": -7 in order to count toward the "Gourmet Chef" achievement and Perfection.

Category The item category.
Price (Optional) The price when sold by the player. This is not the price when bought from a shop. Default 0.

Appearance

field purpose
Texture The asset name for the texture containing the item's sprite. Defaults to Maps/springobjects.
SpriteIndex The sprite's index within the Texture, where 0 is the top-left sprite.
ColorOverlayFromNextIndex (Optional) When drawn as a colored object, whether to apply the color to the next sprite in the spritesheet and draw that over the main sprite. If false, the color is applied to the main sprite instead. Default false.

Edibility

field purpose
Edibility (Optional) A numeric value that determines how much energy (edibility × 2.5) and health (edibility × 1.125) is restored when this item is eaten. An item with an edibility of -300 can't be eaten, values from -299 to -1 reduce health and energy, and zero can be eaten but doesn't change health/energy. Default -300.
IsDrink (Optional) Whether to drink the item instead of eating it. Default false.
Buffs (Optional) The buffs to apply to the player when this item is eaten, if any. Default none.

This consists of a list of models with these fields:

field purpose
Id The unique string ID for this entry within the list.
Duration (Optional if BuffId is set) The buff duration measured in in-game minutes. This can be set to -2 for a buff that should last for the rest of the day.
BuffId (Optional) The unique ID of a buff from Data/Buffs to apply, or null to ignore Data/Buffs and set the ID to food or drink depending on the item's IsDrink field.

If a buff from Data/Buffs is applied and you also specify other fields, here's how the buff data is combined:

field result
Duration
IconTexture
IconSpriteIndex
GlowColor
If specified, the value in Data/Objects is used instead of the one in Data/Buffs. If omitted, defaults to the value from Data/Buffs.
CustomAttributes The values from both entries are combined (e.g. +1 speed in Data/Objects and +1 speed in Data/Buffs results in +2 speed).
IsDebuff The value in Data/Objects is used.
IsDebuff (Optional) Whether this buff counts as a debuff, so its duration should be halved when wearing a Sturdy Ring. Default false.
IconTexture (Optional) The asset name for the icon texture to load. This must contain one or more 16x16 icons in a grid of any size. If omitted, the game will draw a default icon based on the BuffId and CustomAttributes fields.
IconSpriteIndex (Optional) The buff's icon index within the IconTexture, where 0 is the top-left icon. Default 0.
GlowColor (Optional) The glow color to apply to the player. See color format. Default none.
CustomAttributes The custom buff attributes to apply, if any.

This consists of a model with any combination of these fields:

field purpose
CombatLevel
FarmingLevel
FishingLevel
ForagingLevel
LuckLevel
MiningLevel
(Optional) An amount applied to the matching skill level while the buff is active. This can be negative for a debuff. Default 0.
Attack
AttackMultiplier
CriticalChanceMultiplier
CriticalPowerMultiplier
Defense
Immunity
KnockbackMultiplier
MagneticRadius
MaxStamina
Speed
WeaponPrecisionMultiplier
WeaponSpeedMultiplier
(Optional) An amount applied to the player's attack, critical chance and critical power, defense, immunity, knockback (i.e. weight), magnetic radius, maximum stamina, speed, or weapon precision/speed while the buff is active. This can be negative for a debuff. Default 0.
CustomFields (Optional) The custom fields for this entry.

Geodes & artifact spots

field purpose
GeodeDrops
GeodeDropsDefaultItems
(Optional) The items that can be dropped when breaking open this item as a geode. Specifying either or both fields automatically enables geode behavior for this item.

You can specify one or both fields:

  • GeodeDrops can be set to the specific items to drop. Default none. This consists of a list of models with these fields:
    field purpose
    common fields See item spawn fields for the generic item fields supported by geode drops.

    If set to an item query which returns multiple items, one of them will be selected at random.

    Chance (Optional) The probability that the item will be dropped if the other fields match, as a decimal value between 0 (never) and 1 (always). Default 1.
    SetFlagOnPickup (Optional) The mail flag to set for the current player when this drop is picked up.
    Precedence (Optional) The order in which this entry should be checked, where lower values are checked first. This can be a negative value. Geode drops with the same precedence are checked in the order listed. Default 0.

    For consistency, vanilla drops mostly use these values:

    • -1000: special overrides like the golden helmet;
    • 0: normal items.
  • GeodeDropsDefaultItems chooses a predefined list of possible geode drops like clay, coal, copper, iridium, etc. Default false.

If both fields are specified, each geode will choose between them with an equal 50% chance. If GeodeDrops is specified but no entries match, the geode will use the GeodeDropsDefaultItems regardless of whether it's true.

ArtifactSpotChances (Optional) If this is an artifact (i.e. the Type field is Arch), the chance that it can be found by digging artifact spots in each location.

This consists of a string → model lookup, where:

  • the key is the internal location name;
  • the value is the probability the item will spawn if checked, as a decimal value between 0 (never) and 1 (always).

Context tags & exclusions

field purpose
ContextTags (Optional) The custom context tags to add for this item (in addition to the tags added automatically based on the other object data). This is formatted as a list; for example:
"ContextTags": [ "color_yellow", "fish_ocean", "fish_upright", "season_summer" ]
CanBeGivenAsGift (Optional) Whether this item can be gifted to NPCs. Default true.
CanBeTrashed (Optional) Whether this item can be trashed from the player's inventory. Also affects whether the item can be shipped but not whether it can be sold to shops. Default true.
ExcludeFromRandomSale (Optional) Whether to exclude this item from shops when selecting random items to sell. Default false.
ExcludeFromFishingCollection
ExcludeFromShippingCollection
(Optional) Whether to exclude this item from the fishing/shipping collection and their respective effect on the perfection score. Default false, in which case the normal requirements apply (e.g., artifacts are always excluded from the shipping collection).

Advanced

field purpose
CustomFields (Optional) The custom fields for this entry.

Unobtainable items

The spritesheet and data have items that can't normally be found in the player inventory (like twigs and lumber), and some sprites have no corresponding item data. There are also multiple entries for weeds and stone corresponding to different sprites, but the player can only normally obtain one stone item (index 390) and no weeds items.

For C# mods

Object-type items are represented by the StardewValley.Object type.

This provides many methods to simplify common logic. Some notable examples:

method effect
Object.GetRadiusForScarecrow() The tile radius that Object protects as a scarecrow. Default behavior: Checks for the value in the crow_scare_radius_<radius> context tag if applicable, then defaults to 17 if the internal name contains "Deluxe" and 9 otherwise. Can be patched to support custom scarecrows.
Object.IsBar() Whether the item is a copper bar, iron bar, gold bar, iridium bar, or radioactive bar.
Object.IsBreakableStone() Whether the item is a stone debris item which can be broken by a pickaxe.
Object.IsFence() Whether the item is a fence.
Object.IsFruitTreeSapling() Whether the item is a fruit tree sapling. This checks the Data\fruitTrees keys, so it works with custom fruit trees too.
Object.IsHeldOverHead() Whether the player is shown holding up the item when it's selected in their toolbar. Default true (except for furniture).
Object.IsIncubator() Whether the item can incubate farm animal eggs when placed in a building.
Object.IsScarecrow() Whether the item is a scarecrow. Default: true if the object has the crow_scare context tag. Otherwise, returns whether the object's internal name contains "arecrow". Can be patched to support custom scarecrows.
Object.IsTapper() Whether the item is a tapper or heavy tapper.
Object.IsTeaSapling() Whether the item is a tea sapling.
Object.IsTwig() Whether the item is a twig debris item.
Object.IsWeeds() Whether the item is a weed debris item.

See also