Jump to content

Help w/ Catcoon Sanity Gain Perk?


Recommended Posts

Hello! I'm currently working on a custom DST character mod, and I have everything working except for the perk(s), which I have... next to no idea how to code.

Basically, I was hoping to have my character gain sanity from being near catcoons, similarly to how most monsters' auras drain sanity, but with a positive effect.

I've tried looking in various .lua files to study the other characters' perks, but I'm not finding much of use, and I'm afraid to fiddle with any code when I have literally no idea what works and what doesn't. My first thought was to look in Wolfgang's .lua because of the drain he gets at night and around monsters, but...

"inst.components.sanity.night_drain_mult = 1.1"

I don't know if this is what I'm looking for, nor do I know how I would change this to fit what I need.
"inst.components.sanity.catcoon_gain_mult = 1.3" ?
I feel like that wouldn't work, but if it does, can someone please let me know?

Any and all help is appreciated, thank you!

Link to comment
Share on other sites

The sanity aura is not sourced from the characters, it's sourced from the objects emitting the aura. Those objects have the 'sanityaura' component, with a specific value set for it. To add that aura to catcoons, you'll need to add that component using 'AddPrefabPostInit'.


This will affect all characters, however. To make the effect specific to your character, more shenanigans will be required.

Sorry I've not in to more detail, I'm too tired to investigate this fully.


PS. This forum is technically meant only for mods for the singleplayer version, but whatever.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

  • Create New...