[Map Script] SmartMap

RSL said:
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.

Oasis in tundra is quite real (on earth):
http://www.msnbc.msn.com/id/8063227/
is one example, a google search will turn up lots of examples.

Oasis, technically, is a fertile region produced by fresh water in an otherwise arid region (tundra or desert).

Update: nevertheless, I'm making it less likely in the next version of the smartmap feature generator, and impossible in the smartmap strict feature generator that I'm adding.
 
I gotta say... After playing with this map a few times yesterday, it completely rocks! A ton more variety than I expected from some of the other scripts I've loaded. You, sir, are a god among modders.
 
This release cleans up a few bugs that showed up in testing non-standard wrap options, adds a new readme file explaining what you can do with all of the options, and adds a new option 'land style' which will allow you to generate continental fragments and oddly shaped continents.

# Version History
# 7.0
# Add new generation option: Land Style. Land style allows you to opt
# for less roundish continents, and also to allow for small independent
# land fragments separate from the main continents. When land fragments
# are generated, they may be generated anywhere, and may violate the
# sea level strategy guarantees, so use at your own risk. The less rounded
# continent options without land fragments will obey the sea level rules,
# but may be less fair.
# Based on a report of it being annoying to have your capital placed on
# the wrap-edge of the minimap, I now rotate the initial land placement
# to put the minimum number possible of land near the map wrap edge.
# While this does not guarantee this will not happen, it makes it highly
# unlikely.
# Further, made the first player always pick the center most start position
# if wrap is enabled. This should make single player games always have
# the human player start fairly well centered. This should absolutely
# guarantee that a single human player will not start with their capital
# on a map wrap edge.
# Fixed a couple of places where I did not consider y-wrapping correctly.
# But I guess no one plays y-wrap (or both wrap), or they'd have surely noticed.
# Introduce option 'SmartMap Strict' for feature generation. This will only place
# floodplains & tundra where the normal scripts would.
# Made floodplains on anything other than desert less likely, and oasis on tundra
# less likely for the non-strict feature generator.
# Enhanced the plot wetness calculator so plot wetness can be factored into more
# of the generation process.
# Improved the player placement rules to prefer not to place players initially
# on a stretch of land reaching into the ocean.
# Added ReadMeSmartMap.txt
 

Attachments

  • SmartMapV7.zip
    36.7 KB · Views: 270
Here's the non-version history contents of the readme since it may be helpful.

ReadMeSmartMap.txt
ReadMe file describing how to use SmartMap, and its various features.

Sections:
1) How to use
2) Options
3) Thanks
4) Version History


1) How to use
Extract the SmartMap.py to your CivIv install directory's PublicMaps
folder. Start the game, and select Single Player followed by Custom Game.
On the option titled 'Map:' select SmartMap as the map. Set other options
to your liking (I suggest trying all the defaults first!), and Launch!

A common error is to extract to civdir\PublicMaps\SmartMap\SmartMap.py. You
want to just have civdir\PublicMaps\SmartMap.py

Be patient. This script is slower than many of the default scripts. A large
map takes about 30 seconds to generate on my 1.8ghz pentium-M laptop. Huge
takes close to a minute. Pangea is the slowest to generate, picking fair
start locations takes a lot longer.


2) Options
Options are the point of SmartMap. There are a bunch of them. I will
describe how to use each of them in turn to get just the map you are
looking for.

Map: SmartMap, otherwise you're not using SmartMap!

Size: Duel, Tiny, Small, Standard, Large, Huge. SmartMap will use this
setting to determine the overall area of the map, unless you choose to override
the width and height manually, as explained later. SmartMap picks a random
width and height that produce the required area, so not all maps will be the
same shape (if you want to force a specific shape, use the overrides
described later).

Climate: Temperate, Tropical, Arid, Rocky, Cold. These mean approximately
what they do in the normal map scripts. Tropical has less desert and jungle than
you would get in the normal generator. If you feel like you get too much tundra
and snow in temperate, try tropical. Arid produces a lot of desert. Rocky means
an extra boost to hills and mountains. Cold means more snow and tundra.

