[Map Script] PerfectWorld2.py

I'm not sure for strategic ressources [edit : no, it seems to scatter them around the map normally]. But removing the food spacing rules did not reduce the area of the continent where they can be found, it just made them to appear in small and relatively realistic clusters (with some exceptions). And the overall number of ressources did not decrease. On the contrary, it seemed to increase. Except for sea food, which now appear almost only on starting locations. Strange.

[second edit]Ho. I understand. I used an old file where i duplicated the addbonuses loop.
 
Oh, and I just noticed that wheat and cows can be absent of one continent, preventing the script from adding food bonuses to starting locations in large area of plains.
 
Oh, and I just noticed that wheat and cows can be absent of one continent, preventing the script from adding food bonuses to starting locations in large area of plains.

Yes those resources are designed to actually be on one continent only. Ideally, you would have cows on one continent, pigs on another, and then sheep on yet another. Same for wheat, corn, and rice. It can become a slight problem if there are more than 3 major continents, but I try to alleviate that somewhat by finding islands to place them on, but this is by design to promote trade.

EDIT: also, this rule is broken by the default starting plot normalization, so that's why you will sometimes see cows and pigs together on one continent on the stock maps. My normalizer respects this rule.
 
What happens if you end up with a pangea map, or near-pangea? Will the main landmass have only one of wheat/corn/rice or pigs/cows/sheep, with the rest banished to islands?
 
What happens if you end up with a pangea map, or near-pangea? Will the main landmass have only one of wheat/corn/rice or pigs/cows/sheep, with the rest banished to islands?

When there's only one or two continents, multiple ones can exist together but what happens is that the one that is placed first will tend to dominate the others by taking up most of the real estate. You'll have like ten cows, 2 sheep, and maybe one pig. In my bonus placement I always have at least one of everything. There's a routine at the end that disregards the rules and places it somewhere.
 
Can you add an option to allow elimination of land tiles at the poles? I don't like how you can reach the poles but can't travel through them.

Also, can you let players choose the land, peak, hill, plain, etc. percentages?
 
Can you add an option to allow elimination of land tiles at the poles? I don't like how you can reach the poles but can't travel through them.

Also, can you let players choose the land, peak, hill, plain, etc. percentages?

There are many adjustable variables at the beginning of the script. Most of them are fairly self explanatory, but the one you might be interested in is mc.northMargin or (self.northMargin as it is written). Set northMargin to 'True' and this will prevent land at the north pole. This will greatly limit the amount of tundra however, and if you increase the tundra by raising the tundra temperature, you might end up with an unacceptable amount of tundra on altitude peaks in the warmer climates.

I like that the land touches the north pole because it mimicks the real world in a way. No northwest or northeast passage.
 
well atleast make the option of Toroidal then. It bother's me as well how i can't go past the north poll.
 
So I tried to modify your script by adding a third option, to allow the player to choose the land percentage. Now, while I have some programming experience, I have absolutely no knowledge of Python whatsoever. That said, I simply looked at your code and attempted to mimic your syntax.

As far as I know, there are 5 places which need to be altered to add one option. I added code just a little bit below where the static defines were, and in 4 of the blocks beginning with something like "def getCustomMap..." near the bottom of the script.

def getNumCustomMapOptions(): Had it return 3, since I added one more option.
def getCustomMapOptionName(argsList): Named my new option Land Percentage.
def getNumCustomMapOptionValues(argsList): Added the number of choices for Land Percentage.
def getCustomMapOptionDescAt(argsList): Listed all choices for Land Percentage.

Now, when I try to run this script, I get no special choices, and it seems that attempting to build a map by this script freezes the game. So obviously my alterations don't work. Do you think you can take a look at my changes and see if you can get this option working?

http://www.fileden.com/files/2008/6/8/1950977/PerfectWorld3.zip
 
Why don't you use that ?
Code:
##############################################################################
## GLOBAL TUNING VARIABLES: Change these to customize the map results
        
        #Percent of land vs. water
        self.landPercent = 0.30



Cephalo, concerning the repartition of ressources on different continents, could you supress some terrain requirements that prevent pigs from appearing on plains and wheat from appearing on grassplains ?
On factory maps these limits only add some difference between areas, but on your maps, since the separation between continents works, it is not necessary, and it can create particularily poor climate zones in certain continents. If one continent has pigs, rice and bananas, while the other one has sheep, cows and wheat, the first one's plains will be advantaged against other areas of the continent, and the second one's jungles will have the same kind of advantage against the rest of the continent.
And maybe, as deer is the only food ressource for toundra areas, and can be found worldwide irl, it would be good also to create an exception for it.
 
So I tried to modify your script by adding a third option, to allow the player to choose the land percentage. Now, while I have some programming experience, I have absolutely no knowledge of Python whatsoever. That said, I simply looked at your code and attempted to mimic your syntax.

