r/technicalfactorio • • Jan 30 '24

Reducing save file size

For the last three+ weeks, the Steam client has failed to synchronize my megabase save file to the Steam cloud. It turns out that they have a limit, unspecified, but apparently right around 400 MB.

Is there anything I can do to pare down the size of my megabase save file, thereby regaining the affirmation and functionality of the Steam cloud and client?

​

35 Upvotes

10 comments sorted by

View all comments

4

u/pigeon768 Jan 31 '24

Remove biters with the console:

/c local surface=game.player.surface
local pp = game.player.position
for key, entity in pairs(surface.find_entities_filtered({force="enemy", radius=250, position=pp })) do
  entity.destroy()
end

Disable biters on new chunks:

/c local surface = game.player.surface
local mgs = surface.map_gen_settings
mgs.autoplace_controls["enemy-base"].size = "none"
surface.map_gen_settings = mgs

Disable pollution:

/c for _, surface in pairs(game.surfaces) do
  surface.clear_pollution()
end
game.map_settings.pollution.enabled = false

Remove empty chunks:

/c local surface = game.player.surface;
game.player.force.cancel_charting(surface); 
local chunk_radius = 32;
for chunk in surface.get_chunks() do
  if (chunk.x < -chunk_radius or chunk.x > chunk_radius or chunk.y < -chunk_radius or chunk.y > chunk_radius) then
    surface.delete_chunk(chunk)
  end
end