[Map Script] Planet Generator

<sigh> I'm running 2 gig ram on Win XP with a generic system
and I keep running into program crashes - bad memory allocation
I've been cutting back the size of the generated map
down from max to, now, just 2 steps above normal huge mapsize

I'm still seeing the problem of not enough resources
and have been trying the "Full_of_resources" mod to fix this
- it doesn't seem to be helping.

I still like the idea of having this map generator create ringworld maps
:):):)

*please* let me know when you have time to finish another update
of this planet generator.

and thanks in advance for your wonderful work

bonniee
 
Me too :goodjob:

Especially when combined with a 40 civ DLL there are way to few resources on the really big maps.
 
^:agree:^

I was playing a game with 13 islands, and only 2 had iron, and 1 of those had 3, the other had it in the middle of the desert. Guess which one i had to get.
 
This is my new favorite map script. I like it so much I decided to address the problem of too many forests myself. Modified version attached.

The changes I made with explanations for those that might be interested (Nercury, you still there?):

Spoiler :

Code:
@@ -2776,7 +2776,7 @@
       if feature == None and plot.getFeatureType() == featNone:
         randomFeat = probabilityArray()
 
-        randomFeat[distanceFromRiver * 14 * (1 - climateHumidity)] = None # how many tiles have no forest and no jungle
+        randomFeat[distanceFromRiver * 40 * (1 - climateHumidity)] = None # how many tiles have no forest and no jungle
         if tileTemperature > 28:
           randomFeat[(distanceFromRiver / 3 + (tileTemperature - 22) / 2) * (1 - (climateHumidity * 0.5) - 0.5)] = None
 
@@ -3038,7 +3038,7 @@
                       else:
                         tilePlot.setTerrainType(plot.getTerrainType(),False,False)
 
-        posList[len(posList) / 2] = None # add some none probability
+        posList[len(posList) * (1.5 - climateHumidity)] = None # add some none probability
         item = posList.random(dice)
         if item != None:
           seedList[world.getOffset([item[0],item[1]])] = item
@@ -3199,9 +3199,9 @@
         if ay >= 0 and ay < iH:
           if (not (ax == x and ay == y)):
             if ax < 0:
-              ax = iW - 1
+              ax += iW
             elif ax >= iW:
-              ax = 0
+              ax -= iW
             l.append([ax,ay])
   else:
     for by in range(distance * 2 + 1):
@@ -3211,9 +3211,9 @@
         if ay >= 0 and ay < iH:
           if (not (ax == x and ay == y)):
             if ax < 0:
-              ax = iW - 1
+              ax += iW
             elif ax >= iW:
-              ax = 0
+              ax -= iW
             if map.plot(ax, ay).getPlotType() in plotTypes:
               l.append([ax,ay])
   return l
First hunk: Reduce the chance of initial forests and jungles.

Second hunk: Make feature spread dependent on humidity.

Third and fourth hunks: Fix some minor bugs in wrapping.

See, I was able to fix the forest problem by just changing numbers :p

With this version, the lowest humidity setting will generate an occasional small forest, but most of the terrain will be bare. The "normal" setting has a fair amount of vegetation, but not overly much. The highest setting will fill the world almost completely with plants, as before.
 

Attachments

  • planet_generator_0_68_1_py.zip
    27.9 KB · Views: 453
I love the maps this script generates, but it does not provide its options when used with the Pitboss. Or maybe I'm doing it wrong. Is there a way to make it work with the Pitboss?
 
Is there a way to edit this map script so that it generates more resources on map sizes larger than huge? I'm seeing islands that can fit 8 cities with 2 resources.
 
Just like to say I'm another supporter of this map script. Finally found something which gives true control over creation. I can now make Snaky Continents / channel maps WITHOUT excessive ocean and 1-2 landmass islands which all the other scripts do.

 
Hey, I've been digging this map generator but the (many) settings pages have no options for 'players per map'. I'm curious how many are set for the larger maps. Since huge maps are such a time investment I have been reluctant to start one until I know that these will have correctly scaled up the number of players. I started one recently and was surprised to find far much more space for myself than I would have expected leading me to believe that perhaps this is not using the same number of civs as vanilla.

Thanks for the great mod!
 
