Changes

Jump to navigation Jump to search
m
Line 56: Line 56:     
==Common data==
 
==Common data==
 +
===Quality===
 +
Each item has a quality level which (depending on the item type) may affect its price, health boost, etc. The valid qualities are:
 +
 +
{| class="wikitable"
 +
|-
 +
! quality
 +
! value
 +
! constant
 +
|-
 +
| normal
 +
| <samp>0</samp>
 +
| <samp>Object.lowQuality</samp>
 +
|-
 +
| silver
 +
| <samp>1</samp>
 +
| <samp>Object.medQuality</samp>
 +
|-
 +
| gold
 +
| <samp>2</samp>
 +
| <samp>Object.highQuality</samp>
 +
|-
 +
| iridium
 +
| <samp>4</samp>
 +
| <samp>Object.bestQuality</samp>
 +
|}
 +
 
===Categories===
 
===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:
 
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:
Line 63: Line 89:  
! value
 
! value
 
! internal constant
 
! internal constant
! internal string
+
! [[#Context tags|context tag]]
 
! English translation
 
! English translation
 +
! Properties
 
|-
 
|-
 
| -2
 
| -2
 
| <samp>Object.GemCategory</samp>
 
| <samp>Object.GemCategory</samp>
| <samp>"category_gem"</samp>
+
| <samp>category_gem</samp>
 
| Mineral
 
| Mineral
 +
| Affected by [[Skills#Mining|Gemologist]] profession
 
|-
 
|-
 
| -4
 
| -4
 
| <samp>Object.FishCategory</samp>
 
| <samp>Object.FishCategory</samp>
| <samp>"category_fish"</samp>
+
| <samp>category_fish</samp>
 
| Fish
 
| Fish
 +
| Affected by [[Skills#Fishing|Fisher]] and [[Skills#Fishing|Angler]] professions
 
|-
 
|-
 
| -5
 
| -5
 
| <samp>Object.EggCategory</samp>
 
| <samp>Object.EggCategory</samp>
| <samp>"category_egg"</samp>
+
| <samp>category_egg</samp>
 
| Animal Product
 
| Animal Product
 +
| Affected by [[Skills#Farming|Rancher]] profession, can be used in a slingshot
 
|-
 
|-
 
| -6
 
| -6
 
| <samp>Object.MilkCategory</samp>
 
| <samp>Object.MilkCategory</samp>
| <samp>"category_milk"</samp>
+
| <samp>category_milk</samp>
 
| Animal Product
 
| Animal Product
 +
| Affected by [[Skills#Farming|Rancher]] profession
 
|-
 
|-
 
| -7
 
| -7
 
| <samp>Object.CookingCategory</samp>
 
| <samp>Object.CookingCategory</samp>
| <samp>"category_cooking"</samp>
+
| <samp>category_cooking</samp>
 
| Cooking
 
| Cooking
 +
|
 
|-
 
|-
 
| -8
 
| -8
 
| <samp>Object.CraftingCategory</samp>
 
| <samp>Object.CraftingCategory</samp>
| <samp>"category_crafting"</samp>
+
| <samp>category_crafting</samp>
 
| Crafting
 
| Crafting
 +
| Is Placeable
 
|-
 
|-
 
| -9
 
| -9
 
| <samp>Object.BigCraftableCategory</samp>
 
| <samp>Object.BigCraftableCategory</samp>
| <samp>"category_big_craftable"</samp>
+
| <samp>category_big_craftable</samp>
 
|  
 
|  
 +
| Is Placeable
 
|-
 
|-
 
| -12
 
| -12
 
| <samp>Object.mineralsCategory</samp>
 
| <samp>Object.mineralsCategory</samp>
| <samp>"category_minerals"</samp>
+
| <samp>category_minerals</samp>
 
| Mineral
 
| Mineral
 +
| Affected by [[Skills#Mining|Gemologist]] profession
 
|-
 
|-
 
| -14
 
| -14
 
| <samp>Object.meatCategory</samp>
 
| <samp>Object.meatCategory</samp>
| <samp>"category_meat"</samp>
+
| <samp>category_meat</samp>
 
| Animal Product
 
| Animal Product
 +
|
 
|-
 
|-
 
| -15
 
| -15
 
| <samp>Object.metalResources</samp>
 
| <samp>Object.metalResources</samp>
| <samp>"category_metal_resources"</samp>
+
| <samp>category_metal_resources</samp>
 
| Resource
 
| Resource
 +
|
 
|-
 
|-
 
| -16
 
| -16
 
| <samp>Object.buildingResources</samp>
 
| <samp>Object.buildingResources</samp>
| <samp>"category_building_resources"</samp>
+
| <samp>category_building_resources</samp>
 
| Resource
 
| Resource
 +
|
 
|-
 
|-
 
| -17
 
| -17
 
| <samp>Object.sellAtPierres</samp>
 
| <samp>Object.sellAtPierres</samp>
| <samp>"category_sell_at_pierres"</samp>
+
| <samp>category_sell_at_pierres</samp>
 
|  
 
|  
 +
|
 
|-
 
|-
 
| -18
 
| -18
 
| <samp>Object.sellAtPierresAndMarnies</samp>
 
| <samp>Object.sellAtPierresAndMarnies</samp>
| <samp>"category_sell_at_pierres_and_marnies"</samp>
+
| <samp>category_sell_at_pierres_and_marnies</samp>
 
| Animal Product
 
| Animal Product
 +
| Affected by [[Skills#Farming|Rancher]] profession
 
|-
 
|-
 
| -19
 
| -19
 
| <samp>Object.fertilizerCategory</samp>
 
| <samp>Object.fertilizerCategory</samp>
| <samp>"category_fertilizer"</samp>
+
| <samp>category_fertilizer</samp>
 
| Fertilizer
 
| Fertilizer
 +
| Is Placeable, is always passable
 
|-
 
|-
 
| -20
 
| -20
 
| <samp>Object.junkCategory</samp>
 
| <samp>Object.junkCategory</samp>
| <samp>"category_junk"</samp>
+
| <samp>category_junk</samp>
 
| Trash
 
| Trash
 +
|
 
|-
 
|-
 
| -21
 
| -21
 
| <samp>Object.baitCategory</samp>
 
| <samp>Object.baitCategory</samp>
| <samp>"category_bait"</samp>
+
| <samp>category_bait</samp>
 
| Bait
 
| Bait
 +
| Can be attached to a fishing rod
 
|-
 
|-
 
| -22
 
| -22
 
| <samp>Object.tackleCategory</samp>
 
| <samp>Object.tackleCategory</samp>
| <samp>"category_tackle"</samp>
+
| <samp>category_tackle</samp>
 
| Fishing Tackle
 
| Fishing Tackle
 +
| Can be attached to a fishing rod, cannot stack
 
|-
 
|-
 
| -23
 
| -23
 
| <samp>sellAtFishShopCategory</samp>
 
| <samp>sellAtFishShopCategory</samp>
| <samp>"category_sell_at_fish_shop"</samp>
+
| <samp>category_sell_at_fish_shop</samp>
 
|  
 
|  
 +
|
 
|-
 
|-
 
| -24
 
| -24
 
| <samp>Object.furnitureCategory</samp>
 
| <samp>Object.furnitureCategory</samp>
| <samp>"category_furniture"</samp>
+
| <samp>category_furniture</samp>
 
| Decor
 
| Decor
 +
|
 
|-
 
|-
 
| -25
 
| -25
 
| <samp>Object.ingredientsCategory</samp>
 
| <samp>Object.ingredientsCategory</samp>
| <samp>"category_ingredients"</samp>
+
| <samp>category_ingredients</samp>
 
| Cooking
 
| Cooking
 +
|
 
|-
 
|-
 
| -26
 
| -26
 
| <samp>Object.artisanGoodsCategory</samp>
 
| <samp>Object.artisanGoodsCategory</samp>
| <samp>"category_artisan_goods"</samp>
+
| <samp>category_artisan_goods</samp>
 
| Artisan Goods
 
| Artisan Goods
 +
| Affected by [[Skills#Farming|Artisan]] profession
 
|-
 
|-
 
| -27
 
| -27
 
| <samp>Object.syrupCategory</samp>
 
| <samp>Object.syrupCategory</samp>
| <samp>"category_syrup"</samp>
+
| <samp>category_syrup</samp>
 
| Artisan Goods
 
| Artisan Goods
 +
| Affected by [[Skills#Foraging|Tapper]] profession
 
|-
 
|-
 
| -28
 
| -28
 
| <samp>Object.monsterLootCategory</samp>
 
| <samp>Object.monsterLootCategory</samp>
| <samp>"category_monster_loot"</samp>
+
| <samp>category_monster_loot</samp>
 
| Monster Loot
 
| Monster Loot
 +
|
 
|-
 
|-
 
| -29
 
| -29
 
| <samp>Object.equipmentCategory</samp>
 
| <samp>Object.equipmentCategory</samp>
| <samp>"category_equipment"</samp>
+
| <samp>category_equipment</samp>
 
|  
 
|  
 +
|
 
|-
 
|-
 
| -74
 
| -74
 
| <samp>Object.SeedsCategory</samp>
 
| <samp>Object.SeedsCategory</samp>
| <samp>"category_seeds"</samp>
+
| <samp>category_seeds</samp>
 
| Seed
 
| Seed
 +
| Is Placeable, is always passable
 
|-
 
|-
 
| -75
 
| -75
 
| <samp>Object.VegetableCategory</samp>
 
| <samp>Object.VegetableCategory</samp>
| <samp>"category_vegetable"</samp>
+
| <samp>category_vegetable</samp>
 
| Vegetable
 
| Vegetable
 +
| Affected by [[Skills#Farming|Tiller]] profession, can be used in a slingshot
 
|-
 
|-
 
| -79
 
| -79
 
| <samp>Object.FruitsCategory</samp>
 
| <samp>Object.FruitsCategory</samp>
| <samp>"category_fruits"</samp>
+
| <samp>category_fruits</samp>
 
| Fruit
 
| Fruit
 +
| Affected by [[Skills#Farming|Tiller]] profession (if not foraged), can be used in a slingshot
 
|-
 
|-
 
| -80
 
| -80
 
| <samp>Object.flowersCategory</samp>
 
| <samp>Object.flowersCategory</samp>
| <samp>"category_flowers"</samp>
+
| <samp>category_flowers</samp>
 
| Flower
 
| Flower
 +
| Affected by [[Skills#Farming|Tiller]] profession
 
|-
 
|-
 
| -81
 
| -81
 
| <samp>Object.GreensCategory</samp>
 
| <samp>Object.GreensCategory</samp>
| <samp>"category_greens"</samp>
+
| <samp>category_greens</samp>
 
| Forage
 
| Forage
 +
|
 
|-
 
|-
 
| -95
 
| -95
 
| <samp>Object.hatCategory</samp>
 
| <samp>Object.hatCategory</samp>
| <samp>"category_hat"</samp>
+
| <samp>category_hat</samp>
 
|  
 
|  
 +
|
 
|-
 
|-
 
| -96
 
| -96
 
| <samp>Object.ringCategory</samp>
 
| <samp>Object.ringCategory</samp>
| <samp>"category_ring"</samp>
+
| <samp>category_ring</samp>
 
|  
 
|  
 +
|
 
|-
 
|-
 
| -98
 
| -98
 
| <samp>Object.weaponCategory</samp>
 
| <samp>Object.weaponCategory</samp>
| <samp>"category_weapon"</samp>
+
| <samp>category_weapon</samp>
 
|  
 
|  
 +
|
 
|-
 
|-
 
| -99
 
| -99
 
| <samp>Object.toolCategory</samp>
 
| <samp>Object.toolCategory</samp>
| <samp>"category_tool"</samp>
+
| <samp>category_tool</samp>
 
|  
 
|  
 +
|
 
|}
 
|}
   Line 235: Line 295:  
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:
 
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:
   −
<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>
+
<pre>cs return string.Join(`\n`, Game1.objectData.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>
 
}}
 
}}
   Line 241: Line 301:  
A ''context tag'' is an arbitrary data label attached to items. These can produce various effects in-game, or may be informational only.
 
A ''context tag'' is an arbitrary data label attached to items. These can produce various effects in-game, or may be informational only.
   −
The game generates some tags based on the game data (like the item quality), and others are defined in the <samp>Data/ObjectContextTags</samp> data asset (which consists of a string→string dictionary, where the key is the item's internal name, and the value is a comma-delimited list of tags to add).
+
The game generates some tags based on the game data (like the item quality), and others are defined in the <samp>Data/ObjectContextTags</samp> data asset (which consists of a string→string dictionary, where the key is the item's internal name ''or'' the alternative ID matching the <samp>id_{{t|type}}_{{t|identifier}}</samp> tag, and the value is a comma-delimited list of tags to add).
    
Here's an ''incomplete'' list of context tags added or used in the base game. Mods can add custom context tags, which aren't listed here.
 
Here's an ''incomplete'' list of context tags added or used in the base game. Mods can add custom context tags, which aren't listed here.
    +
<dl style="margin-left: 2em;">
 +
<dt>Added automatically for all items:</dt>
 +
<dd>
 +
{| class="wikitable"
 +
|-
 +
! context tag
 +
! effect
 +
|-
 +
| <samp>category_{{t|category}}</samp>
 +
| Added automatically based on the item category. See the 'context tag' column in the [[#Categories|item category list]] for possible values.
 +
|-
 +
| <samp>fish_{{t|metadata}}</samp>
 +
| Added automatically for a fish item based on [[Modding:Fish data|its metadata in <samp>Data/Fish</samp>]].
 +
 +
For [[Crab Pot|crab pot]] fish (''i.e.'' those with type <samp>trap</samp>):
 +
 +
{| class="wikitable"
 +
|-
 +
! context tag
 +
! notes
 +
|-
 +
| <samp>fish_trap_location_{{t|water type}}</samp>
 +
| Based on field 2 ('darting randomness'). For example, <samp>fish_trap_location_ocean</samp>.
 +
|}
 +
 +
For fishing rod fish (''i.e.'' those whose type is ''not'' <samp>trap</samp>):
 +
{| class="wikitable"
 +
|-
 +
! context tag
 +
! notes
 +
|-
 +
| <samp>fish_difficulty_{{t|difficulty}}</samp>
 +
| Based on field 1 ('chance to dart'), where {{t|difficulty}} is one of <samp>easy</samp> (0–33), <samp>medium</samp> (34–66), <samp>hard</samp> (67–100), or <samp>extremely_hard</samp> (101+). For example, <samp>fish_difficulty_hard</samp>.
 +
|-
 +
| <samp>fish_motion_{{t|motion}}</samp>
 +
| Based on field 4 ('location'). For example, <samp>fish_motion_floater</samp>.
 +
|-
 +
| <samp>fish_favor_weather_{{t|weather}}</samp>
 +
| Based on field 7 ('weather'). For example, <samp>fish_favor_weather_sunny</samp>.
 +
|}
 +
|-
 +
| <samp>id_{{t|type}}_{{t|identifier}}</samp>
 +
| Added automatically as an alternative ID. The {{t|type}} is one of <samp>B</samp> (boots), <samp>BBL</samp> (big craftable recipe), <samp>BL</samp> (object recipe), <samp>BO</samp> (big craftable), <samp>C</samp> (clothing), <samp>F</samp> (furniture), <samp>H</samp> (hat), <samp>O</samp> (object), <samp>R</samp> (ring), <samp>W</samp> (melee weapon), else blank. The {{t|identifier}} is the item's parent sheet index. For example, [[pufferfish]] has value <samp>id_o_128</samp> (object #128).
 +
|-
 +
| <samp>item_{{t|name}}</samp>
 +
| Added automatically based on the item name. The name is trimmed, lowercase, with spaces replaced with underscores, and with single quotes removed. For example, [['1000 Years From Now']] has context tag <samp>item_1000_years_from_now</samp>.
 +
|}
 +
</dd>
 +
 +
<dt>Added automatically for [[#Objects|object-type]] items:</dt>
 +
<dd>
 +
{| class="wikitable"
 +
|-
 +
! context tag
 +
! effect
 +
|-
 +
| <samp>jelly_item</samp><br /><samp>juice_item</samp><br /><samp>pickle_item</samp><br /><samp>wine_item</samp>
 +
| For items produced by the [[keg]] or [[Preserves Jar|preserves jar]], the preserved item type.
 +
|-
 +
| <samp>preserve_sheet_index_{{t|id}}</samp>
 +
| For items produced by the [[keg]] or [[Preserves Jar|preserves jar]], the parent sheet index for the original item that was produced. For example, blueberry [[wine]] has <samp>preserve_sheet_index_258</samp>, where 258 is the [[blueberry]] item's index.
 +
|-
 +
| <samp>quality_none</samp><br /><samp>quality_silver</samp><br /><samp>quality_gold</samp><br /><samp>quality_iridium</samp>
 +
| Added automatically based on the item quality.
 +
|-
 +
| <samp>quality_qi</samp>
 +
| Added automatically for items cooked while the [[Quests|''Qi's Cuisine'' special order]] is active.
 +
|}
 +
</dd>
 +
 +
<dt>Context tags from <samp>Data/ObjectContextTags</samp>:</dt>
 +
<dd>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 276: Line 408:  
| <samp>color_purple</samp>, <samp>color_dark_purple</samp>, <samp>color_dark_pink</samp>, <samp>color_pale_violet_red</samp>, <samp>color_poppyseed</samp>, <samp>color_iridium</samp>
 
| <samp>color_purple</samp>, <samp>color_dark_purple</samp>, <samp>color_dark_pink</samp>, <samp>color_pale_violet_red</samp>, <samp>color_poppyseed</samp>, <samp>color_iridium</samp>
 
|}
 
|}
|-
  −
| <samp>quality_none</samp><br /><samp>quality_silver</samp><br /><samp>quality_gold</samp><br /><samp>quality_iridium</samp>
  −
| Added automatically based on the item quality. This is informational only.
   
|}
 
|}
 +
</dd>
 +
</dl>
    
Some game data also references context tags in a generic way. For example, you can add custom tags for an item to <samp>Data/ObjectContextTags</samp>, then reference them in the fish pond data. Specifically:
 
Some game data also references context tags in a generic way. For example, you can add custom tags for an item to <samp>Data/ObjectContextTags</samp>, then reference them in the fish pond data. Specifically:
Line 293: Line 424:  
| [[Modding:Special orders|special orders]]
 
| [[Modding:Special orders|special orders]]
 
| In <samp>Data/SpecialOrders</samp>, used to match items that meet the quest objectives (see [[Modding:Special orders#Context tags|<samp>AcceptedContextTags</samp> in the special order data]]).
 
| In <samp>Data/SpecialOrders</samp>, used to match items that meet the quest objectives (see [[Modding:Special orders#Context tags|<samp>AcceptedContextTags</samp> in the special order data]]).
 +
|-
 +
| tailoring
 +
| In <samp>Data/TailoringRecipes</samp>, used to match items that are needed for a recipe.
 +
|-
 +
| [[Modding:Gift taste data|gift tastes]]
 +
| In <samp>Data/NPCGiftTastes</samp>, used to set character likes and dislike for every item using the context tag.
 
|}
 
|}
 +
    
The <samp>debug listtags</samp> [[Modding:Console commands|console command]] lists all the tags of the item being held.
 
The <samp>debug listtags</samp> [[Modding:Console commands|console command]] lists all the tags of the item being held.
   −
{{collapse|raw tag dump|content=Here's a list of context tags extracted from <samp>Data/ObjectContextTags</samp>: <samp>alcohol_item</samp>, <samp>algae_item</samp>, <samp>ancient_item</samp>, <samp>beach_item</samp>, <samp>bomb_item</samp>, <samp>bone_item</samp>, <samp>book_item</samp>, <samp>ceramic_item</samp>, <samp>chicken_item</samp>, <samp>color_aquamarine</samp>, <samp>color_black</samp>, <samp>color_blue</samp>, <samp>color_brown</samp>, <samp>color_copper</samp>, <samp>color_cyan</samp>, <samp>color_dark_blue</samp>, <samp>color_dark_brown</samp>, <samp>color_dark_gray</samp>, <samp>color_dark_green</samp>, <samp>color_dark_pink</samp>, <samp>color_dark_purple</samp>, <samp>color_dark_red</samp>, <samp>color_dark_yellow</samp>, <samp>color_gold</samp>, <samp>color_gray</samp>, <samp>color_green</samp>, <samp>color_iridium</samp>, <samp>color_iron</samp>, <samp>color_jade</samp>, <samp>color_light_cyan</samp>, <samp>color_lime</samp>, <samp>color_orange</samp>, <samp>color_pale_violet_red</samp>, <samp>color_pink</samp>, <samp>color_poppyseed</samp>, <samp>color_prismatic</samp>, <samp>color_purple</samp>, <samp>color_red</samp>, <samp>color_salmon</samp>, <samp>color_sand</samp>, <samp>color_white</samp>, <samp>color_yellow</samp>, <samp>color_yellow_green</samp>, <samp>cooking_item</samp>, <samp>cow_milk_item</samp>, <samp>cowboy_item</samp>, <samp>crop_year_2</samp>, <samp>dinosaur_item</samp>, <samp>doll_item</samp>, <samp>drink_item</samp>, <samp>dwarvish_item</samp>, <samp>dye_medium</samp>, <samp>dye_strong</samp>, <samp>egg_item</samp>, <samp>elvish_item</samp>, <samp>fertilizer_item</samp>, <samp>fish_bug_lair</samp>, <samp>fish_carnivorous</samp>, <samp>fish_crab_pot</samp>, <samp>fish_desert</samp>, <samp>fish_freshwater</samp>, <samp>fish_lake</samp>, <samp>fish_legendary</samp>, <samp>fish_mines</samp>, <samp>fish_night_market</samp>, <samp>fish_nonfish</samp>, <samp>fish_ocean</samp>, <samp>fish_pond</samp>, <samp>fish_river</samp>, <samp>fish_secret_pond</samp>, <samp>fish_semi_rare</samp>, <samp>fish_sewers</samp>, <samp>fish_swamp</samp>, <samp>fish_talk_demanding</samp>, <samp>fish_talk_rude</samp>, <samp>fish_talk_stiff</samp>, <samp>fish_upright</samp>, <samp>flower_item</samp>, <samp>food_bakery</samp>, <samp>food_breakfast</samp>, <samp>food_cake</samp>, <samp>food_party</samp>, <samp>food_pasta</samp>, <samp>food_salad</samp>, <samp>food_sauce</samp>, <samp>food_seafood</samp>, <samp>food_soup</samp>, <samp>food_spicy</samp>, <samp>food_sushi</samp>, <samp>food_sweet</samp>, <samp>forage_item</samp>, <samp>forage_item_beach</samp>, <samp>forage_item_cave</samp>, <samp>forage_item_desert</samp>, <samp>forage_item_mines</samp>, <samp>forage_item_secret</samp>, <samp>fossil_item</samp>, <samp>fruit_item</samp>, <samp>fruit_tree_item</samp>, <samp>furnace_item</samp>, <samp>ginger_item</samp>, <samp>goat_milk_item</samp>, <samp>golden_relic_item</samp>, <samp>honey_item</samp>, <samp>hunting_item</samp>, <samp>instrument_item</samp>, <samp>jelly_item</samp>, <samp>juice_item</samp>, <samp>large_egg_item</samp>, <samp>large_milk_item</samp>, <samp>light_source</samp>, <samp>machine_item</samp>, <samp>marine_item</samp>, <samp>mayo_item</samp>, <samp>medicine_item</samp>, <samp>milk_item</samp>, <samp>noble_item</samp>, <samp>ore_item</samp>, <samp>pickle_item</samp>, <samp>potion_item</samp>, <samp>prehistoric_item</samp>, <samp>quality_fertilizer_item</samp>, <samp>scroll_item</samp>, <samp>season_all</samp>, <samp>season_fall</samp>, <samp>season_spring</samp>, <samp>season_summer</samp>, <samp>season_winter</samp>, <samp>slime_egg_item</samp>, <samp>slime_item</samp>, <samp>statue_item</samp>, <samp>strange_doll_1</samp>, <samp>strange_doll_2</samp>, <samp>syrup_item</samp>, <samp>totem_item</samp>, <samp>toy_item</samp>, <samp>trash_item</samp>, <samp>tree_seed_item</samp>, <samp>wood_item</samp>.}}
+
{{collapse|raw tag dump|content=Here's a list of context tags extracted from <samp>Data/ObjectContextTags</samp> that aren't listed above yet: <samp>alcohol_item</samp>, <samp>algae_item</samp>, <samp>ancient_item</samp>, <samp>beach_item</samp>, <samp>bomb_item</samp>, <samp>bone_item</samp>, <samp>book_item</samp>, <samp>ceramic_item</samp>, <samp>chicken_item</samp>, <samp>color_black</samp>, <samp>color_dark_gray</samp>, <samp>color_gray</samp>, <samp>color_iron</samp>, <samp>color_prismatic</samp>, <samp>color_white</samp>, <samp>cooking_item</samp>, <samp>cow_milk_item</samp>, <samp>cowboy_item</samp>, <samp>crop_year_2</samp>, <samp>dinosaur_item</samp>, <samp>doll_item</samp>, <samp>drink_item</samp>, <samp>dwarvish_item</samp>, <samp>dye_medium</samp>, <samp>dye_strong</samp>, <samp>egg_item</samp>, <samp>elvish_item</samp>, <samp>fertilizer_item</samp>, <samp>fish_bug_lair</samp>, <samp>fish_carnivorous</samp>, <samp>fish_crab_pot</samp>, <samp>fish_desert</samp>, <samp>fish_freshwater</samp>, <samp>fish_lake</samp>, <samp>fish_legendary</samp>, <samp>fish_mines</samp>, <samp>fish_night_market</samp>, <samp>fish_nonfish</samp>, <samp>fish_ocean</samp>, <samp>fish_pond</samp>, <samp>fish_river</samp>, <samp>fish_secret_pond</samp>, <samp>fish_semi_rare</samp>, <samp>fish_sewers</samp>, <samp>fish_swamp</samp>, <samp>fish_talk_demanding</samp>, <samp>fish_talk_rude</samp>, <samp>fish_talk_stiff</samp>, <samp>fish_upright</samp>, <samp>flower_item</samp>, <samp>food_bakery</samp>, <samp>food_breakfast</samp>, <samp>food_cake</samp>, <samp>food_party</samp>, <samp>food_pasta</samp>, <samp>food_salad</samp>, <samp>food_sauce</samp>, <samp>food_seafood</samp>, <samp>food_soup</samp>, <samp>food_spicy</samp>, <samp>food_sushi</samp>, <samp>food_sweet</samp>, <samp>forage_item</samp>, <samp>forage_item_beach</samp>, <samp>forage_item_cave</samp>, <samp>forage_item_desert</samp>, <samp>forage_item_mines</samp>, <samp>forage_item_secret</samp>, <samp>fossil_item</samp>, <samp>fruit_item</samp>, <samp>fruit_tree_item</samp>, <samp>furnace_item</samp>, <samp>ginger_item</samp>, <samp>goat_milk_item</samp>, <samp>golden_relic_item</samp>, <samp>honey_item</samp>, <samp>hunting_item</samp>, <samp>instrument_item</samp>, <samp>jelly_item</samp>, <samp>juice_item</samp>, <samp>large_egg_item</samp>, <samp>large_milk_item</samp>, <samp>light_source</samp>, <samp>machine_item</samp>, <samp>marine_item</samp>, <samp>mayo_item</samp>, <samp>medicine_item</samp>, <samp>milk_item</samp>, <samp>noble_item</samp>, <samp>ore_item</samp>, <samp>pickle_item</samp>, <samp>potion_item</samp>, <samp>prehistoric_item</samp>, <samp>quality_fertilizer_item</samp>, <samp>scroll_item</samp>, <samp>season_all</samp>, <samp>season_fall</samp>, <samp>season_spring</samp>, <samp>season_summer</samp>, <samp>season_winter</samp>, <samp>slime_egg_item</samp>, <samp>slime_item</samp>, <samp>statue_item</samp>, <samp>strange_doll_1</samp>, <samp>strange_doll_2</samp>, <samp>syrup_item</samp>, <samp>totem_item</samp>, <samp>toy_item</samp>, <samp>trash_item</samp>, <samp>tree_seed_item</samp>, <samp>wood_item</samp>.}}
    
==Objects==
 
==Objects==
 
Objects are the default type for items in inventories or placed in the world.
 
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]].
+
They have their data in <samp>Data/Objects</samp> (<samp>Data/ObjectInformation</samp> prior to 1.6), 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===
 
===Data format===
The object data in <samp>Data/ObjectInformation</samp> consists of an integer→string dictionary with entries like this:
+
The object data in <samp>Data/Objects</samp> consists of a string→ObjectData dictionary (where ObjectData is defined in the game code in <samp>GameData.Objects.ObjectData</samp>). It has entries like this<ref>See <samp>Data/Objects.xnb</ref>:
 
<syntaxhighlight lang="json">
 
<syntaxhighlight lang="json">
   "18": "Daffodil/30/0/Basic -81/Daffodil/A traditional spring flower that makes a nice gift."
+
"201": {
 +
  "Name": "Complete Breakfast",
 +
   "DisplayName": "[LocalizedText Strings\\Objects:CompleteBreakfast_Name]",
 +
  "Description": "[LocalizedText Strings\\Objects:CompleteBreakfast_Description]",
 +
  "Type": "Cooking",
 +
  "Category": -7,
 +
  "Price": 350,
 +
  "Texture": null,
 +
  "SpriteIndex": 201,
 +
  "Edibility": 80,
 +
  "IsDrink": false,
 +
  "Buffs": [
 +
    {
 +
      "Id": "Food",
 +
      "BuffId": null,
 +
      "IconTexture": null,
 +
      "IconSpriteIndex": 0,
 +
      "Duration": 600,
 +
      "IsDebuff": false,
 +
      "GlowColor": null,
 +
      "CustomAttributes": {
 +
        "FarmingLevel": 2.0,
 +
        "FishingLevel": 0.0,
 +
        "MiningLevel": 0.0,
 +
        "LuckLevel": 0.0,
 +
        "ForagingLevel": 0.0,
 +
        "MaxStamina": 50.0,
 +
        "MagneticRadius": 0.0,
 +
        "Speed": 0.0,
 +
        "Defense": 0.0,
 +
        "Attack": 0.0
 +
      },
 +
      "CustomFields": null
 +
    }
 +
  ],
 +
  "GeodeDropsDefaultItems": false,
 +
  "GeodeDrops": null,
 +
  "ArtifactSpotChances": null,
 +
  "ExcludeFromFishingCollection": false,
 +
  "ExcludeFromShippingCollection": false,
 +
  "ExcludeFromRandomSale": false,
 +
  "ContextTags": [
 +
    "color_yellow",
 +
    "food_breakfast"
 +
  ],
 +
  "CustomFields": null
 +
  }
 
</syntaxhighlight>
 
</syntaxhighlight>
    
For each entry in the data asset:
 
For each entry in the data asset:
* The key (before the colon) is the item ID and its sprite index within the [[Modding:Items/Object sprites|object spritesheet]] (saved as <samp>ParentSheetIndex</samp> in-code).
+
* The key (before the colon) is the unqualified item ID and its sprite index within the [[Modding:Items/Object sprites|object spritesheet]] (saved as <samp>ParentSheetIndex</samp> in-code).
* The value (after the colon) 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.
+
* The value (after the colon) is the data pertaining to that object, with the fields listed below. The objects with keys 516–534 (<samp>Ring.ringLowerIndexRange</samp> through <samp>Ring.ringUpperIndexRange</samp>) and 801 (wedding ring) are hardcoded as rings.
    +
Field values are described below (Copied from [[Modding:Migrate to Stardew Valley 1.6]]):
 +
 +
====Basic info====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! index
   
! field
 
! field
! effect
+
! purpose
 +
|-
 +
| <samp>Name</samp>
 +
| The internal item name.
 
|-
 
|-
!style="text-align: left;" colspan="3"| all objects
+
| <samp>DisplayName</samp><br /><samp>Description</samp>
 +
| A [[Modding:Tokenizable strings|tokenizable string]] for the item's in-game display name and description.
 
|-
 
|-
| 0
+
| <samp>Type</samp>
| name
+
| The item's general type, like <samp>Arch</samp> (artifact) or <samp>Minerals</samp>. The vanilla types are: Litter, Basic, Minerals, Quest, asdf, Crafting, Arch, fish, Cooking, Seeds, Ring, interactive
| The internal item name (and display name in English).
   
|-
 
|-
| 1
+
| <samp>Category</samp>
| price
+
| The [[Modding:Items#Categories|item category]].
| The gold price of the item when sold by the player. This is not the price when bought from a shop.
   
|-
 
|-
| 2
+
| <samp>Price</samp>
| edibility
+
| ''(Optional)'' The price when sold by the player. This is not the price when bought from a shop. Default 0.
| 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, values from -299 to -1 reduce health & energy, and zero can be eaten but doesn't change health/energy.
+
|}
   −
This is ignored for rings.
+
====Appearance====
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! purpose
 +
|-
 +
| <samp>Texture</samp>
 +
| The asset name for the texture containing the item's sprite. Defaults to <samp>Maps/springobjects</samp>.
 
|-
 
|-
| 3
+
| <samp>SpriteIndex</samp>
| type and category
+
| The sprite's index within the <samp>Texture</samp>, where 0 is the top-left sprite.
| &#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>.
     −
See the [[#Categories|list of categories and their numeric values]].
+
====Edibility====
 
+
{| class="wikitable"
The types aren't currently documented. The values used in <samp>Data/ObjectInformation</samp> are <samp>Ring</samp>, <samp>Fish</samp>, <samp>Arch</samp>, <samp>asdf</samp>, <samp>Seeds</samp>, <samp>Crafting</samp>, <samp>Quest</samp>, <samp>Basic</samp>, <samp>Cooking</samp>, and <samp>Minerals</samp>.
+
|-
 +
! field
 +
! purpose
 +
|-
 +
| <samp>Edibility</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.
 
|-
 
|-
| 4
+
| <samp>IsDrink</samp>
| display name
+
| ''(Optional)'' Whether to drink the item instead of eating it. Default false.
| The translated item name (not used when playing in English).
   
|-
 
|-
| 5
+
| <samp>Buffs</samp>
| description
+
| ''(Optional)'' The buffs to apply to the player when this item is eaten, if any. Default none.
| The translated item description.
+
 
 +
This consists of a list of models with these fields:
 +
{| class="wikitable"
 
|-
 
|-
!style="text-align: left;" colspan="3"| food & drink only
+
! field
 +
! purpose
 
|-
 
|-
| 6
+
| <samp>Id</samp>
| miscellaneous
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the list.
| &#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
+
| <samp>Duration</samp>
| buffs
+
| ''(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.
| 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
+
| <samp>BuffId</samp>
! buff
+
| ''(Optional)'' The unique ID of a buff from [[#Custom buffs|<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.
 +
 
 +
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"
 
|-
 
|-
| 0
+
! field
| [[Skills#Farming|farming]]
+
! result
 
|-
 
|-
| 1
+
| <samp>Duration</samp><br /><samp>IconTexture</samp><br /><samp>SpriteIndex</samp><br /><samp>GlowColor</samp>
| [[Skills#Fishing|fishing]]
+
| 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>.
 
|-
 
|-
| 2
+
| <samp>CustomAttributes</samp>
| [[Skills#Mining|mining]]
+
| 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).
 
|-
 
|-
| 3
+
| <samp>IsDebuff</samp>
| ''unused''
+
| The value in <samp>Data/Objects</samp> is used.
 +
|}
 
|-
 
|-
| 4
+
| <samp>IsDebuff</samp>
| [[Luck|luck]]
+
| ''(Optional)'' Whether this buff counts as a debuff, so its duration should be halved when wearing a Sturdy Ring. Default false.
 
|-
 
|-
| 5
+
| <samp>IconTexture</samp>
| [[Skills#Foraging|foraging]]
+
| ''(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.
 
|-
 
|-
| 6
+
| <samp>SpriteIndex</samp>
| ''unused''
+
| ''(Optional)'' The buff's icon index within the <samp>IconTexture</samp>, where 0 is the top-left icon. Default 0.
 
|-
 
|-
| 7
+
| <samp>GlowColor</samp>
| max [[energy]]
+
| ''(Optional)'' The glow color to apply to the player. See [[#Color fields|color format]]. Default none.
 
|-
 
|-
| 8
+
| <samp>CustomAttributes</samp>
| [[magnetism]]
+
| The custom buff attributes to apply, if any.
 +
 
 +
This consists of a model with any combination of these fields:
 +
{| class="wikitable"
 
|-
 
|-
| 9
+
! field
| [[speed]]
+
! purpose
 
|-
 
|-
| 10
+
| <samp>FarmingLevel</samp><br /><samp>FishingLevel</samp><br /><samp>ForagingLevel</samp><br /><samp>LuckLevel</samp><br /><samp>MiningLevel</samp>
| [[defense]]
+
| ''(Optional)'' An amount applied to the matching [[Skills|skill level]] while the buff is active. This can be negative for a debuff. Default 0.
 
|-
 
|-
| 11
+
| <samp>Attack</samp><br /><samp>Defense</samp><br /><samp>MagneticRadius</samp><br /><samp>MaxStamina</samp><br /><samp>Speed</samp>
| [[attack]]
+
| ''(Optional)'' An amount applied to the player's [[attack]], [[defense]], [[Magnetism|magnetic radius]], maximum [[Energy|stamina]], or [[speed]] while the buff is active. This can be negative for a debuff. Default 0.
 
|}
 
|}
 
|-
 
|-
| 8
+
| <samp>CustomFields</samp>
| buff duration
+
| ''(Optional)'' The [[#Custom data fields|custom fields]] for this entry.  
| How long the buffs provided by the previous field last, measured in real seconds (assuming [[Day Cycle#Time speed|the default time speed]]). The buff duration number shown in-game will always be one second less than the calculated value.
+
|}
 
|}
 
|}
 +
    
===Notes===
 
===Notes===
* 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).
+
* Prior to 1.6, items that have a number in index 6 (the "Crafting" field) showed buggy information in-game (''e.g.,'' Bean Hotpot prior to version 1.4). Items that had a number in the "Attack" field displayed the Attack icon and a number, but no description. It's unclear how these buffs work (if at all).
 +
* '''Adding custom items with the <samp>Arch</samp> type is inadvisable as it often leads to Artifact Spots becoming broken and not giving any items.'''
 
* Named [[buffs]] (like [[Oil of Garlic]], [[Life Elixir]], or [[Buffs#Tipsy|Tipsy]]) are implemented in code and can't be set in the food buff fields.
 
* Named [[buffs]] (like [[Oil of Garlic]], [[Life Elixir]], or [[Buffs#Tipsy|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.
 
* 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.
Line 420: Line 624:  
Big craftables are objects which can be placed in the world and are two tiles tall (instead of one like objects).
 
Big craftables are objects which can be placed in the world and are two tiles tall (instead of one like objects).
   −
They have their data in <samp>Data/BigCraftableInformation</samp>, their in-game sprites in <samp>TileSheets/Craftables</samp>, and their code in <samp>StardewValley.Object</samp> (with the <code>bigCraftable.Value = true</code> flag).
+
They have their data in <samp>Data/BigCraftables</samp> (<samp>Data/BigCraftablesInformation</samp> prior to 1.6), their in-game sprites in <samp>TileSheets/Craftables</samp>, and their code in <samp>StardewValley.Object</samp> (with the <code>bigCraftable.Value = true</code> flag).
    
===Data format===
 
===Data format===
The big craftables data in <samp>Data/BigCraftableInformation</samp> consists of an integer→string dictionary with entries like this:
+
The big craftables data in <samp>Data/BigCraftables</samp> consists of a string → model lookup, where...
 +
* The key is the unqualified [[#Custom items|item ID]].
 +
* The value is a model with the fields listed below.
    
<syntaxhighlight lang="json">
 
<syntaxhighlight lang="json">
   "19": "Oil Maker/50/-300/Crafting -9/Makes gourmet truffle oil./true/true/0/Oil Maker"
+
   "19": {
 +
    "Name": "Oil Maker",
 +
    "DisplayName": "[LocalizedText Strings\\BigCraftables:OilMaker_Name]",
 +
    "Description": "[LocalizedText Strings\\BigCraftables:OilMaker_Description]",
 +
    "Price": 50,
 +
    "Fragility": 0,
 +
    "CanBePlacedOutdoors": true,
 +
    "CanBePlacedIndoors": true,
 +
    "IsLamp": false,
 +
    "Texture": null,
 +
    "SpriteIndex": 19,
 +
    "ContextTags": null,
 +
    "CustomFields": null
 +
  }
 
</syntaxhighlight>
 
</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 these fields:
+
Field values are described below (Copied from [[Modding:Migrate to Stardew Valley 1.6]]):
    +
====Basic info====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! index
   
! field
 
! field
! effect
+
! purpose
|-
  −
| 0
  −
| name
  −
| The internal item name (and display name in English).
   
|-
 
|-
| 1
+
| <samp>Name</samp>
| price
+
| The internal item name.
| The gold price when sold by the player.
   
|-
 
|-
| 2
+
| <samp>DisplayName</samp><br /><samp>Description</samp>
| edibility
+
| A [[Modding:Tokenizable strings|tokenizable string]] for the item's in-game display name and description.
| See edibility for [[#Objects|object data]]. Always set to <samp>-300</samp> (inedible) for vanilla items.
   
|-
 
|-
| 3
+
| <samp>Price</samp>
| type and category
+
| ''(Optional)'' The price when sold by the player. This is not the price when bought from a shop. Default 0.
| See type and category for [[#Objects|object data]]. Always set to <samp>Crafting -9</samp> for vanilla items.
+
|}
 +
 
 +
====Behavior====
 +
{| class="wikitable"
 
|-
 
|-
| 4
+
! field
| description
+
! purpose
| The translated item description shown in-game.
   
|-
 
|-
| 5
+
| <samp>Fragility</samp>
| outdoors
+
| ''(Optional)'' How the item can be picked up. The possible values are 0 (pick up with any tool), 1 (destroyed if hit with an axe/hoe/pickaxe, or picked up with any other tool), or 2 (can't be removed once placed). Default 0.
| Whether the item can be placed outdoors (<samp>true</samp> or <samp>false</samp>).
   
|-
 
|-
| 6
+
| <samp>CanBePlacedIndoors</samp><br /><samp>CanBePlacedOutdoors</samp>
| indoors
+
| ''(Optional)'' Whether the item can be placed indoors or outdoors. Default true.
| Whether the item can be placed indoors (<samp>true</samp> or <samp>false</samp>).
   
|-
 
|-
| 7
+
| <samp>IsLamp</samp>
| fragility
+
| ''(Optional)'' Whether this is a lamp and should produce light when dark. Default false.
| How the item is removed by tools. Possible values:
+
|}
 +
 
 +
====Appearance====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! fragility
+
! field
! effect
+
! purpose
 +
|-
 +
| <samp>Texture</samp>
 +
| ''(Optional)'' The asset name for the texture containing the item's sprite. Defaults to <samp>TileSheets/Craftables</samp>.
 
|-
 
|-
| <samp>0</samp>
+
| <samp>SpriteIndex</samp>
| Pick up with any tool.
+
| ''(Optional)'' The sprite's index within the <samp>Texture</samp>, where 0 is the top-left sprite.
 +
|}
 +
 
 +
====Context tags====
 +
{| class="wikitable"
 
|-
 
|-
| <samp>1</samp>
+
! field
| Destroyed if hit with an [[Axes|axe]], [[Hoes|hoe]], or [[Pickaxes|pickaxe]]. Any other tool will pick it up.
+
! purpose
 
|-
 
|-
| <samp>2</samp>
+
| <samp>ContextTags</samp>
| Indestructible. The item can't be removed once placed.
+
| ''(Optional)'' The custom [[Modding:Items#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": [ "light_source", "torch_item" ]
 +
</syntaxhighlight>
 
|}
 
|}
 +
 +
====Advanced====
 +
{| class="wikitable"
 
|-
 
|-
| 8
+
! field
| is lamp
+
! purpose
| Whether the item is a lamp and produces light when it's dark. This can be <samp>true</samp> (mark as lamp) or any other value (ignored).
   
|-
 
|-
| 9
+
| <samp>CustomFields</samp>
| display name
+
| ''(Optional)'' The [[Modding:Migrate_to_Stardew_Valley_1.6#Custom_data_fields|custom fields]] for this entry.  
| The translated display name (in non-English assets only).
   
|}
 
|}
   Line 709: Line 935:  
|-
 
|-
 
| 6
 
| 6
 +
| placement restriction
 +
| Where the furniture can be placed.
 +
{| class="wikitable sortable"
 +
|-
 +
! value
 +
! meaning
 +
|-
 +
| -1
 +
| default (uses furniture type)
 +
|-
 +
| 0
 +
| indoors-only
 +
|-
 +
| 1
 +
| outdoors-only
 +
|-
 +
| 2
 +
| indoors or outdoors
 +
|}
 +
|-
 +
| 7
 
| display name
 
| display name
 
| The translated furniture name (in non-English data assets only).
 
| The translated furniture name (in non-English data assets only).
Line 725: Line 972:  
</syntaxhighlight>
 
</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 these fields:
+
Hats from the base game use the hat's <samp>ParentSheetIndex</samp> as its item ID.
 +
For each entry in the data asset, the key is the hat's item ID, and the value is a slash-delimited string with these fields:
    
{| class="wikitable"
 
{| class="wikitable"
Line 735: Line 983:  
| 0
 
| 0
 
| name
 
| name
| The internal item name (and display name in English).
+
| The internal item name.
 
|-
 
|-
 
| 1
 
| 1
Line 750: Line 998:  
|-
 
|-
 
| 4
 
| 4
 +
| tags
 +
| A space-separated list of "tags". These are separate from context tags, and used to contain miscellaneous information. Currently, the only tag used by the game is <samp>Prismatic</samp>, which marks a hat as prismatic and causes it to cycle through colors.
 +
|-
 +
| 5
 
| display name
 
| display name
| The translated item name shown in-game (for non-English assets only).
+
| The translated item name shown in-game.
 +
|-
 +
| 6
 +
| sprite index
 +
| The index in the hat spritesheet used to display this hat.
 +
|-
 +
| 7
 +
| texture name
 +
| The name of the game texture to use for the hat. If empty, the game will use the default hat sheet <samp>Characters/Farmer/hats</samp>
 
|}
 
|}
   −
Hats have a hard-coded category of -95 (<samp>Hats.cs::Load</samp>)
+
Hats have a hard-coded category of -95 (<samp>HatDataDefinition.cs::GetData</samp>)
    
==Tools==
 
==Tools==
Line 919: Line 1,179:     
[[ru:Модификации:Объекты]]
 
[[ru:Модификации:Объекты]]
 +
 +
==History==
 +
{{History|1.6|Objects are now stored in <samp>Data/Objects</samp> rather than <samp>Data/ObjectInformation</samp> and have a new format.}}
 +
{{History|1.6|Field 4 of hats is now used for tags, rather than displayName.}}
 +
{{History|1.6|Display name field is now used for all languages.}}
 +
{{History|1.6|Added Texture & texture index fields to all object data.}}
 +
{{History|1.6|All types of items now use string IDs.}}
translators
8,445

edits

Navigation menu