[Map Script] PerfectWorld2.py

Ok, I thought that I was as current as could be, guess I wasn't, back to the drawing board, I will let you know if I get any bugginess.
 
By the way, I finally figured out what I was doing wrong. I put hyphens in my filename. Apparently Civ IV doesn't read files with hyphens in the name. :cringe:
 
By the way, I finally figured out what I was doing wrong. I put hyphens in my filename. Apparently Civ IV doesn't read files with hyphens in the name. :cringe:

:lol: I would have never guessed that in a million years! How did you learn that?
 
Hi cephalo :D

I really like your work with PerfectWorld but as a Fall From Heaven player, I've encountered an issue: the Malakim civilization which is set to start in desert won't be placed on desert on start with PW2. I looked into the files and commented out the "remove jungle" part for another civilization but didn't find where the "no start on desert" is handled...
 
Hi cephalo :D

I really like your work with PerfectWorld but as a Fall From Heaven player, I've encountered an issue: the Malakim civilization which is set to start in desert won't be placed on desert on start with PW2. I looked into the files and commented out the "remove jungle" part for another civilization but didn't find where the "no start on desert" is handled...

In this script starts are placed purely for 'value'. Desert starts do happen occasionally when there are alot of floodplains concentrated in one area, but it's kinda rare. There really isn't any mechanism for 'fictional' starts of the kind I put in the Erebus map script. You might try Seven05's Erebus Continents map script which is based on PW2 but for FFH.
 
I've attached a couple screenshots of a recent start I got with PW 2.02. I just settled in place to make the screen shots. Seems like not a great spot to me.

The one possibly relevant change I've made is to tweak the maps sizes:

Code:
		# WorldSizeTypes.WORLDSIZE_DUEL:	(12,8),
		# WorldSizeTypes.WORLDSIZE_TINY:	(16,10),
		# WorldSizeTypes.WORLDSIZE_SMALL:	(22,14),
		# WorldSizeTypes.WORLDSIZE_STANDARD:	(26,16),
		# WorldSizeTypes.WORLDSIZE_LARGE:	(32,20),
		# WorldSizeTypes.WORLDSIZE_HUGE:	(36,24)
		WorldSizeTypes.WORLDSIZE_DUEL:		(10,6),
		WorldSizeTypes.WORLDSIZE_TINY:		(13,8),
		WorldSizeTypes.WORLDSIZE_SMALL:		(16,10),
		WorldSizeTypes.WORLDSIZE_STANDARD:	(21,13),
		WorldSizeTypes.WORLDSIZE_LARGE:		(26,16),
		WorldSizeTypes.WORLDSIZE_HUGE:		(32,20)

I did this so that the maps would be the same size as the regular maps, e.g. Fractal, Terra, etc. Could that possibly affect this?
 

Attachments

  • Picture 1.jpg
    Picture 1.jpg
    94.8 KB · Views: 192
  • Picture 2.jpg
    Picture 2.jpg
    184.4 KB · Views: 226
I've attached a couple screenshots of a recent start I got with PW 2.02. I just settled in place to make the screen shots. Seems like not a great spot to me.

The one possibly relevant change I've made is to tweak the maps sizes:

Code:
		# WorldSizeTypes.WORLDSIZE_DUEL:	(12,8),
		# WorldSizeTypes.WORLDSIZE_TINY:	(16,10),
		# WorldSizeTypes.WORLDSIZE_SMALL:	(22,14),
		# WorldSizeTypes.WORLDSIZE_STANDARD:	(26,16),
		# WorldSizeTypes.WORLDSIZE_LARGE:	(32,20),
		# WorldSizeTypes.WORLDSIZE_HUGE:	(36,24)
		WorldSizeTypes.WORLDSIZE_DUEL:		(10,6),
		WorldSizeTypes.WORLDSIZE_TINY:		(13,8),
		WorldSizeTypes.WORLDSIZE_SMALL:		(16,10),
		WorldSizeTypes.WORLDSIZE_STANDARD:	(21,13),
		WorldSizeTypes.WORLDSIZE_LARGE:		(26,16),
		WorldSizeTypes.WORLDSIZE_HUGE:		(32,20)

