Jump to content

Recommended Posts

hi :)

 

is my first time modding a character in Don't Starve,

I saw a lot of tutorials and started programing, but...

I'd like to know if it's possible to do something such specific as

"loose sanity if, not having a shovel in the inventory"

 

how can I do that? is that even possible?

if you could help me I would appreciate a lot

 

 

thanks for the help!!

In your player data, you should have a "local function fn()" which has an "end" at its ...end, unsuprisingly. Put something like this into that function, ideally near the end:

inst.components.sanity.custom_rate_fn = function(inst)    if not inst.components.inventory:Has("shovel") then        return -.5 --this is the rate at which the guy goes mad (additional to normal rate)    endend

I haven't tested that myself, so it may have a syntax error or something.

 

Serionis' method is more complicated than it needs to be, but it should work too

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