[Map Script] PerfectWorld2.py

Hello, first i want to say sorry for my english, i am still learning. :) And if my 2 problems was already mentioned in this thread, please tell me where it is becouse i do not understend 100% words in english language. Anyway....

I have 2 problems: First, i made few games with PerfectWorld2 and saw a starting location WITHOUT any food resource or food like banana (requires Calendar technology). I think this is not good thing in this map creator (but i like it :) ). I know that in default creator in game it is imposible that starting map position has NOT a food resource or have food like banana. Can you edit this map creator that every regenerate map every civilization will have minimum 1 food resource on starting position (of course i mean food like rice, cow, pig, NOT like banana (becouse as we know to have bananas we need Calendar technology :) ) I had one game with banana on starting position but i do not have screen. Those are examples about no food resource on starting positions on PerfectWorld2 map creator:

Spoiler :


Spoiler :


And my second problem, this is more like request to you. It is posible that you edit this map creator by ADD one option ?
Option like: World Wrap: Toroidal
 
Speaking of Deserts: I sometimes seem to have a bit too much of them while Tundra seems to be a bit too little. Perhaps Cephalo could adjust this a bit. In reality there is more Tundra, only the usual map projection (round globe to square map) shows less Tundra because the pole regions appear smaller:

Keep in mind that for matters of taste, I do have a whole bunch of tunable options in the map script. These variables are at the beginning of the script and are well commented, so you don't have to be a programmer to get what you want. You just have to change a number to make less Desert or more Tundra.
 
Yes, with this script you sometimes get food-poor starts, especially compared to the factory maps. I would like to see this adjusted a bit. Especially the first screenshot above; a lot of tech is required before you'd even have one 3 :food: tile.

About the ice/tundra near the equator; I like it. It makes it a little harder to figure out where you are on the map in the early game. One thing I don't like about the factory maps is that as soon as you see some tundra/ice, you know exactly where you are.
 
I have 2 problems: First, i made few games with PerfectWorld2 and saw a starting location WITHOUT any food resource or food like banana (requires Calendar technology). I think this is not good thing in this map creator (but i like it :) ). I know that in default creator in game it is imposible that starting map position has NOT a food resource or have food like banana. Can you edit this map creator that every regenerate map every civilization will have minimum 1 food resource on starting position (of course i mean food like rice, cow, pig, NOT like banana (becouse as we know to have bananas we need Calendar technology :) ) I had one game with banana on starting position but i do not have screen. Those are examples about no food resource on starting positions on PerfectWorld2 map creator:

Food bonuses are fun, and that is a very important consideration, but these starts in the screenshots are very food abundant. My starting spot 'sweetener' routine currently saves the food bonuses for those who are forced to start in food poor areas like plains. If I give food bonuses to people who start in grassland, then it's more difficult to help those who start in worse.

And my second problem, this is more like request to you. It is posible that you edit this map creator by ADD one option ?
Option like: World Wrap: Toroidal

I may do that in the future, but it's not as easy as it sounds. I was originally going to impliment that in this version, but I ran into some structural difficulties that I will need to solve.
 
Yes, with this script you sometimes get food-poor starts, especially compared to the factory maps. I would like to see this adjusted a bit. Especially the first screenshot above; a lot of tech is required before you'd even have one 3 :food: tile.

I thought about this issue a long time since the first version, and let me tell you why I like that there's less food bonuses on the grassland heavy starts. Grassland in Civ4 is overwhelmingly powerful and versatile. On the stock maps, terrain types are sort of evenly scattered around, so your starting plot is never very far from something you need. On a map like this however, where grassland is kindof rare and there's a chance you won't start with grassland near your first city, something needs to be done to counteract the initial power of grassland. As luck would have it, heavy rainfall areas that cause grassland also bring alot of forestation. So, when you are lucky enough to start in the grassy areas, you are likely to have to chop down those trees before you can really take off. Heavy forestation combined with food bonuses on food poor areas help make things more fair for the various possible starting locations.
 
If I give food bonuses to people who start in grassland, then it's more difficult to help those who start in worse.

