[Map Script] PerfectWorld2.py

Can one regenerate the map, or are the settings lost? A couple of complex map scripts do not permit regeneration since player preferences are lost and I was wondering if this was one of them.

While I have not had the same problem as Ulysses81 reports in the above post, I do notice a fair amount of coastal mountain ranges. How are the mountain ranges determined? Could extra tiles of land be added to put the ranges at least a space inland, leaving the coastline usuable?

That being said, overall, I like the mountain ranges otherwise. Most of the times they do form barriers, making defensive play easier, and adding interest to the map in the exploration phase. I look forward to using the modified PW2 script in FfH. (Although the Ancient Towers have yet to show up in useful places in my map generation experiments, but luck of the draw.)
 
Now to be fair, that second start has no water in the FC. That is very much an inland start, and a pretty good one at that. The pigs aren't included most likely because the river side boosts city value also, kinda like the coast multiplier. I don't really like that first one either though. Again I think the culprit is the river multiplier. You might turn that down.

One thing that does concern me is that I'm seeing alot of starts on grassy hills. Production is highly valuable, and since each hill makes 1 food I think the supportable population gets unfairly amplified. This is less of a problem with coastal cities that have seafood.
 
I'm not sure how you determine maximum distance but it might be a good idea to hardcode that no 2 starting FCs must ever overlap.

I created 2 large maps with standard numbers of players and standard settings, both had all coastal starts but I was not so happy about the distance of those 2 players on the 2nd map:
 
While I have not had the same problem as Ulysses81 reports in the above post, I do notice a fair amount of coastal mountain ranges. How are the mountain ranges determined? Could extra tiles of land be added to put the ranges at least a space inland, leaving the coastline usuable?

Some pages ago i made a pretty long post about the tuning variables of this script and what you can do with them, especially to get rid of coastal mountain ranges.
More tectonic plates, etc.. Maybe you find something useful in there.

Now to be fair, that second start has no water in the FC. That is very much an inland start, and a pretty good one at that. The pigs aren't included most likely because the river side boosts city value also, kinda like the coast multiplier. I don't really like that first one either though. Again I think the culprit is the river multiplier. You might turn that down.

The problem with that second picture isn't water in the FC (there is none) but the one city wasting resources on the edge of its FC, in a place where there could be two just as good cities. This tends to happen if you start near, but not on the coast.

Well, i'll probably have to learn python myself...

Ulysses
 
I'm not sure how you determine maximum distance but it might be a good idea to hardcode that no 2 starting FCs must ever overlap.

I created 2 large maps with standard numbers of players and standard settings, both had all coastal starts but I was not so happy about the distance of those 2 players on the 2nd map:

Apparently the max. distance means distance over land, not in a straight line...
I've seen some similar situations but it doesn't really bother me. Actually it would be cool to have starts like these even with land in between now and then. Time for early :ar15:
 
Some pages ago i made a pretty long post about the tuning variables of this script and what you can do with them, especially to get rid of coastal mountain ranges.
More tectonic plates, etc.. Maybe you find something useful in there.
Okay, thank you. Just a standard .txt editor works, right?

Fuyu: Actually, that happens periodically with the official mapscripts, so unless this version of PW2 makes that a regular occurance, it's just the RND # generator, and not a problem. (Now why can't I get that start when I'm Sumeria or Alexander of Greece or Sitting Bull, but it happens when I'm Roosy and the neighbor is Shaka?)

And to repeat my earlier question, can one regenerate the map with this mapscript without losing the player settings from the custom game screen?
 
Proximity can be nice once in a while but I still doubt that flat crosses overlapping is intentional in this mapscript.

This should be fixed in the very latest version actually, unless you are really packing the map full of civs.

Normally you only get close starts when the players are on different continents, but since it does indeed go by path distance, it could happen rarely on the same continent.

In the latest version I made it so that tiles on different continents have a value of zero, so this problem should be minimized from now on... I hope.
 
And to repeat my earlier question, can one regenerate the map with this mapscript without losing the player settings from the custom game screen?

I actually haven't tested it, but I have always believed that the settings were preserved. I never even knew this was an issue on some maps.

I tell you what though, I hate the regen button because it doesn't clean up alot of the graphics. You have stupid stuff like resources under ground, shadows caused by nothing, etc. If you save the game and reload it's all fixed though.
 
This should be fixed in the very latest version actually, unless you are really packing the map full of civs.

Normally you only get close starts when the players are on different continents, but since it does indeed go by path distance, it could happen rarely on the same continent.

In the latest version I made it so that tiles on different continents have a value of zero, so this problem should be minimized from now on... I hope.

