Page 1 of 1

Chunk edges visable after changing tiles in on_chunk_generated

Posted: Thu Sep 16, 2021 9:56 pm
by BicycleEater
My mod changes the water tiles in a chunk to something else while generating certain chunks, but what it changes the water tiles into varies greatly based on what kind of water was generated there - I'm trying to create a dried out lakebed look by replacing it all with special tiles.

The map generator seems to try and smooth the edge between the changed tiles and the deep water, by putting normal water along the edge of the chunk, this results in big 'ridges' along chunk generation boarders when the next chunk gets the script run on it.
The tile I am replacing the water with with is already in the 'water_tile_type_names'

How do I prevent this from being a problem - I can try and identify these conditions and remove them, but that seems difficult and error prone...

Re: Chunk edges visable after changing tiles in on_chunk_generated

Posted: Thu Sep 16, 2021 10:04 pm
by eradicator
LuaSurface.set_tiles(tiles, correct_tiles) has a correct_tiles parameter, have you tried turning that on/off? Another method would be to change map gen settings so that the game handles it for you. But those are a bit underdocumented and can be difficult to get right.

Re: Chunk edges visable after changing tiles in on_chunk_generated

Posted: Sat Sep 18, 2021 6:44 pm
by BicycleEater
Found the problem:
The deepwater tiles have

Code: Select all

    allowed_neighbors = { "water" }
so simply appending to that array in my data.lua worked fine