1- Load map on a linux machine running headless factorio server
2- Connect to server with a windows 11 machine
3- Run /c game.surfaces[1].clear(true)
It's likely to desync instantly. Sometimes the surface needs to be cleared multiple times. In some situations getting a desync is more reliable if the seed is changed before clearing the surface.
/c local surface = game.surfaces[1] local mgs = surface.map_gen_settings mgs.seed = math.random(1111, 99999999) surface.map_gen_settings = mgs
Steps 1 and 2 are important. I couldn't get a desync running multiple instances on the same machine. As far as I can tell toggle-heavy-mode doesn't detect anything either.
freeplay.lua is altered. The following is added to it. Removing request_to_generate_chunks seems to fix the issue.
Code: Select all
script.on_event(defines.events.on_surface_cleared,
function(event)
game.surfaces[1].request_to_generate_chunks({0, 0}, 6)
game.surfaces[1].force_generate_chunk_requests()
end)
script.on_event(defines.events.on_chunk_generated,
function(event)
global.chunk_area = event.area
global.set_water_shallow = {}
global.water_count = 0
for k, tile in pairs (game.surfaces[1].find_tiles_filtered{name = { "water", "deepwater" }, area = global.chunk_area}) do
global.water_count = global.water_count + 1
global.set_water_shallow[global.water_count] = {name = "water-shallow", position = tile.position}
end
game.surfaces[1].set_tiles(global.set_water_shallow)
end)