If 2.05 is the very latest, that's the one I used. So even if you fixed this behaviour for starts on different continents, it can still happen when both civs are on the same continent and a water+mountain chain increases path distance. If that is rare enough, ok, it just happened on my second map creation with this version so of course I assumed it couldn't be that uncommon.

What might make this not as rare as you think is the combination of
  • going by path distance
  • mountain chains directly on the coast
  • (almost) all coastal starts

You could probably fix this the same way you fixed it for different continents: set the tile values to zero for land tiles if path distance from starting location to that tile is greater than 5 (or whatever number you think belongs here. Ideally, land tiles in your FC with a path distance greater than 2 should already be very rare).
 
I actually haven't tested it, but I have always believed that the settings were preserved. I never even knew this was an issue on some maps.
Thank you. Full of Resources is one. Sto warns of the problem in the thread and in the option screen. When I forgot and did it anyway, a last ditch warning was posted on the screen. The map was screwy so I would not have used it, but it was nice having the reminder.

Also, the Fury Road mod map scripts eat the starting settler on regen, so you need to go back to the main menu. That may be a function of the mod though ...

I tell you what though, I hate the regen button because it doesn't clean up alot of the graphics. You have stupid stuff like resources under ground, shadows caused by nothing, etc. If you save the game and reload it's all fixed though.
Yes, I've noticed, but a reload fixes things, and as long as I'm happy with the map I play on, that's okay.

@Ulysses81: Please ignore my earlier question regarding the text editor: I found the answer when looking for your variable tuning post.
 
Settings are definitively preserved when regenerating.
I used it countles times just to look at different maps in the WB.
 
Great job on this Map script. Just wondering, how do you get the same map shape on different sizes like in the pictures in the description?
 
Great job on this Map script. Just wondering, how do you get the same map shape on different sizes like in the pictures in the description?

In the PRand class toward the beginning of the script, you can set the seed value of the random number generator. If you set it to a specific seed, you'll get the same map every time, even on different sizes, at least as far as landforms are concerned. The landforms are determined on the same size bitmap and then shrunk later.
 
I use this script with Rise of Mankind (huge marathon) and besides the realistic beauty of it love how wide oceans, wastelands, and impassible mountain chains create a larger, not heavier world. I get a lot to explore, yet the late game isn't bogged down by excessive cities.

So I like the sizes and overall density just fine thanks.

I've been waiting to ask if this script could be made to work with Flavour Starts or Culturally Linked Starts. Those options would dovetail nicely with the New World / Old World options. But the task at hand is tweaking player spacing and relative advantage. I'll wait another year.

Cephalo, you explained how the script places civs on a landmass like points on a star. Except where points of different landmasses nearly touch that's a great way to keep starts comfortably apart. Now, you're lamenting that civs are too distant for early war. I agree but I don't think the obvious solution of decreasing map size is necessary. A better arrangement, using the same map, would be sometimes starting civs between those extreme points and the landmass center of gravity. Then a civ could expand either aggressively toward neighbouring civs, or defensively away from them. This placement wouldn't force civs into early conflict because they'd each retain those backup tiles the script already searches for. An additional advantage to this placement, is that civs would less often have to move the palace from a far corner.

So could you retain the existing routines, but add something that occasionally chooses starts intermediate between the first picks and the landmass center? Like you said about ratcheting a wheel, it could begin with the farthest flung civ and work around, shifting civs closer to their common center if it finds good starts for them. Since the landmasses are shapely and tend to have bad land in the middle, few civs would actually get relocated far inland.

The problem of civs starting one tile from the coast. This only hurts (and looks wrong) when there are a lot of ocean tiles within the FC, especially with bonuses on those ocean tiles. So maybe the script could check for this condition then cheat by sinking one tile underwater?
 

Is that supposed to happen? I hope not, stone and marble should not only be pretty rare but also only appear once, not in groups. I've seen this a few times with stone and marble.

Not sure but I'd guess the starting location sweetening code is to blame here.
 
Not sure but I'd guess the starting location sweetening code is to blame here.

Yeah, stone and marble are set to allow them to be used this way in the XML. As copper and iron are strategic resources, the XML rules have that flag set to false, so that leaves stone and marble for production sweetening.

Usually if you get those clusters, it's because you need em. Very often the most challenging starts are the one's with lot's of extra resources.
 
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?
 
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?

When I was researching the XML rules, I was a bit surprised by it myself, but if you think about it, it works.

I believe that the rationale is that for wonder purposes, a Civ only ever needs one of these resources, but also it's more important than for other resource types to deny them to your opponents, so they generally aren't traded. Also, these wonder resources come into play before there is alot of resource trading. That means that any extras are valueable only for the production they provide in the FC.

If you want to play with it, you can set the bNormalize flag in the XML.

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.
 
Top Bottom