Burgersim Posted May 3, 2023 Report Posted May 3, 2023 (edited) Hi, I'm trying my hand at modding VintageStory to add some mod-compatibility to certain mods on my Server, but when I try to remove a recipe from a mod it doesn't work and tells me the path doesn't exist. I don't really see why tho, as I tried to use the format just as I saw it on the Wiki and in another mod. Can somebody tell me what I am doing wrong here? I'm basically (for testing) trying to remove the recipes for firewood from Primitive Survival, but i get this: 3.5.2023 13:34:36 [Error] Patch 1 (target: primitivesurvival:recipes/grid/firewood.json) in compatmod:patches/primitivesurvival/remove-firewood-in-grid.json failed because supplied path /1 is invalid: The json path /1 was not found. No such element '1' at the root path when I start the game with the patch enabled. The file path should actually be exactly the path to the recipe file tho and the recipe file has two entries... Oh btw this would be my patch file at the moment: [ { "file": "primitivesurvival:recipes/grid/firewood.json", "op": "remove", "path": "/0", "side": "server" }, { "file": "primitivesurvival:recipes/grid/firewood.json", "op": "remove", "path": "/1", "side": "server" } ] Edited May 3, 2023 by Burgersim
DArkHekRoMaNT Posted May 3, 2023 Report Posted May 3, 2023 What do you have in the recipe file you are patching?
DArkHekRoMaNT Posted May 3, 2023 Report Posted May 3, 2023 Nvm. Change /1 in the second to /0. You removed an array element, so now there is not two, but one element
Burgersim Posted May 3, 2023 Author Report Posted May 3, 2023 Oh so if I want to remove every entry it doesn't happen all at once but one after the other so the index decreases?
DArkHekRoMaNT Posted May 3, 2023 Report Posted May 3, 2023 You can also just add/change "enabled" to false in the recipe instead of removing it completely
Burgersim Posted May 3, 2023 Author Report Posted May 3, 2023 (edited) Ah ok thx So I would do something like this: { "file": "primitivesurvival:recipes/grid/firewood.json", "op": "add" "path": "/0", "value": "enabled: false", "side": "server" } Edited May 3, 2023 by Burgersim
DArkHekRoMaNT Posted May 3, 2023 Report Posted May 3, 2023 3 minutes ago, Burgersim said: Oh so if I want to remove every entry it doesn't happen all at once but one after the other so the index decreases? Or remove in reverse order: 1, 0 not 0, 1
Burgersim Posted May 3, 2023 Author Report Posted May 3, 2023 (edited) Hmm ok I tried it like this: { "file": "primitivesurvival:recipes/grid/firewood", "op": "add", "path": "/0/enabled", "value": false, "side":"server" } and that worked ^^ Edited May 3, 2023 by Burgersim
Burgersim Posted May 3, 2023 Author Report Posted May 3, 2023 (edited) Well it almost works now, but I still somehow have a recipe for Firewood that I'm not able to find. It seems to only use debarked Vanilla Logs, but no idea where it comes from. I was able to deeactivate every other instance of such recipes tho, thx Found the recipe, it was "hidden" inside a file that I wouldn't have assumed contained that recipe tbh Edited May 3, 2023 by Burgersim
Recommended Posts