Jump to content

How to make custom craftable for my character item [its edible]???


Recommended Posts

In custom item, insert below line
if not TheWorld.ismastersim then
        return inst
    end

   

Spoiler

inst:AddComponent("edible")
    inst.components.edible.healthvalue = 1
    inst.components.edible.hungervalue = 1
    inst.components.edible.sanityvalue = 1
    inst.components.edible.foodtype = FOODTYPE.VEGGIE

 

Link to comment
Share on other sites

On 10/20/2022 at 3:41 PM, Haruhi Kawaii said:

In custom item, insert below line
if not TheWorld.ismastersim then
        return inst
    end

   

  Hide contents

inst:AddComponent("edible")
    inst.components.edible.healthvalue = 1
    inst.components.edible.hungervalue = 1
    inst.components.edible.sanityvalue = 1
    inst.components.edible.foodtype = FOODTYPE.VEGGIE

 

i have the codes
i just dont know how to make .tex file
and how to put my item in my survivor tab
annndd my item is smaller than a flower

Edited by HiraaCaan
Link to comment
Share on other sites

23 minutes ago, HiraaCaan said:

 

if you have installed Don't Starve Mod Tools then just put the png file in images folder and run DST it will convert from png to tex also you can also try ZTOOLS
Item is too small you should check in Spriter,  there is one more topic you should answer

 

 

Link to comment
Share on other sites

48 minutes ago, Haruhi Kawaii said:

if you have installed Don't Starve Mod Tools then just put the png file in images folder and run DST it will convert from png to tex also you can also try ZTOOLS
Item is too small you should check in Spriter,  there is one more topic you should answer

 

 

i have mod tools the problem is when i run the game its give a error about cant convert png

but now i tried its worked
ig its not worked because new update is coming 

you mean i should make it bigger in spriter? ok i'll try thanks for helping me! :3

Link to comment
Share on other sites

AddRecipe2(
    "YOURPREFAB",
    {Ingredient("YOURPREFAB2", 1, "images/inventoryimages/YOURPREFAB2.xml", "YOURPREFAB2.tex")},
    TECH.SCIENCE_TWO,
    {nil,
	image = "YOURPREFAB.tex", atlas = "images/inventoryimages/YOURPREFAB.xml"
	},
    {"CHARACTER"}
)

 

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