SevenIndex Posted April 7, 2025 Report Posted April 7, 2025 I'm updating my mod with new recipes and so far its been pretty straight forward. However, some of the recipes I've made (specifically to create Chests) seem to override the vanilla recipe despite me not telling it to do so. I'll keep plugging away it, but if someone more knowledgeable in modding could point out where I went wrong it'd be appreciated! Here's the code: Spoiler [ { "ingredientPattern": "B,K", "enabled": true, "shapeless": true, "ingredients": { "B": { "type": "item", "code": "game:axe-*", "isTool": true }, "K": { "type": "block", "code": "chest-east", attributes: { type: "normal-generic" }, "quantity": 1 } }, "width": 1, "height": 2, "output": { "type": "item", "code": "scrapplank", "quantity": 4 } }, { "ingredientPattern": "BK", "enabled": true, "shapeless": true, "ingredients": { "B": { "type": "item", "code": "game:saw-*", "isTool": true }, "K": { "type": "block", "code": "chest-east", attributes: { type: "normal-generic" }, "quantity": 1 } }, recipeGroup: 1, "width": 2, "height": 1, "output": { "type": "item", "code": "scrapplank", "quantity": 6 } } ]
Brady_The Posted April 7, 2025 Report Posted April 7, 2025 (edited) 3 hours ago, SevenIndex said: some of the recipes I've made (specifically to create Chests) seem to override the vanilla recipe despite me not telling it to do so. Overrides should only happen if you put the new recipe at the exact same path in your mod structure under the game domain as it can be found in Vanilla and give it the same name. In case of the chest that would be "sevenindexscrapmod\assets\game\recipes\grid\chest.json". It seems, though, that you are working from within your own mod domain. Because you are not prefacing your "scrapplank" item with your mod domain. "chest-east" are missing their game domains, though. Edited April 7, 2025 by Brady_The 1 1
SevenIndex Posted April 7, 2025 Author Report Posted April 7, 2025 Thank you! I didn't realize that having files with the same name and pathway would cause problems. Just changed the file names and it worked like a charm. 1
Brady_The Posted April 7, 2025 Report Posted April 7, 2025 (edited) 1 hour ago, SevenIndex said: I didn't realize that having files with the same name and pathway would cause problems. It's a very handy feature for when you actually want to overwrite assets. This works with everything, not just recipes. Also, as long as you keep to the overall file structure (grid recipes go in recipes\grid, etc) you can add as many subfolder as you want. You could, for example, create the structure "sevenindexscrapmod\assets\game\recipes\grid\scrapping", put the chest.json recipe into that folder and be completely fine. If you wanted to differentiate between materials you could create scrapping subfolders called "wood", "metal", etc. too. Edited April 7, 2025 by Brady_The
Neti Posted May 11, 2025 Report Posted May 11, 2025 I'll jump in with a question. There are many other recipes in the game's recipe file and I only want to overwrite one. If I create a file in my mod and enter only that one recipe, the rest of the recipes disappear in the game. Is there a way to overwrite this so that I don't have to copy all the recipes from the game?
Brady_The Posted May 14, 2025 Report Posted May 14, 2025 On 5/11/2025 at 11:43 AM, Neti said: I'll jump in with a question. There are many other recipes in the game's recipe file and I only want to overwrite one. If I create a file in my mod and enter only that one recipe, the rest of the recipes disappear in the game. Is there a way to overwrite this so that I don't have to copy all the recipes from the game? You want a patch to just edit the recipe in question. The game comes with a mod creator tool. Simply change the recipe in the recipes file to your liking, then execute ModMaker.exe found in the installation directory. That'll give you a complete mod which you can either use directly, or unpack the patch file within to include in any mod you might have already started. https://wiki.vintagestory.at/index.php/Modding:JSON_Patching 1
Neti Posted May 15, 2025 Report Posted May 15, 2025 Wow this is great. I saw on the wiki that it is but I didn't know how to run it. Thanks a lot for your help
Recommended Posts