goldfish911 Posted November 27, 2013 Share Posted November 27, 2013 Alright. So I had some crashy issues, which should be fixed, but now I am confused. How do I make a sanity gain from spiders, in this case, specific only to my character? I tried overwriting the sanity aura from spiders in spider.lua, but that just made all characters get sanity gain from them, obviously. Also, how do I implement sanity drain during the day and sanity gain during the night?I tried this inst.components.sanity_day_gain = -5inst.components.sanity_night_mid = +5inst.components.sanity_night_dark = +20 But I think I botched it. Didn't I?Should it be like this instead?inst.components.sanity_day_gain = -5/(day_time*32)inst.components.sanity_night_mid = +5/(night_time*20)inst.components.sanity_night_dark = +20(night_time*2)I will be thankful for any and all help. Link to comment https://forums.kleientertainment.com/forums/topic/30030-how-to-tweak-sanity-auras-of-monsters-for-my-character-onlyadd-sanity-drain-during-daygain-at-night/ Share on other sites More sharing options...
Malacath Posted November 28, 2013 Share Posted November 28, 2013 I'm sorry but it looks like you're just making up variables in hopes of them doing something. None of the components you modified exists and if they would exist they would certainly not work like that.What you'll need to do is hook into the spider prefab and listen for "dusktime" and "daytime" events and change the sanityaura accordingly. You can find tons of examples on how to listen for these events in the vanilla files and also on the forum.And for modifying sanity auras, I'd suggest simply using multiples of the existing tuning variables (as seen in spider.lua)I can't give you any code samples right now though. Link to comment https://forums.kleientertainment.com/forums/topic/30030-how-to-tweak-sanity-auras-of-monsters-for-my-character-onlyadd-sanity-drain-during-daygain-at-night/#findComment-379531 Share on other sites More sharing options...
goldfish911 Posted December 1, 2013 Author Share Posted December 1, 2013 I'm sorry but it looks like you're just making up variables in hopes of them doing something. None of the components you modified exists and if they would exist they would certainly not work like that.What you'll need to do is hook into the spider prefab and listen for "dusktime" and "daytime" events and change the sanityaura accordingly. You can find tons of examples on how to listen for these events in the vanilla files and also on the forum.And for modifying sanity auras, I'd suggest simply using multiples of the existing tuning variables (as seen in spider.lua)I can't give you any code samples right now though.I figured out how to modify tuning variables for sanity auras, but how do I go about sanity drain during the day? I wasn't making up random variables, I was referring to to the values in tuning.lua, but that obviously doesn't work. Should I code a custom component or overwrite the sanity component to include drain during the day? On second thought, I should probably look at the sanity component. Right? I hate writing on forums because I think while typing and change my mind mid-paragraph. Link to comment https://forums.kleientertainment.com/forums/topic/30030-how-to-tweak-sanity-auras-of-monsters-for-my-character-onlyadd-sanity-drain-during-daygain-at-night/#findComment-381566 Share on other sites More sharing options...
goldfish911 Posted December 1, 2013 Author Share Posted December 1, 2013 Figured it out! Just added inst.components.sanity.dapperness = TUNING.CRAZINESS_SMALLAnd that did it! Link to comment https://forums.kleientertainment.com/forums/topic/30030-how-to-tweak-sanity-auras-of-monsters-for-my-character-onlyadd-sanity-drain-during-daygain-at-night/#findComment-381595 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now