Maldrak Posted November 24, 2024 Report Posted November 24, 2024 I am trying to create a simple little mod that will turn redwood quarter blocks into standard redwood blocks. The code is as follows { "ingredientPattern": "L", "width": 1, "height": 1, "shapeless": true, "ingredients": { "L": { "type": "block", "code": "game:logsection-placed-redwood-ne-ud" }, }, "output": { "type": "block", "code": "game:log-placed-redwood-ud" "quantity": 1 } } I have checked all the brackets, commas, etc as well as I can, but the dang thing just won't work. Any help would be appreciated.
Brady_The Posted November 24, 2024 Report Posted November 24, 2024 (edited) 1 hour ago, Maldrak said: I am trying to create a simple little mod that will turn redwood quarter blocks into standard redwood blocks. The code is as follows { "ingredientPattern": "L", "width": 1, "height": 1, "shapeless": true, "ingredients": { "L": { "type": "block", "code": "game:logsection-placed-redwood-ne-ud" }, }, "output": { "type": "block", "code": "game:log-placed-redwood-ud", "quantity": 1 } } I have checked all the brackets, commas, etc as well as I can, but the dang thing just won't work. Any help would be appreciated. You are missing a comma after "code": "game:log-placed-redwood-ud" (You could also delete the comma highlighted in red, but that's not the culprit here.) More often than not, server-main.text/.log or client-main.text/.log will contain helpful hints. It's never a bad idea to have them opened while working on a mod. You could also use a text and source code editor that allows syntax highlighting. Notepad++ should have that. You may have to install the JSONTools plugin to get error highlighting, though. I personally don't use N++ much, so I don't have any experience here. Nice idea, btw. I am not a huge fan of those quarter logs. Haha Edited November 25, 2024 by Brady_The
Maldrak Posted November 25, 2024 Author Report Posted November 25, 2024 Still not working. I'm no longer getting Exception: Requested asset [mbkrecipes:recipes/grid/redwoodconvert.json] could not be found at Vintagestory.Common.FolderOrigin.LoadAsset(IAsset asset) in VintagestoryLib\Common\FileIO\Origins\FolderOrigin.cs:line 54 at Vintagestory.Common.AssetManager.GetMany(String partialPath, String domain, Boolean loadAsset) in VintagestoryLib\Common\FileIO\AssetManager.cs:line 348 at Vintagestory.Common.AssetManager.GetMany[T](ILogger logger, String fullPath, String domain) in VintagestoryLib\Common\FileIO\AssetManager.cs:line 356 at Vintagestory.ServerMods.GridRecipeLoader.LoadGridRecipes() in VSEssentials\Loading\GridRecipeLoader.cs:line 40 at Vintagestory.ServerMods.GridRecipeLoader.AssetsLoaded(ICoreAPI api) in VSEssentials\Loading\GridRecipeLoader.cs:line 33 at Vintagestory.Common.ModLoader.TryRunModPhase(Mod mod, ModSystem system, ICoreAPI api, ModRunPhase phase) in VintagestoryLib\Common\API\ModLoader.cs:line 632 that I was getting before, but still nothing happens when I put the quarter log in the window. mod shows up in the mod manager window, and the path for the recipe is Mods\mbkrecipes.zip\assets\mbkrecipes\recipes\grid I also have recipepatcher mod in there to see if that would help, and get an [Event] that it started, but not one for my mod, if that matters. Or I could just be an idiot...
Brady_The Posted November 25, 2024 Report Posted November 25, 2024 (edited) There shouldn't be any need for a recipepatcher mod. How does your mod folder structure look? It should look like this: mbkrecipes.zip ├ modinfo.json └ assets └ mbkrecipes └ recipes └ grid └ redwoodconvert.json Nothing more, nothing less. mbkrecipes.zip Edited November 25, 2024 by Brady_The
Maldrak Posted November 25, 2024 Author Report Posted November 25, 2024 (edited) Finally got it to work, thanks for the help. Also looked at the modinfo.json and had it originally as universal cause not sure why, copied it from another mod. Changed it to client, wondering if that was my problem all along. <Edit> So, turns out that one of the things I needed to do was remove the capital letters in my modinfo.json. Go figure that that's likely the thing that messed it all up. In the world where nowadays case doesn't matter, here it does. Lesson well learned for sure. </Edit> Edited November 25, 2024 by Maldrak
Recommended Posts