Jump to content

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
https://forums.kleientertainment.com/forums/topic/118225-need-a-piece-of-code/
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...

local TUNING = GLOBAL.TUNING

TUNING.WILLOW_LIGHTFIRE_SANITY_THRESH=25

or change 25 to whatever you want and your done.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...