Sealevel: low, medium, high. This option is used by SmartMap in a unique way.
Since SmartMap offers a direct ocean control, sealevel is used to control inter
continental strategy. In particular:
Low = all land on the map MIGHT be reachable by galley
Medium = it is very unlikely you will be able to reach another continent by galley,
but contact between civs on different continents may happen early due to
influence borders touching (it is only possible to reach another continent
occasionally by galley due to a bug in civiv that will rarely allow a galley
to enter an ocean tile).
High = guaranteed that you cannot reach another continent by galley, and civ contact
between different continents will not happen until two near as possible cities
both reach level 3 culture, or caravel (almost always caravel happens first).
This option is not guaranteed to be enforced if you select a non-default land style, as
explained later.

Era / Speed: These options are not affect by and do not affect SmartMap

Continents: Controls the number of continents generated by the script. Each option is fairly
self explanatory. On low sea level, continents are permitted to merge, so you may receive less
than the expected number of continents. You may also receive less than the expected number if
the script cannot find enough room (as might happen if you select duel size with 36 continents).
You may receive more than the expected number if you select a non-default land style, as explained
later.

Ocean: determines the percentage of ocean to be used on the map. Note that selecting low ocean
levels may result in a map with significantly more useful land area than is typically expected for
a given size of map, and may cause a gameplay imbalance.

Hills: allows you to specify what percentage of the land area should be coverd in hills.

Peaks: allows you to specify what percentage of the land area should be coverd in peaks.

Wrap: allows you to specify whether the map wraps around the border in x and/or y. X wrapping is
the standard circumnavigatable globe you probably expect, but the other options may provide for
an entertainingly different gameplay experience.

Terrain: selects a terrain generator. The terrain generator decides if a given land or hill plot is
a desert, plains, grass, tundra, or snow. The oasis and great plains generators are taken from those
scripts, while standard is just what you normally get on default scripts. SmartMap is a custom terrain
generator that knows how to generate terrain for all kinds of map setups. I recommend SmartMap.

Forest/Jungle: allows you to specify if you'd like more or less than the standard amount of forest and
jungle. Note that this option only affects the results of the SmartMap feature generator.

Features: selects a feature generator. Features are things like oasis, flood plains, forest, and jungle.
They go on top of the base terrain to enhance it in some way. Again, the oasis and great plains options
are just what you'd expect from those scripts. Note that you do NOT have to match terrain and feature
generators. Oasis terrain with Great Plains features works just fine, as do all other combinations.
The default SmartMap feature generator generates a few combinations that do not occur in the standard
scripts, in particular things like floodplains on grass are possible, and oasis will occassionally be seen
on tundra. These are things that happen on earth, and so are 'realistic' but some may find undesireable
because they aren't normal in the sense of the default scripts. If you are one of these people, there is
the SmartMap Strict option, which to the best of my knowledge will not generate any combinations not found
in the default scripts. I recommend either SmartMap or SmartMap strict.

Bonuses: selects how bonuses are placed. You can choose from the standard placement or SmartMap placement.
SmartMap attempts to be fairer about how resources are placed strategically. I recommend SmartMap. This
option also controls the placement of goody huts. SmartMap goody huts aren't much different from standard.

Start Placement: selects how player start positions are determined. The SmartMap option attempts to do a
fairer job of placing players based on an analysis of the positions of strategic resources, and is also
more likely to place your initial settler on a tile with one tile of ocean access so that your capital can
build ocean buildings.

Override width/height options: these options allow you to force SmartMap to generate a specific size of map
to your liking. This can allow you to generate absolutely huge maps beyond the size that your computer
memory can hold, so be careful with this. The sizes are multiplied by 4 in each direction to determine
the final number of plots, so a 64x32 map is really 256 tiles wide and 128 tiles tall. A SmartMap 'huge'
map is 16,000 tiles total area, so the 64x32 map described = 256x128 tiles = 32,768 tiles would be more
than twice the size of SmartMap's huge, which is in turn nearly twice as big as a default map's huge. Note
that this allows you to play a very big map on duel, which would be a wierd experience, as many of the pacing
elements of the game assume that you only have a certain amount of landmass to work with.

