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 Share on other sites More sharing options...
seronis Posted March 2, 2015 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 Link to comment 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 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 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 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 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 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 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 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 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 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 Share on other sites More sharing options...
WalrusMan Posted March 15, 2015 Author Share Posted March 15, 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 )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. Link to comment 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 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 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 Share on other sites More sharing options...
Recommended Posts
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.