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 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 Share on other sites More sharing options...
Ultroman Posted June 24, 2019 Share Posted June 24, 2019 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 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.