Rosten Posted December 4, 2013 Share Posted December 4, 2013 The title may be a bit confusing, but how would i add a reduce-spoilage effect on a certain characters inventory, e.g whenever they have food in their inventory, it reduces spoilage by X time, or however the icebox calculates it in the code, im pretty new to the character modding aspect of this, so some explanation would be nice. Link to comment https://forums.kleientertainment.com/forums/topic/30179-how-to-add-a-icebox-function-to-a-characters-inventory/ Share on other sites More sharing options...
Rosten Posted December 4, 2013 Author Share Posted December 4, 2013 Nothing? eh, maybe once snow-chester (if he) comes out there'll be some more info on this, oh well :/ Link to comment https://forums.kleientertainment.com/forums/topic/30179-how-to-add-a-icebox-function-to-a-characters-inventory/#findComment-383740 Share on other sites More sharing options...
simplex Posted December 4, 2013 Share Posted December 4, 2013 (edited) Nothing? eh, maybe once snow-chester (if he) comes out there'll be some more info on this, oh well :/inst:AddTag("fridge")Replace inst with GetPlayer() if appropriate.Coding snow chester would be a feat sung by bards throughout the land! EDIT: To see how it's done, check the Update() function in components/perishable.lua. You'll see that perish rate multipliers are very much hardcoded, so getting an effect more flexible than that would likely require some serious overriding of the functions in perishable.lua. Edited December 4, 2013 by simplex Link to comment https://forums.kleientertainment.com/forums/topic/30179-how-to-add-a-icebox-function-to-a-characters-inventory/#findComment-383800 Share on other sites More sharing options...
Rosten Posted December 4, 2013 Author Share Posted December 4, 2013 inst:AddTag("fridge")Replace inst with GetPlayer() if appropriate.Coding snow chester would be a feat sung by bards throughout the land! EDIT: To see how it's done, check the Update() function in components/perishable.lua. You'll see that perish rate multipliers are very much hardcoded, so getting an effect more flexible than that would likely require some serious overriding of the functions in perishable.lua. Thanks! That was... to say a lot less complicated then i thought it would be, granted not very flexible, but it will surely work for the purpose needed Link to comment https://forums.kleientertainment.com/forums/topic/30179-how-to-add-a-icebox-function-to-a-characters-inventory/#findComment-383809 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