[GUIDE] Map scripts

I'm trying to make pictures of Tectonic map script, but it ain't easy task. First thing is that this map is one size bigger, but has lots of water. I think this is on purpose, since land size for settling is the same in the end. It just makes you play with a huge ocean. Second thing, it is extremely random, sometimes is a Pangea, sometimes 4 big continents, sometimes 2 small continents. Sometimes there are big lakes, sometimes there are none. Rivers are few, but long, very long in some cases. There's no ice, but snow is abundant. Tundra and desert, however, are fewer.

About settings, number of plates affects the shape, fewer plates give less but longer mountain chains, more plates give more corners in the coast (this can also be changed with the snaky shape option). The speed of the plate movement give wider mountain chains, with fast movement giving a shape similar to Earth.

Tactically, it has some interesting choke points. An example:
Spoiler Tectonic (more land, fast movement) :
Tectonic (fast) 1.jpg
Tectonic (fast) 2.jpg
Tectonic (fast) 3.jpg
Tectonic (fast) 4.jpg
Tectonic (fast) 5.jpg
Tectonic (fast) 6.jpg
 
I used to play Communitas but I've switched to Perfect World 3.
Ok. Trying this right now. It's a bit dry to change settings in the lua file, but it allows for fine tuning. I've made a few changes so far for allowing longer rivers and reduce the amount of mountains (maybe too much), shorter snow areas, more marshes and fewer hills.
What I haven't managed is producing some big lakes or ocean rifts. Maybe someone can help me with the settings?

Here's what I've got after several attempts.
Spoiler Perfect World 3 :

PerfectWorld3 1.jpg
PerfectWorld3 2.jpg
PerfectWorld3 3.jpg
PerfectWorld3 4.jpg
PerfectWorld3 5.jpg
 
I notice in many of y'all's screenshot the bonus tile is only wheat. Is it because the other bonus resources still hidden and waiting for the respective tech researched?
 
Ok. Trying this right now. It's a bit dry to change settings in the lua file, but it allows for fine tuning. I've made a few changes so far for allowing longer rivers and reduce the amount of mountains (maybe too much), shorter snow areas, more marshes and fewer hills.
What I haven't managed is producing some big lakes or ocean rifts. Maybe someone can help me with the settings?

Here's what I've got after several attempts.

Mind to share the file? I like perfectworld's separation of continents (clear cut between old world and new world), but sometimes mountain ranges make locations awfully unhospitable. And I love rivers too...
 
