TheeLord said:
I am curious.. How difficult would it be to create a script that created land masses to simulate the conditions each civ has on a real earth map.. for example a semi-crowded 'europe', Italy on a peninsula seperated from the europe area by a mountain range.. England on an island next to the european area, America on a huge fertile area with very spread out resources, Japan on a mountainous large island, russia with a huge amount of relatively unfertile land and a good starting location, Egypt on a river valley in the biggest desert in the old world... I think this would be awesome if theres any way to do it.
It's not very hard to make a Terra like map with this script, but creating landmasses simulating those of a real earthmap in detail is a bit harder since I don't know how to retrieve the civs in the map script, but I suppose it can be done.
The algo processes this way:
Put a seed for each sea plate and land plate. (I made a mistake with the plate 0 which is useless by the way, but this doesn't translate into any bug) The seeds are generated randomly. If you replace that by a coordinate corresponding roughly to the center of the corresponding Earth plate, you should get something similar. The only problem is mountains, as the subduction/collision direction (movement of the plates) is systematically random. It would require a bit more work to change that.
For instance for Italy: You would create a land plate surrounded by sea plates to the west, south and east, and a land plate to the north, and ensure Italy plate is moving north. The problem is Italy is really small and I don't think the Adriatic is actually a separate plate. I've been thinking of making Earthlike and Mediterranean like maps, but will probably not have the time soon.
For Egypt, I am not sure since I do not know whether the rivers generation is called before or after the terrain generation (where terrain = desert/grass/plain/tundra/ice, whereas plot generation = peak/hill/land/sea). The code in GreatPlains.py can probably help create a Nile river. Finding out the biggest desert would require some region detector but that's not too hard to make a crude one.
As for learning to code, I checked the existing .py files. The most interesting are CvMapGeneratorUtil.py in Assets/Python and then the various PublicMaps (continents being the simplest one, InlandSea, GreatPlains have some info on the rivers). I asked Sirian for help too in order to get the rivers code entrypoints. That one is really ugly by the way, it should be probably at least twice as small as it currently is had I tackled the problem correctly.
I've also been using this to learn python so I'm pretty sure the code could be way cleaner. There are also things I'm unsure about, like latitude since there are latitude methods on the plots which seem to provide 0-90 values, and another utility in one script which computes a 0-1 value.
There's also a very very useful document by Locutus:
http://apolyton.net/forums/showthread.php?s=&threadid=140611
It doesn't seem to be complete, however, as I found at least one method on plot that is not documented there.