Version 19, nearly all bugs are fixed
I tuned TerraGenesis for use with the heightlevel patch. Beside many adjustions to the values especially in the frequencies-array, I changed the following things:
(1) _max_height now also depends on the map size. Reason: Make more finetuning possible, and avoid water only maps (a value of 48 on a 64x64 map up to now caused a water only map, since 64/48 = 1, and this fraction then was multiplied with some other fraction < 1 for determining the max. allowed height. So I had to lower this value for small maps.
(2) For very rough and cereally rough maps, I disabled smoothing coasts and the sine transformation also smoothing the map. This way, one can get actually rough maps, with really steep coasts. Actually, the frequency values for rough and very rough are very similar, the main difference is that for very rough maps you don't have that flat areas along the coasts.

I know, such maps are hard, but for me, generating a hard map is just the reason for introducing settings like very rough. And yes, I like such maps for playing
(3) If one introduces (2), this will end up in very few industries being generated, just because the generator doesn't find sufficient locations. In detail, it accepted (among several other conditions) a location if it doesn't need to rise/lower any piece of land by more than one heightlevel. For very rough and cereally rough, I introduced new constants, currently set to three heightlevels. For the other settings, I left the bound of one unchanged.
(4) Furthermore, (3) is active only for heightlevels below 20 (also being a constant in industry.h). This way, I want to avoid too much industries being founded somewhere up in the mountains. Maybe this could be extended to some separate switch, giving the decision to the player. For industries founded later in the game, or founded at places where rising/lowering by one heightlevel is sufficient, this limit doesn't apply.
Now, I don't know of any further actual bugs. However, some things might need further improvement:
(a) When the patch is disabled (i.e. max heightlevel 15), generating rough maps 512x512 or bigger is almost impossible. The reason is, that the frequency values don't depend on the max. allowed heightlevel. In other words, the frequency values especially for the rough settings are optimized for much higher maps.
(b) What should we do with the two terrain types CommanderZ and Go for the flows? Currently, in may opinion they don't look really optimal (of course, if someone likes them, I will not object

). My ideas for additional map types include:
(b1) An additional setting optimized for rough maps with low max. allowed height, solving problem (a)
(b2) A setting producing many relatively small islands
(b3) A setting producing a rough map with many fjords.
To summarize, I personally am now content with the generated maps.
And now, happy testing again
