[Map Script] PerfectWorld.py

Is there a logical reason why this script would be incompatiable with the "earth flavour... historically appropriate starting postions" script?

Cos When I've tried it it seems to screw the script up and leaves me with a basic grasslands map with no ocean etc...

I'm asking here cos I didint get a reply on the other forum...
Should work fine, I do that in my mod with modified versions of perfect world and the starting position normalizer.
 
I would like to play 18 civs on huge, with the possibility of a pangea, but also the possibility of islands. I have tinkered a bunch with the settings, and can't seem to get them right--no matter what I do, I seem to get either pangeas or way too crowded land masses. Right now, I am at 47% land mass, with pangea set to allow, and civs able to settle anywhere. Any suggestions?
 
I would like to play 18 civs on huge, with the possibility of a pangea, but also the possibility of islands. I have tinkered a bunch with the settings, and can't seem to get them right--no matter what I do, I seem to get either pangeas or way too crowded land masses. Right now, I am at 47% land mass, with pangea set to allow, and civs able to settle anywhere. Any suggestions?

I'm not sure I understand the problem. If you turn off the new world rules, it should spread the starting plots out fairly evenly.
 
It's not a problem, really: more trying to see if you have any recommendations on how to get what I'm looking for, which is a decent amount of land for 18 civs on a huge map where I can't assume that I'll get a single continent. Right now, with allow pangeas on, I invariable get one large land mass--when I set break pangea to true, I get an overly crowded map. Just trying to find a balance point where, when I start the game, there is more mystery as to the type of map I'm on.
 
It's not a problem, really: more trying to see if you have any recommendations on how to get what I'm looking for, which is a decent amount of land for 18 civs on a huge map where I can't assume that I'll get a single continent. Right now, with allow pangeas on, I invariable get one large land mass--when I set break pangea to true, I get an overly crowded map. Just trying to find a balance point where, when I start the game, there is more mystery as to the type of map I'm on.

Well, I always intended for these maps to have alot of ocean, so I made them somewhat bigger than the normal maps in raw size.

When you set the land percent to 47%, and then try to break up pangaeas, it may call forth so many meteors that you actually get alot less land than 47%. It kindof depends just how they hit. You might actually get better results if you set the land percent lower. That will make well defined bottlenecks more likely, which should require less meteors to break up.

If you don't mind pangeas, you might set the percent around 30% and allow pangaeas, that might give you a better mix.
 
Hi, I'm trying to use your map script with the Rise of Mankind mod, but I'm having some trouble, the script doesn't generate a proper map with the two RoM added world sizes of Giant and Gigantic. I added them in the script file so it now looks as such:
Code:
	grid_sizes = {
		WorldSizeTypes.WORLDSIZE_DUEL:		(12,8),
		WorldSizeTypes.WORLDSIZE_TINY:		(16,10),
		WorldSizeTypes.WORLDSIZE_SMALL:		(22,14),
		WorldSizeTypes.WORLDSIZE_STANDARD:	(26,16),
		WorldSizeTypes.WORLDSIZE_LARGE:		(32,20),
		WorldSizeTypes.WORLDSIZE_HUGE:		(36,24),
		WorldSizeTypes.WORLDSIZE_GIANT:		(42,30),
		WorldSizeTypes.WORLDSIZE_GIGANTIC:		(54,36)
	}
Is there something I'm missing to make it generate a correct map? Or is it a lost cause?

EDIT: Ok, I've got it to create a proper map, but it's still giving this error:
Code:
Traceback (most recent call last):

File "Perfectworld" line 3733, in getGridSize

AttributeError: type object 'CvPythonExtensions.WorldsizeTypes'
has no attribute 'WORLDSIZE_GIANT'

Any idea why?
 
Hi, I'm trying to use your map script with the Rise of Mankind mod, but I'm having some trouble, the script doesn't generate a proper map with the two RoM added world sizes of Giant and Gigantic. I added them in the script file so it now looks as such:
Code:
	grid_sizes = {
		WorldSizeTypes.WORLDSIZE_DUEL:		(12,8),
		WorldSizeTypes.WORLDSIZE_TINY:		(16,10),
		WorldSizeTypes.WORLDSIZE_SMALL:		(22,14),
		WorldSizeTypes.WORLDSIZE_STANDARD:	(26,16),
		WorldSizeTypes.WORLDSIZE_LARGE:		(32,20),
		WorldSizeTypes.WORLDSIZE_HUGE:		(36,24),
		WorldSizeTypes.WORLDSIZE_GIANT:		(42,30),
		WorldSizeTypes.WORLDSIZE_GIGANTIC:		(54,36)
	}
