[Map Script] SmartMap

# Version History
# 6.0
# Improved lake generation system, grows more lakes beyond one plot
# Numerous terrain relevance improvements. More desert&snow at high altitudes,
# less desert near water, etc.
# Changed continent computation to more accurately determine the large
# continents, which should as a side effect improve the fair resource
# distribution. Removed tiny continents which will never be player
# starts from the fair resource distribution.
# Improved tile wetness calculator to consider number of rivers and lakes
# touched by tile (a tile touched by fresh water on multiple sides is
# now more likely to shift from desert->plains->grass).
# Added a river originating at the highest point of each continent, which
# greatly improves the fairness of river distribution overall
# Changed forest/jungle options to allow independent choice of forest and
# jungle coverage (light,normal,heavy independently selectable for each)
# General code cleanup, reorganization, commenting
# Ran code through pychecker and cleaned all warnings, pychecker found a
# couple of legitimate bugs that may have improved the resulting maps.
 
lordroy said:
Ill try with Tropical.... but wont that give me craploads of jungle?


-=R=-

try version 6 and see if it seems better. You can also now select tropical, with low jungle and your choice of forest, which will get you very little desert or jungle. Hopefully this will give you enough control to really get whatever sort of map you prefer.
 
lordroy said:
Ill give it a run tonight, thanx for the effort and hard work.


Check out SevoMod sometime... if you haven't already... http://forums.civfanatics.com/showthread.php?t=151611



-=R=-

I've looked at it some number of versions ago. It's good, but not a particularly good fit to my preferred playstyle, so I mostly stick with my own mod.
 
Surt,

Glad to see V6 is out.


I was wondering though, currently your script generates worlds that are for the most part balanced.
On random Islands, they are all about the same size. This is great, especially on multiplayer games, but I do miss a totally random world. Where you don’t know what you are going to get.

I know you can create a kinda random world by setting the sea level low, but I was hoping for something a little more dramatic. Something where you can have large continents and small islands. Some connected, some separated by clusters of small islands.

Could you add an option in to create a totally random world.
 
Victorvanwavere said:
Surt,

Glad to see V6 is out.


I was wondering though, currently your script generates worlds that are for the most part balanced.
On random Islands, they are all about the same size. This is great, especially on multiplayer games, but I do miss a totally random world. Where you don’t know what you are going to get.

I know you can create a kinda random world by setting the sea level low, but I was hoping for something a little more dramatic. Something where you can have large continents and small islands. Some connected, some separated by clusters of small islands.

Could you add an option in to create a totally random world.

I will give some thought to how this might be done. It's somewhat difficult with the way my script is currently set up, which has each continent given essentially equal growth probability. Presumably to accomplish this I'd need to allow for more variation in the growth of continents. I really wish that the standard map had come with more than 3 sea levels, that would make it somewhat easier. Anyway, I'll see what I can do.
 
I don't seem to recall this occuring with the maps generated with the in-game generator; but my most recent game using SmartMap I ended up with my capital right on the x-wrap border, which made for a very annoying mini-map, especially since the continent was long and N-S.

Also, I thought I selected to have many hills, but they seem rather sparse, and it might just be me, but the map seems larger than the normal "Standard" map size.

Here's all the settings I had:

Size: Standard
Climate: Random
Sealevel: Random
Continents: random 2-5
Ocean: 60% ocean
Hills: many hills
Peaks: many peaks
Wrap: wrap x
Terrain: standard
Forest/Jungle: heavy forest/light jungle
Features: standard
Bonuses: standard
Start Placement: standard
Overrides: don't override
 
Randle said:
I don't seem to recall this occuring with the maps generated with the in-game generator; but my most recent game using SmartMap I ended up with my capital right on the x-wrap border, which made for a very annoying mini-map, especially since the continent was long and N-S.

That's one I haven't run into, but it's definitely possible. I'd call that a bug with the mini-map, it ought to center itself around your capital. However, since I can't do anything about that, I'll give some thought about what to do to prevent that.

Randle said:
Also, I thought I selected to have many hills, but they seem rather sparse, and it might just be me, but the map seems larger than the normal "Standard" map size.

I'll have a look at the hills. As to the size, because I determine the width and height dynamically, I can't match the area of standard exactly. Instead, I start with an area, and find a width and height that closely match it. Here are the sizes I'm working with:

# Duel Tiny Small Standard Large Huge
# SmartMap: 60 100 180 320 560 1000
# Standard: 60 104 160 273 416 640

