[Map Script] PerfectWorld2.py

Open the map script, and toward the beginning you will see some adjustable variables that are well commented. You can turn down DesertPercent to a level more to your liking.

Stupid question... How can I open the map script? :blush:
 
Is there anyway of getting a little more randomness in terms of desert/plains/grassland in changing the variables?
I've shrunk both the deserts and plains, but almost without fail any reasonable sized continent will have a desert in the center, a ring of plain, then areas of grassland by the coast. Chunky peninsulas coming off the main continent will be usually exclusively grassland, and smaller australia sized continents will also be largely grassland.
Id like some variation. deserts on the east/west/south/north part of the continent rather than stuck in the middle. plains and grassland mixed in together. At the moment every map I generate is like a fried egg, if you get what i mean.
The problem I have with this is it makes my games too predictable. Civs are settled on the coast. there is always a huge badlands in the center of the continent, which gets settled last and always has lots of barb cities. It tends to mean I will rarely do a rush on PW as there will be loads of crappy land between me and my neihbour. It also means that coastal starts are almost certain as theres little good land in the center. In PW I nearly always do a WB WB start.

Ive gone back onto fractal for the minute, due to the above issues which is a shame as the continent formation and ranges of mountains in pw place it far and above the stock maps, and add a whole new strategic layer. Id still like there to be a possibility of a huge desert or plains in the middle of my continent, but I dont want it to be a certain.

any quick fixes in the variables, or do I have to beg Cephalo to make an "arcade" version of PW?
 
Is there anyway of getting a little more randomness in terms of desert/plains/grassland in changing the variables?
I've shrunk both the deserts and plains, but almost without fail any reasonable sized continent will have a desert in the center, a ring of plain, then areas of grassland by the coast. Chunky peninsulas coming off the main continent will be usually exclusively grassland, and smaller australia sized continents will also be largely grassland.
Id like some variation. deserts on the east/west/south/north part of the continent rather than stuck in the middle. plains and grassland mixed in together. At the moment every map I generate is like a fried egg, if you get what i mean.
The problem I have with this is it makes my games too predictable. Civs are settled on the coast. there is always a huge badlands in the center of the continent, which gets settled last and always has lots of barb cities. It tends to mean I will rarely do a rush on PW as there will be loads of crappy land between me and my neihbour. It also means that coastal starts are almost certain as theres little good land in the center. In PW I nearly always do a WB WB start.

Ive gone back onto fractal for the minute, due to the above issues which is a shame as the continent formation and ranges of mountains in pw place it far and above the stock maps, and add a whole new strategic layer. Id still like there to be a possibility of a huge desert or plains in the middle of my continent, but I dont want it to be a certain.

any quick fixes in the variables, or do I have to beg Cephalo to make an "arcade" version of PW?

I might be able to do something like that, but it would be alot of work, and it would violate the 'rules'. Part of what makes PW work is that it sticks to it's rules, and creates a sensibility for why there is rain here and not there.

I do understand though, the result of these rules is often quite different from Earth. There are alot of reasons why it ends up like it does, and there are several things I could do to improve the situation. For example, the way I generate plate tectonics means that continents very often are surrounded by mountain ranges that block the rain. I'd like to find a solution that keeps to the rules if I can.

Hopefully I'll get around to another update for PW soon, and there will be changes that should make climate much easier to control at least.
 
Another problem is that it doesn't fully account for moist and arid currents. The script the way it's set up would make the Great Plains desert; it wouldn't account for the gulf air bringing moisture to the eastern US. It would also make Australia all grassland. I hear you about the time though, it would take a good deal of work to change the current central desert system in a way that played by a set of rules based on Tectonics and Meteorology. Still though, it sure would be nice if effects like gulf streams were taken into account so there was more variability in the global climates produced. The "Fried Egg" effect is definitely a good way to describe it.
 
Another problem is that it doesn't fully account for moist and arid currents. The script the way it's set up would make the Great Plains desert; it wouldn't account for the gulf air bringing moisture to the eastern US. It would also make Australia all grassland. I hear you about the time though, it would take a good deal of work to change the current central desert system in a way that played by a set of rules based on Tectonics and Meteorology. Still though, it sure would be nice if effects like gulf streams were taken into account so there was more variability in the global climates produced. The "Fried Egg" effect is definitely a good way to describe it.

Well to use this as an example, imagine if there was a mountain range on the coast of Texas and Louisiana, then the Great Plains would indeed be a desert. That's kinda how most continents are configured in PW. The monsoon code that I have should in theory bring rain all the way into a flat continent, but there aren't very many of those.

Check out this map, this is kinda what I'm going for. Imagine the yellow parts as desert.
http://encarta.msn.com/encnet/RefPages/RefMedia.aspx?refid=461530746
 
One thing you guys might do to get rid of the 'fried egg' look is you can take out the monsoon code by setting the variable geostrophicFactor to 100.0 or so. You might like the results better.
 
