Jump to content

how to use vanilla inventory image in mod crafting recipe


Recommended Posts

I thougt it would be the same as in DS:

 

local lightberry = AddModRecipe("lightberry", {Ingredient("lightbulb", 8)}, RECIPETABS.LIGHT, TECH.SCIENCE_TWO)
lightberry.product = "wormlight"
lightberry.image = "wormlight.tex"
lightberry.numtogive = 3
STRINGS.NAMES.LIGHTBERRY = "Wormlight x 3"
STRINGS.RECIPE_DESC.LIGHTBERRY = "Now I see you"

Did you tried it that way too?

  • Thanks 1
Link to comment
Share on other sites

the recipe code is different than the dont starve one it looks like this is the way i have it

AddRecipe("goldnugget2",
{
GLOBAL.Ingredient("goldnugget", 1),
},
GLOBAL.RECIPETABS.REFINE, GLOBAL.TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "goldnugget.tex")

when I put the "goldnugget.tex" which for mod image usually would be like " "images/inventoryimages/goldnugget2.xml" " but it crashes saying

" Could not find an asset matching goldnugget.tex in any of the search paths. "

im guessing it is impossible to use vanilla inv img for mod recipe then that sucks but thank you for your help friend

Link to comment
Share on other sites

Okay, it in nearly the same thing.

the params the function will have are 

name, ingredients, tab, level, placer, min_spacing, nounlock, numtogive, builder_tag, atlas, image, testfn, product, build_mode, build_distance

so you put your "goldnugget.tex" in the "altlas" position, but ist must go in the next one, the image. please set is with my example code eg

myGoldnugget = AddRecipe(...)
myGoldnugget.image = "..."

 

or find out the atlas name and add it instead (not sure if thats the correct altas name):
 

AddRecipe("goldnugget2",
{
GLOBAL.Ingredient("goldnugget", 1),
},
GLOBAL.RECIPETABS.REFINE, GLOBAL.TECH.SCIENCE_TWO, nil, nil, nil, nil, nil,"goldnugget.xml", "goldnugget.tex")
Edited by krylincy
  • Thanks 1
Link to comment
Share on other sites

i tried the thing you did i put no xml or text thing and just do

goldnugget2.image = "goldnugget.tex" and made recipe have local name goldnugget2 and it looking like it works you helped me a lot thank you couldnt do it without your help :D

  • Like 1
Link to comment
Share on other sites

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
 Share

×
  • Create New...