Land Style: this option controls a couple of special features that are more dangerous to use than the others,
and so are reserved for last. First, you can control how round your continents will turn out. Rounder
continents have a tendency to be more fair, so very round is the default. As you transition to somewhat or
least round, you will get odder continent shapes which various people have requested, or find to be
'more realistic'. Independently, you may also choose a level of fragments. Fragments are little pieces
of land added randomly to the map which will appear as archipelagos or odd continent outgrowths, or tiny
islands. You can get all sorts of interesting growth patterns with these. However, since they may be
placed anywhere, they may violate the sea level guarantees of separation. They may completely join
continents, or make them reachable by galley. Nevertheless, some people wanted this as another way to
have more varied or realistic maps. The default for this option is very round, no fragments, which provides
the most guarantees of fair gameplay, particularly for multiplayer games. For single player games, you
may have fun seeing what interesting other types of maps you can get with this option.


3) Thanks
I'd like to thank the following people for their contributions:
Sirian : for answering a number of questions about how map scripts work
A Silly Goose @ CivFanatics : for early feedback
lordroy @ CivFanatics : for lots of feedback and screenshots
Victorvanwavere : suggestion to have a forest/jungle setting & what became land style
Randle @ CivFanatics : report of getting capital on wrap border
Silver14 @ Apolyton : report of too many very tall maps when x-wrapping and other early feedback
alms66 @ Apolyton : also suggested the forest/jungle setting, and other early feedback
Commander Bello @ Apolyton : manual width/height override and other feedback
skodkim @ Apolyton : assorted feedback
battists @ Apolyton : idea for this readme!
 
Here are some samples of the variety you can now get with this script. The top row are high sea level, second is medium, third is low. The other settings are an assortment designed to show a variety of interesting results.
 
Downright amazing, man. You know you've got a great script when it can generate both very strategically fair maps as well as more chaotic ones.

This has definitely become the Blue Marble of map scripts.
 
Cool, thanks for version 7.0... I hope I don't see those sea horses again (in v6 I saw some horses appear off the coast, and explode like good huts).

Any clue why goody huts (in custom map scripts) often explode and don't regenerate when they are revealed from the fog of war? I never noticed this before in normal games.

goody hut frequency and bonus frequency would be nice for future versions... I often want to turn off good huts.

My problem with wrap y are the flashing trees in the fog of war... trees need to be kept a couple squares from the poles or something... at least until the game is patched to fix it.
 
I think your script is great. The only complaint I had was that the continents were too regular and there weren't any small islands. The newest version fixed that, but I've found a new problem. There have been several maps with large regions of plains. No fresh water, no hills, and no resources. I've seen one at least twice as big as the one in my screenshot. Can I get rid of these through tweaking the options?

-RdF
 

Attachments

  • greatplains.JPG
    greatplains.JPG
    136 KB · Views: 358
Dude, go to the post on the front page where you posted the original shots and replace them with some of the examples from the latest version. I checked this thread out awhile back and didn't care for those pics much so I didn't download your script. Happened to check out the last page in the thread today and was blown away by what you have done. So put those new shots up on the front page where people can see them!!!
 
Version 7! :clap:
Any clue why goody huts (in custom map scripts) often explode and don't regenerate when they are revealed from the fog of war? I never noticed this before in normal games.

I am almost positive this can happen in any game. I believe it occurs when you reveal a goody hut, do not collect it, and a rival Civ collects it whilst in the fog of war.
 
Byrath said:
I am almost positive this can happen in any game. I believe it occurs when you reveal a goody hut, do not collect it, and a rival Civ collects it whilst in the fog of war.
I've seen that happen. But I also have a few times (in custom scripted maps) had my scout move into the black revealing a hut, which it should be able to get on the next turn. There are no other AIs on the continent... and the hut still goes poof.
 
Koyaanisqatsi said:
Cool, thanks for version 7.0... I hope I don't see those sea horses again (in v6 I saw some horses appear off the coast, and explode like good huts).

