Jump to content

Recommended Posts

Hi, there! Does anyone know how to make a new crafting tab?

Also, I want to be able to craft my prefab "pencil_thibaud" but the game crashes everytime and tells me "[00:00:17]: [string "scripts/util.lua"]:450: Could not find an asset matching paperdrawing_builder in any of the search paths."

If I comment this code out it doesn't crash, so this seems to be the problem : (in my modmain)

-- Make a pencil
local Ingredient = GLOBAL.Ingredient
local af_rec = AddRecipe("pencil_thibaud", 
{Ingredient("charcoal", 8), Ingredient("log", 2)}, Ingredient("nigmtmarefuel", 2),
GLOBAL.RECIPETABS.SURVIVAL, GLOBAL.TECH.NONE, 
nil, nil, nil, nil, "paperdrawing_builder",
"images/inventoryimages/pencil_thibaud.xml", "pencil_thibaud.tex")
af_rec.sortkey = -2

I should probably note I did add

inst:AddTag("paperdrawing_builder")

to the main function of my charachted and I also have this in my modmain :

-- Make a Wurm
local Ingredient = GLOBAL.Ingredient
local af_rec = AddRecipe("wurm_thibaud", 
{Ingredient("cutgrass", 1), Ingredient("berries", 1)}, 
GLOBAL.RECIPETABS.SURVIVAL, GLOBAL.TECH.NONE, 
nil, nil, nil, nil, "paperdrawing_builder",
"images/inventoryimages/pencil_thibaud.xml", "pencil_thibaud.tex")
af_rec.sortkey = -3

which does work fine.

 

Any ideas? :) Thanks in advance :)

You borked your ingredients list.

{Ingredient("charcoal", 8), Ingredient("log", 2)}, Ingredient("nigmtmarefuel", 2),

should be

{Ingredient("charcoal", 8), Ingredient("log", 2), Ingredient("nightmarefuel", 2)},

 

Edited by DarkXero

Oh thanks, stupid of me not to have thought of that. :)

Edit: Now for some reason it doesn't properly use the crafting image I set up, even though it does work for the pencil_thibaud (see above code). I don't get it because I used it the same way. I took a png, put it in the inventoryimages, let the game compile it in .tex and .xml and have this code in modmain :

local Ingredient = GLOBAL.Ingredient
local af_rec = AddRecipe("wurm_thibaud", 
{Ingredient("cutgrass", 1), Ingredient("berries", 1)}, 
GLOBAL.RECIPETABS.SURVIVAL, GLOBAL.TECH.NONE, 
nil, nil, nil, nil, "paperdrawing_builder",
"images/inventoryimages/wurm_thibaud.xml", "wurm_thibaud.tex")
af_rec.sortkey = -3

But it uses the pencil image properly when changing "wurm_thibaud" to "pencil_thibaud" here (for the image). I've even tried a 64x64 image but it doesn't seem to make a difference

Edited by Thibooms

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...