I did this so that the maps would be the same size as the regular maps, e.g. Fractal, Terra, etc. Could that possibly affect this?

The size should not effect it, and that is not the kind of start that I would expect at all. There are a couple more things that are different about this map from the default settings, that river corner that touches desert should have a spot of green to indicate a floodplain, and there seems to be many fewer trees. Have you made alot more tweaks than just map size?

It's also good to see where everyone else is starting to see if there is a reason that someone lost the musical chairs of placement. A large but really bad continent might conceivably cause this to happen. Also, if the meteors destroyed too much of the world that might also effect things.

That spot should normally have been thrown out early in the process. I would suspect that there was maybe an exception thrown during my starting plot finder, causing the default routine to happen, except I see you have a bunch of rocks as compensation for your bad start. If a crash happened you shouldn't have gotten those rocks, because I believe I disabled the default starting plot sweeteners.

If you still have the game I wouldn't mind seeing the mini-map.
 
I don't have the original map, but I recreated it (as well as the script allows) using the same seed. See the attached picture, of the same area, including the entire minimap.

I noticed a couple things. (1) In this run, I got the spot that Monty got in the original place, but without the fish. Why would that be? (All the other resources are the same, so I'm assuming that the fish in the first map were added to boost the start value of that spot.) (2) No stone where Moscow was in the first map. Was that also added to boost the start value?

I have the PythonDbg.log files for both maps, if there's something of interest there. I could also generate more maps with these values to see what else comes up.

You're right, I've modified the forest placement to reduce the forest. I've also made some other changes, but I don't think they should affect things, they're mostly adding in-game options or changing the defaults. I haven't done anything that should affect start placement, I don't think, or river/flood plains.
 

Attachments

  • Picture 1.jpg
    Picture 1.jpg
    193.5 KB · Views: 178
I noticed a couple things. (1) In this run, I got the spot that Monty got in the original place, but without the fish. Why would that be? (All the other resources are the same, so I'm assuming that the fish in the first map were added to boost the start value of that spot.) (2) No stone where Moscow was in the first map. Was that also added to boost the start value?

Since the starts are different on this run, that would change the calculations regarding plot boost resources. That's probably why you didn't get fish. Also yes, those rocks were a vain attempt to improve your crappy start position.

I'm looking at the minimap, and it looks like a large percentage of the world was destroyed in the meteor phase. My algorithm is better than it was, but sometimes it still ends up destroying the world. Are you breaking pangaeas and using a new world? That combined with the smaller map sizes would put an expected strain on the starting plot finder. Less good land and more players just makes fairness more difficult to achieve.
 
One of the changes I made was to have "Break Pangaeas" and "Allow New World" be set randomly. For that map they were both true.

Does your boosting algorithm always add (perhaps multiple occurrences of) a single type of resource to the BFC to help balance starts? It's true that when I reduced the map size I started seeing more multi-stone and multi-marble starts. (Although that four-stone start was the most extreme I've seen.) Have you thought about tweaking the algorithm a bit to add more types of resources and perhaps scatter them further (but still nearby)?
 
One of the changes I made was to have "Break Pangaeas" and "Allow New World" be set randomly. For that map they were both true.

Does your boosting algorithm always add (perhaps multiple occurrences of) a single type of resource to the BFC to help balance starts? It's true that when I reduced the map size I started seeing more multi-stone and multi-marble starts. (Although that four-stone start was the most extreme I've seen.) Have you thought about tweaking the algorithm a bit to add more types of resources and perhaps scatter them further (but still nearby)?

It's actually sortof random how it boosts the starts. It will randomly pick commerce, prod, or food and boost, stepping thorugh the different types, until it reaches the desired value. (I have a vague memory of changing that, I'm not sure exactly how it works now.) It works pretty well unless things get rediculous.
 
I really like your work with PerfectWorld but as a Fall From Heaven player, I've encountered an issue: the Malakim civilization which is set to start in desert won't be placed on desert on start with PW2.

Fall Further and Fall Further plus both have a 'Flavor Start' option that will start civilizations near their preferred terrain. I believe this was originally part of a separate mod called FlavorMod that can be downloaded separately and used with Fall from Heaven 2.
 
