Search the Community
Showing results for tags 'community'.
-
This little project is to help beginners in coding by giving simple lines of code to help them out, i'll try to start them out by give some simple codes for perks/debuffs. these codes should be easily able to implement into their fan characters (these are food perks\debuffs) if inst.components.eater ~= nil then inst.components.eater:SetPrefersEatingTag("preparedfood") - (warly's debuff on only eating prepared foods) inst.components.eater.strongstomach = true - (webber's abilities to eat monster meat) inst.components.eater.ignoresspoilage = true - (wx's ability to ignore food spoilage) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ (this ones a bit more complicated but it't basically so that it has no hunger) (add this to your modmain) local function removeStomach(self, inst) if inst and inst.prefab == "your charcter's name" then self.brain:SetPosition(self.stomach:GetPosition()) --moves brain to where stomach was self.stomach:SetPosition(self.heart:GetPosition()) --moves stomach behind heart, JUST in case? inst:DoTaskInTime(1, function() self.stomach:Hide() end) inst:ListenForEvent("ms_playerspawn", function() self.stomach:Hide() end) inst:ListenForEvent("playeractivated", function() self.stomach:Hide() end) inst:ListenForEvent("ms_respawnedfromghost", function() self.stomach:Hide() end) inst:ListenForEvent("hungerdelta", function() self.stomach:Hide() end) end end AddClassPostConstruct("widgets/statusdisplays", removeStomach) (add this to your character) inst.components.hunger.DoDelta = function(self, delta, overtime, ignore_invincible) return end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- (these are for if you want special items) (examining and the name of your item) STRINGS.NAMES.your item = "name of your item" STRINGS.CHARACTERS.GENERIC.DESCRIBE.your item = "generic character thinks your item is good" STRINGS.RECIPE_DESC.your item = "your item good" (crafting your item) AddRecipe("item name", { Ingredient("type of ingredient 1", amount), Ingredient("type of ingredient 2", amount), }, RECIPETABS.MAGIC, TECH.NONE, nil, nil, nil, nil, 'the tag you select for your character', "images/inventoryimages/image name.xml") (i'm sorry if this is not alot i hope that the community can help out by giving out more codes,i'll add more as i can :p)