violetines Posted July 19, 2015 Share Posted July 19, 2015 Hi there, I've created my own character mod with a custom hat. Everything seems to be working, however I can't seem to get my head around adding perks to her. The perk I am hoping to add is she loves the darkness, so she has a small increase in sanity during the night. I know Wendy has a similar perk, but I don't know how to include hers into my own and tweak it. I usually get an error. Some guidance would be wonderful, I'll include my characters prefab! violet.lua Link to comment https://forums.kleientertainment.com/forums/topic/56306-help-with-sanity-perk/ Share on other sites More sharing options...
Blueberrys Posted July 19, 2015 Share Posted July 19, 2015 @violetinesI think it's just this line.inst.components.sanity.night_drain_mult = TUNING.WENDY_SANITY_MULTWENDY_SANITY_MULT is 0.75 so the total value is reduced when multiplied. Portion of sanity.lua for reference: if day then light_delta = TUNING.SANITY_DAY_GAIN else local highval = TUNING.SANITY_HIGH_LIGHT local lowval = TUNING.SANITY_LOW_LIGHT if lightval > highval then light_delta = TUNING.SANITY_NIGHT_LIGHT elseif lightval < lowval then light_delta = TUNING.SANITY_NIGHT_DARK else light_delta = TUNING.SANITY_NIGHT_MID end light_delta = light_delta*self.night_drain_mult end Link to comment https://forums.kleientertainment.com/forums/topic/56306-help-with-sanity-perk/#findComment-655720 Share on other sites More sharing options...
violetines Posted July 20, 2015 Author Share Posted July 20, 2015 Hmm, I'm not sure where I've gone wrong. I've included that line and the character still has a sanity drain at night, rather than an increase. :s Link to comment https://forums.kleientertainment.com/forums/topic/56306-help-with-sanity-perk/#findComment-655918 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