[Map Script] PerfectWorld2.py

Will PW.py accept negative numbers?

If I did added something like this:

self.hmMinDeepOceanDepth = -0.15

and then later on in CreateTerrainMap

for i in range(0,mc.height*mc.width):
self.terrainMap.append(mc.DEEPOCEAN)
elif (self.heightmap = isBelowSeaLevel and >= self.hmMinDeepOceanDepth):
self.terrainMap.append(mc.OCEAN)

is that close to what I would need to do or am I horribly off?

Generally, the numbers should be between 0.0 and 1.0. If not, they will usually be normalized, so that your -0.15 will become the new 0.0. Your minimums and maximums will be expanded or clamped to 0 and 1.
 
In this script starts are placed purely for 'value'. Desert starts do happen occasionally when there are alot of floodplains concentrated in one area, but it's kinda rare. There really isn't any mechanism for 'fictional' starts of the kind I put in the Erebus map script. You might try Seven05's Erebus Continents map script which is based on PW2 but for FFH.
Hmm... I'm using FlavourMod and it still won't let me start in deserts. Could I just remove PW2's function that assign starting plots and just rely on FlavourMod? I think it would fix the issue, wouldn't it?

And, btw, is there a way to get rid of the normalization of the starts? Well, I guess if I remove PW2 starting plots assignment, it will remove that too.
 
Could you please bring the map size in line with the standards for the rest of the scripts. A small map using this script is as big as a standard. Large as huge, etc. It's annoying when you first use it, because if you know your computer can't handle large maps, and you pick standard, you get lagged out, and late game MAF crashes.

It's pretty easy to change it for yourself, just make the changes shown is posts 307 or 308 of this thread.
 
Hmm... I'm using FlavourMod and it still won't let me start in deserts. Could I just remove PW2's function that assign starting plots and just rely on FlavourMod? I think it would fix the issue, wouldn't it?

And, btw, is there a way to get rid of the normalization of the starts? Well, I guess if I remove PW2 starting plots assignment, it will remove that too.

I think FlavourMod only swaps starts that are already selected. It won't actually place it's own. Since PW usually doesn't place anyone in the desert, there will not be an available place for the Malakim.

You can redo the starting plot selection, but be aware that finding somewhat fair starts was the very most difficult task in the PW script. The default routine will give rediculously unfair results on this map. If you just want to get rid of the normalization, I think theres a function called boostStartingPlotValue that you can comment out, but again that's where alot of the fairness comes from as well.
 
aside from swapping starts, Flavourmod will also "hijack" the normalization routine ( for example, it deactivates RemoveBadTerrain, RemoveBadFeature, AddGoodTerrain... you get the picture ) . it does so with the VANILLA normalization routine though, so I'm not sure how it will behave with perfectworld's...
 
[to_xp]Gekko;8248552 said:
aside from swapping starts, Flavourmod will also "hijack" the normalization routine ( for example, it deactivates RemoveBadTerrain, RemoveBadFeature, AddGoodTerrain... you get the picture ) . it does so with the VANILLA normalization routine though, so I'm not sure how it will behave with perfectworld's...

Yeah in PW all of those are disabled and I use my own routines. I would be surprised though if Seven05 didn't handle these issue in Erebus Continent. He puts Malakim in the desert right?
 
he definitely does.

Opera, you could try asking Seven05 in his Erebus Continent thread in the FFH modmods and maps subforum. a FFH-optimized version of PW would be pretty sweet :D
 
I just want to throw my hat in the ring of praise for PerfectWorld. I just discovered it and it adds great variety and flavor to the game.

:hatsoff:

After reading this thread I will probably go back and try tweaking the BonusBonus variable. There are definitely more food-poor city sites than most standard map scripts, though I'm not convinced this is necessarily a bad thing. I sort of imagine small bands of people merely surviving in mediocre terrains until technology unlocks the secrets of nature (+1:food: from farms, windmills, watermills, +1:food: from watermills/workshops, corporations...) and then their small villages can explode in productivity!

The disparity in resources does result in "interesting" balance issues, but what would the point of the game be if you didn't have obstacles to overcome?

Everything I know about meteorology I learned from Wikipedia. :) I think that in Civ 5 once you research Wikipedia, it should make education obsolete. :lol:

This one got me in trouble at work! :lol:
 
There are definitely more food-poor city sites than most standard map scripts, though I'm not convinced this is necessarily a bad thing.