So my 'standard' sized map may have about 17% more tiles total, which allows for a little more flexibility in ocean levels. If you're using 60% ocean, that's a bit low compared to normal maps, so you may be noticing the extra land available. You might try 70% ocean and see if it seems more normal to you.
 
surt said:
So my 'standard' sized map may have about 17% more tiles total, which allows for a little more flexibility in ocean levels. If you're using 60% ocean, that's a bit low compared to normal maps, so you may be noticing the extra land available. You might try 70% ocean and see if it seems more normal to you.

That might explain it; I was amazed that the nearest civ was so far away.
 
Just downloaded this and checked out a few generated maps in the world builder.. it looks very good and I am looking forward to playing on them :)
One thing I noticed, it seems to generate floodplains oddly.. when I mouse-over the tile, it reads 'Floodplains/Plains', and the graphic for said tile is almost identical, graphically, to a normal plains tile. It may have a few more yellowish specks in it, but otherwise it looks the same. I am using the Blue Marble terrain mod.
Thanks for the great work on this map script! :D
 
surt said:
Yes, a large map can often take ~30 seconds to generate on my 1.8ghz pentium-m notebook, and a huge can take around 2 minutes. I'm looking into what I can do to make it faster, but unfortunately around 90% of the time is eaten up in preventing the continents from colliding in med/high sea level, and i've not yet come up with anything to do about that.



I have to say I really love what you have done with this. I would suggest that you do not try to optimize this unless you are confident that you can do so without taking away from the work you have done. The maps made with this script are so nice.... I really would hate to see you change things just for speed... Personally, I think that it needs very little else done to it...


But, either way, thanx for the hard work.


-=R=-
 
Byrath said:
Just downloaded this and checked out a few generated maps in the world builder.. it looks very good and I am looking forward to playing on them :)
One thing I noticed, it seems to generate floodplains oddly.. when I mouse-over the tile, it reads 'Floodplains/Plains', and the graphic for said tile is almost identical, graphically, to a normal plains tile. It may have a few more yellowish specks in it, but otherwise it looks the same. I am using the Blue Marble terrain mod.
Thanks for the great work on this map script! :D

Floodplains on plains and grass are allowed by my generator, and apparently allowed by the rules, but not generated in any of the default generators. Flood plains are considered a 'terrain feature' whereas plains and grass are 'base terrain'. I am considering adding a 'SmartMap strict' option to the next version which will disallow all feature/terrain combinations not generated by the standard generator.

In the meantime, if it bothers you enough, you can switch to standard mode for features. Otherwise, all it means is that you get an extra food on that tile.
 
lordroy said:
I have to say I really love what you have done with this. I would suggest that you do not try to optimize this unless you are confident that you can do so without taking away from the work you have done. The maps made with this script are so nice.... I really would hate to see you change things just for speed... Personally, I think that it needs very little else done to it...


But, either way, thanx for the hard work.


-=R=-

I've only done algorithmic optimizations (found different ways to accomplish the same math, essentially). They don't change the outcomes at all. I have optimized low and medium sea level quite a bit, by the way, those generate more than twice as fast as before. Even high sea level is somewhat improved, though only about 20%. Anyway, the time spent generating a huge map is down under a minute for me now, and large (which is the biggest I personally play) is under 30 seconds, so I'm happy enough with the speed. More time is now spent finding the starting positions than anything else, so I may spend some time trying to make that a little faster, but I'm mostly not too worried about the speed anymore.

As an aside, to anyone who does find things too slow, if you don't mind low/medium sea level, or standard player placement, those are the two options that will speed up my script the most currently.
 
Thanks for all the hard work.

The maps are looking better, but the bodies of land are still too globular. Compare your mid sized islands with the standard archipelagoes to see what I mean. It looks as though you start with a rectangular mass and then add an irregular coastline. The result does not look realistic, at least to me.

However, the level of control over terrain makes it all worthwhile!
 
charleswatkins said:
Thanks for all the hard work.

The maps are looking better, but the bodies of land are still too globular. Compare your mid sized islands with the standard archipelagoes to see what I mean. It looks as though you start with a rectangular mass and then add an irregular coastline. The result does not look realistic, at least to me.

However, the level of control over terrain makes it all worthwhile!

It actually starts from a single tile and grows in random directions. The result is statistically likely to be circular if the continents have sufficient space not to grow into each other (or into a pole). When they do get close together (or to a pole), then you tend to see more non-circular shapes.

I'm thinking about adding some options to allow for more tweaking of the growth patterns that might yield other shapes more of the time.
 
