Jump to content

Recommended Posts

In your character lua

 

inst.components.sanity.dapperness = TUNING.DAPPERNESS.MED*-1

-- where Tuning.Dapperness is your default (daytime) sanity loss/gain rate

-- this is adapted from the character waxwell.lua

-- Dapperness rates are shown in the Tuning.Lua file

 

        DAPPERNESS_TINY = 100/(day_time*15),
        DAPPERNESS_SMALL = 100/(day_time*10),
        DAPPERNESS_MED = 100/(day_time*6),
        DAPPERNESS_LARGE = 100/(day_time*3),
        DAPPERNESS_HUGE = 100/(day_time),

 

day_time default is 300* but is dependent on day segments (daylight time) so probably changes slightly

with seasons as the number of segments of day light increase and decrease.

At default day_time 'Tiny' comes out to 0.02 and 'Huge' comes out to 0.33

 

* 30 seconds per segment, 10 segments of daylight.

 

I think dapperness is the sanity change per real time second, and 30 real time seconds per day 'segment' resulting in 480 real time seconds per day, (300 in daylight by default).  At night the dapperness is affected by other factors and (while you might normally be gaining sanity) you loose sanity faster than any gain.

 

My point being at 'Tiny' there is (barring any other factors light night and monsters) a change of about 11 sanity per full day, 16 at 'Small', 27 at 'Med', 53 at 'Large' and 160 at 'Huge'.

 

 

inst.components.sanity.night_drain_mult = -0.5

-- multiplier for sanity drain at night, in theory the negative multiplier will result in sanity gain.

-- this is adapted from the character wolfgang.lua

-- be careful of this, the character might rapidly gain sanity just by standing in the pitch black

 

inst.components.sanity.neg_aura_mult = 1.0

-- multiplier for sanity drain around creatures (if you want a change in that)

-- this is adapted from the character wolfgang.lua

Edited by MidrealmDM

Thanks ! but the inst.components.sanity.dapperness = TUNING.DAPPERNESS.MED*-1 doesn't work ... it always crashes.

 

That may because it is a negative dapperness,

or maybe the format.

try this instead

inst.components.sanity.dapperness = (-TUNING.DAPPERNESS.MED)

That may because it is a negative dapperness,

or maybe the format.

try this instead

inst.components.sanity.dapperness = (-TUNING.DAPPERNESS.MED)

 

Doesn't work neither 

Edited by Prince143

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