I played with the tunable variables a lot lately. Here are some of the things i did and what i found out:

First i increased PlateMapScale from 1.1 to 2.0 so the heightmap is mainly generated by tectonics.

Now if the heightmap is generated mainly by tectonics you can get rid of some of the coastal ranges by:
-decreasing PlateStagger (height differences between tectonic plates)
-decreasing RippleFrequency 0.5 -> 0.2 (if i undestand this one correctly, what i did should increase the "wavelength" of mountain ranges near plate borders, thus moving some of the height disturbance further inland)

To make sure that the map doesn't get too boring with the above settings (which can give you relatively large areas without any hills at all)
-i tunred hmNoiseLevel up from 2.0 to 20.0 (you'll have to check if your computer can handle that; 30.0 made me use the reset button).
-tripled the number of plates (make sure to lower minSeedRange accordingly or it won't work)
-also lowered plateGrowthChance 0.3 -> 0.1 (not sure what this does, the comment says it'll give more irregular plate shapes)

So, considering all of the above plus what cephalo suggested about geostrophic vs monsoon, i think this script can be tuned to satisfy almost everyones needs...

...although there is one problem that was addressed before and i know no solution to:
you just cant get rid of all the coastal starts. setting the variable determining their value (forgot the name atm) to anything lower than the default 1.3 will generate AI starts one tile away from the coast, missing lots of seafood; apparently the AI never moves the settler.
It would really be nice to get starts at least a bit further inland, the terrain can be made good enough for that with the above changes. All that would be needed is some rule int the code that prevents really stupid choices like one plot off the coast.

greets
Ulysses
 
I should add that i did most of the testing on large maps. I don't know what this does on below-standard sizes...
Also i increased the land percentage to 0.33 (more land = more civs =more fun!) and BonusBonus (to 1.25)

I'm not sure any more about what i wrote about the PlateStagger variable above, it seems like more and more irregular plates plus more heightmap noise already do a good job keeping the height difference away from the coast.
EDIT: You can even use more platestagger than the default (tried .15 instead of .1) which gives archipelago-like results when the number of plates is high enough, again with no unreasonable amount of coastal mountain ranges.

With these changes you often get mediterranean-type geographies where a civ starts on the coast but probably won't get access to the "real" ocean without open borders with another civ as soon as the coastal chokepoints are settled.

View attachment 232740

View attachment 232741

View attachment 232742

View attachment 232743

Tectonics also tend to generate some nice island chains:

View attachment 232744

With more randomness you sometimes don't need the meteors to separate pangaeas, and if you use them, they will have an easier job htting just one or two small chokepoints. In the map below (generated without meteor code) the depicted island chain was the only connection between two big continents.

View attachment 232745

Below are some flatlands on the coast:

View attachment 232746

And another one, also showing a rare specimen of the endangered species of inland starts.

View attachment 232747

greets
Ulysses

EDIT: Another observation: a geostrophicFactor of 3.5 seems to give a good balance between fried-eggs-effect and what i would like to call climatezone zebrastripes. Just a little bit more randomness wouldn't hurt though. In the comments of the desert/plains modifiers i think it says something about chances of desert etc to appear, so there seems to be some randomness in place already. Maybe it can be turned up just a bit?
This and more inland starts, which can be achieved by preventing (with brute force) starts to be placed say 1-3 tiles off the coast, so that CoastalCityValueBonus can be lower than 1.3 without hurting the AI, would make this truly perfect to me.
 
I agree about the same old same old and the deserts. I also noticed the size of the map has a limit no matter how many civs are in the game, as seems different than the first PW. Right now I'm sticking with the first Perfect World map and enjoying that. For some reason that seems to adjust in size relevent to the number of civs in the game. Or am I incorrect?
 
I'm new to installing these mods. How do I get this .py file to work with CIV4 BTS? I assume I need to copy it to a folder, but I'm not sure which one. Thanks in advance for your advice!
 
I'm new to installing these mods. How do I get this .py file to work with CIV4 BTS? I assume I need to copy it to a folder, but I'm not sure which one. Thanks in advance for your advice!

Copy it into ...\Beyond the Sword\PublicMaps
 
Ok, version 2.04 is up!

The first change I made was long overdue. I finally changed the percentage variables for terrain types etc. to be a percent of land tiles instead of a percent of all the tiles. Now you can finally tinker with the land percent without messing up the balance of terrain tiles.

I added extra bonuses to be placed when the player is at a certain handicap level. These can be adjusted in the map constants. This way you have a fighting chance to resist the tsunami of AI cheating at higher difficulties. How much exactly should be added is something I might need some input on, because I refuse to play above Noble. :lol:

I also caused a minimum of hills in a starting flat cross so that nobody will have to worry about zero production. This is adjusted in a map constant.

I gave a slight value bonus for river sides so that starting plots will favor river sides. This is adjustable in map constants.

Another thing I did which might be slightly contraversial is I disabled the normalizeRemovePeaks function, and instead there is now an adjustable maximum number of peaks in the starting FC. The old function was flattening peaks in like a 5 tile radius around starts, and peaks are fun! Also, this all happened after starting plots were given and adjusted, throwing off the calculations in a big way, so hopefully starts will be a bit more fair, and more dramatic looking. :D

EDIT: I also bumped up geostrophicFactor to 6.0 to make things less fried eggy.
 
Thanks for the new version cephalo!

I agree about peaks in the FC being ok as long as there are not too many.
As it seems you did quite some work on the evaluation code for starting positions, adding the max. peaks and min. hills requirements.
Now i can only repeat what i asked earlier about coastal starts:
Can't you put in another condition that requires a start to be either on the coast or at least 2 tiles away? That would finally make the variable CoastalCityValueBonus usable. Look at the epic fail in the picture below: This even happens sometimes with the default CoastalCityValueBonus of 1.3.

View attachment 232853

greets
Ulysses

EDIT: In case of a non-coastal start the additional starting resources shouldn't be seafod of course.
 
Thanks for the new version cephalo!

I agree about peaks in the FC being ok as long as there are not too many.
As it seems you did quite some work on the evaluation code for starting positions, adding the max. peaks and min. hills requirements.
Now i can only repeat what i asked earlier about coastal starts:
Can't you put in another condition that requires a start to be either on the coast or at least 2 tiles away? That would finally make the variable CoastalCityValueBonus usable. Look at the epic fail in the picture below: This even happens sometimes with the default CoastalCityValueBonus of 1.3.

View attachment 232853

greets
Ulysses

EDIT: In case of a non-coastal start the additional starting resources shouldn't be seafod of course.

:lol: That's pretty bad. I don't see alot of those fortunately. A human can correct it easily I guess. I would guess that the far left clam is a natural clam, and the evaluation wanted to get the clam and the sheep.

I'll have to remember this for the next update. It will take a bit of work to properly evaluate water resources for non-coastal cities.
 
I don't see alot of those fortunately.

Well, if you lower the CoastalCityValueBonus, this happens all the time, effectively rendering this variable useless for getting more inland starts.

I'll have to remember this for the next update. It will take a bit of work to properly evaluate water resources for non-coastal cities.

All that would have to be done is to make starting tiles either be ON the coast or at least 3 TILES INLAND (not one or two like i wrote above).
Then the AI EITHER gets the water resources in the first city OR has the possibility to built another city in between (which it'll do most likely). Nothing in the evaluation processes as such for the FC or the further surroundings (the scrpt does that, right?) would have to be changed.
Unfortunately i don't know anything about pyton but i suspect it would take just a few lines of code... probably not more complicated than what you did concerning hills and peaks in the most recent release.

greets
Ulysses
 
Well, if you lower the CoastalCityValueBonus, this happens all the time, effectively rendering this variable useless for getting more inland starts.



All that would have to be done is to make starting tiles either be ON the coast or at least 3 TILES INLAND (not one or two like i wrote above).
Then the AI EITHER gets the water resources in the first city OR has the possibility to built another city in between (which it'll do most likely). Nothing in the evaluation processes as such for the FC or the further surroundings (the scrpt does that, right?) would have to be changed.
Unfortunately i don't know anything about pyton but i suspect it would take just a few lines of code... probably not more complicated than what you did concerning hills and peaks in the most recent release.

greets
Ulysses

The problem is that inland cities really do have some disadvantages. Aside from building a navy and getting first dibs on the new world, it's far easier to get good trading routes on the coast. The value boost that I use does, for the right reasons, the same thing as the brute force method you are proposing. In my experience there will be inland starts only when there's a really good spot. On larger maps it's alot more common.

The value of 1.3 is kinda arbitrary. It might be better or more accurate at a different value, and this perfect value might change depending on map size, allowed victory conditions, etc. but I think it feels pretty good.

I can easily imagine a place just off the coast that might be well worth starting on. I'd like it to be a possibility if the situation should warrant that.
 
Well, i usually play on large/huge maps with lots of civs (ca. 20 plus the ones created by revolutions and barb cities) and no empty new world, and i imagine there are more people like me who enjoy this mapscript also because it creates worlds that are bigger than the usual "huge". On such a map it doesn't make a lot of sense that the interior of a big continent (which doesn't necessarily have to be all desert, as i pointed out above) stays empty for a very long time.

This seems to be just a matter of taste... and thats why i ask for an opportunity to get more inland starts. The change i propose won't alter anything as long as you leave the CoastalCityValueBonus and other variables the way they are. The rare inland starts will probably still be very close to the coast (due to climatic conditions) and allow for enough coastal cities for the civ in question, but it won't screw the AI like in my example above, which depicts the kind of inland starts you get with the script as it is now.

Again, what i ask for is only an opportunity to tune the script according to ones taste. It won't change anything as long as you leave the variables the way they are, except that the very rare inland starts you get now won't screw the AI.

greets
Ulysses
 
Top Bottom