Jump to content

Recommended Posts

Hey, does somebody know how I can change sanity/insanity effects to be calculated by precise points instead of %. E. g. one of my modded character got a max.sanity of 250,but at 150 my screen already getting thouse typicall "insanity" effects i. g blurred borders and so on... 

 

So at the end it should be like this: Starting insanity effects at ~70 sanity points.

 

I tryed to google some solutions but couldnt find anything usefull, the only thing I did find, was this:

 

thread http://forums.kleientertainment.com/topic/33162-mod-help-sanityinsanity-changing-health-and-hunger-stats/

You can change insanity effects to be active at a certain percent, but not a specific value. Correct?

 

If so, you can still pull off your sanity effects at a specific value. 70 / 250 = 0.28, so the insanity effects should become active at 28% in order for them to happen once your sanity reaches 70.

Edited by DragonDePlatino

First of all, thank you for responding :)

hm k, so how do I set this up? the only thing I have related to sanity is a "if sanity low function, -> toggle night vision"

 

 

 

local function sanitylow(inst, data)
 
if inst.components.sanity.current <= 40 then
inst.Light:Enable(false)
end
 
if inst.components.sanity.current > 110 then
inst.Light:Enable(true)

 

 

Sorry, mate! I've got some general programming knowledge but I haven't started on my lua skills yet. You'll need to wait for someone else's help if you need to get any code-related issues out of the way.

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