First, thanks for the compliments!

Second, pay attention to the food bonuses. If you start with no food bonuses, that means you have a very good starting position relative to other players. If you have alot of food bonuses, that is when you are in for a challenge. There's a system in place here; give it a chance and see how the game develops.
 
First of all thanks for this great Mapscript! I don't use any others any more...

But there is one thing that really bugs me:
It seems to be almost impossible to get non-coastal starting locations.
I tried setting CoastalCityValueBonus down to 1 but then you get lots of AI capitals settled one tile away from the coast, unable to use the seafood that's usually in their BFC.
Is there any possibility to get land far away from the coast that's not predictably uninhabitable in the beginning of the game? It would be great to have some landlocked civs now and then if the map/continent in question is big enough (i usually play standard/start anywhere/~13 civs).

Some questions/ideas on how to achieve this:
-Is there a variable that can be tuned so that the water is carried further inland if the wind goes in the right direction and there are no mountains in the way?
-Is rainfall only dependent on amount of water in the air or also on terrain height and thus temperature? A part of the water should keep going until it hits a montain range far away from the coast.
-Do inland lakes participate in climate generation? They could generate a little green zone in the middle of the desert...
-Is there any way to code the starting locations to be either coastal or at least x tiles inland?

thanks and hoping for insightful answers
Ulysses
 
Everything I know about meteorology I learned from Wikipedia. :) I think that in Civ 5 once you research Wikipedia, it should make education obsolete. :lol:

To lower the amount of desert, find the DesertPercent variable toward the beginning of the script, and set it to a lower number.

Thanks for the compliments everyone! :)

tried this - got a map with all grassland - no ocean no nothing. well other than grassland. weirdly two of the options on the create custom game screen are gone too, the cydrical/torodal one and something else i think.

I've just copied the perfect world pw file, made one change (0.9 to 0.6 i think) saved, then copied it into my civ4/public maps folder. Am i doing something wrong? tweaked the map sizes a bit earlier in this way and it worked fine.

anyway ive got bigger problems at the minute. my latest game jsut stopped and froze when hitting enter in the early 1800's. I think i might have buggered it up by trying to run betterai and bug with the new patch. i should stop messing with things i dont understand:cry:
 
I've just copied the perfect world pw file, made one change (0.9 to 0.6 i think) saved, then copied it into my civ4/public maps folder. Am i doing something wrong? tweaked the map sizes a bit earlier in this way and it worked fine.

This should work. Make sure you don't have two copies of perfectworld in directories that civ4 can see.

Also, in your Civilization4.ini file, set HidePythonExceptions to zero. That way you can see stuff go wrong and get a reason why. Any small typo will cause a map crash, especially in Python. Another thing you can do is check the PythonErr.log file, that should contain the reason for a map crash also.
 
First of all thanks for this great Mapscript! I don't use any others any more...

But there is one thing that really bugs me:
It seems to be almost impossible to get non-coastal starting locations.
I tried setting CoastalCityValueBonus down to 1 but then you get lots of AI capitals settled one tile away from the coast, unable to use the seafood that's usually in their BFC.
Is there any possibility to get land far away from the coast that's not predictably uninhabitable in the beginning of the game? It would be great to have some landlocked civs now and then if the map/continent in question is big enough (i usually play standard/start anywhere/~13 civs).

Some questions/ideas on how to achieve this:
-Is there a variable that can be tuned so that the water is carried further inland if the wind goes in the right direction and there are no mountains in the way?
-Is rainfall only dependent on amount of water in the air or also on terrain height and thus temperature? A part of the water should keep going until it hits a montain range far away from the coast.
-Do inland lakes participate in climate generation? They could generate a little green zone in the middle of the desert...
-Is there any way to code the starting locations to be either coastal or at least x tiles inland?

thanks and hoping for insightful answers
Ulysses

It just so happens that coastal terrain also tends to have the most fertile land. I would set that variable to be just over 1, so that in case of a value tie the coast will win.

As far as the other stuff goes. There may be some obscure variables that can help with that stuff but it's been a long time since I looked at that code and it's very complicated. Terrain height cools the air and pulls moisture from it to the ground. This makes the air dryer, so when it moves it will contribute less rain.

Inland lakes do not currently effect the climate. They have to be calculated after rivers, which depend on the climate, so there would have to be a second pass to determine the climate changes, which would change the rivers and then... Uh oh! :D
 
