Hello everyone! I might want to skip to the point here, I'm making a character based on myself and I wanted to do some buffs for him involving Insanity and the like. I'll just post the perks that I currently have for him here:
1. Hates Spoilage - Caleb (My Character) will refuse to eat anything that is below the stale ranking of food, and will not eat rot either.
2. Benefits From Insanity - I'm planning that my character will get a health and damage boost when he starts to go insane. H
To do this kind of thing, in the past I would have used ListenForEvent to listen for any changes in the sanity (the sanitydelta" event), but since that event is fired any time a sanity change is applied, it is actually fired every single frame during dusk and night and when you're close to monsters with a negative sanity aura. Instead, I'd make it a task which handles all of this, that only runs every 0.5 to 1.0 seconds. In the template below, it runs every 0.5 seconds.
Here is a template f