Any clue why goody huts (in custom map scripts) often explode and don't regenerate when they are revealed from the fog of war? I never noticed this before in normal games.

goody hut frequency and bonus frequency would be nice for future versions... I often want to turn off good huts.

My problem with wrap y are the flashing trees in the fog of war... trees need to be kept a couple squares from the poles or something... at least until the game is patched to fix it.


I will go ahead and split out goody hut and resource frequencies so you can control those, that's a good option to have.

If you actually want to try wrap y you may find that it works with my script since my script always keeps all features other than ice more than 2 tiles away from the edge. (not that I play it much myself, but i've tried it a couple times and not noticed a problem).

Also, I agree with the other poster on fog of war ... if you line-of-sight a goody hut that has been picked up by another player, but was under fog-of-war then it has to kaboom.
 
roidesfoux said:
I think your script is great. The only complaint I had was that the continents were too regular and there weren't any small islands. The newest version fixed that, but I've found a new problem. There have been several maps with large regions of plains. No fresh water, no hills, and no resources. I've seen one at least twice as big as the one in my screenshot. Can I get rid of these through tweaking the options?

-RdF

Well, you can certainly try some combination of the following:
1) increase the hills/peaks rate
2) try tropical, which has more rivers
3) wait for next update where i'll allow you to increase the resource rate
4) increase your forest level

Since the map script has a great deal of randomness, there is certainly always going to be a chance of getting an uninteresting area. I will take a look and see if I can spot anything happening, though, just in case.
 
Civilicious said:
Dude, go to the post on the front page where you posted the original shots and replace them with some of the examples from the latest version. I checked this thread out awhile back and didn't care for those pics much so I didn't download your script. Happened to check out the last page in the thread today and was blown away by what you have done. So put those new shots up on the front page where people can see them!!!

Done. Thanks, good suggestion.
 
Koyaanisqatsi said:
I've seen that happen. But I also have a few times (in custom scripted maps) had my scout move into the black revealing a hut, which it should be able to get on the next turn. There are no other AIs on the continent... and the hut still goes poof.

I believe barbarians can poof huts.

There is absolutely no difference between the way that my script adds huts vs the way standard scripts add huts, the only difference is in number and layout. The selection of tiles on which huts are allowed to be placed are exactly the same.
 
Surt, I know someone has mentioned it in the thread already, but I am noticing large areas of plains sometimes, with no terrain features. There are some resources scattered about but no forests, hills, peaks, rivers, etc. in these large plains areas. I had one large continent almost entirely plains, with some deserts sprinkled in here and there. Also river generation needs to be pumped up a bit with more/longer rivers. The landmasses look great though, really excited about where you are going with this.
 
Civilicious said:
Surt, I know someone has mentioned it in the thread already, but I am noticing large areas of plains sometimes, with no terrain features. There are some resources scattered about but no forests, hills, peaks, rivers, etc. in these large plains areas. I had one large continent almost entirely plains, with some deserts sprinkled in here and there. Also river generation needs to be pumped up a bit with more/longer rivers. The landmasses look great though, really excited about where you are going with this.

Ya I noticed this also... especially the lack of rivers, but I was so glad to get rid of all the deserts that I was not going to complain.


-=R=-
 
First off, I wanted to say what a great job you did on this map generator. I have tried out a few of the settings, and even on tropical, it doesn't seem to be generating very many rivers. I was wondering if you could put a River percentage meter or something in future versions.

Also, I noticed that the maps I generate are extremely wide and not tall at all. Seems like a 4:1 ratio of width to height, what can I do to make it more rectangular or square?

Keep up the good work!
 
Civilicious said:
Surt, I know someone has mentioned it in the thread already, but I am noticing large areas of plains sometimes, with no terrain features. There are some resources scattered about but no forests, hills, peaks, rivers, etc. in these large plains areas. I had one large continent almost entirely plains, with some deserts sprinkled in here and there. Also river generation needs to be pumped up a bit with more/longer rivers. The landmasses look great though, really excited about where you are going with this.

Based on your and Lordroy's comments I'll go ahead and tweak up the base river rate, and I'll also look at adding a river rate control of some kind.
 
Top Bottom