Jump to content

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!

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.

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