[Map Script] PerfectWorld2.py

Yeah, but the marshes aren't a new terrain type, just an "improvement."

How are marshes an improvement? They are a terrain type and as they were not included in vanilla civ4, I would venture to call them new, granted other people have included marsh terrain in their mods, but all PerfectWorld2.03_WithMarshes does is give you the ability to play on the PerfectWorld2.03 mapscript and have marshes be represented in your maps. I don't even know if I consider it an actual mod, it adds nothing in the way of game functionality (if you don't count the Swamp Fox promotions from Colonization), it is simply intended to take a frigging awesome mapscript and add one more terrain option.
 
I found this thread today while at work and I actually went home early to try the map because it sounded so cool :D

...but unfortunately I'm quite disappointed. I really like the approach, but the results, as far as I see after about 10 generated maps, are very cool to look at, but not very playable.
-almost every continent has a massive mountain range in its center, or a massive stretch of desert, often both. While looking cool, this is in game terms just a whole lot of useless terrain
-even strategic resources like marble are clustered. This doesn't make sense because nobody in their right mind would ever trade marble or stone to anyone
-on standard size I started isolated on a small continent which consisted of like 70% ice and mountains four times in a row. In general, there are way too many isolated players. This seems to improve on large maps
-too many New Worlds! The AI can't handle colonization, it doesn't have a strategy for it. I bet that most games will end in a chaos of at least a dozen puny colonies...

Lemme explain what's going on line by line.

1. Yes there's alot of useless terrain. I'm going for the man vs. nature struggle. It should be pretty fair in the end. Give it a chance.

2. The bonus placement pretty much follows the XML rules, generally there will not be clustering of strategic resources. In the case of marble and stone however, there's a tag in the XML that allows their use to enhance a starting plot's production. So you might see those clustering around a starting position that is kinda poor.

3. There's some bad luck going on there, but if you stick with it, you should find that most of the AI's are in the same boat.

4. You will find that the AI handles colonization better than you think. I've often seen smaller civs come from behind by shifting their efforts to the new world. They will beat you there if you let them. And.... you can turn that off. Not everyone likes the new world. I do.
 
Thanks for your answer... but either I'm in a real streak of bad luck or this thread is an elaborate trolling intended to drive people into madness :mischief:

Two more tries... settings: Size Large, starting position anywhere, 12 civs (and, for the record, Emperor difficulty and Stalin as leader).

First map I start with NOT A SINGLE visible resource. Not even one Cow or Rice or something. Only grassland and TUNDRA hills, nothing else. Needless to say I hit Regenerate...

Second shot: Three clams, yay! And some hills, decent start. But it turns out I'm ISOLATED... again! I'm on a tiny "continent" with room for five very poor cities, only two of them except the capital have a single food resource, none has two. There's also no happy resource except heaps of furs and only three different health resources available. That's just plain non-winnable.
I revealed the map with the debug mode... I was indeed isolated until Astronomy and my "continent" was just a tiny island compared to what everyone else had within reach. Only one other civ was almost as screwed as I was.

I mean, things like that happen on the factory maps too... but not seven times in a row. And they don't take several minutes to generate...

Ah, well. I'm a patient man and will give it another try or ten. But maybe you just have a different concept of fun ;) In my book a city that does not at least have one top-notch food resource (fish, corn, pig, ...) is not even worth founding because they make for crawling games that are just unbearable. Concepts like Slavery and Specialist Economy / GP farms are outright impossible to use with rubbish like that. Food is of paramount importance in Civ4, especially for any advanced strategy.
 
First map I start with NOT A SINGLE visible resource. Not even one Cow or Rice or something. Only grassland and TUNDRA hills, nothing else. Needless to say I hit Regenerate...

Thats the one you wanna keep! If you have resources at all, it's because your starting position is relatively weak. As you have seen...

Second shot: Three clams, yay! And some hills, decent start. But it turns out I'm ISOLATED... again! I'm on a tiny "continent" with room for five very poor cities, only two of them except the capital have a single food resource, none has two. There's also no happy resource except heaps of furs and only three different health resources available. That's just plain non-winnable.

Actually, 5 cities is plenty to get you to astronomy. If it's grassland, then it's some of the best land on the map. Plus on an Island you don't need to focus so much on defense.
 
Ugh. If you think that an all-grassland start with no resources is great then we do indeed have very different concepts of fun :sad: On any of the "normal" maps you will be hard-pressed to even find a spot on the map that is so weak outside of the polar regions.