I know that create a map is a difficult thing and i know that you making a great job, we all thank you very much :) Believe me i do not wanna angry you, i just want to help you by my propositions :) On my opinion minimum one food resource is the most important thing to make a good balance in game. I know that one player starts in grassland and second starts near tundra, another near desert, but like you know we do not have only one kind of food resources. What about deer or sheep ? I know that deer/sheep on tundra gives us 3 or maximum 4 food, but everythink is to make it to be a good ballance. Someone who is on grasslands and has a pigs (6 food) is ok becouse another player who start in tundra can have 2xsheep on hills (2x3 food) On my opinion this is something like ballance :) Another example. What about water ? Fish and crabs can appears next to desert and next to icy/tundra too.

From the other side to better understand me:

1). one player has 6 food (pig) = another player has 2x3 food (sheep on hills) = ballance (no need river to farm, or lake to farm or Calendar to plantation)

2). one player has 4 food (wheat) and another for example has no food, no river and no lake. This is no balance :) I know that this is rare situation but it can appears.

About this two options on my opinion option number 1 is more ballanced/better like option number 2.
 
I may do that in the future, but it's not as easy as it sounds. I was originally going to impliment that in this version, but I ran into some structural difficulties that I will need to solve.

Seven05 had done a wonderful job with toroidal maps in ErebusContinent... maybe you will be able to borrow some of his code since he borrowed a lot of yours :D
 
It seems like this map needs some work on starting spots,



Two civs should never start so close, that they have overlapping tiles in their caps. Also note the lack of production near the starting spots. It is almost as if the map just randomly placed the starting positions anywhere without regard to it's surroundings.
 
It seems like this map needs some work on starting spots,

Two civs should never start so close, that they have overlapping tiles in their caps. Also note the lack of production near the starting spots. It is almost as if the map just randomly placed the starting positions anywhere without regard to it's surroundings.

Haha, that's funny. Well, the reason this happened is because my starting plot finder works hard at arranging players on their respective continents, but doesn't take into account plots that are in use from cities on other continents. This won't be an easy fix. Fortunately, this scenario shouldn't come up too often. At least there's some water separation there. :)

As for the production, the amount of hills on this map usually prevent's problems in this area, but that guy on the right is really going to have a tough time with zero production. I'll have to change the way I evaluate plots to totally prevent this sort of thing. I'll definately work on that for a future version.
 
Ahh i get it, it's two islands and two civs are placed on each. The map is designed to do so, however it doesn't place it on an ideal location, just anywhere on the island, thus scenerio's such as this is possible.

One thing i don't get though, is the one on the left is the one on an island, the one on the right is on a continent. Ideally the civ on the continent should have a better starting position, as do some of the other civs on that continent, but on the pic, the one on the right seems to be just randomly placed there as if due to the lack of space.

Also on the production thing, most civs i've encountered so far have had poor production capitals, as well as the lack of food resources. I myself had a Floodplain start with only 2 desert hills to gain production from.
 
That's also weird because production has the highest startplot value in the python script, you'd expect starting cities to lack food rather than production.
 
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.
It would make the most sense to leave in the buffer code, but change it's effect. Have it do three things (in this order):
1st) Ice bordering Dessert -> Plains
2nd) Ice Bordering Plains/Grassland -> Tundra
3nd) Dessert bordering Tundra/Grassland -> Plains
 
That's also weird because production has the highest startplot value in the python script, you'd expect starting cities to lack food rather than production.
Maybe the normalization counts all values together. That would be explaining that the german starting location in the last screen is so full with food bonuses and irrigated grasslands while the screens of zorzak with hills and/or productive bonuses lack food bonuses and have less irrigated areas.

edit : to increase the global bonus number, not only on starting locations, i tried to change some calculs and limits in the bonus placer, in different functions (addemergencybonus, addbonustype, CalculateNumBonusesToAdd...). It works with sea food and luxury bonuses, but not with land food. I don't really understand how the script works, but i find this strange enough to report.
 
Lol... early culture war for the win TheLastOne?

