Aurorance Posted April 5, 2021 Share Posted April 5, 2021 (edited) I am currently working on my character Gojo, recently I want to add a food type called "Curse" (that includes only nightmare fuels). I want to make Gojo can eat nightmare fuels by making his diet include the food type "Curse" also. I've looked for some tutorials making this but the server cannot open after I type the codings. It shows something like this (without telling me where the error is) Spoiler I've checked by myself that the error mainly comes from this chunk (since i removed this chunk and the character works normally) I want to know where the problem is. Thank you so much for the help ! orz Spoiler -- New Food Type AddPrefabPostInit("nightmarefuel", function(inst) if ThePlayer().prefab == "gojo" then inst.components.edible.foodtype = "CURSE" inst.components.edible.healthvalue = 10 inst.components.edible.hungervalue = 0 inst.components.edible.sanityvalue = 20 end end) modinfo.lua modmain.lua gojo.lua Edited April 5, 2021 by Aurorance Link to comment https://forums.kleientertainment.com/forums/topic/128655-custom-food-type-not-working/ Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now