Berwin Posted November 14, 2017 Share Posted November 14, 2017 Hi Would someone be able to make me a cleaning script to run every 960 seconds and remove 'rot' from ground, not inventories. Thank you. Link to comment Share on other sites More sharing options...
Serpens Posted November 14, 2017 Share Posted November 14, 2017 (edited) There could be two ways: Do you really want it the way you described? Or might it be more interesting, if any rot that laid 15 minutes on the ground, will disappear? So instead all disappearing at once, they will disappear individually. Edited November 14, 2017 by Serpens Link to comment Share on other sites More sharing options...
Berwin Posted November 14, 2017 Author Share Posted November 14, 2017 (edited) To be honest I asked for help getting lists of items to become perishable and someone was kind enough to provide this and it's working beautifully. The problem is perished items are becoming rot. Ideally I want them to disappear instead. I don't understand how to change the bit about onperishreplacement. I tried removing the line but the item would then just stop perishing when it gets low. Another side note, while certain items are in your inventory you see the perishing % and it not until you equip an axe for example and actually use it then you get to see its remaining item uses. Same with torch which is a bit worrying sometimes Can this be improved? Ideally the perishing % could be removed completely and the green background getting lower is enough. Also why do items like cut stone not have the green background? Some do some don't. local addperish = { ["silk"] = GLOBAL.TUNING.PERISH_FAST , ["twigs"] = GLOBAL.TUNING.PERISH_SLOW , } for k,v in pairs(addperish) do AddPrefabPostInit(k or "",function(inst) if inst.components.perishable==nil then inst:AddComponent("perishable") end inst.components.perishable:SetPerishTime(v) inst.components.perishable:StartPerishing() inst.components.perishable.onperishreplacement = "spoiled_food" end) end Edited November 14, 2017 by Berwin Link to comment Share on other sites More sharing options...
Serpens Posted November 15, 2017 Share Posted November 15, 2017 (edited) I think the easiest way would be to change "spoiled_food" into "ash" ? that will dissappear when laying on the ground Edited November 15, 2017 by Serpens Link to comment Share on other sites More sharing options...
spideswine Posted November 15, 2017 Share Posted November 15, 2017 Or make birds eat rot(like seeds laying on the ground), there's also a mod that does that with several items, so should be easy to copy from. Link to comment Share on other sites More sharing options...
Berwin Posted November 15, 2017 Author Share Posted November 15, 2017 (edited) Blimey, yes turning things into ash would make sense. That never even occurred to me. Out of interest how would I add to the code to make birds eat rot? I'm still learning but it makes sense to go the ash route.Why also does cut stone not have a green 'perishing' background when in inventory like a lot of other items? Edited November 15, 2017 by Berwin Link to comment Share on other sites More sharing options...
Serpens Posted November 15, 2017 Share Posted November 15, 2017 2 hours ago, Berwin said: Blimey, yes turning things into ash would make sense. That never even occurred to me. Out of interest how would I add to the code to make birds eat rot? I'm still learning but it makes sense to go the ash route.Why also does cut stone not have a green 'perishing' background when in inventory like a lot of other items? There may be a wide range of confilcts when adding perishable to something that is not ment to be perishable. But in this case I think maybe the picture of stone is too big, so it covers the perishing background. Link to comment Share on other sites More sharing options...
Berwin Posted November 15, 2017 Author Share Posted November 15, 2017 Is it possible to change the above script so that weapon and armor, items with durability, have their durability drained over time instead of adding perishing to them? Link to comment 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