Jump to content

Recommended Posts

I'm a newbie to modding and I'd like some help with the following character perks:

Character doesn't lose sanity in caves;

eating mushrooms gives double the hunger,sanity and health;

making a custom hat (that functions like a berry bush hat);

and how to make certain mobs passive to the character;

Also in what file do I need to put the coding related to perks?

(I'm using the extended character sample) 

 

thanks to anyone who decides to help 

 inst.components.sanity.night_drain_mult = .5     -I used this do half the sanity drain during the night; if your replace night with cave it MIGHT work

to make certain mobs passive to the character, I recommend digging through Webber's .lua and borrowing some of that code, modifying as needed (this can be found under don't_starve>data>scripts>prefabs)

as for adding custom items, there are many things that can easily go wrong- I finally have my custom items to work w out crashing, but the textures are invisible.

 

these traits need to be put under scripts>prefabs>"yourcharactersname"

make sure you add it under      local fn = function(inst)

20 hours ago, That_1Guy said:

 inst.components.sanity.night_drain_mult = .5     -I used this do half the sanity drain during the night; if your replace night with cave it MIGHT work

to make certain mobs passive to the character, I recommend digging through Webber's .lua and borrowing some of that code, modifying as needed (this can be found under don't_starve>data>scripts>prefabs)

as for adding custom items, there are many things that can easily go wrong- I finally have my custom items to work w out crashing, but the textures are invisible.

 

these traits need to be put under scripts>prefabs>"yourcharactersname"

make sure you add it under      local fn = function(inst)

Local fn? I'm using the same chracter sample and I dont see local fn

 thanks for the reply I will try that! I'm currently working on the art unfortunately I'm stumped on the hair I made a post about it here: 

I'm a complete newbie to modding so i guess naturally problems would occur.

Anyways thanks though! 

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