Tutorial: Your First Content Patcher Pack
Last edited by AtlasVBot on 2025-09-13 18:58:05
Welcome to creating your first Content Patcher Pack. I wanted a quick and easy way someone could copy, paste, and run their first content patch to prove to themselves everything's working as expected. I always find that creating my first, simple, working code gave me the confidence that I could tinker with things slightly and watch as my code grows.
In this tutorial, I will do my best to break everything down in a manner that gets you from start to finish as quickly as possible. Our task is to edit the description text of a crop. In my examples below, I will use the item `Hazelnut` as my example, but do not hesitate to pick something else to try for yourself!
Prerequisites
This tutorial assumes you have:
- Downloaded and set up SMAPI
- Downloaded and set up Content Patcher
- Your game, SMAPI, and Content Patcher all start without issues.*
- You understand where your game files are. You should know this from setting up ContentPatcher and SMAPI. Locate your Mods directory, it is important!
- The Courage to try !
If you have any issues with the prerequisites, you should start by addressing these items (or giving yourself a pep talk. You've got this!)
Creating Your Content Pack Structure
There are 3 components required for starting our first Content Pack:
- The file folder that will contain your Content Pack that lives within the
Modsfolder - Your
manifest.jsonfile - Your
content.jsonfile
First thing you need to decide on is a name. According to the naming conventions for the modding community, your Content Pack should be named with "[CP]" at the front. As an example name you could use: [CP] MyFirstPack . With your name decided, you will need to create that folder within your Mods folder.
Second, you will want to create the 2 json files: manifest.json and content.json. Go ahead and make 2 empty files named and saved as such. Now, let's cover what those are for.
manifest.json
Your manifest.json file describes your mod pack as well as defines how Content Patcher will interact with your mod pack. Copy this code into your manifest.json file. (TIP: change the ___ to the name of the existing in-game crop to the one you want!)
{
"Name": "My First Pack",
"Author": "YourNameHere",
"Version": "1.0.0",
"Description": "YourNameHere's first pack. It edits the description of the ___ crop.",
"UniqueID": "YourNameHere.MyFirstPack",
"UpdateKeys": [],
"ContentPackFor": {
"UniqueID": "Pathoschild.ContentPatcher"
}
}
If you want a breakdown of each field, feel free to review the Modder Guide to the Manifest on the official wiki. For now, this will work as expected for our purposes.
content.json
Your content.json file is how we can edit in-game files without having to dig too deeply into the code itself. Content Patcher was written in a way to make it more accessible for people to create the experience they wanted in Stardew Valley. The purpose of this guide is to get something simple working; however, please know that Content Patcher is rich with features that allow you to edit portraits, add new items, and much more. Our goal is to keep the scope of our experience to something small that helps us understand how things interact. First, I will show you the code to edit the Hazelnut's description. After that, I will explain how it works and how you can understand how to edit other items and more.
{
"Format": "2.7.0",
"Changes": [
{
"Action": "EditData",
"Target": "Data/Objects",
"Entries": {
"408": {
"DisplayName": "Hazelnut",
"Description": "I bet this would be delicious roasted..."
}
}
}
]
}
Let's break down each of these pieces:
- Format -- Sets the version number for Content Patcher. 2.7.0 was the latest as of the writing of this tutorial.
- Changes -- The list of changes we want Content Patcher to make on our behalf.
- Action -- Tells Content Patcher what task to perform. Content Patcher has defined many actions that you can review for yourself once you are ready to learn more.
- Target -- Tells Content Patcher what type of thing will receive the above Action.** In this case it is
"Data/Objects"that we are looking for. - Entries -- Allows us to edit more than one item at a time. Do you want to update Hazelnuts and something else? This section allows us to add multiple
EditDataactions calls towardData/Objectstypes. - 408 -- The ID of the crop or item you want to edit. The wiki has created a helpful google spreadsheet with all of the IDs you could ever need. Check out the "itemIDs" tab and find the item you want to use.
- DisplayName -- The name of the crop or item. Even if you do not want to change the name of the item it is important that you write it here as it is in the game or spreadsheet. Otherwise your item will be named "Unnamed Item (O)408" (if you chose Hazelnut that is...) You can also this opportunity to rename Hazelnut to something else.
- Description -- The text the player will see when they hover over this crop or item.
It's worth mentioning some entries, such as Display Names and Descriptions, are different in other languages. To simplify the process of others translating your mod, please be sure to check out i18 translation. See Modding:Translations, Modding:Modder Guide/APIs/Translation and translations.md for further explanation.
Now, if you copy this code as it is, have a your manifest set up, and run the game with your mods you should be able to pick up a Hazelnut and see the new text changes!
If it's working, why not try something else? Perhaps you don't have a Hazelnut yet in your inventory, but i'm sure there's Lumber (ID: 30) or Parsnip Seeds (ID: 472) lying around for you to try too.
In Summary...
Your files should look like this:
Mods/
├─ [CP] MyFirstPack/
│ ├─ manifest.json
│ ├─ content.json
And in the end you should have something that looks like...
Congratulations!
The Questions I Had and the Answers I Wanted
How do I know what the IDs are for my item?
- The Stardew Valley - Event Modding Resource Spreadsheet as i mentioned before or...
- You can use the
list_itemscommand in the terminal. Checkout the official wiki's Console_commands documentation for more. It lets you search too so trylist_items hazelnutand you can see the name and id. Please be careful when interacting with the terminal if you do not understand how it works!
Where are the docs?
- This wiki has a lot of great resources as does the Main Wiki; however, Content Patcher has some docs within it's source code too.
Any helpful tools?
- SMAPI has a json validator that can help check if your json is formatted correctly. Be sure to select Content Patcher json format to make it even easier on you.
Notes
- * It took me a few hours to get MacOS, SMAPI, and Stardew Valley to all work together. In the end, I have to boot the game directly from the StardewModdingAPI executable. I hope when you read this that is working easier...
- ** I could not for the life of me find a document that stated what "Target" options are available to call for each Action. I found the author-guide/action-editdata.md to be the closest thing, but it was not clear to me what could be actioned upon or what entries were available for the user who uses the most base level game.
