Jump to content

HELP! CUSTOM ITEM NOT WORKING


Recommended Posts

I see now the issue, working on a fix for it. It seems to be with how you added the recipe. You cannot add the recipe in the prefab of the file. It needs to be added in the modmain.lua file.

 

Here is the code which make it work.

 

modmain.lua

Assets = {
Asset("IMAGE", "images/inventoryimages/wand.tex"),
Asset("ATLAS", "images/inventoryimages/wand.xml" ),
}
 
local wand = Recipe("wand", {Ingredient("twigs", 1)}, GLOBAL.RECIPETABS.WAR,  GLOBAL.TECH.NONE)

wand.atlas = "images/inventoryimages/wand.xml"

 

Remove these two assets from your wand.lua and remove the recipe from wand.lua as well. It will work. Now you should be able to alter the wand.tex and wand.xml to your desires.

Edited by Kzisor
  • Like 1
Link to comment
Share on other sites

I see now the issue, working on a fix for it. It seems to be with how you added the recipe. You cannot add the recipe in the prefab of the file. It needs to be added in the modmain.lua file.

 

Here is the code which make it work.

 

modmain.lua

Assets = {
Asset("IMAGE", "images/inventoryimages/wand.tex"),
Asset("ATLAS", "images/inventoryimages/wand.xml" ),
}
 
local wand = Recipe("wand", {Ingredient("twigs", 1)}, GLOBAL.RECIPETABS.WAR,  GLOBAL.TECH.NONE)

wand.atlas = "images/inventoryimages/wand.xml"

 

Remove these two assets from your wand.lua and remove the recipe from wand.lua as well. It will work. Now you should be able to alter the wand.tex and wand.xml to your desires.

 

 

thank you sooooo much, it works, (it is invisible when held but hey!)

 

*i think i can fix this, i will add ALL assets from wand.lua to the modmain.lua*

Edited by mikey99222
  • Like 1
Link to comment
Share on other sites

thank you sooooo much, it works, (it is invisible when held but hey!)

 

*i think i can fix this, i will add ALL assets from wand.lua to the modmain.lua*

 

 

i have another broken mod 

(http://forums.kleientertainment.com/topic/50008-help-dont-starve-together-character-mod-help-needed/)

 

but i think i will try to fix, then i will learn, then i can help others too!

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