[Map Script] Tectonics

LDiCesare

Deity
Joined
Dec 22, 2005
Messages
2,612
Location
France
This is a map script, not a map, so I initially put this thread in the geneal mod section but it may belong here better:
This script is designed to produce mountain ranges, and simulate plate tectonics, giving more realistic/earthlike terrain (mountain ranges, mountains near the coasts like the Andes or between subcontinents like the Himalaia):
http://apolyton.net/forums/showthread.php?s=&threadid=145842

Version 3.16.

Download link below:
 

Attachments

  • TectonicsV316.zip
    13.1 KB · Views: 3,084
Thanks. Good effort. I tried it a couple of times (checking in World BUilder) to see what it did. I noticed that it almost always produced a 'pangaea' map. was this intentional?
 
Try this link: http://apolyton.net/forums/showthread.php?s=&threadid=145842 it is: //apolyton.net/forums/showthread.php?s=&threadid=145842 if the hyperlink fails.

It doesn't always generate pangaeas. My current game for instance has 2 main continents, one big island (the Russians managed to sneak 3 cities there while I destroyed them on our continent) and a few islands.
Now I'm mostly testing on standard maps, it may be more cluttered on smaller maps or map sizes with many civs and little space.
 
Wow:) You are quite possibly the first map scripter for this game. Meaning your script is not a cut and paste of an existing map script. It gives the rest of a chance to do equally original scripts.
 
WOW! what a neat idea.. I cant wait to try this out! Has anyone had success with this yet? Has it created nice looking terrains? This has been my biggest complaint with the game so far.. the monotony of the terrains it generates.
 
VERY NEAT! Doesnt give pangea all the time at all.. I am impressed, but there are some problems.. For one, the mountain ranges dont always make sense 'tectonically' but they are MUCH MUCH MUCH better than the original mountains in the fact that they run in ranges. Also, your desert areas have perfectly straight boundaries with just some grassland running into them, and of course the rivers could use some work. Great start though!!
 
There are a bit more plates than realistic, since otherwise I get too polygonal land shapes. And the tectonics model is crude, so you sometimes get silly small plates which may create a lot of mountains in an unexpected place.
The desert borders are too straight indeed. I tried something a bit different but got weird results. I suspect the x coordinates of the map not to work the way I think they should. Its possible to turn back the climate to the standard model by changing one line. I will probably put this as an option as I tweak the script more.
The rivers I know are odd, but I haven't found how they are generated, so I kept the default algorithm, which sometimes produces great ribbons which make little sense. How to correct that is what I would like to find out next.
 
I upgraded the script with better(hopefully) river systems. They are shorter, may branch more, and don't cross mountains now.
I attach here a sample of what the script can provide.
 

Attachments

  • tectonicsSlide.JPG
    tectonicsSlide.JPG
    60.9 KB · Views: 15,190
Keep working on this please! Its a really really really great idea and Id love to have a version of this that I could use for all my maps!
 
Which options would you like? I can make a Pangaea, provide varying land/sea combos (more land, more sea) pretty easily.
 
I updated this to version3.0. This includes a menu to let you choose from earthlike, pangaea, lakes and islands.
Note Pangaea uses the default terrain generator for desert/grass/plains in order to avoid (realistic) huge deserts on such maps.
 
Just tried a few maps on the new version! Seems to be alot better.. But rarely do you get an ocean that you can circumnavigate the world with, that would be my only complaint with it now. This is really neat and Im gonna be using it for my next game no doubt!

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.

I can program very well, and with a little teaching on how the scripts work I could definatly help if it is possible. Let me know!
 
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.
 
I started a game with this and the only problem with it really was that you couldnt circumnavigate the globe at all.. But otherwise I really liked the map it produced, it felt much more dynamic than the stock maps.

You should make a new thread with this with an appropriate title and an easy download that is located on this site.
 
Top Bottom