Delete Empty Chunks

by Strath

Delete chunks which contain no player entities, configurable chunk radius & paving detection

Utilities
3 years ago
0.15 - 1.1
13.2K

g When pressing the button does it do all the deletion, or does it ask stuff?

5 years ago
(updated 5 years ago)

The latest thing I could find here on that is 1 year and 7 months old, so...And I don't want to delete everything, just some chunks beyond a radius

5 years ago

Could I do a thing like, delete all chunks not revealed by radar? That would be perfect.

5 years ago
(updated 5 years ago)

If you mean all chunks hidden by fog-of-war then here is a console command. Save first, single player only, use carefully, not responsible for loss, etc...

/c local p=game.player local s,n=p.surface,0 for c in s.get_chunks()do if not p.force.is_chunk_visible(s,c)then s.delete_chunk({c.x,c.y}) n=n+1 end end game.print("Deleted: "..n)

5 years ago

Not hidden? No, I'd want to delete the ones that are hidden by fog-of-war

5 years ago
(updated 5 years ago)

Ya, typos happen. Of course I meant "hidden". Would be kind of silly otherwise.

New response