surt said:
It actually starts from a single tile and grows in random directions. The result is statistically likely to be circular if the continents have sufficient space not to grow into each other (or into a pole). When they do get close together (or to a pole), then you tend to see more non-circular shapes.

I was going to say... Judging by the screens, there's lots of rugged coastline but the shapes are all round and roughly equal. We do have a setting that will produce about the same kind of result (Pangaea, Solid shoreline) but only a third of the time that option is selected and only 10% of "Random Shoreline" Pangaea maps. ... Well, and it is also available 100% of the time in the Balanced script.

Getting more variance out of your continents will take some creativity. I had the luxury of not having to worry too much about it, since the Fractal generator was already on hand, and I could get more out of making that dance and sing than seemed worthwhile to invest in designing an alternative system that would do approximately the same thing in the end. :crazyeye:


I'm thinking about adding some options to allow for more tweaking of the growth patterns that might yield other shapes more of the time.

Good luck. I'm sure there are numerous solutions, and some may come out with significantly different results than the stock scripts.


- Sirian
 
Floodplains on plains and grass are allowed by my generator, and apparently allowed by the rules, but not generated in any of the default generators. Flood plains are considered a 'terrain feature' whereas plains and grass are 'base terrain'. I am considering adding a 'SmartMap strict' option to the next version which will disallow all feature/terrain combinations not generated by the standard generator.

In the meantime, if it bothers you enough, you can switch to standard mode for features. Otherwise, all it means is that you get an extra food on that tile.

Ahh I see. I will switch to standard mode for features then .. seems a bit unbalancing to have multiple 4F, 1P, 1C tiles within range of my capital city. :lol:
Thanks for the info! :)
 
Sirian said:
I was going to say... Judging by the screens, there's lots of rugged coastline but the shapes are all round and roughly equal. We do have a setting that will produce about the same kind of result (Pangaea, Solid shoreline) but only a third of the time that option is selected and only 10% of "Random Shoreline" Pangaea maps. ... Well, and it is also available 100% of the time in the Balanced script.
Getting more variance out of your continents will take some creativity. I had the luxury of not having to worry too much about it, since the Fractal generator was already on hand, and I could get more out of making that dance and sing than seemed worthwhile to invest in designing an alternative system that would do approximately the same thing in the end. :crazyeye:

Mostly I wanted one script which could produce a whole range of options using random, plus I particularly wanted to be able to enforce the contact/intercontinental war rules, which was the biggest single item I could not see how to do building on the existing scripts (which quite possibly may be related to not fully being able to understand all of the tweaks available on the fractal generator). And really my motivation in starting on this at all was about 60% a desire to learn python, 30% to do something unique to keep myself active in the games business for my resume, and really only about 10% about actually generating maps.


Sirian said:
Good luck. I'm sure there are numerous solutions, and some may come out with significantly different results than the stock scripts.

- Sirian

Thanks, and thanks again for taking time to answer my questions. Oh how I wish I had taken longer searching for your helpful answers before I got started. I had about 50% of all the work done (by trial and error and searching through the existing scripts) before I even discovered CvMapScriptInterface. :cry:

If you feel like answering one more question for me: does CvPythonExtensions exist in accessible python somewhere? It's the one thing apparently preventing me from properly running pychecker on my scripts (which would be nice for catching programming errors). Do you use any tool for lint checking python?


--doug (surt)
 
Byrath said:
Ahh I see. I will switch to standard mode for features then .. seems a bit unbalancing to have multiple 4F, 1P, 1C tiles within range of my capital city. :lol:
Thanks for the info! :)

Yes, it may well alter the typical game flow, though i'd note that it probably will not overly significantly advantage you over the AI, because the extra food is factored into the start location picking, so the AI is likely to have an equally good position.

Anyway, having thought this over, I am now implementing a strict option for the next version.
 
surt said:
Floodplains on plains and grass are allowed by my generator, and apparently allowed by the rules, but not generated in any of the default generators. Flood plains are considered a 'terrain feature' whereas plains and grass are 'base terrain'. I am considering adding a 'SmartMap strict' option to the next version which will disallow all feature/terrain combinations not generated by the standard generator.

In the meantime, if it bothers you enough, you can switch to standard mode for features. Otherwise, all it means is that you get an extra food on that tile.

Also, I saw an Oasis in some Tundra. It was kind of cool, but I wonder about the authenticity of it. Perhaps it could be written off as some kind of arctic floral bonanza. Anyone?

ETA: Also some Floodplains/Grassland/Hills which kind of rocks, if is a little cheaty.
 
Top Bottom