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 732: |
Line 730: |
| |- | | |- |
| | <samp>color_*</samp> | | | <samp>color_*</samp> |
− | | The color produced by this item when the player [[Dyeing#Dye Pots|dyes clothing]] at [[2 Willow Lane|Emily's house]]. The context tag only affects which of the six color dye pots it can be placed in; for example, <samp>color_red</samp> and <samp>color_dark_red</samp> are both placed in the red pot, but they don't produce different colors. | + | | Color tags are used by a number of game functions, including when the player [[Dyeing#Dye Pots|dyes clothing]] at [[2 Willow Lane|Emily's house]], when tinting certain machine products such as [[Wine]] and [[Pickles]], and when displaying the [[Books|Book]] reading animation. For tinting purposes, each tag has a specific RGB value that is used, except when using Emily's Dye Pots, in which case they are grouped into one of the following categories. |
| | | |
| {| class="wikitable" | | {| class="wikitable" |
Line 749: |
Line 747: |
| |- | | |- |
| | green | | | green |
− | | <samp>color_green</samp>, <samp>color_dark_green</samp>, <samp>color_lime</samp>, <samp>color_yellow_green</samp>, <samp>color_jade</samp> | + | | <samp>color_green</samp>, <samp>color_dark_green</samp>, <samp>color_lime</samp>, <samp>color_yellow_green</samp>, <samp>color_jade</samp>, <samp>color_sea_green</samp> |
| |- | | |- |
| | blue | | | blue |
Line 756: |
Line 754: |
| | purple | | | purple |
| | <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> |
| + | |- |
| + | | no color |
| + | | <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 780: |
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,077: |
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,097: |
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. |
| |} | | |} |
| | | |
− | ==Clothing==
| + | The boots data in <samp>Data/Boots</samp> consists of a string → string dictionary with entries like this: |
− | Clothing consists of cosmetic items that can be equipped in the player's [[Tailoring|pants and shirt]] slots.
| |
| | | |
− | They have their data in <samp>Data/ClothingInformation</samp>, their in-game sprites in <samp>Characters/Farmer/pants</samp> & <samp>Characters/Farmer/shirts</samp>, and their code in <samp>StardewValley.Objects.Clothing</samp>.
| + | <syntaxhighlight lang="json"> |
| + | "511": "Dark Boots/Made from thick black leather./250/4/2/7" |
| + | </syntaxhighlight> |
| | | |
− | ===Data format===
| + | A custom entry might look something like this: |
− | The clothing data in <samp>Data/ClothingInformation</samp> consists of an integer→string dictionary with entries like this:
| |
| | | |
| <syntaxhighlight lang="json"> | | <syntaxhighlight lang="json"> |
− | "1282": "Tomato Shirt/Tomato Shirt/A shirt that answers the big question: 'Tomatoes are'... (but the rest is smudged)./282/-1/50/255 0 0/false/Shirt/Sleeveless" | + | { |
| + | "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> | | </syntaxhighlight> |
| | | |
− | For each entry in the data asset, the key is the item's <samp>ParentSheetIndex</samp> (offset by 1000 for shirts) and the value is a slash-delimited string with these fields:
| + | ==Pants== |
| | | |
| + | ===Data format=== |
| + | |
| + | You can create/edit [[Tailoring#Pants|pants]] by editing the <samp>Data/Pants</samp> asset. This 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 pants data==== |
| + | {| class="wikitable" |
| + | |- |
| + | ! field |
| + | ! purpose |
| + | |- |
| + | | <samp>Name</samp> |
| + | | ''(Optional)'' The internal name for the item. Default <samp>Pants</samp>. |
| + | |- |
| + | | <samp>DisplayName</samp><br /><samp>Description</samp> |
| + | | ''(Optional)'' A [[Modding:Tokenizable strings|tokenizable string]] for the item's in-game display name and description. Defaults to the generic pants text (''Pants'' and ''A wearable pair of pants''). |
| + | |- |
| + | | <samp>Price</samp> |
| + | | ''(Optional)'' The default price when the item is sold to the player in a shop. Default 50. |
| + | |} |
| + | |
| + | ====Appearance==== |
| + | {| class="wikitable" |
| + | |- |
| + | ! field |
| + | ! purpose |
| + | |- |
| + | | <samp>Texture</samp> |
| + | | The asset name for the texture containing the pants' sprite. Defaults to <samp>Characters/Farmer/pants</samp>. |
| + | |- |
| + | | <samp>SpriteIndex</samp> |
| + | | The pants' sprite index within the <samp>Texture</samp>, where 0 is the top-left set. |
| + | |- |
| + | | <samp>DefaultColor</samp> |
| + | | ''(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 <samp>255 235 203</samp> (which matches the color of the cloth item). |
| + | |- |
| + | | <samp>CanBeDyed</samp> |
| + | | ''(Optional)'' Whether the player can [[dyeing|dye]] these pants. Default false. |
| + | |- |
| + | | <samp>IsPrismatic</samp> |
| + | | ''(Optional)'' Whether the pants continuously shift colors. This overrides <samp>DefaultColor</samp> and <samp>CanBeDyed</samp> if set. Default false. |
| + | |} |
| + | |
| + | ====Other==== |
| + | {| class="wikitable" |
| + | |- |
| + | ! field |
| + | ! purpose |
| + | |- |
| + | | <samp>CanChooseDuringCharacterCustomization</samp> |
| + | | ''(Optional)'' Whether these pants can be selected on the character customization screen (e.g. when creating a character). Default false. |
| + | |- |
| + | | <samp>CustomFields</samp> |
| + | | The [[Modding:Common_data_field_types#Custom_fields|custom fields]] for this entry. |
| + | |} |
| + | |
| + | ==Shirts== |
| + | |
| + | ===Data format=== |
| + | |
| + | 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 [[Modding:Common_data_field_types#Item_ID|item ID]]. |
| + | * The value is a model with the fields listed below. |
| + | |
| + | ====Basic shirt data==== |
| {| class="wikitable" | | {| class="wikitable" |
| |- | | |- |
− | ! index
| |
| ! field | | ! field |
− | ! effect | + | ! purpose |
| + | |- |
| + | | <samp>Name</samp> |
| + | | ''(Optional)'' The internal name for the item. Default <samp>Shirt</samp>. |
| + | |- |
| + | | <samp>DisplayName</samp><br /><samp>Description</samp> |
| + | | ''(Optional)'' A [[Modding:Tokenizable strings|tokenizable string]] for the item's in-game display name and description. Defaults to the generic shirt text (''Shirt'' and ''A wearable shirt''). |
| + | |- |
| + | | <samp>Price</samp> |
| + | | ''(Optional)'' The default price when the item is sold to the player in a shop. Default 50. |
| + | |} |
| + | |
| + | ====Appearance==== |
| + | {| class="wikitable" |
| |- | | |- |
− | | 0
| + | ! field |
− | | name
| + | ! purpose |
− | | The internal item name (and display name in English).
| |
| |- | | |- |
− | | 1 | + | | <samp>Texture</samp> |
− | | display name
| + | | The asset name for the texture containing the shirt's sprite. Defaults to <samp>Characters/Farmer/shirts</samp>. |
− | | The translated item name shown in-game. | |
| |- | | |- |
− | | 2 | + | | <samp>SpriteIndex</samp> |
− | | description
| + | | The shirt's sprite index within the <samp>Texture</samp>, where 0 is the top-left set. |
− | | The translated item description shown in-game. | |
| |- | | |- |
− | | 3 | + | | <samp>DefaultColor</samp> |
− | | male index
| + | | ''(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. |
− | | The sprite index in the clothing spritesheet for male characters. | |
| |- | | |- |
− | | 4 | + | | <samp>CanBeDyed</samp> |
− | | female index
| + | | ''(Optional)'' Whether the player can [[dyeing|dye]] this shirt. Default false. |
− | | The sprite index in the clothing spritesheet for female characters, or <samp>-1</samp> to use the male index.
| |
| |- | | |- |
− | | 5 | + | | <samp>IsPrismatic</samp> |
− | | price | + | | ''(Optional)'' Whether the shirt continuously shifts colors. This overrides <samp>DefaultColor</samp> and <samp>CanBeDyed</samp> if set. Default false. |
− | | The price when purchased from shops.
| |
| |- | | |- |
− | | 6 | + | | <samp>HasSleeves</samp> |
− | | default color
| + | | ''(Optional)'' Whether to draw shirt sleeves. Default true. |
− | | The default color, specified in space-delimited RGB with each channel being an integer from 0 (no color) to 255 (full color). For example, <samp>255 0 0</samp> for full red.
| + | |} |
| + | |
| + | ====Other==== |
| + | {| class="wikitable" |
| |- | | |- |
− | | 7
| + | ! field |
− | | dyeable
| + | ! purpose |
− | | Whether the clothing can be [[Dyeing|dyed]] (<samp>true</samp> or <samp>false</samp>).
| |
| |- | | |- |
− | | 8 | + | | <samp>CanChooseDuringCharacterCustomization</samp> |
− | | Type
| + | | ''(Optional)'' Whether this shirt can be selected on the character customization screen (e.g. when creating a character). Default false. |
− | | The clothing type. One of <samp>Pants</samp>, <samp>Shirt</samp>, or <s><samp>Accessory</samp></s> (unimplemented).
| |
| |- | | |- |
− | | 9 | + | | <samp>CustomFields</samp> |
− | | extra data | + | | The [[Modding:Common_data_field_types#Custom_fields|custom fields]] for this entry. |
− | | A comma-delimited list of tags attached to the item (unrelated to [[#Context tags|context tags]]). The values recognized by the game are <samp>Prismatic</samp> (adds a shifting rainbow effect) and <samp>Sleeveless</samp> (disables drawing the sleeve color over the player's arms).
| |
| |} | | |} |
| | | |
Line 1,189: |
Line 1,410: |
| 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,312: |
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. |
| |} | | |} |
| | | |