Jump to content

Recommended Posts

So i've been building up my character with his own sort of uniqueness along with some uniqueness from other mods and the base characters.. however I'd love for him to haev a sort of unique.. item to start with/be able to craft.. How would i go about, taking something already in the game.. recoloring it.. and renaming it / recipies.. that only he can craft?

Link to comment
https://forums.kleientertainment.com/forums/topic/71299-custom-itemtool/
Share on other sites

For editing existing textures I recommend looking into a custom character/item tutorial where custom textures are explained.

For recipes that can only be used by your character, you will need to give him a custom tag:

--in masterpostinit of yourcharacter.lua
inst:AddTag("myawesomecharacter") --you can name this whatever you want, but if it uses the same name as other existing tags it can cause issues.

Then you will need to add a custom recipe into your modmain.lua

local Ingredient = GLOBAL.Ingredient

local customrecipe = AddRecipe("itemprefabhere", {Ingredient("cutgrass", 3),Ingredient("carrot", 2), Ingredient("berries", 6)}, GLOBAL.RECIPETABS.TOWN, GLOBAL.TECH.SCIENCE_ONE, "yourtagnamehere", nil, nil, 1, nil, "images/inventoryimages/yourprefabicon.xml", "youprefabicon.tex")

You can see existing recipes if you want to know stuff like tab names : Don't Starve Together/data/scripts/recipes.lua

Edited by DarkKingBoo

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