If you want to edit recipes in someone elses mod for personal use, here's how you do it.
1. Find the .json file where the mod stores the recipes. In my mod you can find the in the content.json at /VeganVanilla Recipes/ [CP] Vegan Vanilla Recipes/content.json. Mods tha add their own recipes need to add them via JSON Assets, so they'll be in a folder marked something along the line of: [JA] "Something, probably the mod name"/Objects/"Name of recipe".
2. Open that file in a basic texteditor. Or a more fancy one, wih added feature for coding if you want. I use Visual Studio Code because it catches some of my (many) sloppy errors.
3. Find the recipe you want to change. If you search my document for Lucky Lunch, this is what you'll find:{
I'm far from an expert at modding, so I'll just tell you that "Target" is which file in the original game that this code tries to edit. In this case the cooking recipes. Lucky Lunch is which recipe I'm editing. The 0 tells CP that I want to edit the ingredients used to make Lucky Lunch. Those are listed after the colon. I think you can write out the names of the ingredients, but most mods I've seen use the item-id:s. 268, for example, is starfruit, 229 is tortilla and 597 is blue jazz. So to make Lucky Lunch with my mod you need 1 starfruit, 1 tortilla and 1 blue jazz. Any other mod that edits vanilla recipes should look similar.
"Action": "EditData",
"Target": "Data/CookingRecipes",
"Fields": {
"Lucky Lunch": {
"0": "268 1 229 1 597 1"
}
}
},
If you're editing a recipe added with the help of JA it's gonna look a bit different. But you're looking for the word "Recipe" after that they'll list the ingredients. 'Object' is the item used and 'Count' how many you need. For example:"Recipe":
This recipe calls for 2 honey (340) and 1 wheat flour (246). And you can easily switch out the honey for maple syrup (724).
{
"ResultCount": 1,
"Ingredients": [
{
"Object": 340,
"Count": 2,
},
{
"Object": 246,
"Count": 1,
},
],
4. Use any site which lists the numbers for each item to see what it takes to make the recipe. Here's a link to one of them. Good item-id's to look for: milks (184, 186, 436, 438, 803), eggs (174, 176, 180, 182, 107, 289, 305, 442, 107). If you want a recipe to accept any milk or egg, you can change the milk to -6 and the egg to -5. That way the recipe will use vegan version of milk and eggs as well.
5. Change what you want to change.
6. Save the file, start your game and see if it worked.
2 comments
One of my mods was interfering with my crafting completion list, I found the mistake and thanks to your guide I was able to fix it.
Much appreciated ♥
nexus dosent do the spacing right