And I know there are special strategies for isolated starts, but I don't like them because they are just boring. Diplomacy is an important part of the game for me. Also on higher difficulties it is very hard to maintain tech parity when you have no one to trade with.

That said, I saw AI-starting positions that weren't half bad, certainly better than my resourceless grassland start. If I'd gotten one of those, I would have played on.
 
Ugh. If you think that an all-grassland start with no resources is great then we do indeed have very different concepts of fun :sad: On any of the "normal" maps you will be hard-pressed to even find a spot on the map that is so weak outside of the polar regions.

And I know there are special strategies for isolated starts, but I don't like them because they are just boring. Diplomacy is an important part of the game for me. Also on higher difficulties it is very hard to maintain tech parity when you have no one to trade with.

That said, I saw AI-starting positions that weren't half bad, certainly better than my resourceless grassland start. If I'd gotten one of those, I would have played on.

Actually, a productionless start is something that can happen and needs fixing. It shouldn't happen very often though. All I ask is that you play a game or two from one of these difficult starts. Where's the drama if you know you'll win on first turn? After that, open up the map script and check out some of the things that are adjustable. With a few tweaks, you could probably make something that will fit your pre-conceptions about Civ. ;)
 
Ok, this just can't be coincidence anymore... now three times in a row I started isolated on a tiny continent in the lower left corner of the world. Out of nine games I started to play in earnest seven were isolated, the other two completely resourceless. Does the script intentionally place the human player like that? Most AIs start on big continents after all.
 
Actually, a resourceless start is something that can happen and needs fixing. It shouldn't happen very often though. All I ask is that you play a game or two from one of these difficult starts. Where's the drama if you know you'll win on first turn?
It's not about winning or losing but the fun in the process ;) If I know from the start that my cities will never grow bigger than 12 and will never be able to support a single specialist because they do not have a single 3-food-tile, there's no fun.

I would play with crappy land if I'm not isolated. But it seems that a non-isolated start is already too much to ask for :cry:
 
you could try opening the mapscript file with a text editor, search for "self.BonusBonus" ( without the " " ) and set it higher. start with 1.1, check it out in WB and see what you get, then you can always increase it more. eventually you will get the amount of resources you like. you can also shrink deserts and plains, and a lot more. it's pretty self-explaining when you read those variables.

about your isolated/ice starts... whoa. you just seems like you've been incredibly unlucky. :/
 
It's not about winning or losing but the fun in the process ;) If I know from the start that my cities will never grow bigger than 12 and will never be able to support a single specialist because they do not have a single 3-food-tile, there's no fun.

I would play with crappy land if I'm not isolated. But it seems that a non-isolated start is already too much to ask for :cry:

You're one of those that really get a kick out of bonuses. Nothing wrong with that! There's a variable at the beginning of the script called BonusBonus. Tweak that up a few notches to like 1.2 or so, and see if you don't like that better.

The thing about bonuses on this map is this: I mainly use bonuses to even out the starting positions. If I give them to everyone, then it's harder to use bonuses to make things more fair.
 
Thanks, I may try that. I hate "rigging" things in my favor, though :sad:That's why I never use mods.

I just managed to get a non-isolated start... with NOT A SINGLE production tile! Not one hill, only 80% water, rest grassland, no river. Ah well, I guess in reality that was a great start because three of the grassland tiles were actually forested, so the hammer count went up to 4! :lol:
There were also no hidden production resources (copper, iron, horses). I think that's the first time I saw a capital city which couldn't get to more than 4 hammers/turn :crazyeye: Of course it would have been pretty decent with the Moai Statues, only building them takes 94 turns :lol:

cephalo, may I ask what difficulty you usually play? Because afaik the higher the difficulty, the worse the starting position of the human player compared to the AI players. I think there is a number of selected starts and if you play on a higher level, you get the worst of them.

I took screenshots of my position and those of the AI civs, have a look:

My starting position


Some AI starts from the same game







The other AI starts were all like those above, all 11 of them. All of those starts are at least decent, most are great! I would certainly play with any of them. So it's clearly not true that starting positions on this map are meant to be as bad as those I always get.
 
The other AI starts were all like those above, all 11 of them. All of those starts are at least decent, most are great! I would certainly play with any of them. So it's clearly not true that starting positions on this map are meant to be as bad as those I always get.

