Page 1 of 1

Is it possible to remove alien relics from the earth with a terminal command?

Posted: Mon Apr 22, 2024 8:44 am
by urethrasave
Because there are so many alien objects on the ground, my game is experiencing noticeable frame rate slowdowns during biter assaults. Since it's simply a startup setting, I wasn't aware that I could limit their drops to spawners. As a workaround, I was expecting there might be a terminal command that would allow me to completely delete them. I really need a way to get rid of the dang things since I'm making more than I'll probably ever need to use, but I don't want to restart a game that I've spent so much time on.

Re: Is it possible to remove alien relics from the earth with a terminal command?

Posted: Mon Apr 22, 2024 1:59 pm
by Silari
If you want to destroy all items on the ground -

Code: Select all

/c for _, item in pairs(game.player.surface.find_entities_filtered{name="item-on-ground"}) do item.destroy() end

If you want to destroy only items on the ground that contain a specific item (like the alien relics):

Code: Select all

/c for _, item in pairs(game.player.surface.find_entities_filtered{name="item-on-ground", has_item_inside=game.item_prototypes["pistol"]}) do item.destroy() end
just replace the "pistol" part with the name of the item you want to delete - "alien-artifact" or something similar probably, not sure of the name of Bobs stuff off the top of my head. You can look up the names with the Prototype Explorer in factorio - Ctrl+Shift+E