Jump to content

Recommended Posts

  Hi, so I'm currently working on a character mod and have come to a bit of a halt. I need to make unique consumable potion items that you can craft specifically with said character, but I can't seem to find any tutorials specifically for custom consumable items. Can anyone point me to one? If so that'd be great help, thanks.

Link to comment
Share on other sites

Well, question before I start to try and help you, with custom consumables do you want it to just be like eating something, or something you use like a spider gland or honey poultice?


I guess it'd be like spider glands or honey poultice.

Link to comment
Share on other sites

Alright, lets see here... take a look at spidergland.lua in dontstave/data/scripts/prefabs/spidergland.lua and that will give you an idea on what to do to make a useable item.


As for making it craftable for only one character, you could make a new crafting tab for potions or character specific items and look at how the books tab for wickerbottom is implemented for an idea on how to do it. Let me see if I can locate where that is at.


What exactly are you wanting the potion to do?

Link to comment
Share on other sites


Make a prefab mod (see prefab portion of these samples) and give it a healer component.

-- In the prefab's create fn, where inst refers to the prefab instanceinst:AddComponent("healer")

For food-like consumables, you would use the edible component instead.


Edit: To make it only usable by your character, I think you just need to add the characterspecific component.

Link to comment
Share on other sites


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.

  • Create New...