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 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 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 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.