Jump to content

Recommended Posts

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

@violetines

I think it's just this line.

inst.components.sanity.night_drain_mult = TUNING.WENDY_SANITY_MULT

WENDY_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 

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