Actually the (default) number of players per map is defined within a XML-File in
...\Assets\XML\GameInfo\CIV4WorldInfo.xml:
Code:
<WorldInfo>
	<Type>WORLDSIZE_DUEL</Type>
	<Description>TXT_KEY_WORLD_DUEL</Description>
	<Help>TXT_KEY_WORLD_DUEL_HELP</Help>
	<iDefaultPlayers>2</iDefaultPlayers>
	:
That means it's probably depending on the mod.

Incidently I would love to know how to change the default from within the map-script,
so that the custom map option would show the new default number of players. Anyone?
 
Number of players depend on map type, but you can select any number if you load new game over "custom game" window.

So far I am not placing players with this script myself, I just rely on the way firaxis' default placement works, i.e. if you have 4 continents and 5 players, it places 3 of them into separate continents, and 2 of them into single continent. But when you select "by player count" in my script, i would generate one continent twice bigger, and firaxis' algorithm would recognize that.

By the way, what default settings you guys use? I am planning to make second, "lite" planet generator variant with less settings, and i am planning how best to streamline it by cutting out necessary options. So far I am considering removing "Map size override", "Relative continent size", "Land near pole ice" (always allow), "One tile islands" (always disallow), "Hills" (default setting), "Flood plains" (standard).
 
edit-the bug is with my PC, not the script.
 
By the way, what default settings you guys use? I am planning to make second, "lite" planet generator variant with less settings, and i am planning how best to streamline it by cutting out necessary options. So far I am considering removing "Map size override", "Relative continent size", "Land near pole ice" (always allow), "One tile islands" (always disallow), "Hills" (default setting), "Flood plains" (standard).

Of the ones listed, I use "Relative continent size", "Land near pole ice" (set to "Never"), and "Hills" (varies on mood). Since I'm away from my PC, I can't look at the other options, but I'll edit in the other ones I use later.


Incidentally, right now you only have a "Standard" setting for options. If it's not too difficult, could you enable a variable modifier there to allow an increase in resources from 5% to 100%?

EDIT 1: My usual settings are Standard map, Smart Selector, 3 continents, Rough Edges, Rare Small Islands (although I often use no Islands), min 4 tiles of ocean, Relative continent size by player count, Default Ocean, No Land near pole ice, Default Lonely Islands, Default lonely island size, No one tile islands, usually default on mountains and hills, usually default on climate, vegetation, and temperature settings (although I like playing "Dawn of Time" worlds which call for more jungle and forest, so I often reset for humid tropical climates with lots of vegetation), Standard flood plains.
 
Is there a way to edit this map script so that it generates more resources on map sizes larger than huge? I'm seeing islands that can fit 8 cities with 2 resources.

I use this script in conjuction with the XXL world mod. I use no map overdrive and get bigger map sizes through the standard size selector (xxl, giant, ultra are all big enough for my tastes). Resources are ok. Copy the py in the Program files> Firaxis>Civ> Beyond the Sword>Mods>XXL World>Private Maps. It should appear in the map menu.

What does map size override do? Could someone please explain.

It overides the stock map sizes and produces bigger maps.
 
Request: Is it possible to select independently width and height of a map? It would be cool.
 
Best map script I've tried so far.

I'm trying to achieve a map with many continents, some of which have start locations, and some of which are empty. It would also be nice to have later contact between continents and some ocean between continents (not glued to each other).

So when I select the options like this:

I get this:


Would be nice to have a bit more space between continents, and some continents without starting locations.. I tried forcing 160x100 map size but one such generation actually crashed to desktop, and they kinda increased the land area too much, with these exact settings.

The terrain placement is great with this script. few hills/few mountains in groups of 5 produces more balanced terrain than the default, but that is just my opinion of course.

I think the high number in "continent separation" somehow kills the uninhabited continents. They may appear with these settings, but only a tiny one and rarely, so far. =/

Maybe I'll have to test more to get better results still..

EDIT: Ok, after further testing, I probably got good enough maps for actually start playing :lol:.

Overriding Huge to 160x100 and lowering land % to 50 seems to work quite well:

Then I slightly lowered map size (to have a bit less space for cities) and tried the "use all empty space for small islands"-setting:

Well, now I have some seas. Still difficult to generate many islands. The islands are also quite tiny.. maybe because you want to ensure that the default placement (that you probably use?) won't place anyone to these islands. They are mostly for flavour though.
 
Top Bottom