Is there something I'm missing to make it generate a correct map? Or is it a lost cause?

EDIT: Ok, I've got it to create a proper map, but it's still giving this error:
Code:
Traceback (most recent call last):

File "Perfectworld" line 3733, in getGridSize

AttributeError: type object 'CvPythonExtensions.WorldsizeTypes'
has no attribute 'WORLDSIZE_GIANT'

Any idea why?

I'm not actually familiar with that mod, but are you sure you spelled WORLDSIZE_GIANT correctly? I think that once you put those in, you can only use the map with that mod. On other maps, does it not complain about these new types?
 
This script has rather strict dimension limits. Specifically, the map must be evenly divisible, in Width and in Height, by a power of two that is at least mapWidth/16. It will throw a Python Exception if the size doesn't meet that criteria. Also keep in mind that the 'cell' size or whatever is 4x4 map squares I think. Any time you get wall to wall grassland it means the map script crashed.

PW is not the fastest map script on the block. Maps bigger than huge seems like it would take forever to generate. Also, this script is kindof a memory hog, I think Civ puts limits to how much memory is available to Python and there were some past versions of PW were I hit that limit with Huge sized maps. Good luck.

Here is something I had said about this earlier.
 
Just tried the new version. Were you ever able to figure out why the grain/livestock distribution is so rigid? It just seems strange to me that invariably and without fail, any given continent only has one of a specific type of grain, and one of a specific type of livestock. In one map, there were two major continents and some smaller islands, and all of the sheep and rice were on one continent, all of the pigs and wheat were on the other continent, and the ENTIRETY of the cows and sheep were a mere two or three each scattered on a couple of the islands.

Your map script is the best, but this resource problem is just so puzzling to me. I know you helped with a manual fix to the XML, but intuitively it just seems strange that there can't be an in-game/in-script fix, since so many of the other maps allow for diversity of grain/livestock within individual continents.

Is this just me? Is anyone else noticing this, invariably and without fail?

Thanks for all your hard work!
 
I believe the behavior you describe is intentional: there is a note somewhere that refers to the desirability of having resources grouped by continent. Yes, there it is--check out the very first post, where he writes
Here is an example on the huge map how resources are placed. I captured a junction of three continents to show that, to encourage trading, different continents have different resource sets. One continent has wheat and pigs, another cows and corn, and the other sheep and rice. These resources are designed in the XML to avoid appearing on the same continent, and this rule is respected when starting plots are normalized also.
 
I believe the behavior you describe is intentional: there is a note somewhere that refers to the desirability of having resources grouped by continent. Yes, there it is--check out the very first post, where he writes

The thing that is throwing me is that the other maps and map scripts don't function that way with grain/livestock. Which makes me think there must be an easier fix.

Oh well. To each his own, I suppose! :)
 
The thing that is throwing me is that the other maps and map scripts don't function that way with grain/livestock. Which makes me think there must be an easier fix.

Oh well. To each his own, I suppose! :)

Actually, I believe the only reason that you sometimes see multiple types on the same continent is because the starting plot normalizer doesn't respect the bArea flag in the XML. If you look at the default bonus placement code, it's clearly intended to avoid mixing continents if it can. It is to encourage trade.
 
My question is... is there a way to reduce the desert content? PerfectWorld seems to have LAAARGE amounts of desert.

edit: nvm, found it. Nice, easy to read file. Kudos!
 
I usually startup on duel maps with two civs, when testing stuff with the worldbuilder. I use all settings on default. In one case, the script placed my starting warrior RIGHT NEXT TO the other civ's settler! Easiest win ever! :D
 
I usually startup on duel maps with two civs, when testing stuff with the worldbuilder. I use all settings on default. In one case, the script placed my starting warrior RIGHT NEXT TO the other civ's settler! Easiest win ever! :D

Heheh, things get really crowded on duel maps. Especially when you need for room for a new world as well. Duel maps have always brought up unique situations. I'm expecting the day when someone says, "Hey, I tried a duel size map with 18 civs and it didn't work!" Ok I admit! I never tested that! :lol:
 
First, thank you for all your work in this really amazing mapscript... these maps really do make much more sense to me in terms of where mountain ranges pop up and things like that... but I found something that you may want to tweak in your next release...

I don't know if this has been posted in the 20+ previous screens of dialog, but I'll ask anyway :)