Yeah this perfect world thing is ridiculous.

I'm shocked at the beauty of it on a small map size, allow pangaea and start in the old world and the Cephalo algorithms are how to say, spectacular :eek: straight out of the box no adjustments needed. In order to change the resource balance for corps, just plug in a couple of extra woc sea resources to displace the vanilla sea resources and off you go for a stupendous BTS experience.

Sharing quality code like this is a wonderful thing.
Cheers.
 
cephalo
many thanks for your superb map, it really is top banana! pretty much the only one i can play civ on nowadays, the other maps just seem wrong.
I would be obliged if you could point me in the direction of what to adjust to shrink the deserts a bit. Im playing on a small map and the deserts often turn out to be a little too big for me. Im useless at coding and so every attempt Ive made had just led to an entire map of grassland which is no use to anyone.

Ive played some very interesting games on this map. Just had one where I was hemmed in by desert on one side and the koreans on the other. I did a quick rush of the koreans, but it turned out their land was blocked off by a mountain range. (note: a proper range not just a little clump of peaks) Ho hum thinks I, and goes about building up my crappy little empire, until i finally built a galley and sailed past the mountain range. Lo and behold a lovely little lost world was up there! Straight out of Conan Doyle. Lush jungle, enough room for 4 cities, cavemen, dinosaurs! brilliant!

are you a meteoroloist by the way? you seem to know a lot about weather systems.
 
cephalo
are you a meteoroloist by the way? you seem to know a lot about weather systems.

Everything I know about meteorology I learned from Wikipedia. :) I think that in Civ 5 once you research Wikipedia, it should make education obsolete. :lol:

To lower the amount of desert, find the DesertPercent variable toward the beginning of the script, and set it to a lower number.

Thanks for the compliments everyone! :)
 
Everything I know about meteorology I learned from Wikipedia. :) I think that in Civ 5 once you research Wikipedia, it should make education obsolete. :lol:

I wouldn't do that. I was deathly afraid of squirrels for a while because Wikipedia said they were bloodthirsty carnivores.

Spoiler :
Okay, not really. :lol:
 
Could you please bring the map size in line with the standards for the rest of the scripts. A small map using this script is as big as a standard. Large as huge, etc. It's annoying when you first use it, because if you know your computer can't handle large maps, and you pick standard, you get lagged out, and late game MAF crashes.

Also why have you enlarged it? Are you unaware that some people's computers can't handle biggger maps, and enlarging it means everyone with earlier machines have to drop a map size, and not knowing this causes confusion, and can ruin games because the lag gets too bad in the late game when you're not expecting it, because you didn't realize you're playing on a large map when you know your computer can handle standard maps, but this script makes standar size maps large?
 
Could you please bring the map size in line with the standards for the rest of the scripts. A small map using this script is as big as a standard. Large as huge, etc. It's annoying when you first use it, because if you know your computer can't handle large maps, and you pick standard, you get lagged out, and late game MAF crashes.

Also why have you enlarged it? Are you unaware that some people's computers can't handle biggger maps, and enlarging it means everyone with earlier machines have to drop a map size, and not knowing this causes confusion, and can ruin games because the lag gets too bad in the late game when you're not expecting it, because you didn't realize you're playing on a large map when you know your computer can handle standard maps, but this script makes standar size maps large?

The maps are larger because the playing area is alot smaller in PW. There's alot more ocean and unusable terrain, plus by default nobody starts in the new world. If I made the maps the normal size I think you would run into your neighbors too early. I've really been happy with the pace of the games I've played with this map.

If you need some help changing the size I can help with that, but I'm not going to make the default settings tuned for people with old computers...
 
Will PW.py accept negative numbers?

If I did added something like this:

self.hmMinDeepOceanDepth = -0.15

and then later on in CreateTerrainMap

for i in range(0,mc.height*mc.width):
self.terrainMap.append(mc.DEEPOCEAN)
elif (self.heightmap = isBelowSeaLevel and >= self.hmMinDeepOceanDepth):
self.terrainMap.append(mc.OCEAN)

is that close to what I would need to do or am I horribly off?
 
Top Bottom