Second, pay attention to the food bonuses. If you start with no food bonuses, that means you have a very good starting position relative to other players. If you have alot of food bonuses, that is when you are in for a challenge. There's a system in place here; give it a chance and see how the game develops.

In my most recent game my own start was fine (Settler was originally 1W of the corn), but those of the Russians and Germans were very poor, allowing the Dutch, who are between them, to grow quite large.

I hear what you say about grassland as a base terrain compensating, but it puts the game on a fairly different pace than the whip-heavy course most standard games take. Usually when I'm dot-mapping my initial expansion phase most cities have 1-2+ food resources accessible with ancient-era technology.

Pic's in the spoiler. This map was generated with your "stock" script, the most updated version.

Spoiler :

My Ottoman Empire. Food is a bit scarce, with at most 1 food resource in all non-capitol cities. I don't think spices count, and plains cow barely does.




The Germans have only 1 corn and a couple cows in some outlying cities, and without even much grassland nearby.




The Russians are pretty screwed here. Moscow is on some nice river-grasslands, but has no resources in its BFC. In their entire empire there are only 2.5 pre-calendar food resources.


 
In my most recent game my own start was fine (Settler was originally 1W of the corn), but those of the Russians and Germans were very poor, allowing the Dutch, who are between them, to grow quite large.

I hear what you say about grassland as a base terrain compensating, but it puts the game on a fairly different pace than the whip-heavy course most standard games take. Usually when I'm dot-mapping my initial expansion phase most cities have 1-2+ food resources accessible with ancient-era technology.

Pic's in the spoiler. This map was generated with your "stock" script, the most updated version.

My Ottoman Empire. Food is a bit scarce, with at most 1 food resource in all non-capitol cities. I don't think spices count, and plains cow barely does.

The Germans have only 1 corn and a couple cows in some outlying cities, and without even much grassland nearby.

The Russians are pretty screwed here. Moscow is on some nice river-grasslands, but has no resources in its BFC. In their entire empire there are only 2.5 pre-calendar food resources.

I'm thinking that these are the rules from the XML. There are some changes to how I implemented this from the default routines, but my priority was to respect the spirit of the rules. Grain bonuses are supposed to be a minimum of 5 tiles away from any other grain bonus. Same for livestock.

Bonus placement is the only starting plot fairness balancer on this map, because I don't like to just place terrain without regard the climate system. One reason that some capitals don't have bonuses is because if they did, it would be that much harder to balance the starting locations. Your Moscow example is really a great starting location on PW. Another pretty big difference is that some bonuses are supposed to be on only one continent, and my starting plot sweetener respects that rule, while the default one does not! So on this map you won't see cows and pigs in the same continent and you probably see that alot on the factory maps.

After all that said however, I may have to reexamine my bonus placer. I'm a little surprised there were no food resource for Berlin. I wonder if my start plot sweetener respects the spacing rules, which really it should not.
 
look at this little tile of tundra in the middle of a huge desert. looks pretty ugly :D I had not seen any cold terrain in the middle of deserts in a while, since 2.01 I guess. weird how this could happen with the new rules to handle tundra/ice next to deserts ... :confused:
 
[to_xp]Gekko;8268755 said:
look at this little tile of tundra in the middle of a huge desert. looks pretty ugly :D I had not seen any cold terrain in the middle of deserts in a while, since 2.01 I guess. weird how this could happen with the new rules to handle tundra/ice next to deserts ... :confused:

That looks more like Creation(Erebus). Is this really PW2? You are correct, there is a routine that should change the surrounding tiles to plains.
 
yeah, it's FFH but the mapscript is definitely PW 2.03, I hardly ever play on any other mapscript now tbh. :D it's just that there's a VERY long vertical mountain chain just left of that huge desert, which blocks all the wind and rain from coming in I guess.
 
[to_xp]Gekko;8269625 said:
yeah, it's FFH but the mapscript is definitely PW 2.03, I hardly ever play on any other mapscript now tbh. :D it's just that there's a VERY long vertical mountain chain just left of that huge desert, which blocks all the wind and rain from coming in I guess.

One possibility is that this tundra was once a peak that was removed for some reason. PW doesn't always pay close attention to the terrain under peaks. I wonder if FfH has some reason to remove troublesome peaks.
 
I don't think so, since I'm not using flavourmod or anything that could modify the map after it is created, and that peak doesn't look troublesome anyway... would attaching a savegame be useful?
 
Top Bottom