Hial Posted November 19, 2014 Share Posted November 19, 2014 hi is my first time modding a character in Don't Starve,I saw a lot of tutorials and started programing, but...I'd like to know if it's possible to do something such specific as"loose sanity if, not having a shovel in the inventory" how can I do that? is that even possible?if you could help me I would appreciate a lot thanks for the help!! Link to comment Share on other sites More sharing options...
seronis Posted November 19, 2014 Share Posted November 19, 2014 1. run a timer2. check inventory for presence (or lack) of shovel3. adjust stats Link to comment Share on other sites More sharing options...
Mobbstar Posted November 19, 2014 Share Posted November 19, 2014 In your player data, you should have a "local function fn()" which has an "end" at its ...end, unsuprisingly. Put something like this into that function, ideally near the end:inst.components.sanity.custom_rate_fn = function(inst) if not inst.components.inventory:Has("shovel") then return -.5 --this is the rate at which the guy goes mad (additional to normal rate) endendI haven't tested that myself, so it may have a syntax error or something. Serionis' method is more complicated than it needs to be, but it should work too 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.