Ayuros Posted January 18, 2015 Share Posted January 18, 2015 Hello, i tried to find out if this mod does exist, one mod who will check item unlooted and would delete it to ease the server.would be could if it had a configurable (after how many days the item gonna get deleted) Link to comment https://forums.kleientertainment.com/forums/topic/49343-mod-request-world-cleaner/ Share on other sites More sharing options...
rezecib Posted January 18, 2015 Share Posted January 18, 2015 @Ayuros, I don't know if there's a mod on the workshop that does it, but I did write something like this for my Director Maxwell mod (I'm still working on it):local deleteless = { spider = true, spider_warrior = true, hound = true, icehound = true, firehound = true, crawlinghorror = true, terrorbeak = true,}local deletemore = { spider = true, spider_warrior = true, hound = true, icehound = true, firehound = true, crawlinghorror = true, terrorbeak = true, silk = true, spidergland = true, monstermeat = true, houndstooth = true, redgem = true, bluegem = true,}local function CheckTurfRemove(object) local turf = GLOBAL.TheWorld.Map:GetTileAtPoint(object:GetPosition():Get()) if turf == 1 or turf > 12 then object:Remove() endendlocal function ClearMaze(more) local delete = more and deletemore or deleteless local ents = GLOBAL.TheSim:FindEntities(0, 0, 0, 9001) for k,v in pairs(ents) do if delete[v.prefab] and not v.inlimbo then CheckTurfRemove(v) elseif more and (v.prefab == 'nightmarefuel' and (not v.inlimbo) and math.random() < 0.05) then CheckTurfRemove(v) end endend This actually clears monsters and stuff too (whatever's in the delete list). You probably want something a little more like this, though:local dontdelete = { lighter = true, abigail_flower = true, cane = true, walrushat = true,}local function CleanGround() local ents = GLOBAL.TheSim:FindEntities(0, 0, 0, 9001) for k,v in pairs(ents) do if not dontdelete[v.prefab] and not v.inlimbo then v:Remove() end endendAddPrefabPostInit("world", function(inst) inst:DoPeriodicTask(30*16, CleanGround) end) You probably want to add more items to the dontdelete list, though (which prevents it from deleting certain valuable items like walking canes). 30*16 is one in-game day. Although I realized in retrospect that maybe what you want is more along the lines of deleting any item that's been on the ground for a certain amount of time? That's a more difficult task... Probably something you'd do by doing AddComponentPostInit("inventoryitem", fn), with a function that modifies the topocket and toground to start a cleanup task with the configured time-to-delete. Link to comment https://forums.kleientertainment.com/forums/topic/49343-mod-request-world-cleaner/#findComment-603435 Share on other sites More sharing options...
Ayuros Posted January 19, 2015 Author Share Posted January 19, 2015 Hi and thank you for the replyi'm dunno how to mod etc but yeah a simple mod who can delete trash (feather, flint, rotten eggs, rot) after 1 or 2 day would do the job i think Link to comment https://forums.kleientertainment.com/forums/topic/49343-mod-request-world-cleaner/#findComment-603808 Share on other sites More sharing options...
Maris Posted January 20, 2015 Share Posted January 20, 2015 @Ayuros, here is simple mod: TUNING.KRAMPUS_THRESHOLD = 1TUNING.KRAMPUS_THRESHOLD_VARIANCE = 0 Link to comment https://forums.kleientertainment.com/forums/topic/49343-mod-request-world-cleaner/#findComment-604032 Share on other sites More sharing options...
Ayuros Posted January 20, 2015 Author Share Posted January 20, 2015 yes but krampus might clean too well Link to comment https://forums.kleientertainment.com/forums/topic/49343-mod-request-world-cleaner/#findComment-604046 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