Pangu90 Posted May 13, 2020 Share Posted May 13, 2020 Hey there! I'm trying to give my character Willow's perk to set fires when sanity is below 50%. I think I've found the right code, however I'm new to this and when I insert it to my character, it crashes. Also, I'd like my char to set fires when below 25% sanity, not 50. Can you help? P.S.: What would really be cool if thic mechanic triggered when going to sleep. But as far as I know, tweaking the sleep mechanic is difficult. Link to comment https://forums.kleientertainment.com/forums/topic/118225-need-a-piece-of-code/ Share on other sites More sharing options...
Feanara Posted June 10, 2020 Share Posted June 10, 2020 Can we see the code you have so far? Link to comment https://forums.kleientertainment.com/forums/topic/118225-need-a-piece-of-code/#findComment-1341147 Share on other sites More sharing options...
Nappy Posted July 16, 2020 Share Posted July 16, 2020 You need to change willows threshold for creating fires, its in the scripts>components>firebug.lua. In this lua file, it references self.inst.components.sanity:GetPercent() < TUNING.WILLOW_LIGHTFIRE_SANITY_THRESH on line 9. So all you need to do is in your modmain.lua write... local TUNING = GLOBAL.TUNING TUNING.WILLOW_LIGHTFIRE_SANITY_THRESH=25 or change 25 to whatever you want and your done. Link to comment https://forums.kleientertainment.com/forums/topic/118225-need-a-piece-of-code/#findComment-1354448 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