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...
Chunk edges visable after changing tiles in on_chunk_generated
-
- Fast Inserter
- Posts: 153
- Joined: Sun Jul 26, 2020 4:05 pm
- Contact:
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Chunk edges visable after changing tiles in on_chunk_generated
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.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Fast Inserter
- Posts: 153
- Joined: Sun Jul 26, 2020 4:05 pm
- Contact:
Re: Chunk edges visable after changing tiles in on_chunk_generated
Found the problem:
The deepwater tiles have
so simply appending to that array in my data.lua worked fine
The deepwater tiles have
Code: Select all
allowed_neighbors = { "water" }