Jump to content

Recommended Posts

Posted

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.

Posted (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.

2467_3jZyEXperSxI5q4MGcP7.png.2efc53980c05af01efb04a2163728b41.png

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 by Brady_The
Posted

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...

Posted (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.

2468_98SA6g96IP889ilGtPJW.png.5025f4dce9bb73626ad0543d47fe19a2.png

mbkrecipes.zip

Edited by Brady_The
Posted (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 by Maldrak
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.