Jump to content

Recommended Posts

Posted

for some reason i cant get this fruittree pantograph recipe right. when viewing the cutting with H it crashes the  game but not with the  pantograph's they dont seem to  have the recipe. i cant seem to reference the pantographs in the recipe correctly. if anyone can lend a  hand would be great so i can get this version out 

woodenpantograph_1.3.5.zip

Posted

If i understand correctly, you're trying to move over the "metal" of the chisel to your output code?

In the "L" ingredient you should have a "name" field with "material" as the value.

Like so:

"L": {
	"type": "item",
	"code": "game:chisel-*",
	"name": "material",
	"quantity": 1,
	"isTool": true
}

 

You can then refer back to that value in your output code by entering the code like "chiseltools:pantograph-{material}"

Like so:

"output": {
	"type": "item",
	"code": "chiseltools:pantograph-{material}"
}

 

  • Like 2
Posted

lol when i did it the recipe no longer crashes the game but not it references the original chisel tools  metal ones :P  i need them to reference the fruitpantograph.json how would i do that?

Posted (edited)

Does that work?

 

{
    "ingredientPattern": "LH",
    "ingredients": {
        "L": {
            "type": "item",
            "code": "game:chisel-*",
            "quantity": 1,
            "isTool": true
        },
        "H": {
            "type": "block",
            "code": "game:fruittree-cutting-*",
	    "name": "type",
            "quantity": 1
        }
    },
    "width": 2,
    "height": 1,
    "output": {
        "type": "item",
        "code": "simplepantograph-{type}"
    }
}

 

Edited by Wondiws98
  • Like 2
Posted

i got this "[Warning] Failed resolving crafting recipe ingredient with code woodenpantograph:simplepantograph-{type} in Grid recipe
25.4.2025 11:29:15 [Error] Grid Recipe 'woodenpantograph:recipes/grid/fruitpantographs.json': Output Item code woodenpantograph:simplepantograph-{type} cannot be resolved"

 

could it have something to  do with the itemtype file?

Posted (edited)

Ok so after doing a little digging I've figured out that this isn't working because fruit cuttings doesn't have the "fruit" type stored as a variant. It is stored as an attribute.

This means that for this to work you will probably need to create a recipe for each fruit types.

Here is an example for red apple.

 

{
    "ingredientPattern": "LH",
    "ingredients": {
        "L": {
            "type": "item",
            "code": "game:chisel-*",
            "quantity": 1,
            "isTool": true
        },
        "H": {
            "type": "block",
            "code": "game:fruittree-cutting",
	    "attributes": {"type": "redapple"},
            "quantity": 1
        }
    },
    "width": 2,
    "height": 1,
    "output": {
        "type": "item",
        "code": "simplepantograph-redapple"
    }
}

 

Edited by Wondiws98
  • Like 2
Posted (edited)

Edit: Windows98 and my solution follow two slightly different approaches. Hers might be better under these circumstances.

Windows98 is on the right path, but it's a bit simpler regarding the recipes. You only need one. https://wiki.vintagestory.at/Modding:Grid_Recipes_Guide/en#Copying_attributes

Of course you'll have to adjust the itemtype file as well. I'd have a look at how shields do it.

Btw, I think you got a bit confused in your own files. Your original fruit tree recipe has this output.

"output": {
        "type": "item",
        "code": "chiseltools:pantograph-{*}"
    }

But your pantographs are in your own mod domain, not in "chiseltools", so the output would have failed here, if everything else would have been correct.

The fruit tree pantograph file has the code "simplepantograph" not "pantograph",  so the output would have failed here, if everything else would have been correct.

Giving the fruit tree pantographs individual names could prove challenging. I am not sure if the game is smart enough to append the tree species lang strings to modded items.

2749_Xg0hNcFY8D8VKM7L6DyP.gif

Edited by Brady_The
  • Like 2
Posted
31 minutes ago, Brady_The said:

Edit: Windows98 and my solution follow two slightly different approaches. Hers might be better under these circumstances.

Windows98 is on the right path, but it's a bit simpler regarding the recipes. You only need one. https://wiki.vintagestory.at/Modding:Grid_Recipes_Guide/en#Copying_attributes

Of course you'll have to adjust the itemtype file as well. I'd have a look at how shields do it.

Btw, I think you got a bit confused in your own files. Your original fruit tree recipe has this output.

"output": {
        "type": "item",
        "code": "chiseltools:pantograph-{*}"
    }

But your pantographs are in your own mod domain, not in "chiseltools", so the output would have failed here, if everything else would have been correct.

The fruit tree pantograph file has the code "simplepantograph" not "pantograph",  so the output would have failed here, if everything else would have been correct.

Giving the fruit tree pantographs individual names could prove challenging. I am not sure if the game is smart enough to append the tree species lang strings to modded items.

2749_Xg0hNcFY8D8VKM7L6DyP.gif

should be fixed now ^_^

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