Line 648: |
Line 648: |
| | | |
| ===Context tags=== | | ===Context tags=== |
− | 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. Context tags are case-insensitive. The game generates some tags based on the game data (like the item quality), and others are defined in <samp>Data/Objects</samp>. |
− | | |
− | 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. |
Line 724: |
Line 722: |
| </dd> | | </dd> |
| | | |
− | <dt>Context tags from <samp>Data/ObjectContextTags</samp>:</dt> | + | <dt>Color tags:</dt> |
| <dd> | | <dd> |
| {| class="wikitable" | | {| class="wikitable" |
Line 760: |
Line 758: |
| | <samp>color_black</samp>, <samp>color_gray</samp>, <samp>color_dark_gray</samp>, <samp>color_white</samp>, <samp>color_iron</samp>, <samp>color_prismatic</samp> | | | <samp>color_black</samp>, <samp>color_gray</samp>, <samp>color_dark_gray</samp>, <samp>color_white</samp>, <samp>color_iron</samp>, <samp>color_prismatic</samp> |
| |} | | |} |
| + | |} |
| + | |
| + | <dt>Tags added in 1.6:</dt> |
| + | <dd> |
| + | {| class="wikitable" |
| + | |- |
| + | ! context tag |
| + | ! effect |
| + | |- |
| + | | <samp>campfire_item</samp> |
| + | | Marks the item as a [[campfire]]. If the item also has the <samp>torch_item</samp> context tag, when it's placed in the world and turned on... |
| + | * Campfire flames are drawn over it; |
| + | * If the item is [[Modding:Items#Big craftables|big craftable]], light is emitted from its center instead of the top. |
| + | |- |
| + | | <samp>fish_pond_ignore</samp> |
| + | | Prevents players from adding this fish to [[Fish Pond|fish ponds]], even if it would otherwise match an entry in <samp>Data/FishPondData</samp>. |
| + | |- |
| + | | <samp>geode_crusher_ignored</samp> |
| + | | Prevents breaking this item open in a [[Geode Crusher|geode crusher]], even if the item has geode fields in [[Modding:Items#Objects|<samp>Data/Objects</samp>]]. |
| + | |- |
| + | | <samp>item_type_{{t|type}}</samp> |
| + | | For an [[Modding:Items#Objects|object-type item]], the type value from the 'type and category' field. (Non-object items always have the exact tag <samp>item_type_</samp> with nothing after the last underscore.) This is automatic and shouldn't be set manually. The tag is checked in a few places (''e.g.'' the [[museum]] to check if an item is an artifact or mineral), but most of the game won't be affected. |
| + | |- |
| + | | <samp>museum_donatable</samp><br /><samp>not_museum_donatable</samp> |
| + | | Set whether the item can be donated to the [[museum]], overriding the vanilla logic. |
| + | |- |
| + | | <samp>not_giftable</samp> |
| + | | Prevents players from gifting this item to NPCs, who'll ignore the item entirely (e.g. as if you were holding a tool). |
| + | |
| + | This only affects gift-giving, it doesn't affect non-gift logic like quest goals or special order objectives. If the NPC also has a <samp>reject_*</samp> dialogue for the item, the dialogue takes priority. |
| + | |- |
| + | | <samp>not_placeable</samp><br /><samp>placeable</samp> |
| + | | Sets whether the item can be placed on the ground. |
| + | |- |
| + | | <samp>prevent_loss_on_death</samp> |
| + | | Indicates the item can't be [[Adventurer's Guild#Item Recovery Service|lost when the player dies]]. |
| + | |- |
| + | | <samp>sign_item</samp> |
| + | | Marks the item as a [[Crafting#Signs|sign]], which lets player display items on it or place it on a [[Fish Pond|fish pond]] to show the fish count. |
| + | |- |
| + | | <samp>torch_item</samp> |
| + | | Marks the item as a [[torch]], which lets the player turn it on/off to emit light. |
| + | See also <samp>campfire_item</samp>. |
| + | |} |
| + | </dd> |
| + | |
| + | <dt>Context tags which affect [[Modding:Machines|machine processing]]:</dt> |
| + | <dd> |
| + | {| class="wikitable" |
| + | |- |
| + | ! context tag |
| + | ! effect |
| + | |- |
| + | | <samp>crystalarium_banned</samp> |
| + | | When applied to a gem or mineral item, prevents players from placing it in a [[crystalarium]]. |
| + | |- |
| + | | <samp>keg_juice</samp><br /><samp>keg_wine</samp> |
| + | | Allows processing the item in a [[keg]] to produce a juice or wine variant. |
| + | |- |
| + | | <samp>preserves_jelly</samp><br /><samp>preserves_pickle</samp> |
| + | | Allows processing the item in a [[Preserves Jar|preserves jar]] to produce a jelly or pickled variant. |
| + | |- |
| + | | <samp>seedmaker_banned</samp> |
| + | | When applied to a seed item, prevents players from placing it in a [[Seed Maker|seed maker]]. |
| + | |- |
| + | | <samp>tapper_item</samp> |
| + | | Marks the item as a [[tapper]] or [[Heavy Tapper|heavy tapper]]. |
| + | |- |
| + | | <samp>tapper_multiplier_{{t|multiplier}}</samp> |
| + | | The multiplier applied to the tapper production speed. For example, <samp>2</samp> will make items take half their base time (''i.e.'' each item will finish in <sup>base time</sup>/<sub>speed multiplier</sub>). Defaults to 1 if omitted. |
| + | |} |
| + | </dd> |
| + | |
| + | |
| + | <dt>Informational tags which have no effect on the game logic:</dt> |
| + | <dd> |
| + | {| class="wikitable" |
| + | |- |
| + | ! context tag |
| + | ! effect |
| + | |- |
| + | | <samp>fish_legendary</samp><br /><samp>fish_legendary_family</samp> |
| + | | Marks the fish as a [[Fish#Legendary Fish|legendary fish]] or [[Quests#Extended Family|legendary fish family]]. These are purely informational; the legendary fish behavior is determined by data fields like <samp>CatchLimit</samp> or <samp>IsBossFish</samp> in [[Modding:Location_data|<samp>Data/Locations</samp>]]. |
| + | |- |
| + | | <samp>geode</samp> |
| + | | ''(Added automatically)'' Marks the item as a [[Minerals#Geodes|geode]] item, which can be broken open at [[Blacksmith|Clint's blacksmith shop]] or using a [[Geode Crusher|geode crusher]]. This is added automatically if the geode fields are present in [[Modding:Items#Objects|<samp>Data/Objects</samp>]]. |
| + | |- |
| + | | <samp>id_{{t|item id}}</samp> |
| + | | ''(Added automatically)'' The [[Modding:Common_data_field_types#Item_ID|qualified item ID]], like <samp>id_(o)128</samp>. This can be used to match or exclude an item by ID using context tags. Any spaces in the ID are replaced with underscores, and single quotes are removed. |
| + | |- |
| + | | <samp>is_machine</samp> |
| + | | ''(Added automatically)'' Indicates the item has [[Modding:Machines|machine logic]]. This is added automatically based on <samp>Data/Machines</samp>. |
| + | |- |
| + | | <samp>machine_input</samp> |
| + | | ''(Added automatically)'' Whether the item is a machine which accepts items from the player. This is added automatically based on the machine's fields in <samp>Data/Machines</samp>: |
| + | * if <samp>HasInput</samp> is true; |
| + | * ''or'' if any output rules have an <samp>ItemPlacedInMachine</samp> trigger. |
| + | |- |
| + | | <samp>machine_output</samp> |
| + | | ''(Added automatically)'' Whether the item is a machine which produces items for the player to collect. This is added automatically based on the machine's fields in <samp>Data/Machines</samp>: |
| + | * if <samp>HasOutput</samp> is true; |
| + | * ''or'' if it has any output rules. |
| |} | | |} |
| </dd> | | </dd> |
| </dl> | | </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 to an item, then reference them in the fish pond data. Specifically: |
| | | |
| {| class="wikitable" | | {| class="wikitable" |
Line 783: |
Line 883: |
| | In <samp>Data/NPCGiftTastes</samp>, used to set character likes and dislike for every item using the context tag. | | | 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> 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>.}} | | {{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>.}} |
| + | |
| + | ====ItemContextTagManager class==== |
| + | For C# mods, the <samp>ItemContextTagManager</samp> class simplifies working with item context tags and reduces repeated code. |
| + | |
| + | This provides a few utility methods: |
| + | {| class="wikitable" |
| + | |- |
| + | ! method |
| + | ! effect |
| + | |- |
| + | | <code>GetBaseContextTags(id)</code> |
| + | | Get the base context tags for an item based on its raw data in <samp>Data/Objects</samp> or <samp>Data/BigCraftables</samp>. This doesn't include dynamic tags added that are based on instance info (like quality), which you can get using <code>item.GetContextTags()</code>. |
| + | |- |
| + | | <code>DoesTagQueryMatch(query, tags)</code> |
| + | | Get whether a context tag query matches the given tags. For example, <code>ItemContextTagManager.DoesTagQueryMatch("bone_item, !fossil_item", item.GetContextTags())</code> returns true if the item is a bone item but not a fossil (like the [[Bone Flute]]). |
| + | |- |
| + | | <code>DoAllTagsMatch(requiredTags, actualTags)</code><br /><code>DoAnyTagsMatch(requiredTags, actualTags)</code> |
| + | | Get whether every (<samp>DoAllTagsMatch</samp>) or at least one (<samp>DoAnyTagsMatch</samp) required tag matches the actual item tags. This supports negated required tags like <samp>"!fossil_item"</samp> too. |
| + | |- |
| + | | <code>DoesTagMatch(requiredTag, actualTags)</code> |
| + | | Get whether a single tag matches the actual item tags. This supports negated required tags like <samp>"!fossil_item"</samp> too. |
| + | |- |
| + | | <code>SanitizeContextTag(tag)</code> |
| + | | ''(Specialized)'' Replace characters that may appear in item names so they're valid in context tags. For example, <code>SanitizeContextTag("Sam's Boombox")</code> returns <samp>sams_boombox</samp>. |
| + | |} |
| | | |
| ==Objects== | | ==Objects== |
Line 1,080: |
Line 1,204: |
| | | |
| ==Boots== | | ==Boots== |
− | Boots are items that can be equipped in the player's [[footwear]] slot.
| |
− |
| |
− | They have their data in <samp>Data/Boots</samp>, their in-game sprites in <samp>Maps/springobjects</samp> (item sprite) and <samp>Characters/Farmer/shoeColors</samp> (shoe color), and their code in <samp>StardewValley.Objects.Boots</samp>.
| |
− |
| |
| ===Data format=== | | ===Data format=== |
− | The boots data in <samp>Data/Boots</samp> consists of an integer→string dictionary with entries like this:
| + | You can create/edit [[Footwear|boots]] by editing the <samp>Data/Boots</samp> asset. This consists of a string → string dictionary, where... |
− | | + | * The key is the unqualified [[Modding:Common_data_field_types#Item_ID|item ID]]. |
− | <syntaxhighlight lang="json">
| + | * The value is a slash-delimited string with the fields listed below. |
− | "511": "Dark Boots/Made from thick black leather./250/4/2/7"
| |
− | </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:
| |
| | | |
| {| class="wikitable" | | {| class="wikitable" |
Line 1,100: |
Line 1,216: |
| |- | | |- |
| | 0 | | | 0 |
− | | name | + | | Name |
| | The internal item name (and display name in English). | | | The internal item name (and display name in English). |
| |- | | |- |
| | 1 | | | 1 |
− | | description | + | | Description |
| | The translated item description shown in-game. | | | The translated item description shown in-game. |
| |- | | |- |
| | 2 | | | 2 |
− | | price | + | | Price |
| | '''Unused.''' The actual price is calculated as <samp>(''added defence'' × 100) + (''added immunity'' × 100)</samp>. | | | '''Unused.''' The actual price is calculated as <samp>(''added defence'' × 100) + (''added immunity'' × 100)</samp>. |
| |- | | |- |
| | 3 | | | 3 |
− | | added defense | + | | Added Defense |
| | A [[defense]] bonus applied to the player while equipped. | | | A [[defense]] bonus applied to the player while equipped. |
| |- | | |- |
| | 4 | | | 4 |
− | | added immunity | + | | Added Immunity |
| | An [[immunity]] bonus applied to the player while equipped. | | | An [[immunity]] bonus applied to the player while equipped. |
| |- | | |- |
| | 5 | | | 5 |
− | | color index | + | | Color Index |
− | | The index of the boot color in the <samp>Characters/Farmer/shoeColors</samp> spritesheet. | + | | The boots color index within the Color Texture, where 0 is the top-left set, if present, otherwise the <samp>Characters/Farmer/shoeColors</samp> spritesheet. |
| |- | | |- |
| | 6 | | | 6 |
− | | display name | + | | Display Name |
| | The translated item name shown in-game (for non-English assets only). | | | The translated item name shown in-game (for non-English assets only). |
| + | |- |
| + | | 7 |
| + | | Color Texture |
| + | | The asset name for the texture containing the boots color sprite. |
| + | |- |
| + | | 8 |
| + | | Sprite Index |
| + | | The boots sprite index within the Texture, where 0 is the top-left set. |
| + | |- |
| + | | 9 |
| + | | Texture |
| + | | The asset name for the texture containing the boots sprite. |
| |} | | |} |
| + | |
| + | The boots data in <samp>Data/Boots</samp> consists of a string → string dictionary with entries like this: |
| + | |
| + | <syntaxhighlight lang="json"> |
| + | "511": "Dark Boots/Made from thick black leather./250/4/2/7" |
| + | </syntaxhighlight> |
| + | |
| + | A custom entry might look something like this: |
| + | |
| + | <syntaxhighlight lang="json"> |
| + | { |
| + | "Format": "2.2.0", |
| + | "Changes": [ |
| + | { |
| + | "LogName": "Load boots texture", |
| + | "Action": "Load", |
| + | "Target": "{{ModId}}/Boots, {{ModId}}/BootsColor", |
| + | "FromFile": "assets/{{TargetWithoutPath}}.png" |
| + | }, |
| + | { |
| + | "LogName": "Add boots to boots data", |
| + | "Action": "EditData", |
| + | "Target": "Data/Boots", |
| + | "Entries": { |
| + | "{{ModId}}_OPBoots": "Overpowered Boots/These boots are totally broken!/1000000/100/100/8/Overpowered Boots/{{ModId}}\\BootsColor/0/{{ModId}}\\Boots" |
| + | } |
| + | } |
| + | ] |
| + | } |
| + | </syntaxhighlight> |
| | | |
| ==Pants== | | ==Pants== |
Line 1,191: |
Line 1,349: |
| ===Data format=== | | ===Data format=== |
| | | |
− | You can now create/edit [[Tailoring#Shirts|shirts]] by editing the new <samp>Data/Shirts</samp> asset, which replaces <samp>Data/clothingInformation</samp>. This consists of a string → model lookup, where... | + | You can create/edit [[Tailoring#Shirts|shirts]] by editing the new <samp>Data/Shirts</samp> asset. This consists of a string → model lookup, where... |
− | * The key is the unqualified [[#Custom items|item ID]]. | + | * The key is the unqualified [[Modding:Common_data_field_types#Item_ID|item ID]]. |
| * The value is a model with the fields listed below. | | * The value is a model with the fields listed below. |
| | | |
Line 1,224: |
Line 1,382: |
| |- | | |- |
| | <samp>DefaultColor</samp> | | | <samp>DefaultColor</samp> |
− | | ''(Optional)'' The dye color to apply to the sprite when the player hasn't [[dyeing|dyed]] it yet, if any. See [[#Color fields|color format]]. Default none. | + | | ''(Optional)'' The dye color to apply to the sprite when the player hasn't [[dyeing|dyed]] it yet, if any. See [[Modding:Common_data_field_types#Color|color format]]. Default none. |
| |- | | |- |
| | <samp>CanBeDyed</samp> | | | <samp>CanBeDyed</samp> |
Line 1,246: |
Line 1,404: |
| |- | | |- |
| | <samp>CustomFields</samp> | | | <samp>CustomFields</samp> |
− | | The [[#Custom data fields|custom fields]] for this entry. | + | | The [[Modding:Common_data_field_types#Custom_fields|custom fields]] for this entry. |
| |} | | |} |
− |
| |
| | | |
| ==Furniture== | | ==Furniture== |
| Furniture are decorative items which can be placed in the world, including chairs which the player can sit on. | | Furniture are decorative items which can be placed in the world, including chairs which the player can sit on. |
| | | |
− | They have their data in <samp>Data/Furniture</samp>, their in-game sprites in <samp>TileSheets/furniture</samp>, and their code in <samp>StardewValley.Objects.Furniture</samp>. | + | They have their data in <samp>Data/Furniture</samp>, their in-game sprites in <samp>TileSheets/furniture</samp>, translations in <samp>Strings/Furniture</samp>, and their code in <samp>StardewValley.Objects.Furniture</samp>. |
| | | |
| ===Data format=== | | ===Data format=== |
Line 1,376: |
Line 1,533: |
| | 7 | | | 7 |
| | display name | | | display name |
− | | The translated furniture name (in non-English data assets only). | + | | The translated furniture name, which allows [[Modding:Tokenizable strings|tokenizable strings]]. |
| + | |- |
| + | | 8 |
| + | | sprite index |
| + | | The sprite index within the spritesheet texture to draw. |
| + | |- |
| + | | 9 |
| + | | texture |
| + | | ''(Optional)'' The asset name of the texture to draw. Defaults to <samp>TileSheets/furniture</samp>. |
| + | |- |
| + | | 10 |
| + | | off limits for random sale |
| + | | ''(Optional)'' Whether to prevent this furniture from appearing in randomly generated shop stocks and the furniture catalogue. Default false. |
| + | |- |
| + | | 11 |
| + | | context tags |
| + | | ''(Optional)'' A space-delimited list of [[Modding:Items#Context tags|context tags]] which apply to this furniture. Default none. |
| |} | | |} |
| | | |