Search the Community
Showing results for tags 'custom items'.
Found 2 results
Hello! I'm pretty new to modding, and was wondering if it's possible to make items uncraftable when sanity is below a certain threshold? Later I would like to translate that to "dark energy" which is a custom meter that I made for my character. The code I've been fiddling around with: inst:DoPeriodicTask(5, function() local old = inst.replica.builder.CanLearn local de = inst.components.darkenergy:GetPercent() function inst.replica.builder:CanLearn(recname) if forbidden1 [recname] and de < .40 then return false elseif forbidden2 [recname] and de < .30 then return false elseif forbidden3 [recname] and de >=.40 then return old(self,recname) else return old(self,recname) end end end) I've gotten it to work where once de (dark energy) gets below 30, the recipes disappear, but I have issues with the recipes reappearing once de increases above 40. Any help/tips would be greatly appreciated!! Edit: I think I realized why the recipe won't reappear: they are taken out of the game until restart. Is there a way to lock recipes instead of taking them out completely?
I am in need of coding help! I want to make another new character and I noticed that a lot of people were getting help here so now I'm searching for help here. I've made a full custom character before but this new one will require a bit more coding that i do not have the knowledge to do. The Perks that i need help with: -Can make body armor like Wigfrid makes battle helmets. -He has extra room for items. (the extra slots appear on the side just like a backpack would give.) -He cannot wear any type of backpack (Krampus Sack, Piggy Back, Etc) and will do the same emote Wigfrid does when you try to make her eat fruits and vegetables if you try to make him wear a backpack. This extra thing i need isn't for this character, but i would still like to know how to remove the arm model that doesn't hold anything. Making a character only have one arm. EDIT: Thanks for the help so far! but i should've mentioned that i have no idea how to create custom armor. I'm looking into armor files to see if i can find anything though.