Sign in to follow this  
MrStealYoKills

Ground Item Removal Mod?

Recommended Posts

Me and a friend are year 2 autumn, and after spending the summer in caves, and having bearger run through a forest. There are a lot of items in the cave, and overworld. I as the host am getting major fps lag down to 30 fps or less. I have uninstalled the food values mod, and item values as I know what they do. I was wondering if their is a mod out there that will delete items above ground/ in caves after they have been left for a certain amount of time. (I couldn't find one, but I think I remember my friend using it when he used to host.) Any other suggestions to decrease this fps lag would be great, (Also I do have quite a beefy computer, that runs arma 3, and such at 60 fps +)

Share this post


Link to post
Share on other sites
fimmatek    3,890

I think this mod does what you're looking for: https://steamcommunity.com/sharedfiles/filedetails/?id=597417408

I only used its world cleaning part, but that was working perfectly. You can also adjust it in the mod settings (what items to delete, or how many of each items are allowed to remain on the ground), furthermore you can customise it by editing the mod files themselves (so you can add/remove/adjust items that weren't even on the list).

  • Like 1

Share this post


Link to post
Share on other sites
Mooagain    2,015

If you get far enough into the ruins, you could get a lazy forager. Those pick up everything on the ground for you.

Edited by Mooagain
  • Like 1
  • Haha 1
  • Confused 1

Share this post


Link to post
Share on other sites
Ezaroth    1,112

The More Stack Size mod has the option to stack nearby items together, might help with the logs and similar situations.

Share this post


Link to post
Share on other sites
__IvoCZE__    7,269
10 hours ago, MrStealYoKills said:

Me and a friend are year 2 autumn, and after spending the summer in caves, and having bearger run through a forest. There are a lot of items in the cave, and overworld. I as the host am getting major fps lag down to 30 fps or less. I have uninstalled the food values mod, and item values as I know what they do. I was wondering if their is a mod out there that will delete items above ground/ in caves after they have been left for a certain amount of time. (I couldn't find one, but I think I remember my friend using it when he used to host.) Any other suggestions to decrease this fps lag would be great, (Also I do have quite a beefy computer, that runs arma 3, and such at 60 fps +)

Yeeeah, since that you had an item values mod installed for like a year, It looks like your world is going to lag permanently.

Share this post


Link to post
Share on other sites
fimmatek    3,890
8 hours ago, SinancoTheBest said:

The item you're looking for is Lazy Forager. Lazy Explorer is the upgrade to the walking cane that lets you teleport to your desired spot on your screen. The forager is really convenient, especially when you are mass chopping or mining but I hardly ever use it because unlike Magiluminescence you can't refuel it and the item expires in just 250 item pickups, I only make one for the cave pits and keep the rest of my orange gems for Lazy Deserters. I wish it was refuelable, would have seen much more usage from me. Never played long enough where I amassed so many orange gems to make lazy forager expandable.

And it picks up stacked items one by one instead of the whole stack in one go, making it even less effective. 

Furthermore, it doesn't really save you time with all the rot, twigs and such that piles up in the world, sadly. 

  • Like 1

Share this post


Link to post
Share on other sites
7Meias    245

Not really a mod but if you know how to use commands, you can also copy paste this 
 

for k,v in pairs(Ents) do if v.prefab == "prefab" then v:Remove() end end

in your console~  (just substitute 'prefab' with what you want to remove)


Only note worth pointing, tho, is that it'll delete all instances of the item left on the world so think about it throughly or use the command on the next post, written by @cezarica. Tho, Logs are easily repleshined, for example, so I personally dont feel the need to worry much about them
As an example, to delete these, youd need to write

for k,v in pairs(Ents) do if v.prefab == "log" then v:Remove() end end

 

Edited by 7Meias
a better warning was followed, so i edited accordingly in case other people come to the thread in the future ^^

Share this post


Link to post
Share on other sites
cezarica    503

Using the command @7Meias suggested will also remove stuff from players inventory and chests, not only from the world. Instead uses something like this:

for k,v in pairs(Ents) do if v.prefab == "prefab" then if not (v.components.inventoryitem ~= nil and v.components.inventoryitem.owner~= nil) then v:Remove() end end end

Don't forget to replace "prefab" with something you actually want to remove from the world

Another option so you don't to mess with the command multiple times would be to create your own personalized customcommands.lua that will put on the server in Master and Caves folder with some custom commands in it for easy access to server admins, for example we have one to remove a bunch of stuff like this:

local function hasValue(tab, item)
    local match = false
    for key, value in pairs(tab) do
        if (value == item) then
            match = true
            break
        end
    end
    return match
end

function m_cleanup()
    local prefabs = {
        --"spoiled_food", "boneshard", "stinger", "seeds",
        "spoiled_food", "stinger", "seeds",
        
        -- Boats debris
        "boatfragment01", "boatfragment02", "boatfragment03", "boatfragment04", "boatfragment05"
        -- Winter event
        --"winter_food1", "winter_food2", "winter_food3", "winter_food4", "winter_food5",
        --"winter_food6", "winter_food7", "winter_food8", "winter_food9"
    }
    local count = 0
    for k,v in pairs(Ents) do
        if (hasValue(prefabs, v.prefab)) then
            if not (v.components.inventoryitem ~= nil and v.components.inventoryitem.owner~= nil) then
               v:Remove()
               count = count + 1
            end
        end
    end
    ThePlayer.components.talker:Say(string.format("Cleared %s", count))
end

And from in-game console I just do 'm_cleanup()' (be sure to send it to Remote and not Local) and it will remove "spoiled_food", "stinger", "seeds", and boat debris in the world. The last line makes your character say how many prefabs have been removed.

If you don't like this then you can use this code (I think i got this for CarlZalph, don't recall right now):

function m_clean(prefab)
    if type(prefab) == "string" then
        local count = 0
        for k, v in pairs(Ents) do
            if v and prefab and v.prefab == prefab then
                if v.components and v.components.inventoryitem and v.components.inventoryitem.owner == nil and ((v.components.stackable and v.components.stackable.stacksize == 1) or v.components.stackable == nil) then
                    v:Remove()
                    count = count + 1
                end
            end
        end
        ThePlayer.components.talker:Say(string.format("Cleared %s stacks of %s", count, prefab))
    end
end

function m_cleanall(prefab)
    if type(prefab) == "string" then
        local count = 0
        for k, v in pairs(Ents) do
            if v and prefab and v.prefab == prefab then
                if v.components and v.components.inventoryitem and v.components.inventoryitem.owner == nil then
                    v:Remove()
                    count = count + 1
                end
            end
        end
        ThePlayer.components.talker:Say(string.format("Cleared %s %s", count, prefab))
    end
end

First removes stacks of given prefab name and the second doesn't care if it's in a stack or not.

Edited by cezarica
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this