[Done] Water Question

Place to get help with not working mods / modding interface.
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1456
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

[Done] Water Question

Post 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.
Last edited by TheSAguy on Tue Jun 11, 2019 2:50 pm, edited 1 time in total.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Water Question

Post by darkfrei »

Try to remove autoplace.

See also https://mods.factorio.com/mod/no-lakes
mrvn
Smart Inserter
Smart Inserter
Posts: 5969
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Water Question

Post 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.
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1456
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: Water Question

Post by TheSAguy »

Thanks guys,
The Autoplace did the trick
Post Reply

Return to “Modding help”