:lol: I swear that starting plots are fully controlled by this map script, and it is due to a random shuffle which one you get! I promise!

One thing to look at is how much room each civ has to expand. It should make sense to you why someone gets alot of resources when someone else doesn't. Look at the whole map, and see whos likely to get what land.

A lack of production is something I don't really like, I should really fix that. However, even when you have no production, you are not slowed in any way when making a settler. A settler can fix that almost before it becomes an issue.
 
No... the AIs on the continent all had plenty of room to expand, and all of them had better land, too.


As you can see, the civs are pretty evenly distributed, everyone has about equal amount of land in reach.

My surrounding land:

Not exactly fantastic. Lots of dry plains, little food, not a single happiness resource, only three different health resources. It doesn't get better when zooming out further.

Some AI surroundings


A lot better, and again, those screenshots are typical, the other AI had similar land within reach.
 
My surrounding land:

Not exactly fantastic. Lots of dry plains, little food, not a single happiness resource, only three different health resources. It doesn't get better when zooming out further.

I feel like this is a pretty good start. You have alot of flat grassland that you can cottage up, and very close by you have some plains hills right next to some floodplain desert! I feel like I could win the game with this start. Then again, I usually play on noble.

If you wanna see a real bad start, I would guess that Mr. Dark Green has it worse. I'd like to see what he got in compensation for that...
 
umh... how many civs are you trying to fit on what map size? it seems to me that you're trying to fit too many civs on a map that's too small to support them well, and that's the reason why some of them get stranded on tiny islands and/or with crappy starting spots.

since perfectworld has a lot of water, desert and unfavourable terrain, grassland is what it's supposed to be, the BEST terrain, and of course there can't be a lot of the BEST. :D

grasslands in PW2 are mainly on the coast, and going to the center of the continent you'll get plains->desert , which is actually very realistic. of course, factory maps can be more balanced, but mainly it's that you've become used to them.

try playing a game on pw2 after you finally get a starting plot that satisfies you, it should be a lot more fun than factory maps. and don't play vanilla BTS, get RevDCM. this mod doesn't unbalance the game in any way, and includes BetterAI which makes the AI much, much better. seriously, do yourself a favour and try RevDCM 2.51 . you will NOT want to go back to regular BTS, you can bet on that. :goodjob:
 
I feel like this is a pretty good start.

No, it isn't. Can't say more than that. I'm a good player, winning most Emperor games (on reasonable maps) and having won a few Immortal games. On all kinds of maps, with all types of leaders. I know what I'm talking about. I can win any game on Noble, Noble is unlosable on any map. As is Prince. On Monarch the map has to be very very bad for it to be not winnable, like the one above. But I might even have a chance to win it on Monarch. But not Emperor.

Even if you consider my starting position "very good" (I guess it is when compared to the right thing, like a 1-tile-island in the middle of the ocean with no resources), there's no denying that all of the AI starts are much, much BETTER.

edit: Sure, on Noble you have all the time in the world and can just build a settler, found a decent city and later move capital. On Emperor you don't have that luxury. By the time you could have a usable capital (which is crucial because of the bureaucracy bonus), the game will already be lost because the AIs have established large empires and an unassailable tech lead, while you have nothing to trade to catch up.
You might say: Why not play on Noble then? I may give it a try tonight since your map script seems to be specifically catered to low difficulties (I guess very bad terrain for the human is just another way to raise the difficulty). But I'm quite sure that after the initial challenges the game will be a breeze, and thus very boring, as soon as I have established myself.
 
[to_xp]Gekko;8284149 said:
umh... how many civs are you trying to fit on what map size? it seems to me that you're trying to fit too many civs on a map that's too small to support them well, and that's the reason why some of them get stranded on tiny islands and/or with crappy starting spots.
I don't think so. I played with 12 civs (instead of the normal 9) on a large map. I don't usually do that because it makes the game easier on regular maps. But this script is designed for the New World thing after all... when I tested it with normal number of civs and New World off, there were always still uninhabited continents or large landmasses with only one AI on it. With 12 civs there is still a huge amount of land for everyone, as you can see on my screenshots. In fact there's room for at least two more players.

You guys always suggest that I want bonuses everywhere and that the map script is designed to have very few bonus resources. Both is not true. There is a reasonable amount of resources on the map (that's why I theoretically like it and keep on trying), only they are distributed in an insanely imbalanced way. (Which could still be just bad luck, but after so many tries I'm beginning to doubt it)