I'm in the wrapping up mode of my first game using this map script, and it's been a total blast... seeing AI civs string their cities along the flood plains of a continent spanning river cutting through a massive desert isn't something you usually get in the factory maps. Thanks for the work you put into this! :)
 
It would make the most sense to leave in the buffer code, but change it's effect. Have it do three things (in this order):
1st) Ice bordering Dessert -> Plains
2nd) Ice Bordering Plains/Grassland -> Tundra
3nd) Dessert bordering Tundra/Grassland -> Plains

something like this should work nicely. having altitude affect temperature is awesome, but having desert next tundra/ice looks weird.
 
I'm in the wrapping up mode of my first game using this map script, and it's been a total blast...
Same here - for me now the 5th game in a row. It is amazing to see how different games behave with these maps. To me the gameplay feels more realistic, more strategic and more entertaining. Even though the lacking food in the beginning delays the game somehow, overall the Civs develop very balanced, it feels more like you are watching real history, and the maps look more natural and are way more thrilling. Currently I cannot image going back to the classic map scripts again, for me Cephalos script really breathes new life into a classic.
 
I think the resource spread is a lot better... in most games, once you get past the midway point (especially maps with a new world, which I prefer) everyone seems to have gotten all the resources, except for things like silver (which nobody has) or maybe furs. This is the first time I've ever gone to war... for sugar. And now I have enough to sell to everybody, so it was definitely worth it :)
 
I think the resource spread is a lot better... in most games, once you get past the midway point (especially maps with a new world, which I prefer) everyone seems to have gotten all the resources, except for things like silver (which nobody has) or maybe furs. This is the first time I've ever gone to war... for sugar. And now I have enough to sell to everybody, so it was definitely worth it :)


I'm very glad you noticed this. A lot of people are shocked when they see large clumps of luxury resources, and suggest that the map is broken. The thing is, those resources are actually designed to do this in the XML. People aren't used to it because the Fractal terrain generators that many of the stock maps are based on break up the terrain cohesion so much that it prevents this clumping functionality from showing itself.

I quite like it. You have to trade, or conquer to get all the resources.
 
Still in view of adapting the script to my personnal preferences, i ended up with something that suits me more or less. Far from perfect, but perfect is not as simple.
I commented out the parts of "def CanPlaceBonusAt" that prevent similar bonuses to be close from one another, and to avoid too large clusters of bonuses (jungles of bananas or mountains of coal don't seem so fun to play with), i rewrited the calcul of "def CalculateNumBonusesToAdd" like that :
Code:
        players = game.countCivPlayersAlive() * bonusInfo.getPercentPerPlayer()/150
        bonusCount = baseCount * (landTiles + players)/150
        bonusCount = max(1,bonusCount)
The only problem is that on small maps (and maybe on large ones too, but i didn't generate enough of these to verify that), sometimes a small island gets all of a food bonus, without any on the continents. It's more visible because the modifications allows then the bonus to fill almost completely the island, but i don't know if it is directly caused by these modifications.
 
Still in view of adapting the script to my personnal preferences, i ended up with something that suits me.
I commented out the parts of "def CanPlaceBonusAt" that prevent similar bonuses to be close from one another, and to avoid too large clusters of bonuses (jungles of bananas or mountains of coal don't seem so fun to play with), i rewrited the calcul of "def CalculateNumBonusesToAdd" like that :
Code:
        players = game.countCivPlayersAlive() * bonusInfo.getPercentPerPlayer()/150
        bonusCount = baseCount * (landTiles + players)/150
        bonusCount = max(1,bonusCount)
The only problem is that on small maps (and maybe on large ones too, but i didn't generate enough of these to verify that), sometimes a small island gets all of a food bonus, without any on the continents. It's more visible because the modifications allows then the bonus to fill almost completely the island, but i don't know if it is directly caused by these modifications.

Hmm, this should give you 33% less bonuses overall.

The spacing rules for strategic resources and food help to insure that they are scattered over a wide area. By removing that and decreasing the number of bonuses, you might be making it more, rather than less, likely that a few civs will have monopolies of things like iron and coal.
 
Top Bottom