Page 1 of 1

[Done] Water Question

Posted: Tue Jun 11, 2019 1:49 am
by TheSAguy
Is there a way to remove water from the game?

I tried brute force, but the game errors if there is no "water", "water-mud" or "water-shallow".

Code: Select all

-- Tiles to Remove
vanilla_tiles = {
    ["grass-1"] = true,
    ["grass-2"] = true,
    ["grass-3"] = true,
    ["grass-4"] = true,
    ["dirt-1"] = true,
    ["dirt-2"] = true,
    ["dirt-3"] = true,
    ["dirt-4"] = true,
    ["dirt-5"] = true,
    ["dirt-6"] = true,
    ["dirt-7"] = true,
    ["dry-dirt"] = true,
    ["red-desert-0"] = true,
    ["water-green"] = true,
    ["water"] = false,
    ["water-mud"] = false,
    ["water-shallow"] = false,
    ["deepwater"] = true,
    ["deepwater-green"] = true
}

local function remove_tile(tile_name)
	data.raw.tile[tile_name] = nil
end

local disable_unused_tiles = function()
	for _, tile_name in pairs(data.raw["tile"]) do
		if vanilla_tiles[tile_name.name] then
			remove_tile(tile_name.name)
		else
		end
	end  
end

If it's not possible, how would I force the water to only be in the starting area I guess...

Thanks.

Re: Water Question

Posted: Tue Jun 11, 2019 4:35 am
by darkfrei
Try to remove autoplace.

See also https://mods.factorio.com/mod/no-lakes

Re: Water Question

Posted: Tue Jun 11, 2019 11:01 am
by mrvn
The game settings have an option for water only in the starting area that you can force in a mod. I don't think you can remove that last bit from the map generator.

What you can do for that last bit of water is catch the chunk generated event and then scan the chunk for water and replace the tiles.

Re: Water Question

Posted: Tue Jun 11, 2019 2:50 pm
by TheSAguy
Thanks guys,
The Autoplace did the trick