GamerLadyAnny Posted June 14, 2019 Share Posted June 14, 2019 I'd like to know if is possible to make the following itens unperishable: honey batilisk wing brainy matter bramble bulb butter butterfly wings koalefant trunks glowberry light bulb lichen limpets coffee beans coconut crop seeds seeds mussel petals powdercake preety parasol fashion mellon royal jelly floral shirt flytrap stalks garland glommer flower tea coffee ham bat tropical parasol ice cube iced tea wet goop I use all dlc for dont starve + a mod for having the bee queen, thus askinf for the royal jelly too Link to comment https://forums.kleientertainment.com/forums/topic/107526-help-w-changing-perishabes/ Share on other sites More sharing options...
Kimdstb Posted June 20, 2019 Share Posted June 20, 2019 --Yes. c: Put this in your modmain.lua. It makes honey non-perishable. --making things perishable local function RemovePerishablePostInit(inst) inst:RemoveComponent("perishable") end AddPrefabPostInit("honey", RemovePerishablePostInit) --[[ Now for every other prefab you want to make perishable, call this function again, but replace the word in quotes with the prefab name of the perishable item. You can get the prefab name of the item in the Don't Starve Wiki. ]] --this is for the garland AddPrefabPostInit("flowerhat", RemovePerishablePostInit) Link to comment https://forums.kleientertainment.com/forums/topic/107526-help-w-changing-perishabes/#findComment-1212003 Share on other sites More sharing options...
Ultroman Posted June 24, 2019 Share Posted June 24, 2019 (edited) Here's a nice way of setting up changing many prefabs using the same code: local prefabs_to_alter = { "honey", "corn", } for i, v in ipairs(prefabs_to_alter) do AddPrefabPostInit(v, function(inst) if inst.components.perishable then inst:RemoveComponent("perishable") end end) end Edited June 24, 2019 by Ultroman Link to comment https://forums.kleientertainment.com/forums/topic/107526-help-w-changing-perishabes/#findComment-1213607 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