Darkshard Posted February 18, 2015 Share Posted February 18, 2015 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 More sharing options...
bigpak Posted February 18, 2015 Share Posted February 18, 2015 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? Link to comment Share on other sites More sharing options...
Darkshard Posted February 18, 2015 Author Share Posted February 18, 2015 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 More sharing options...
bigpak Posted February 18, 2015 Share Posted February 18, 2015 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 More sharing options...
Blueberrys Posted February 18, 2015 Share Posted February 18, 2015 @DarkshardMake 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.inst:AddComponent("characterspecific")inst.components.characterspecific:SetOwner("your_char_prefab") Link to comment Share on other sites More sharing options...
Darkshard Posted February 18, 2015 Author Share Posted February 18, 2015 I want a few different potions that have varying effects, though from my knowledge they could all be applied in similar fashion. I want them to give you unique temporary stat boosts and for one of them to heal you. Link to comment Share on other sites More sharing options...
Blueberrys Posted February 18, 2015 Share Posted February 18, 2015 @Darkshard Since you're making potions, you might wanna have a look at these mods. You can check their code and see how they implement it. 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.