Jump to content

How to create a knapping recipe


Recommended Posts

Hello everybody I want to create a new item "kunai " but i don't know how it works to create a knapping recipe.

I have already created the following pattern

         "____##____",
        "___####___",
        "__######__",
        "_########_",
        "__######__",
        "___####___",
        "____##____",
        "____##____",
        "___####___",
        "____##____"

in the file recipes/knapping/kunai.json

Can someone help me ?

Link to comment
Share on other sites

What's the issue at hand, here? Would you create a custom mod and don't know how that works, have you already created a kunai item, is something unclear about the recipe .json, or did you do that all and there's an error when you try to load the game? Also, please post your full "kunai.json" file. (In general, I can only recommend referring to the existing game assets you can find in the installation directory under "assets", and refer to the "Game Content Modding" on the main wiki page.)

  • Thanks 1
Link to comment
Share on other sites

In fact, I want to create a custom mod and I'm currently looking at the wiki page and in the code files to learn how it works. 
Currently I've created the Kunai object, i.e. the model, the texture and the itemtypes as you can see in the folder that I attached to this message.
My problem here is that I'd like my Kunai to be crafted (knapping) as the exact same way that we can craft knife blade/axe head/spear head etc... using stones and/or flint. I already looked for recipes on the main wiki page but I wasn't able to find any about knapping. 
So far I have only managed to create a grid recipe.

Thank you for helping, 

Fox

kunaiMod.zip

Link to comment
Share on other sites

I noticed you had a line in your recipe file like this:

ingredient: { type: "item", code: "kunai", name: "rock", allowedVariants: ["obsidian", "flint"] },

This means the ingredient item for knapping would be the item you're trying to craft. If you want to have your crafted from both flint and stone, you'll have to make two different recipes, and therefore two different files.

ingredient: { type: "item", code: "stone-obsidian" },
ingredient: { type: "item", code: "flint" },

The "name" entry is only useful when you use the variant in the recipe output, like the stone knife recipe does for example. And I have a feeling the inclusion of flint in the allowed variants is an error. As you can see, flint is a completely different item.

Other than that, I can only recommend to keep your mod folder name ("assets/kunaiMod"), and other asset filenames ("assets/kunaiMod/shapes/item/kunaiModel.json") all lowercase, as it will otherwise cause issues on other operating systems, which are case-sensitive. And you will need to get rid of the extra "kunaiMod" folder in the .zip file for the game to recognize and load it. To do that, instead of selecting the folder "kunaiMod" and creating a .zip file, go into the folder, select all files, and then create a .zip file from those (you can rename and move it after).

Edited by copygirl
  • Thanks 1
Link to comment
Share on other sites

  • 8 months later...

I'd like a little more detail about this as I've had similar issues when trying to create a flint and stone-obsidian sawblade.

everything looked like it worked I got no error messages but when I go to knap the sawblade head doesn't show up.

{
    ingredient: { type: "item", code: "flint" },
    pattern: [[
        "__________",
        "___#______",
        "__##__#___",
        "___#__#___",
        "__##__##__",
        "___#__#___",
        "__##__##__",
        "___#__#___",
        "__##__##__",
        "__________"
    ]],
    name: "Flint sawblade",
    output: { type: "item", code: "sawblade-flint"  }
}

{
    ingredient: { type: "item", code: "stone-*", name: "rock", allowedVariants: ["obsidian", "flint"] },
    pattern: [[
        "__________",
        "___#______",
        "__##__#___",
        "___#__#___",
        "__##__##__",
        "___#__#___",
        "__##__##__",
        "___#__#___",
        "__##__##__",
        "__________"
    ]],
    name: "stone sawblade",
    output: { type: "item", code: "sawblade-{rock}"  }
}

 

I basically used the axe/hatchet as a guide and it too had obsidian and flint in the stone section as well as a different recipe for flint by itself. I found this as odd but figured there was a reason behind it but as you said maybe it's just an error so I'll remove flint from the variants section of the stone version but I still have the issue of it simply not showing up as an option when you place down flint or obsidian for knapping. I even had a shape for it but the part that got confusing and the reason why I didn't think it was working is because of this coming part of the code.

... weird I can't find the files that were confusing me. as I looked through everything it looked like I should have no trouble making a recipe for it I guess I would just have to create a second grid recipe or maybe add another option in the existing grid recipe for saw that would use material instead of metal 

[
{
    ingredientPattern: "T    S",
    ingredients: {
        "T": { type: "item", code: "sawblade-*", name: "metal"  },
        "S": { type: "item", code: "stick" }
    },
    width: 1,
    height: 2,
    output: { type: "item", code: "saw-{metal}", quantity: 1  }
},
{
    ingredientPattern: "T    S",
    ingredients: {
        "T": { type: "item", code: "sawblade-*", name: "material"  },
        "S": { type: "item", code: "stick" }
    },
    width: 1,
    height: 2,
    output: { type: "item", code: "saw-{material}", quantity: 1  }
}
]

material would cover the flint and stone variants of the saw.

 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
 Share

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