Jump to content

How do I make a character lose sanity when around fire?


Recommended Posts

I know this probably sounds like a silly and rather basic question, but every time I try to look it up on a search engine or something all I get is people complaining about sanity loss instead of actual modding tips.

 

Also, another rather silly question; does anybody have a link to a good tutorial on how to make a character specific item and make sure it stays character specific?

Link to comment
Share on other sites

1) Pretty nice feature for a character! But how will the character spend the night times?..

There are many ways to do that. You can periodically check the area around the character for objects that are on fire (has specific burning tag). Check GetClosestInstWithTag, FindEntity functions and some finding behaviours, for instance scripts/behaviours/findlight.lua

 

2) For example of character specific item check Willow. She has a character specific item - lighter.

Basically you can add an item to character's inventory when the char first spawned in the world or add the item to world generating script for it to appear somewhere on the map.

Link to comment
Share on other sites

Have a look at Willow's prefab file. She gains sanity when near fires. Use that code and just substitute a negative sanity value. The character will lose sanity instead of gaining it. For coding character specific items, look at Willow's lighter prefab.

Link to comment
Share on other sites

Play wickerbottom. She seems to need to lose very little sanity for effects to appear. Eating spoiled foods will generally do it too but the foods have more impact with her. If you want easy insane winter nights, she the one to pick.

Link to comment
Share on other sites

Play wickerbottom. She seems to need to lose very little sanity for effects to appear. Eating spoiled foods will generally do it too but the foods have more impact with her. If you want easy insane winter nights, she the one to pick.

 

I am confident you meant to be helpful, but usually custom characters are made for either fun or for bringing that character to DS. Also, Mrs. Wickerbottom has more sanity to begin with, making it practically harder to go from perfectly sane to nuts and the other way round. She's not good if one needs to jump between those states regulary.

Link to comment
Share on other sites

Thank you so much for all your tips and suggestions! But I'm afraid I'm still a bit new at modding and many of these things baffle me. How do I add a sanity aura to something in the first place? I'm not sure what from sanityaura.lua I should implement and how. I'm also not sure how to make it specific to burning objects.

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