Mind to share the file? I like perfectworld's separation of continents (clear cut between old world and new world), but sometimes mountain ranges make locations awfully unhospitable. And I love rivers too...
I can't remember all changes I did. Here's my current settings (edit PerfectWorld3.lua):
Code:
function MapConstants:New()
    local mconst = {}
    setmetatable(mconst, self)
    self.__index = self

    --Percent of land tiles on the map.
    mconst.landPercent = 0.25

    --Percent of dry land that is below the hill elevation deviance threshold.
    mconst.hillsPercent = 0.65

    --Percent of dry land that is below the mountain elevation deviance
    --threshold.
    mconst.mountainsPercent = 0.92

    --    .
    mconst.desertPercent = 0.36
    --Coldest absolute temperature allowed to be desert, plains if colder.
    mconst.desertMinTemperature = 0.39

    --Percent of land that is below the plains rainfall threshold.
    mconst.plainsPercent = 0.56

    --Percent of land that is below the rainfall threshold where no trees
    --can appear.
    mconst.zeroTreesPercent = 0.30
    --Coldest absolute temperature where trees appear.
    mconst.treesMinTemperature = 0.27

    --Percent of land below the jungle rainfall threshold.
    mconst.junglePercent = 0.75
    --Coldest absolute temperature allowed to be jungle, forest if colder.
    mconst.jungleMinTemperature = 0.70

    --Percent of land below the marsh rainfall threshold.
    mconst.marshPercent = 0.90

    --Absolute temperature below which is snow.
    mconst.snowTemperature = 0.20

    --Absolute temperature below which is tundra.
    mconst.tundraTemperature = 0.30

    --North and south ice latitude limits.
    mconst.iceNorthLatitudeLimit = 60
    mconst.iceSouthLatitudeLimit = -60

    --North and south atoll latitude limits.
    mconst.atollNorthLatitudeLimit = 20
    mconst.atollSouthLatitudeLimit = -20
    mconst.atollMinDeepWaterNeighbors = 4

    --percent of river junctions that are large enough to become rivers.
    mconst.riverPercent = 0.20

    --This value is multiplied by each river step. Values greater than one favor
    --watershed size. Values less than one favor actual rain amount.
    mconst.riverRainCheatFactor = 1.8

    --These attenuation factors lower the altitude of the map edges. This is
    --currently used to prevent large continents in the uninhabitable polar
    --regions. East/west attenuation is set to zero, but modded maps may
    --have need for them.
    mconst.northAttenuationFactor = 0.75
    mconst.northAttenuationRange = 0.15 --percent of the map height.
    mconst.southAttenuationFactor = 0.75
    mconst.southAttenuationRange = 0.15

    --east west attenuation may be desired for flat maps.
    mconst.eastAttenuationFactor = 0.25
    mconst.eastAttenuationRange = 0.08 --percent of the map width.
    mconst.westAttenuationFactor = 0.25
    mconst.westAttenuationRange = 0.08

    --These set the water temperature compression that creates the land/sea
    --seasonal temperature differences that cause monsoon winds.
    mconst.minWaterTemp = 0.10
    mconst.maxWaterTemp = 0.60

    --Top and bottom map latitudes.
    mconst.topLatitude = 70
    mconst.bottomLatitude = -70

    --Important latitude markers used for generating climate.
    mconst.polarFrontLatitude = 60
    mconst.tropicLatitudes = 23
    mconst.horseLatitudes = 28 -- I shrunk these a bit to emphasize temperate lattitudes

    --Strength of geostrophic climate generation versus monsoon climate
    --generation.
    mconst.geostrophicFactor = 3.0

    mconst.geostrophicLateralWindStrength = 0.6

    --Fill in any lakes smaller than this. It looks bad to have large
    --river systems flowing into a tiny lake.
    mconst.minOceanSize = 20

    --Weight of the mountain elevation map versus the coastline elevation map.
    mconst.mountainWeight = 0.5

    --Crazy rain tweaking variables. I wouldn't touch these if I were you.
    mconst.minimumRainCost = 0.0001
    mconst.upLiftExponent = 4
    mconst.polarRainBoost = 0.00

    --default frequencies for map of width 128. Adjusting these frequences
    --will generate larger or smaller map features.
    mconst.twistMinFreq = 0.02
    mconst.twistMaxFreq = 0.12
    mconst.twistVar = 0.042
    mconst.mountainFreq = 0.078

    --mconst.useCivRands = true --not ready for this yet
 
Oook, I was looking at the PerfectWorld3 thread, and it seems that the script was updated to version 5b (the one distributed in Steamshop is version 1). This one addresses all the complaints I had for version 1. This is very nice, check the screenshots.

Spoiler PerfectWorld 3v5b :

PerfectWorld 3v5b 1.jpg
PerfectWorld 3v5b 2.jpg
PerfectWorld 3v5b 3.jpg
PerfectWorld 3v5b 4.jpg
PerfectWorld 3v5b 5.jpg

The only thing I'm missing is some nice ocean rifts, as to have truly isolated continents. The world in 4000bC was surely more forested, but if we do so with the maps, some resources will not spawn (someone said horses?).
 
I've been digging inside the lua file of PlanetSimulator, and this lets you tune everything PerfectWorld3 does, and more. I've tweaked deserts and tundra generation to be reduced (default gives too much desert for my taste). I might tweak rivers too, but just wanted to show how it improves with a little change of constant numbers.

Spoiler Tuned PlanetSimulator :

PlanetSim v2 1.jpg
PlanetSim v2 2.jpg
PlanetSim v2 3.jpg
PlanetSim v2 4.jpg
PlanetSim v2 5.jpg
 
Ooooo juicy.

Is it possible to have only two big landmasses? I want to compare with Communitas two continent settings.
 
Ooooo juicy.

Is it possible to have only two big landmasses? I want to compare with Communitas two continent settings.
In GUI options you may choose Pangea or Continents. If chosen Continents, the script creates a rift, then assign plates (10 plates + extra plates depending on map size), to the map. In case the plate hits the rift, it is 'sunk' and another plate is generated.
There's a funny commentary in this part of the code:
Code:
--TODO: Add plate fusing as per BE script?

So, unless we recruit someone with modding skills, no, Continents cannot be fused into two landmasses. This fusing is performed in the code for Pangea (something about determining if a plate is continental or oceanic, and in case it turns out to be oceanic, try to move it). Probably not too hard to do, but I'm not confident enough to make such code. I just tweak constants in the code to my tastes.
 
I've been digging inside the lua file of PlanetSimulator, and this lets you tune everything PerfectWorld3 does, and more. I've tweaked deserts and tundra generation to be reduced (default gives too much desert for my taste). I might tweak rivers too, but just wanted to show how it improves with a little change of constant numbers.

