Jump to content

Recommended Posts

I'm adding new items to my mod like feathers and stuff, but the prefab's icon won't show up in the crafting menu.

93fe93f002cd6af6431e6f8729330519.pngad80a10463b9f18a179af1bcb11d9012.png

I have a code to add these prefabs, obviously.

	local raspberry = GLOBAL.Ingredient( "raspberry", 8)  
	local feather_loon = GLOBAL.Ingredient( "feather_loon", 4)  
	local feather_loonhat = GLOBAL.Ingredient( "feather_loon", 2)  
	raspberry.atlas = "images/inventoryimages/raspberries.xml"
	feather_loon.atlas = "images/inventoryimages/feather_loon.xml"
	feather_loonhat.atlas = "images/inventoryimages/feather_loon.xml"

I'm still unsure what I'm doing wrong.

I never added new prefabs myself, but did you add the recipes like in this example? :
 

local blowdart_healthrecipe = AddRecipe("blowdart_health", {Ingredient("cutreeds", 2), Ingredient("medkit_med", 1,"images/inventoryimages/medkit_med.xml"), Ingredient("feather_robin", 1)}, GLOBAL.RECIPETABS.WAR, GLOBAL.TECH.SCIENCE_ONE, nil, nil, nil, nil, "medic", "images/inventoryimages/blowdart_health.xml")

notice that the new ingredient "medkit_med", again has a link to xml file
(taken from Medic mod)

Edited by Serpens

Either

local raspberry = GLOBAL.Ingredient("raspberry", 8)
local feather_loon = GLOBAL.Ingredient("feather_loon", 4)
local feather_loonhat = GLOBAL.Ingredient("feather_loon", 2)
raspberry.atlas = GLOBAL.resolvefilepath("images/inventoryimages/raspberries.xml")
feather_loon.atlas = GLOBAL.resolvefilepath("images/inventoryimages/feather_loon.xml")
feather_loonhat.atlas = GLOBAL.resolvefilepath("images/inventoryimages/feather_loon.xml")

or

local raspberry = GLOBAL.Ingredient("raspberry", 8, "images/inventoryimages/raspberries.xml")
local feather_loon = GLOBAL.Ingredient("feather_loon", 4, "images/inventoryimages/feather_loon.xml")
local feather_loonhat = GLOBAL.Ingredient("feather_loon", 2, "images/inventoryimages/feather_loon.xml")

 

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