[Map Script] PerfectWorld2.py

I tried, I failed. The Mod I use doesn't even have a \XML\Terrain\ folder; Civilization4\Beyond the Sword\Assets\XML\Terrain\ exists but no CIV4BonusInfos.xml file there, so I went and changed those bNormalize values to 0 in Civilization4\Assets\XML\Terrain\CIV4BonusInfos.xml . If that xml file is even read or if your map script simply ignores that flag I don't know, I can only observe that it doesn't help.
(minhills 4 and maxpeaks 2, no other changes to the mapscript)


click for full picture

3 times stone - which I don't like so much; directly next to it 1 marble, completely ignoring the iUnique values from Civ4BonusClassInfos. But the best is still the Hills/Flood Plains tile to the right of the stone row.

edit: changing the file from warlords seems to have the desired effect though :)
 
I tried, I failed. The Mod I use doesn't even have a \XML\Terrain\ folder; Civilization4\Beyond the Sword\Assets\XML\Terrain\ exists but no CIV4BonusInfos.xml file there, so I went and changed those bNormalize values to 0 in Civilization4\Assets\XML\Terrain\CIV4BonusInfos.xml . If that xml file is even read or if your map script simply ignores that flag I don't know, I can only observe that it doesn't help.
(minhills 4 and maxpeaks 2, no other changes to the mapscript)

3 times stone - which I don't like so much; directly next to it 1 marble, completely ignoring the iUnique values from Civ4BonusClassInfos. But the best is still the Hills/Flood Plains tile to the right of the stone row.

edit: changing the file from warlords seems to have the desired effect though :)

Yeah, Warlords is the latest version of that file. I had forgotten about that.

Dang. Floodplains on a hill. That's a bug. The part I don't get though, is that you have well over the minimum amount of hills (4 you said?) in that screenshot, so when was that hill added and why? I'll have to look into that.
 
@cephalo: self.BonusBonus will adjust bonus frequency of both land and sea resources. Is it possible to increase ocean bonuses only?

The reason I ask is that in Fall from Heaven, pearls are one of the sea resources ,but only the Lanun can see and use them. However, the mapscript does not know that, so the invisible pearls are counted against the total resources in your starting position. I figured if one could increase overall sea resource frequency, it would balance the pearls, and the seas wouldn't be so barren for the other civs. (Incidentally, I've copied perfectworld2 into the FfH public maps folder since I've decided different script settings are required in FfH than in basic BtS. More land for starters.)

@Ulysses81: I've been tinkering with the variables as you suggested on page 25 of the thread. However, I can't reset noise or plate number as high as you did owing to computer limitations, so the coastal mountain ranges are only reduced, though not vanished. Still, increasing the plate number is making for interesting shaped continents. Thanks for your help.
 
Yes it's a bug probably unrelated to minhills and maxpeaks but it only happens when a dessert hill next to a river is inside a starting FC, and unlike the wonder resources craziness this is rare enough.



edit: I just hope this is not related to BetterAI :p
 
I think it's -censored by forum software- to allow BONUSCLASS_WONDER to be used for simple production sweetening at all, let alone in groups. Isn't that what hills and plains are for?
Some starts are without bronze or iron anywhere near them, others start with multiple wonder resources? I'd favor bronze or iron to be used instead if there is neither in the 7x7 area around the starting location (but I guess that's a completely different problem).
So what xml values would that be so I can disable this behaviour, or even better: how can I make your script not use these wonder resources for sweetening at all?

There are a couple of things to keep in mind with this map though. From the beginning I chose not to deform the land for plot sweetening, because I worked very hard to come up with the climate and tectonics rules that look natural and have a reason to be the way they are. Recently however, I cheated a bit to ensure a minimum of hills, because there are no legal production sweeteners for grassland, and sometimes you could get a plot with no production at all, which is of course terrible.

If you sweeten with long standing strategic resources like iron, you might end up with a surplus that negativly affects the game. What you can do instead is bump up the MinHillsInFC variable to 3 or 4, so that everyone at least has some production if you choose to not use wonder resources for that.

In my opinion there are too many resources in almost every starting spot, be they stones/marble or food.

I think the underlying problem here is that the script assigns starting locations first and then, if the resulting FC and surroundings aren't good enough on their own, changes the location (by adding resources, hills, etc) instead of discarding it in favor of the next on the list.
For the alternative to work there must of course be enough potential locations to choose from. And this would probably be complicated by the maximum-distance algorithm discussed before.

