Jump to content

Modding:Tailoring: Difference between revisions

From Stardew Valley Wiki
imported>SiTheGreat
No edit summary
imported>SiTheGreat
No edit summary
Line 23: Line 23:
|-
|-
| <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.
| 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>
|-
|-
| <samp>SpendRightItem</samp>
| <samp>SpendRightItem</samp>
Line 29: Line 29:
|-
|-
| <samp>CraftedItemId</samp>
| <samp>CraftedItemId</samp>
| The [[Modding:Migrate to Stardew Valley 1.6#Custom items|qualified item ID]] of the crafted item.
| 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.
|-
|-
| <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.
| ''(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.
|-
|-
| <samp>CraftedItemIdFeminine</samp>
| <samp>CraftedItemIdFeminine</samp>
| ''(Optional)'' The [[Modding:Migrate to Stardew Valley 1.6#Custom items|qualified item ID]] of crafted item outputs.
| ''(Optional)'' The [[Modding:Migrate to Stardew Valley 1.6#Custom items|qualified item ID]] of crafted item outputs. Default <samp>null</samp>.
|}
|}
===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:
{{Content Patcher example|<nowiki>
    "Changes": [
        {
            "Action": "EditData",
            "Target": "Data/TailoringRecipes",
            "Entries": {
                "Example.ModId_GovernorsHat": {
                    "FirstItemTags": [
                        "item_cloth"
                    ],
                    "SecondItemTags": [
                        "item_trout_soup"
                    ],
                    "SpendRightItem": true,
                    "CraftedItemId": "(H)GovernorsHat",
                    "CraftedItemIds": null,
                    "CraftedItemIdFeminine": null,
                    "Id": "Example.ModId_GovernorsHat"
                }
            },
        }
    ]
</nowiki>}}


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

Revision as of 03:03, 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 box 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 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 item_magic_rock_candy
SpendRightItem Whether to consume the item in the thread box on the right-hand side of the tailoring menu when crafting the item.
CraftedItemId The qualified item ID of the crafted item. Default null. One of either this field or CraftedItemIds must be defined.
CraftedItemIds (Optional) A list of qualified item IDs of possible crafted item outputs. Default null. One of either this field or CraftedItemId must be defined.
CraftedItemIdFeminine (Optional) The qualified item ID of crafted item outputs. Default null.

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:

{
    "Format": "2.8.0",
    "Changes": [
        {
            "Action": "EditData",
            "Target": "Data/TailoringRecipes",
            "Entries": {
                "Example.ModId_GovernorsHat": {
                    "FirstItemTags": [
                        "item_cloth"
                    ],
                    "SecondItemTags": [
                        "item_trout_soup"
                    ],
                    "SpendRightItem": true,
                    "CraftedItemId": "(H)GovernorsHat",
                    "CraftedItemIds": null,
                    "CraftedItemIdFeminine": null,
                    "Id": "Example.ModId_GovernorsHat"
                }
            },
        }
    ]
}

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 .