I would like to create a map script that generates multiple land areas (not necessarily separate land masses) each completely dominated by one terrain type (e.g. tundra, desert, swamp, etc.). I would like to be able to select how many unique terrains the map will generate from the advanced setup screen.
As an example, image I have a pangaea and I want only snow, desert, and forested grasslands. For smaller maps, I want all the snow tiles touching one another, all the desert tiles touching, and so on. For larger maps there could be multiple areas of just desert, just snow, or just forested grasslands.
I have been playing around with several map scripts, but have not been able to find a function that will allow me to do this. So far I have been able to generate maps that only have e.g. desert and tundra; however, I can only get desert in the center and tundra on the top and bottom.
For further clarity of what I am after, image I have a single circular land mass. I want to take n pie/pizza slices and give each slice a single terrain type and feature (e.g. forest, jungle, nothing).
I thought I might create a function that would come after land mass, water, hills, and mountains were generated. If for example N terrain types were selected for the map, the function would select a tile (probably a coastal land tile) at random and assign that tile one of the N terrain types. It would then select adjacent tiles and tiles adjacent to those tiles making them the same terrain type until 1/N tiles were assigned that terrain type. The function would then assign the remaining N-1 terrains in the same way while avoiding assigning a terrain type to the same tile more than once. It seems something like this could work well for pangaeas, but perhaps not as well for some other map types.
So, my questions are: 1) Is something like this possible? 2) Is there a function(s) that I missed that will allow me to do any part of this? 3) Is this a reasonable approach? Perhaps someone can suggest a more clever way to implement this.
As an example, image I have a pangaea and I want only snow, desert, and forested grasslands. For smaller maps, I want all the snow tiles touching one another, all the desert tiles touching, and so on. For larger maps there could be multiple areas of just desert, just snow, or just forested grasslands.
I have been playing around with several map scripts, but have not been able to find a function that will allow me to do this. So far I have been able to generate maps that only have e.g. desert and tundra; however, I can only get desert in the center and tundra on the top and bottom.
For further clarity of what I am after, image I have a single circular land mass. I want to take n pie/pizza slices and give each slice a single terrain type and feature (e.g. forest, jungle, nothing).
I thought I might create a function that would come after land mass, water, hills, and mountains were generated. If for example N terrain types were selected for the map, the function would select a tile (probably a coastal land tile) at random and assign that tile one of the N terrain types. It would then select adjacent tiles and tiles adjacent to those tiles making them the same terrain type until 1/N tiles were assigned that terrain type. The function would then assign the remaining N-1 terrains in the same way while avoiding assigning a terrain type to the same tile more than once. It seems something like this could work well for pangaeas, but perhaps not as well for some other map types.
So, my questions are: 1) Is something like this possible? 2) Is there a function(s) that I missed that will allow me to do any part of this? 3) Is this a reasonable approach? Perhaps someone can suggest a more clever way to implement this.