[Map Script] PerfectWorld.py

Improvements are another thing you can use to stack on terrain tiles. FfH uses lots of them for monster lairs etc. So if you want to combine two features, you can have one of them be an improvement instead. Although, it would be destroyed if someone built another improvement on top of it.

I didn't know that they could be generated at the start, may have to look into it some more. I've set most improvements except roads to destroy the features anyway, because there were some bad clipping issues with some of them.
 
I just downloaded the latest version of this (I think), and I was wondering how to put it into a mod that I am working on. What exactly do I do with the py file?

Wait, I think I just figured this out, I just make a publicmaps folder in my mod's folder right? And then put this in there?
 
I just got the following on a large map with 13 civs, start anywhere and allow pangeas:

File "PerfectWorld", line 4047 in AddBonuses
File "PerfectWorld", line 2091 in AddBonuses
File "PerfectWorld", line 2166 in AddBonusType

ValueError: bad index shuffling plot list randIndex=2864 listLength=2864, mapSize = 10240

I closed out, re-rolled the start, and got a map with no errors, so just FYI ...
 
I just downloaded the latest version of this (I think), and I was wondering how to put it into a mod that I am working on. What exactly do I do with the py file?

Wait, I think I just figured this out, I just make a publicmaps folder in my mod's folder right? And then put this in there?

find the other map scripts for the unmodded game and duplicate that directory structure in your mod directory. then put the script in there.

for an example see my Expanded Plus Mod download in my sig, I included the perfect world map script with it.
 
I just got the following on a large map with 13 civs, start anywhere and allow pangeas:

File "PerfectWorld", line 4047 in AddBonuses
File "PerfectWorld", line 2091 in AddBonuses
File "PerfectWorld", line 2166 in AddBonusType

ValueError: bad index shuffling plot list randIndex=2864 listLength=2864, mapSize = 10240

I closed out, re-rolled the start, and got a map with no errors, so just FYI ...

That is a long standing, very occasional bug that I absolutely cannot figure out. It is impossible for that to happen, yet it happens. Sometimes the length of a list is not updated fast enough I guess... but I really just don't know.

the randIndex is the same as the length as you can see, which is of course a bad index.
 
find the other map scripts for the unmodded game and duplicate that directory structure in your mod directory. then put the script in there.

for an example see my Expanded Plus Mod download in my sig, I included the perfect world map script with it.

Hmm, yeah that's what I did with my mod but a strange thing happens. I put the NewWorld.py and Perfect_World.py into my PublicMaps folder within my mod, and I actually tested both scripts out. Now when you start the game the loading bar sticks on "initializing" for quite a long time, but it went through for both scripts. Now here's the strange part. THE NEXT TIME I try and load up the game right after the opening video shows it says it can't locate the file NewWorld.py/Perfect_World.py. Why does this happen? Do I have to have them present in the regular PublicMaps folder as well as my PublicMaps folder?

And if that is the case why does Thomas' War work without having them in both folders?

Anyone know why this is happening?
 
Hmm, yeah that's what I did with my mod but a strange thing happens. I put the NewWorld.py and Perfect_World.py into my PublicMaps folder within my mod, and I actually tested both scripts out. Now when you start the game the loading bar sticks on "initializing" for quite a long time, but it went through for both scripts. Now here's the strange part. THE NEXT TIME I try and load up the game right after the opening video shows it says it can't locate the file NewWorld.py/Perfect_World.py. Why does this happen? Do I have to have them present in the regular PublicMaps folder as well as my PublicMaps folder?

And if that is the case why does Thomas' War work without having them in both folders?

Anyone know why this is happening?

Ya, I'm familiar with this issue. The game writes your last map used in your ini file. However, the normal game does not look in all the mod folders for maps, only the main PublicMaps folder. So if you use a mod with it's own map, then start up the normal game, it can't find the map it saved in the ini file. What you can do is just ignore the error messages, run a different map and the problem goes away.
 
Yeah but it just locks up between opening screens (the opening video, and all that other crap), so how can I solve this issue?

I usually get error messages that I can just click through. It's really locking up? In that case, you can edit the ini file and remove the part regarding what map script is chosen. As for inclusion in a mod, you might create a PrivateMaps directory like Final Frontier does, instead of a PublicMaps directory. That may actually prevent this problem. I'm not sure about that since I just thought of it one second ago, but it's worth a try.
 
BTW, I've found this map to occasinally produce civ starting spots that are too close to each other. Like two coastal capitals on the sides of a narrow channel or small gulf.
 
BTW, I've found this map to occasinally produce civ starting spots that are too close to each other. Like two coastal capitals on the sides of a narrow channel or small gulf.

The starting positions were the very most difficult part of making this map. The reason you see that kind of behavior is that everything is done by continent. The starting placer knows how many people should be on a continent, and tries to make those starts as fair as it can. Starts on different continents are not examined at all. This map is so variable in terms of land quality that creating fair starts is very difficult.
 
I've been using your map script on BTS for about 3 months now, and I have to say: EXCELLENT JOB SIR! It's by far my favourite type of world. I especially love the abundance of grassland/hills/forests and rivers, and the long mountain ranges which act as natural lines of defence.

Just one gripe: the human player too often seems to start on a separate island or small continent, and may even remain isolated until the discovery of Optics - with an obvious heavy disadvantage in the tech race. And there are sometimes sizeable landmasses with no luxury resources of any kind. Is this intentional?
 
Hmm, that's odd, in my games with this map there is usually one huge continent that has the majority of civs, and then maybe two or three much smaller continents (almost really just large islands) that have one AI civ on them. I always wind up on the largest continent.

Also one game I played as Japan I was on this huge continent, and there was a mountain range separating me from the rest of it, but I had really great land, and a good deal of it. So it was a little easy. Is there anything that can be done about this phenomenon (one time the Chinese started on an island that only had two tiles)?
 
I always generate several times, checking the overall look of the map with worldbuilder, before starting the game. I love this map script, but most of the maps it generates I don't like. (One large snakey continent, and some smaller islands.) But I love the ones I do like! (The ones that give at least two good-sized continents.)

I've tweaked the settings to give more land, and less desert and ice.
 
I always generate several times, checking the overall look of the map with worldbuilder, before starting the game..

Me too - except I don't usually look in WorldBuilder, just keep regenerating until I get a prime starting location.
 
I find one of the problem with most map scripts, is that sometimes you get a mountain on a single tile that separates two big landmasses. That messes up the AI, because it doesn't know how to settle "around the mountain". It probably doesn't know how to attack around it, either. The AI doesn't seem to understand it needs to use ships to go around the mountain, even if it's on the same continent.

So, I always convert those mountains into hills before starting the game.
 
That is a long standing, very occasional bug that I absolutely cannot figure out. It is impossible for that to happen, yet it happens. Sometimes the length of a list is not updated fast enough I guess... but I really just don't know.

the randIndex is the same as the length as you can see, which is of course a bad index.
This is probably a very simplistic suggestion by your standards, but...

Does python use a base of 0 for indexes? If so, then for a list with N elements, legal indexes are 0 thru N-1, not 1 thru N. Since the error message lists the same length and index I’d guess that’s the issue.

The infrequency of the error would be confirmed because it would occur only when a random index equal to the last (really the last +1) element is indicated.
 
My only gripe with the maps I get now is that they tend to be... heavily forested. And very green. It fits the bill for a good starting spot, but it tends to be a little boring when you can't find much variety in starting spots.
 
Back
Top Bottom