Krougal Posted August 7, 2025 Report Posted August 7, 2025 (edited) I am trying to change the recipes involving the large chromium tanned hide to use 2 chromium sulfate and 2 wax instead of 3. I also have some normal recipes in the mod which are working, so the basic mod structure is all there and working. These are the relevant files I created in my mod: \assets\cutthehides\recipes\patches\recipes-cooking-hide-chromium.json [ { "op": "replace", "path": "/server/chromium tanned large hide/chromium sulfate/0/ingredients/0/minQuantity", "value": 2 "file": "game:recipes/cooking/hide-chromium.json" }, { "op": "replace", "path": "/server/chromium tanned large hide/chromium sulfate/0/ingredients/0/maxQuantity", "value": 2 "file": "game:recipes/cooking/hide-chromium.json" } ] \assets\cutthehides\recipes\patches\recipes-cooking-leather.json [ { "op": "replace", "path": "/server/leather-sturdy-plain/wax/0/ingredients/0/minQuantity", "value": 2 "file": "game:recipes/cooking/leather.json" }, { "op": "replace", "path": "/server/leather-sturdy-plain/wax/0/ingredients/0/maxQuantity", "value": 2 "file": "game:recipes/cooking/leather.json" } ] It doesn't error, but it doesn't work. Edited August 7, 2025 by Krougal
Brady_The Posted August 7, 2025 Report Posted August 7, 2025 (edited) Your paths are wrong. "server" doesn't exist in any recipe I know of. Both recipe files are arrays (square brackets). The way you navigate through arrays is with array indices. Note: Array counts start at 0 not 1. You just have to take the most direct path to the keys you want to change, no need for detours. Spoiler Exemplary path visualisation: [ { "op": "replace", "path": "/0/ingredients/0/minQuantity", "value": 2 "file": "game:recipes/cooking/hide-chromium.json", "side": "Server" }, { "op": "replace", "path": "/0/ingredients/0/maxQuantity", "value": 2 "file": "game:recipes/cooking/hide-chromium.json", "side": "Server" } ] and [ { "op": "replace", "path": "/0/ingredients/0/minQuantity", "value": 2 "file": "game:recipes/cooking/leather.json", "side": "Server" }, { "op": "replace", "path": "/0/ingredients/0/maxQuantity", "value": 2 "file": "game:recipes/cooking/leather.json", "side": "Server" } ] should do the trick. I can highly recommend https://mods.vintagestory.at/show/mod/513 when working with patches. It is a great debugging tool showing you exactly what your patches are doing. Edited August 7, 2025 by Brady_The
Krougal Posted August 7, 2025 Author Report Posted August 7, 2025 Nope on either account. I tried a few variations as well. Tried adding , after the value too. I am not getting anything in the debug log either, and I followed the directions.
Brady_The Posted August 7, 2025 Report Posted August 7, 2025 (edited) 20 minutes ago, Krougal said: Nope on either account. I tried a few variations as well. Tried adding , after the value too. I am not getting anything in the debug log either, and I followed the directions. It seems to be working for me. Spoiler Edited August 7, 2025 by Brady_The
Brady_The Posted August 7, 2025 Report Posted August 7, 2025 (edited) 4 minutes ago, Krougal said: My file paths are ok? I don't know what you mean with that. Have you looked into the spoiler in my first comment and changed your patches accordingly? Edit: Yeah, the file paths are okay. Edited August 7, 2025 by Brady_The
Krougal Posted August 7, 2025 Author Report Posted August 7, 2025 2 minutes ago, Brady_The said: I don't know what you mean with that. Have you looked into the spoiler in my first comment and changed your patches accordingly? Yes. I'm talking about the physical folder paths \mod.zip\assets\domain\recipes\patches\patch.json
Brady_The Posted August 7, 2025 Report Posted August 7, 2025 (edited) 5 minutes ago, Krougal said: Yes. I'm talking about the physical folder paths \mod.zip\assets\domain\recipes\patches\patch.json Ah, you are talking about the path of the actual patch file. This is the wrong place for patches. They belong in "\mod.zip\assets\domain\patches", no matter what file you are patching. The navigation to the changed file (and thus the form of asset (blocktypes, recipes, shapes, etc)) happens in the patch file itself with the property of the "file" key. Edited August 7, 2025 by Brady_The 1
Krougal Posted August 7, 2025 Author Report Posted August 7, 2025 Yeah, as soon as I did that, I got it to throw errors. Thanks for your help! 1
Recommended Posts