Jump to content

Modding:Tailoring: Difference between revisions

From Stardew Valley Wiki
imported>SiTheGreat
No edit summary
imported>SiTheGreat
No edit summary
Line 20: Line 20:
|-
|-
| <samp>FirstItemTags</samp>
| <samp>FirstItemTags</samp>
| A list of [[Modding:Context tags|context tags]] for items that can be accepted by the cloth box on the left-hand side of the tailoring menu for this recipe. Typically includes the <samp>item_cloth</samp> context tag.
| A list of [[Modding:Context tags|context tags]] for items that can be accepted by the cloth slot on the left-hand side of the tailoring menu for this recipe. Typically includes the <samp>item_cloth</samp> context tag.
|-
|-
| <samp>SecondItemTags</samp>
| <samp>SecondItemTags</samp>
| A list of [[Modding:Context tags|context tags]] for items that can be accepted by the thread box on the right-hand side of the tailoring menu for this recipe. If a specific item is needed, the item's automatically generated context tag should be used, for example <samp>item_magic_rock_candy</samp>
| A list of [[Modding:Context tags|context tags]] for items that can be accepted by the thread slot on the right-hand side of the tailoring menu for this recipe. If a specific item is needed, the item's automatically generated context tag should be used, for example <samp>item_magic_rock_candy</samp>.
|-
|-
| <samp>SpendRightItem</samp>
| <samp>SpendRightItem</samp>
| Whether to consume the item in the thread box on the right-hand side of the tailoring menu when crafting the item.
| Whether to consume the item in the thread slot on the right-hand side of the tailoring menu when crafting the item.
|-
|-
| <samp>CraftedItemId</samp>
| <samp>CraftedItemId</samp>
| The [[Modding:Migrate to Stardew Valley 1.6#Custom items|qualified item ID]] of the crafted item. Default <samp>null</samp>. One of either this field or <samp>CraftedItemIds</samp> must be defined.
| The [[Modding:Migrate to Stardew Valley 1.6#Custom items|qualified item ID]] of the crafted item.
|-
|-
| <samp>CraftedItemIds</samp>
| <samp>CraftedItemIds</samp>
| ''(Optional)'' A list of [[Modding:Migrate to Stardew Valley 1.6#Custom items|qualified item IDs]] of possible crafted item outputs. Default <samp>null</samp>. One of either this field or <samp>CraftedItemId</samp> must be defined.
| ''(Optional)'' A list of [[Modding:Migrate to Stardew Valley 1.6#Custom items|qualified item IDs]] of possible crafted item outputs. For example,
|-
|-
| <samp>CraftedItemIdFeminine</samp>
| <samp>CraftedItemIdFeminine</samp>
| ''(Optional)'' The [[Modding:Migrate to Stardew Valley 1.6#Custom items|qualified item ID]] of crafted item outputs. Default <samp>null</samp>.
| ''(Optional)'' The [[Modding:Migrate to Stardew Valley 1.6#Custom items|qualified item ID]] of the crafted item output. Default <samp>null</samp>.
|}
|}


===Examples===
===Examples===
You can add or replace tailoring recipes. For example, this content pack adds a recipe to tailor the Governor's Hat using cloth and trout soup:
You can add or replace tailoring recipes. For example, this content pack adds a recipe to tailor a rain coat using cloth and a pufferchick:
{{Content Patcher example|<nowiki>
{{Content Patcher example|<nowiki>
     "Changes": [
     "Changes": [
Line 46: Line 46:
             "Target": "Data/TailoringRecipes",
             "Target": "Data/TailoringRecipes",
             "Entries": {
             "Entries": {
                 "Example.ModId_GovernorsHat": {
                 "ExampleAuthor.ModId_RainCoatFromPufferchick": {
                     "FirstItemTags": [
                    "Id": "ExampleAuthor.ModId_RainCoatFromPufferchick"
                        "item_cloth"
                     "FirstItemTags": [ "item_cloth" ],
                    ],
                     "SecondItemTags": [ "item_pufferchick" ],
                     "SecondItemTags": [
                        "item_trout_soup"
                    ],
                     "SpendRightItem": true,
                     "SpendRightItem": true,
                     "CraftedItemId": "(H)GovernorsHat",
                     "CraftedItemId": "(S)1260",
                     "CraftedItemIds": null,
                     "CraftedItemIds": null,
                     "CraftedItemIdFeminine": null,
                     "CraftedItemIdFeminine": null,
                    "Id": "Example.ModId_GovernorsHat"
                 }
                 }
             },
             },
Line 63: Line 59:
     ]
     ]
</nowiki>}}
</nowiki>}}
==Open the Tailoring Menu==
You can place an [[Modding:Maps#Action|<samp>Action Tailoring</samp> tile property]] on the map, which will open the tailoring menu when the player clicks it. The player must have seen event 992559 (the event of Emily visiting the farmhouse after you have gotten your first piece of cloth) for it to open.


==See also==
==See also==

Revision as of 03:20, 15 November 2025

← Index

This page explains how the game stores and uses tailoring recipe data. This is an advanced guide for mod developers.

Overview

Tailoring recipes are recipes that can be made in the tailoring menu, which can be opened by interacting with the Sewing Machine either at Emily's house or once the player obtains it.

Tailoring recipe data is stored in the Data/TailoringRecipes asset.

Data format

The Data/TailoringRecipes asset consists of a string → model lookup, where...

  • The key is a unique string ID for the tailoring recipe.
  • The value is a model with the fields listed below.
field effect
FirstItemTags A list of context tags for items that can be accepted by the cloth slot on the left-hand side of the tailoring menu for this recipe. Typically includes the item_cloth context tag.
SecondItemTags A list of context tags for items that can be accepted by the thread slot on the right-hand side of the tailoring menu for this recipe. If a specific item is needed, the item's automatically generated context tag should be used, for example item_magic_rock_candy.
SpendRightItem Whether to consume the item in the thread slot on the right-hand side of the tailoring menu when crafting the item.
CraftedItemId The qualified item ID of the crafted item.
CraftedItemIds (Optional) A list of qualified item IDs of possible crafted item outputs. For example,
CraftedItemIdFeminine (Optional) The qualified item ID of the crafted item output. Default null.

Examples

You can add or replace tailoring recipes. For example, this content pack adds a recipe to tailor a rain coat using cloth and a pufferchick:

{
    "Format": "2.8.0",
    "Changes": [
        {
            "Action": "EditData",
            "Target": "Data/TailoringRecipes",
            "Entries": {
                "ExampleAuthor.ModId_RainCoatFromPufferchick": {
                    "Id": "ExampleAuthor.ModId_RainCoatFromPufferchick"
                    "FirstItemTags": [ "item_cloth" ],
                    "SecondItemTags": [ "item_pufferchick" ],
                    "SpendRightItem": true,
                    "CraftedItemId": "(S)1260",
                    "CraftedItemIds": null,
                    "CraftedItemIdFeminine": null,
                }
            },
        }
    ]
}

Open the Tailoring Menu

You can place an Action Tailoring tile property on the map, which will open the tailoring menu when the player clicks it. The player must have seen event 992559 (the event of Emily visiting the farmhouse after you have gotten your first piece of cloth) for it to open.

See also

Modding:Recipe data for data about cooking and crafting recipes.

Modding:Hats for data about hat items.

Modding:Shirts for data about shirt items.

Modding:Pants for data about pant items.

Modding:Boots for data about boot items .