So my proposals are:

-Get rid of the maximum-distance thing in favor of a minimum-distance rule that makes sure that at least FCs don't overlap. The
min-distance could be adjustable. This will give some early competition.

-Get rid of all starting spot sweetening. Just examine locations as they are and take the best. I don't think it'll be more unfair than the
current starts where you have to compensate for bad surroundings with tons of food boni, just because the
maximum-distance rule decided that one civ should be stuck on the shady side of the continent.

-and i still would like to see a rule that makes starting locations be either on the coast or at least 3 tiles away. Everything else usually
screws the AI.

greets
Ulysses
 
So my proposals are:

-Get rid of the maximum-distance thing in favor of a minimum-distance rule that makes sure that at least FCs don't overlap. The
min-distance could be adjustable. This will give some early competition.

-Get rid of all starting spot sweetening. Just examine locations as they are and take the best. I don't think it'll be more unfair than the
current starts where you have to compensate for bad surroundings with tons of food boni, just because the
maximum-distance rule decided that one civ should be stuck on the shady side of the continent.

-and i still would like to see a rule that makes starting locations be either on the coast or at least 3 tiles away. Everything else usually
screws the AI.

greets
Ulysses

Man, those are some serious cans o' worms! I think those pros would come with some heavy cons, but I don't really have time for the required experimentation. This is all work after work for me.

I worked on the starting code for months, and it really is about the best I can do. If you can do better, I think everyone would like to see it. I have no objections to modmods of my map scripts. I say make a new thread with your own starting code and get some feedback.

Map scripts get old hat. Everyone likes a new spin on things. I say go for it if you have the time!
 
Man, those are some serious cans o' worms! I think those pros would come with some heavy cons, but I don't really have time for the required experimentation. This is all work after work for me.

I worked on the starting code for months, and it really is about the best I can do. If you can do better, I think everyone would like to see it. I have no objections to modmods of my map scripts. I say make a new thread with your own starting code and get some feedback.

Map scripts get old hat. Everyone likes a new spin on things. I say go for it if you have the time!

Unfortunately i don't really know python, otherwise i'd be at it already. But i imagine that the main element of the starting code, the evaluation process, would stay the same. I'll see if i can figure out how to make the script do what i want, but that may take a long time...

greets
Ulysses
 
Unfortunately i don't really know python, otherwise i'd be at it already. But i imagine that the main element of the starting code, the evaluation process, would stay the same. I'll see if i can figure out how to make the script do what i want, but that may take a long time...

greets
Ulysses
I didn't know any Python when I started this map. ;) It's actually a pretty fun way to learn.

Actually, the things that you propose are very similar to how the default placement works. For a quick experiment you can simply comment out the starting code altogether and let the default routines happen. There are some difficulties that you will face however if you really want to make better starts.

This map often has large areas of really good and really bad land. If you have a minimum distance algorithm, the guy who gets the best starting plot is also likely to have prime land to expand into, probably the best region in the world. So he will have not only the best starting city, but the best first 3 or 4 cities as well. The factory maps tend to scatter the terrain much more randomly, which means that the map is more homogenous in terms of quality. Starting plots matter less on the factory maps. In PW you can have a great local start but be hemmed in by a massive desert or tundra wasteland and have no chance. This situation needs to be recognized and accounted for in some way, and plot sweetening usually works pretty well.

Another issue is that the quality of a starting plot very much depends on where your neighbors are. You can get into this circular feedback loop where civ A's quality depends on where civ B is, and civ B's quality depends on where civ A is! It can get pretty nightmarish with the chicken and egg thing. Quality really can't be determined until all civs are placed.
 
This map often has large areas of really good and really bad land. If you have a minimum distance algorithm, the guy who gets the best starting plot is also likely to have prime land to expand into, probably the best region in the world. So he will have not only the best starting city, but the best first 3 or 4 cities as well.

Hmm... i don't see how a maximum distance rule prevents this. What i propose would level the field in such a situation by placing not one but several starts into the best area of the map. The not-so-good starts would get more room to expand as a compensation.

The factory maps tend to scatter the terrain much more randomly, which means that the map is more homogenous in terms of quality. Starting plots matter less on the factory maps. In PW you can have a great local start but be hemmed in by a massive desert or tundra wasteland and have no chance. This situation needs to be recognized and accounted for in some way, and plot sweetening usually works pretty well.