As far as I know, there are 5 places which need to be altered to add one option. I added code just a little bit below where the static defines were, and in 4 of the blocks beginning with something like "def getCustomMap..." near the bottom of the script.

def getNumCustomMapOptions(): Had it return 3, since I added one more option.
def getCustomMapOptionName(argsList): Named my new option Land Percentage.
def getNumCustomMapOptionValues(argsList): Added the number of choices for Land Percentage.
def getCustomMapOptionDescAt(argsList): Listed all choices for Land Percentage.

Now, when I try to run this script, I get no special choices, and it seems that attempting to build a map by this script freezes the game. So obviously my alterations don't work. Do you think you can take a look at my changes and see if you can get this option working?

http://www.fileden.com/files/2008/6/8/1950977/PerfectWorld3.zip

If I were you, I wouldn't worry about making it an option. Just tune the settings to your taste and use it that way. I really don't like putting alot of in-game options cluttering up the interface. There really is no limit to the various options people want in their maps. I could put 3, or 5, or 50, or 200 and people will still ask for more. It's much more efficient to just teach people to tune the map.

I may add some more options, but they can't be matters of taste, it has to be something that people would want to change from game to game.
 
On factory maps these limits only add some difference between areas, but on your maps, since the separation between continents works, it is not necessary, and it can create particularily poor climate zones in certain continents. If one continent has pigs, rice and bananas, while the other one has sheep, cows and wheat, the first one's plains will be advantaged against other areas of the continent, and the second one's jungles will have the same kind of advantage against the rest of the continent.
And maybe, as deer is the only food ressource for toundra areas, and can be found worldwide irl, it would be good also to create an exception for it.

Sounds to me like rather interesting differences between continents. :)

These kinds of rules are supposed to be set in the XML. Different mods have differing resources and requirements and it's best if the map script doesn't make assumptions about specific resources. If you want to use tundra, it is very nice to have some deer there, but the XML rules say that it should be only on one continent. I would have set that differently myself. But that's the rules and in most cases it does add interest to the game. The flag in question is the bArea flag in the XML.

EDIT: also, the code is supposed to pick the best continent for a resource, so deer should be on the continent with the most tundra for example.
 
Why don't you use that ?
Code:
##############################################################################
## GLOBAL TUNING VARIABLES: Change these to customize the map results
        
        #Percent of land vs. water
        self.landPercent = 0.30

The problem I have with changing the values from the code directly is that it requires me to restart Civ IV every time to see the results. If there were some way, any way at all, to make the options available for change in-game, it would be a lot faster for me to do what I want to do.
 
The problem I have with changing the values from the code directly is that it requires me to restart Civ IV every time to see the results. If there were some way, any way at all, to make the options available for change in-game, it would be a lot faster for me to do what I want to do.

I think that you need, in addition to the functions you mentioned, something for getCustomMapOptionDefault and also isRandomCustomMapOption.
 
Yeah, right now ice goes purely by temperature. I have a rainfall map which I could use for that I suppose but I haven't. Another thing that makes this screenshot look a little weird is that I made a 'clean up' routine that prevents desert from appearing next to tundra and ice, since it really doesn't look good to put them together. So what happened in this case is that we have what is supposed to be a very high altitude ridge, but the tundra surrounding the ice has been turned to plains to avoid desert+tundra. I may have to revisit the rules regarding this. Maybe turn the desert into plains rather than the tundra.

The generation time is much improved over v1. That's all I have to say about that. :lol: Hey, you only have to generate once per game. :)

But even central Africa has/had/melting glaciers until this century. :)

http://en.wikipedia.org/wiki/Mount_Kilimanjaro

http://news.mongabay.com/2006/0515-agu.html


It actually validates your code, Cephalo. :)

EDIT: Maybe the ice hills could be explained as high plateus?
 
Having tried 2 games with this script, I must say, it is very good :goodjob:

Also the build times are greatly exagerated. My old clunker machine builds the map in a couple of minutes, it's a while, but nothing extreme.
 
Thanks Cephalo for the hard work you have put into this :great job: The maps are really detailed and subtle. Brilliant. I've included it into RevolutionDCM below if that's ok.
Cheers.
 
Thanks Cephalo for the hard work you have put into this :great job: The maps are really detailed and subtle. Brilliant. I've included it into RevolutionDCM below if that's ok.
Cheers.

no problem.
 
Why doesn't this mapscript create any Snow/Ice land areas near the artic circles at all (not even with land touching the edge of map)?
 
Why doesn't this mapscript create any Snow/Ice land areas near the artic circles at all (not even with land touching the edge of map)?

That doesn't sound right. Do you have a screenshot?
 
Top Bottom