WalrusMan Posted March 1, 2015 Share Posted March 1, 2015 Is there a way to give my character a sanity boost from fishing? If there is, please tell me? Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/ Share on other sites More sharing options...
seronis Posted March 2, 2015 Share Posted March 2, 2015 (edited) Yes. sanity.lua. It has a hook that lets you inject a function to be used to modify sanity based on whatever conditions you deem appropriate Edited March 2, 2015 by seronis Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-618427 Share on other sites More sharing options...
WalrusMan Posted March 2, 2015 Author Share Posted March 2, 2015 Yes. sanity.lua. It has a hook that lets you inject a function to be used to modify sanity based on whatever conditions you deem appropriate(Hehe, hook.) Can you tell me exactly how to make it so I can get a sanity boost from fishing? Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-618429 Share on other sites More sharing options...
Mobbstar Posted March 2, 2015 Share Posted March 2, 2015 Listen for the fishingcollect event. e.g.:inst:ListenForEvent("fishingcollect",function() inst.components.sanity:DoDelta(10) end) Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-618583 Share on other sites More sharing options...
WalrusMan Posted March 2, 2015 Author Share Posted March 2, 2015 Listen for the fishingcollect event. e.g.:inst:ListenForEvent("fishingcollect",function() inst.components.sanity:DoDelta(10) end)Where would I type this? Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-618634 Share on other sites More sharing options...
Mobbstar Posted March 2, 2015 Share Posted March 2, 2015 Where would I type this? In your characters main function, where you presumably set the unique stats, minimap icon, voice, etc. Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-618636 Share on other sites More sharing options...
WalrusMan Posted March 2, 2015 Author Share Posted March 2, 2015 Ah, thanks.Another thing, I typed in the... thing (in prefabs) for my character to not get get walrus aggro (if that's the right word) but it doesn't work. Do you know the correct... thing? (This is my first mod, so I know almost nothing. ) Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-618637 Share on other sites More sharing options...
The Noon Fish Posted March 14, 2015 Share Posted March 14, 2015 Ah, thanks.Another thing, I typed in the... thing (in prefabs) for my character to not get get walrus aggro (if that's the right word) but it doesn't work. Do you know the correct... thing? (This is my first mod, so I know almost nothing. )try addinginst:AddTag("walrus")to the fn in the character's prefab. (i did this with merms for my character, so merms just stare at my character ) Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-621699 Share on other sites More sharing options...
WalrusMan Posted March 14, 2015 Author Share Posted March 14, 2015 try addinginst:AddTag("walrus")to the fn in the character's prefab. (i did this with merms for my character, so merms just stare at my character )Really? Where would I type that? Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-621708 Share on other sites More sharing options...
Kzisor Posted March 14, 2015 Share Posted March 14, 2015 @WalrusMan, your characters main function. Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-621710 Share on other sites More sharing options...
WalrusMan Posted March 14, 2015 Author Share Posted March 14, 2015 @WalrusMan, your characters main function.Mine says modmain. I'm assuming that's it? Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-621711 Share on other sites More sharing options...
Kzisor Posted March 14, 2015 Share Posted March 14, 2015 Mine says modmain. I'm assuming that's it? No, you put it in the same place as you put the line for listening for the event for fishing. Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-621718 Share on other sites More sharing options...
WalrusMan Posted March 15, 2015 Author Share Posted March 15, 2015 (edited) try addinginst:AddTag("walrus")to the fn in the character's prefab. (i did this with merms for my character, so merms just stare at my character )That didn't work. I typed it in and the game crashed with the log saying something like Could not load character. Maybe inst:AddTag("walrusfriend") would work?I know walruses have ("houndfriend") so I thought of that. Edited March 15, 2015 by WalrusMan Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-621906 Share on other sites More sharing options...
The Noon Fish Posted March 15, 2015 Share Posted March 15, 2015 That didn't work. I typed it in and the game crashed with the log saying something like Could not load character. Maybe inst:AddTag("walrusfriend") would work?I know walruses have ("houndfriend") so I thought of that.im not sure how that would workthat might work, but can you send the log thou?it might of been a typo Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-621910 Share on other sites More sharing options...
Kzisor Posted March 16, 2015 Share Posted March 16, 2015 @WalrusMan, I'm almost 100% certain that inst:AddTag did not crash your game. 100% of the 'entities' in Don't Starve can have tags. Make sure you aren't adding it to a component or widget as those cannot have tags to my knowledge. Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-622073 Share on other sites More sharing options...
WalrusMan Posted March 16, 2015 Author Share Posted March 16, 2015 @WalrusMan, I'm almost 100% certain that inst:AddTag did not crash your game. 100% of the 'entities' in Don't Starve can have tags. Make sure you aren't adding it to a component or widget as those cannot have tags to my knowledge.Meh. I typed it under my components along with the ListenForFishingThing. Link to comment https://forums.kleientertainment.com/forums/topic/51631-sanity-boost-from-fishing/#findComment-622104 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