Modifying water generation

Place to get help with not working mods / modding interface.
swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Modifying water generation

Post by swni »

I would like to write a mod that totally changes where water is generated on the map. However, I don't want to change anything about the generation of ores/trees/biomes/enemies/etc. What is the best way to go about doing this? From what I can tell from reading the lua code in "base", it seems that all of those things are generated together, so there is no way for me to change where the water is placed after Factorio places the water and before Factorio places everything else. Therefore I think to accomplish my goal it is necessary for me to regenerate everything myself (including ores/trees/etc.). This means that, to preserve the original distribution, I need to redo all the terrain generation code in lua, and I don't know enough about the terrain generation algorithm to do that well.

In particular, the Straight World mod is the only mod I know of that changes initial water distribution, and the author of that mod said they had problems with water distribution that they were unable to explain.

Is there a better way to do this? Suggestions?
swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: Modifying water generation

Post by swni »

Well, other than this one issue, I finished the mod. By the way, I have found that it is necessary to put a buffer of two tiles of grass around any water in desert biome to avoid weird and annoying boundaries.Image https://imgur.com/MCjJJBd
Post Reply

Return to “Modding help”