That is one nice looking map. Can you explain the changes you made to the Lua because you appear to have fixed my two primary issues with PlanetSimulator: too much desert and too little tundra. Half my starts seem to involve at least some desert and I can't remember the last time the Tundra Pantheon was picked in a game.
 
In the Planet Simulator.lua You need to find this section:
Code:
    -------------------------------------------------------------------------------------------
   --Terrain type constants
   -------------------------------------------------------------------------------------------
   mconst.desertPercent = 0.10       --Percent of land that is below the desert rainfall threshold.
   mconst.desertMinTemperature = 0.35 --Coldest absolute temperature allowed to be desert, plains if colder.
   mconst.plainsPercent = 0.50    --Percent of land that is below the plains rainfall threshold.
   mconst.tundraTemperature = 0.31   --Absolute temperature below which is tundra.
   mconst.snowTemperature = 0.26    --Absolute temperature below which is snow.
   -------------------------------------------------------------------------------------------
You can then adjust the values as needed (I can't remember if this is my already edited version or the version as it comes so the figures might be different to what you find in the original).
Hope this helps.
 
That is one nice looking map. Can you explain the changes you made to the Lua because you appear to have fixed my two primary issues with PlanetSimulator: too much desert and too little tundra. Half my starts seem to involve at least some desert and I can't remember the last time the Tundra Pantheon was picked in a game.
Start reading the Lua file. There's a section in the beginning, with some deprecated constants. It then says the section where these constants are set now. Look for humidity and temperature, they give three options that you can select from the gui when starting a new game, you know, when you are allowed to select humid or arid planet. Well, browse to that section, you can set the percentage of desert tiles in your map for every option (I changed that just for standard, as I am still testing it). You can also set the percentage of marshes quite clearly.
Tundra is trickier, you must change temperature values, set the temperature at which tundra appears to a higher value, and don't increase the temperature for snow. I don't know yet which values are best, since changing humidity also affects temperature outcome.
 
This thread is fascinating and I have put together realistic Earth settings on Planet Simulator for anyone interested.

Standard Map Changes:
* Land % - 29%
* Hills % - 30%
* Mountain % - 10%
* Desert % - 33%
* Plains % - 30%
* No Trees % - 65%
* Marsh % - 6%
* Min. Lake Size - 3 tiles

Arable land will be a premium, but with Desert, Tundra, and Mountain pantheons, I think this map setting would be a good test for anyone. Navy is vital for world conquest.

Just copy and paste the text file into PlanetSimulator.lua

Edit: I pick Frequent Islands now because the Aegean, Pacific, and Oceanic waters aren't really a thing without it.
 

Attachments

Last edited:
Tectonic is quite random indeed even with identical settings. But it is a good thing.

Just don't set up everything on random. I have seen some terrible results. Especially with 43 Civs you need

More Land
Blocky Continents
Less Plates

Otherwise some Civs may not have space to settle their first town.
 
Does any other map script have the "river flowing into lakes" feature of Communitas? I really like that feature; it makes lakes much more realistic.
 
Does any other map script have the "river flowing into lakes" feature of Communitas? I really like that feature; it makes lakes much more realistic.
PerfectWorld3 has a piece of code that enlarges lakes, precisely for avoiding large rivers into small lakes. It sets a minimum number of lake tiles when a river goes into it. Planet Simulator inherits this code.
Problem is that lakes are very rare in these map scripts, but you can lower this value and hopefully you'll see more rivers ending in lakes.
 
In Communitas, rivers actually flow through small lakes into large lakes/the sea. Does that happen in PerfectWorld3 and Planet Simulator?
 
I decided to also make some changes to the Communitas.lua file and share my settings that have very similar percentages of land to my Planet Simulator file.

There's actually quite a bit more to play with there, so Earth-style Communitas looks promising.

Instead of having to download it like with Planet Simulator, Community Patch gets it in the mapscripts folder of the main file.

Edit - I tweaked the settings a bit after some trial and error, and one of the things that you'll notice is that Eurasia-style continents are much more realistic than with the default settings. There are Mediterranean / Baltic inland seas, and much more land that is continuous, which makes Domination victories more palatable.

If you want more island-hopping WW2 America vs. Japan gameplay, tweak the continental scatter settings. I'd recommend incrementally upping that percentage, because it can get really goofy, like all of Eurasia being like SE Asia goofy, if you go too high too fast.

I also reduced the desert %, because my 33% standard was based on the definition from rainfall, which doesn't necessarily mean hot deserts. Antarctica is technically a desert, but it's freezing cold. I'm not finding reliable %s, so I'm just putting it at 15% so there's a Sahara desert potential.
 

Attachments

Last edited:
That's a text file, copy and paste it to Communitas.lua if you want to use it.
 
Back
Top Bottom