As I said I don't use mods. I play a lot of competitive multiplayer games and I don't want to get used to altered game rules.
 
Cephalo, in modifying PW2 for more landmass, pangaeas, peaks and smaller mapsizes I seem to have broken something. I'm getting very few rivers, oases and lakes during generation. Any suggestions how I can get my freshwaters back?
 
Btw, I did some research on the starting position algorithms... what I recalled here only from memory is indeed true. Some information compiled from this thread:

In Civ4HandicapInfo.xml, each level has assigned to it an iStartingLocPercent value. This is the value returned by CvHandicapInfo::getStartingLocationPercent() which is called by CvGame::assignStartingPlots()

assignStartingPlots uses this value to determine what order the starting plots are given out. So if you are playing at Prince level (iStartingLocPercent = 50), you should expect that half of the AIs will have better starting positions than you do, and have will have worse starting positions.

Note that the assignment of the StartingPlots happens before the normalization of the starting plots - in other words, the map that you see after the game has loaded may not be the same one the computer was looking at when assigning positions.

From what I can see, the normalization code doesn't use this handicap value at all. Instead, it works from a fixed floor, to ensure that the quality of all starts is within about 80% of the best start (see CVGame::normalizeAllExtras()).

StartingLocPercent is indeed 10 to 90 so I am not that bad in remembering stuff
assignStartingPlots() however seems to indeed behave like VoiceOfUnreason describes, i.e. it tries to set you at the 10% spot in Settler and the 90% spot in Deity

The normalize function than interferes with this since it does level the starting plots pretty well IF it is called but some map generator scripts only call part of the normalize function...

I strongly suspect that PerfectWorld2 has not been thoroughly tested with higher difficulty levels. It seems to generate mostly great or decent starting positions, but also some terrible ones (which is quite normal). If you play on a low level like Noble, you won't notice because you'll always get one of the good ones. But on a high level you will get one of the crappy ones.

Those crappy starts are usually supposed to be made playable by normalizing the starts, which happens after the positions are assigned to the players. I assume that this is where the script fails – the normalization process does not do enough to make a terrible start playable. And by playable I mean comparable in quality to the good starts. If everyone had crappy starts it would at least be balanced, but my screenshots clearly show this is not the case – most starts are very good.
 
I strongly suspect that PerfectWorld2 has not been thoroughly tested with higher difficulty levels. It seems to generate mostly great or decent starting positions, but also some terrible ones (which is quite normal). If you play on a low level like Noble, you won't notice because you'll always get one of the good ones. But on a high level you will get one of the crappy ones.

Those crappy starts are usually supposed to be made playable by normalizing the starts, which happens after the positions are assigned to the players. I assume that this is where the script fails – the normalization process does not do enough to make a terrible start playable. And by playable I mean comparable in quality to the good starts. If everyone had crappy starts it would at least be balanced, but my screenshots clearly show this is not the case – most starts are very good.

You are very correct that PW has not been thoroughly tested on the higher difficulties. The main reason for this is that I am very much a sandbox type player. I never play above noble because it interferes with my fantasies of being the worlds greatest emperor. :lol: PW has always been made for that kind of fun. It's also not so great as a multiplayer map if you care about fairness. You really wouldn't want to hold a tournement with PW.

One of the problems that need to be solved in PW is that it is much more difficult to find fair starts on this kind of map. The factory maps scatter the terrain randomly in such a way that the whole map is rather homogenous in terms of land quality. In PW however, there are vast tracks of unusable land. It's very easy to find yourself on a little patch of green on the edge of the Sahara. In the thread for PW1 you can see all the issues that came up and how I had to deal with them. It's very important to take into account the value of the surrounding land.

Another handicap to making the starts fair is that I refuse to green up the land or create rivers around starts. I worked hard to simulate where rivers and wet climate should be and I don't want to ruin that just for something trivial like map fairness. :lol: I only use bonuses to boost starting positions. Also, I'm not sure I like the idea of your starting capital always being the best city location you could ever find through exploration. If you boost them up too much, I think it makes the rest of the map kinda hum drum.

However, do you think I could fix this map for higher difficulty just by making the player's start better? I can certainly do something a little different in this regard when the difficulty is higher. I don't know why nobody has brought this up before after a whole year! Thanks for your input.
 
Top Bottom