QuickShot010 Posted September 14, 2014 Share Posted September 14, 2014 I can't seem to make anything work...Can anyone help? Link to comment Share on other sites More sharing options...
_Q_ Posted September 14, 2014 Share Posted September 14, 2014 I can't seem to make anything work...Can anyone help? Don't expect someone to help you when you didn't provide any detials on the problem and didn't upload what you have done so far.Your thread is pure spam without that info and code. Link to comment Share on other sites More sharing options...
QuickShot010 Posted September 14, 2014 Author Share Posted September 14, 2014 Don't expect someone to help you when you didn't provide any detials on the problem and didn't upload what you have done so far.Your thread is pure spam without that info and code. Sorry, you are right. The problem i have is making the armor craftable. The other problem i have is the item has no logo in my inventory. Both of are them the same case: I have absolutely NO idea how to fix it. Link to comment Share on other sites More sharing options...
_Q_ Posted September 14, 2014 Share Posted September 14, 2014 Sorry, you are right. The problem i have is making the armor craftable. The other problem i have is the item has no logo in my inventory. Both of are them the same case: I have absolutely NO idea how to fix it.The inventory imge (I think that what you mean by logo) is in this example prefab:http://forums.kleientertainment.com/files/file/202-sample-mods/You need to declare image atlas in assets:Asset("ATLAS", "images/inventoryimages/mech_"..data.name.."_item.xml"),then use iinst:AddComponent("inventoryitem") inst.components.inventoryitem.atlasname = "images/inventoryimages/mech_"..data.name.."_item.xml" t in your prefab function Making something craftable you need to add things into your modmain file:local Ingredient = GLOBAL.Ingredientlocal RECIPETABS = GLOBAL.RECIPETABSlocal TECH = GLOBAL.TECHlocal mech_hay_item = GLOBAL.Recipe("mech_hay_item", {Ingredient("wall_hay_item", 1), Ingredient("goldnugget", 2),Ingredient("gears", 1)}, RECIPETABS.TOWN, TECH.SCIENCE_TWO, nil, nil, nil, 1)mech_hay_item.atlas = "images/inventoryimages/mech_hay_item.xml"something lile above but with your item and things needed to craft it Link to comment Share on other sites More sharing options...
Mobbstar Posted September 14, 2014 Share Posted September 14, 2014 Crafting (modmain.lua):local rep1= GLOBAL.Recipe("ARMOR", {Ingredient("marble", 4)}, GLOBAL.RECIPETABS.WAR, GLOBAL.TECH.SCIENCE_ONE)rep1.atlas = "images/INVENTORYICON.xml"Icon (Prefab file):local assets={--other stuff Asset("ATLAS", "images/inventoryimages/darktool_inv.xml"), Asset("IMAGE", "images/inventoryimages/darktool_inv.tex"),}--stufflocal function fn(Sim) local inst = CreateEntity() --stuff inst:AddComponent("inventoryitem") inst.components.inventoryitem.atlasname = "images/inventoryimages/darktool_inv.xml" inst.components.inventoryitem.imagename = "darktool_inv" --stuff return instendEDIT: Got ninja'ed Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.