Jump to content

Need help with mod character perks


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 

Link to comment
Share on other sites

 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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

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