cruelings Posted June 4, 2016 Share Posted June 4, 2016 I want to know how to give my custom character a sanity buff when she's in the graveyard biome, and how to give her a sanity decrease when she's around regular flowers, as well as a slight health decrease if she picks them or wears the flower crown. Thanks guys! I'm hopeless with coding! Link to comment https://forums.kleientertainment.com/forums/topic/67886-sanity-buff-in-graveyards-plus-flower-allergy-need-help/ Share on other sites More sharing options...
Mobbstar Posted June 4, 2016 Share Posted June 4, 2016 For the graves and flower sanity, you should edit the respective prefabs "mound" and "flower" using a "AddPrefabPostInit" for each. AddPrefabPostInit("flower", function(inst) inst.components.sanityaura.aura = -TUNING.SANITYAURA_SMALL end) AddPrefabPostInit("mound", function(inst) inst:AddComponent("sanityaura") inst.components.sanityaura.aura = TUNING.SANITYAURA_MED end) Link to comment https://forums.kleientertainment.com/forums/topic/67886-sanity-buff-in-graveyards-plus-flower-allergy-need-help/#findComment-779643 Share on other sites More sharing options...
cruelings Posted June 4, 2016 Author Share Posted June 4, 2016 (edited) Thank you so much! Where would I put that exactly? I've opened prefabs in the character's folder and the .lua file but all I see is a huge list of actions with their respective .zips. Edited June 4, 2016 by cruelings Link to comment https://forums.kleientertainment.com/forums/topic/67886-sanity-buff-in-graveyards-plus-flower-allergy-need-help/#findComment-779747 Share on other sites More sharing options...
Mobbstar Posted June 4, 2016 Share Posted June 4, 2016 1 hour ago, cruelings said: Where would I put that exactly? The modmain.lua in your mod, of course. Link to comment https://forums.kleientertainment.com/forums/topic/67886-sanity-buff-in-graveyards-plus-flower-allergy-need-help/#findComment-779768 Share on other sites More sharing options...
cruelings Posted June 5, 2016 Author Share Posted June 5, 2016 Sorry to be a huge pain, but my modmain.lua looks like this and I'm not sure at all where those lines of code are supposed to go. Do I put them just anywhere? Link to comment https://forums.kleientertainment.com/forums/topic/67886-sanity-buff-in-graveyards-plus-flower-allergy-need-help/#findComment-779896 Share on other sites More sharing options...
Mobbstar Posted June 5, 2016 Share Posted June 5, 2016 6 hours ago, cruelings said: Do I put them just anywhere? Yes. Just try first of all. Your PC won't explode if you make a tiny mistake. Link to comment https://forums.kleientertainment.com/forums/topic/67886-sanity-buff-in-graveyards-plus-flower-allergy-need-help/#findComment-779989 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