Jump to content

Need a piece of code

Recommended Posts

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

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...



or change 25 to whatever you want and your done.

Link to comment
Share on other sites


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.

  • Create New...