I used PerfectWorld.py on a Standard map size and wound up with a good starting location food-wise (3 clams); however, due to the number of surrounding hills, it has no capability to be irrigated pre-biology (see screenshot of Cuzco below)... luckily, I'm wonder-spamming and got the Pyramids... so I'm settling Great Engineers to compensate in this game... but perhaps you can do a quick check to see if there is any freshwater in the starting plot... if not, add a 1-tile river (or perhaps lake?) next to a flat tile in the recommended starting BFC...

Also, I noticed that you define "class StartingPlotFinder" in your code... does anyone have an idea how the standard BtS map scripts identify the player's starting point? I am getting consistently better starting positions as Incas than I do with something like Hemispheres... I'll confess that I have a paranoid suspicion that Firaxis punishes the more powerful leaders with somewhat less desirable starts... thoughts?
 
The standard starting procedure basically finds the top 'n' places to build a city and places the players at those spots, taking into consideration how many people already on a continent and also distance from other starts. Most maps shuffle the players to determine first pick but not all of them do. This works OK on a map that is fairly homogenous in terms of land quality, where you are never too far from usable land.

PerfectWorld however, has large areas of good and bad land, so that scheme really didn't work very well. I worked very hard to try to make PW's starts as fair as possible. If you do choose to read all the old posts in this thread you can get an idea of the challenges that need to be dealt with.

As for adding fresh water to a start plot, that's actually kindof difficult to do on this map as the river system is strictly altitude based. If there is a river or a lake at a given spot, there is a very good reason why it's there according to the simulated laws of nature. By having little river sections defy these laws, like going 'uphill' for a stretch, it would be very difficult to maintain the illusion I'm going for with this map. There should be enough food, production and commerce, along with fair access to better lands to get you going.
 
As for adding fresh water to a start plot, that's actually kindof difficult to do on this map as the river system is strictly altitude based. If there is a river or a lake at a given spot, there is a very good reason why it's there according to the simulated laws of nature. By having little river sections defy these laws, like going 'uphill' for a stretch, it would be very difficult to maintain the illusion I'm going for with this map. There should be enough food, production and commerce, along with fair access to better lands to get you going.

In this specific map, it would not have been such a stretch to add a river, since there was a peak about 3 squares northeast that was already sourcing another river... but I understand the desire to keep your code consistent. Perhaps another approach is giving the starting plot finder a strong preference for rivers and then adding resources to compensate for an otherwise bland start.

I tuned down PeakPercent and changed the desert / plains thresholds... turning down PeakPercent was a nice change, since most of the mountain ranges in the real world have sections that you can cross... PW defaults are especially harsh on thin continents / small islands... PW defaults tend to give a "great wall" of coastal mountain ranges on thin continents... I think coastal hills are more appropriate in most cases. Instead of frequent peaks, now I get more frequent TundraHills where the peaks were... this seems like a better outcome that still simulates the lack of agriculture potential for the terrain.

In the maps I've generated so far, there seems to be a stronger preference for south-pole landmasses... especially when you increase LandPercent to something like .3 or .4... any thought on why?

I also noticed that DesertPercent is very very sensitive... it seems like almost an all or nothing variable... I think I wound up using 0.005, which still gives me a few patches of desert, but not the vast expanses that I normally saw out of PW's default settings... that might be a little too low, but I need more exact data to come to a better conclusion.

I'm suspect that there are plenty of relationships between terrain and weather. I'd like to look at rainfall, temperature and wind values while I'm in-game... I used the chipolte cheat so I could import PW functions, but I'm still trying to find a way to hack PW so I can see per-tile weather values in-game. I'll post a followup if I can figure something out... I'm not a heavy BtS modder, so there is lots of research to do here.
 
PW uses lot's of extra bitmaps for weather and a whole bunch of other things also. I don't know how to show those values in game, but for each bitmap theres usually a print function that will print a text map where each character has a certain meaning. That's how I did my debugging to make sure the weather effects had the result I was looking for.

I think that alot of people who are new to PW tend to be surprised by the amount of desert, but there are a couple of reasons why I like it that way. First of all, it is quite realistic. Most of the world actually doesn't get alot of rainfall. Another reason is that I like that there is good land and bad land. Good land can only be good if something exists that is worse, otherwise its just normal land. Making good land scarce means there's something to fight over. Another thing that is really cool in BtS specifically is that corporations allow you to really make use of some previously unusable land. This kindof simulates modern times where cities like Phoenix AZ simply wouldn't exist without advanced technology. I once had a city in a desert with 3 gold resources, iron and an oil, with no water for miles. The city gave me access to those resources, but that was it's only contribution for eons. Once I moved in Cereal Mills, I actually got to work those tiles and it was an awsome city! I thought that was fun.
 
Back
Top Bottom