If you move more starts into the better areas there wont be so many of the surrounded-by-wasteland type. But before i assume too much about what the script does, can you tell me to what extent and distance the surroundings are actually analyzed?

Another issue is that the quality of a starting plot very much depends on where your neighbors are. You can get into this circular feedback loop where civ A's quality depends on where civ B is, and civ B's quality depends on where civ A is! It can get pretty nightmarish with the chicken and egg thing. Quality really can't be determined until all civs are placed.

Thats tricky... but actually what i propose should at least statistically balance the good land with close neighbours, without actually analyzing the positions relative to each other.

well ill see what i can do...
Ulysses
 
Cephalo mentioned plot sweetening above.... Speaking of plot sweetening, this is probably the best start I ever had in Civ4... using the latest version of perfect world...

4 crabs, 1 corn, 1 clam, 1 cow and spices thrown in there to make it taste great!

Incredibly, I wound up loosing this game to constant AI dogpile behavior... It's hard to tech when you are fighting so much... I did fine holding my own until ragnar showed up with grenadiers vs my longbows... at that point, it was gameover.
 

Attachments

  • lotsa_eats.jpg
    lotsa_eats.jpg
    219.4 KB · Views: 209
Would you consider making a version of this mapscript that could add the marsh terrain and peat bog feature for RoM? and possible one that allows production materials to appear on peaks for Affores modmod?
 
Cephalo mentioned plot sweetening above.... Speaking of plot sweetening, this is probably the best start I ever had in Civ4... using the latest version of perfect world...

4 crabs, 1 corn, 1 clam, 1 cow and spices thrown in there to make it taste great!

Incredibly, I wound up loosing this game to constant AI dogpile behavior... It's hard to tech when you are fighting so much... I did fine holding my own until ragnar showed up with grenadiers vs my longbows... at that point, it was gameover.

I'm guessing that you are playing on one of the higher difficulties? I have a new feature that adds extra bonuses past Noble difficulty. You can adjust this in the map script variables.
 
Would you consider making a version of this mapscript that could add the marsh terrain and peat bog feature for RoM? and possible one that allows production materials to appear on peaks for Affores modmod?

I thought someone else had done this already. Anyway, I probably won't have time for a good long while.
 
I'm guessing that you are playing on one of the higher difficulties? I have a new feature that adds extra bonuses past Noble difficulty. You can adjust this in the map script variables.

Indeed, this was prince / bbai. In this case, I think the plot sweetening was justified given the small room I had to expand in... although I'm not sure if you even consider expansion when you bump starting bfc values. I'll have to look at the source sometime.

I've had PW starting plots in other prince games that quite frankly were bad, and seemed to need more help. I can remember one as india with no metal, no food, no luxuries and only one grass horse.
 
Indeed, this was prince / bbai. In this case, I think the plot sweetening was justified given the small room I had to expand in... although I'm not sure if you even consider expansion when you bump starting bfc values. I'll have to look at the source sometime.

I've had PW starting plots in other prince games that quite frankly were bad, and seemed to need more help. I can remember one as india with no metal, no food, no luxuries and only one grass horse.

Yes, expansion room and it's value are the main criteria for boosting. If you get a ton of sweetening like this it's because you are tucked into an isolated corner. Conversely, if your expansion area (likely city locations that are closer to you than anyone else on the same continent) is highly valuable you would get nothing, even if your starting location has no resources. However, I have found that lots of resources tends to signal a more difficult game.

However, you would always get a bonus for your difficulty level. On Prince that defaults to 1 resource. This is a new feature starting with 2.04.
 
BTW, Cephalo, I constantly hear people suggesting some mid/late game bonuses for the AI elsewhere, just to counter human players' pattern of getting far too strong mid-game due to effective micromanagement, specialized economy and BRAINS ;) How about an option to supply AI capitol spots with delayed technology resources that would kick in mid/late-game?
 
I honestly do not know how to make the file work...

It says "To use this map, put it in your Civilization 4\PublicMaps folder, not in your My Documents\My Games\Civilization 4\PublicMaps folder."

but the only way to get to the publicmaps folder is through the my games part of my hard drive...?
 
nevermind I think i got it working...

I think lol

When the game asks you what map script to use, PerfectWorld should be in the list of choices.

That warning I gave is actually kindof outdated, it will work in your mygames/etc.
 
Top Bottom