[Map Script] PerfectWorld2.py

something that would be nice imho is making sure that the northern and southern borders of the map are all ice ( the water, impassable one ) , since seeing land end up in a black "invisible wall" kinda breaks immersion ;) also, it might be nice to make sure that there's some water between the end of the continent and the ice, so that ships can sail there instead of having to take a loooooong detour across half the planet :D
 
I fiddled a bit with the various variables (and forcible added a new variable of my own) and I almost go what I want (decent amount of snow/tundra land 'wearing' a small 'Ice on Ocean' hat at northpole), but now I got Ice/Tundra reaching a little too far up from the south. Any suggestion as to which variable I should modify to reduce that (without changing the reach from the north)?
 
[to_xp]Gekko;7840902 said:
something that would be nice imho is making sure that the northern and southern borders of the map are all ice ( the water, impassable one ) , since seeing land end up in a black "invisible wall" kinda breaks immersion ;) also, it might be nice to make sure that there's some water between the end of the continent and the ice, so that ships can sail there instead of having to take a loooooong detour across half the planet :D

You can set mc.northMargin to 'True' and it will prevent this behavior. You will have less tundra however. Keep in mind there is no northwest passage in the real world! So you could just look at the problem in a fun way!
 
I fiddled a bit with the various variables (and forcible added a new variable of my own) and I almost go what I want (decent amount of snow/tundra land 'wearing' a small 'Ice on Ocean' hat at northpole), but now I got Ice/Tundra reaching a little too far up from the south. Any suggestion as to which variable I should modify to reduce that (without changing the reach from the north)?

You might be able to play with the lattitude variables and get what you want. Unfortunately, when you do that you might get strange results, I'm not sure that code is doing exactly what I think it does right now.
 
I fiddled a bit with the various variables (and forcible added a new variable of my own) and I almost go what I want (decent amount of snow/tundra land 'wearing' a small 'Ice on Ocean' hat at northpole), but now I got Ice/Tundra reaching a little too far up from the south. Any suggestion as to which variable I should modify to reduce that (without changing the reach from the north)?

I think if you set southWaterBand and southCrop to some positive value x, the extreme south will be simulated beyond the south border, essentially warming up the climate towards the south border by some small amount. I would recommend x=10.

Code:
self.northWaterBand = 0
self.southWaterBand = x
self.eastWaterBand = 0
self.westWaterBand = 0

self.northCrop = 0
self.southCrop = x
self.eastCrop = 0
self.westCrop = 0
 
I played a few games with your script and I liked it a lot.
Very good work and a nice addiction to a great game.
Now the issue.

Since I installed bug 3.6 (I don't know if it's related, but the 2-3 games I played with BUG 3.5 did not have any problems) often the created map is all grassland with only scattered resources; no hills, no forests, no sea. If I regenerate the map, resources change but nothing else do. I have to shutdown CIV and restart it.

Any idea?
 
I played a few games with your script and I liked it a lot.
Very good work and a nice addiction to a great game.
Now the issue.

Since I installed bug 3.6 (I don't know if it's related, but the 2-3 games I played with BUG 3.5 did not have any problems) often the created map is all grassland with only scattered resources; no hills, no forests, no sea. If I regenerate the map, resources change but nothing else do. I have to shutdown CIV and restart it.

Any idea?

That's a map crash. If you turn on Python popups in your ini file, you can see what's going on. That's usually a good idea anyway when you use alot of mods. If you have logging turned on, you can also see these errors in PythonErr.log in your logs folder.
 
Thank you, I enabled python popups and logging.
Now I wait for another map crush :)
 
[to_xp]Gekko;7840902 said:
something that would be nice imho is making sure that the northern and southern borders of the map are all ice ( the water, impassable one ) , since seeing land end up in a black "invisible wall" kinda breaks immersion ;) also, it might be nice to make sure that there's some water between the end of the continent and the ice, so that ships can sail there instead of having to take a loooooong detour across half the planet :D

Agreed. The map needs Torodial. :)
 
You can set mc.northMargin to 'True' and it will prevent this behavior. You will have less tundra however. Keep in mind there is no northwest passage in the real world! So you could just look at the problem in a fun way!

would there be a way to set mc.northMargin and mc.southMargin to be random instead of true? even better would be to have it random for each continent. :D
 
Agreed. The map needs Torodial. :)

As soon as I have some free time for this I will make a toroidal, cylindrical, and flat option. To do it properly takes a little bit of work.
 
Does anyone else find themselves putting more civs than usual on PerfectWorld maps, to compensate for the sparsity of these maps?

For example, if I play with 7 civs on a Standard size map, it pretty much ensures that I will not meet anyone for a very long time (except scouts and boats that have traveled a long way). There will be no possibility of early war. So to compensate, I put 7 civs on a Small map, 10 civs on Standard, etc.

It seems that PerfectWorld's world sizes are generally larger than other maps. Is this true or is there just something about the starting locations that makes it seem that way?
 
First game with PF2. FFH game. Large Map.

Python Exception, Traceback:

line 5085, in addBonuses
line 3179, in addBonuses
line 3352 in AssignBonusAreas
line 3575 in CalculateAreaSuitability
line 3568 in GetSameClassTypeCountInArea

TypeError: unsopported operand type(s) for *: 'int' and 'instancemethod'

Exited, regenerated, same error.
 
Does anyone else find themselves putting more civs than usual on PerfectWorld maps, to compensate for the sparsity of these maps?

For example, if I play with 7 civs on a Standard size map, it pretty much ensures that I will not meet anyone for a very long time (except scouts and boats that have traveled a long way). There will be no possibility of early war. So to compensate, I put 7 civs on a Small map, 10 civs on Standard, etc.

It seems that PerfectWorld's world sizes are generally larger than other maps. Is this true or is there just something about the starting locations that makes it seem that way?


Yeah, PerfectWorld sets the map sizes to quite a bit larger than the standard sizes. If you want to keep the maps at standard sizes, look for the grid_sizes setting and change it back to the following:


def getGridSize(argsList):
grid_sizes = {
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 think if you remove the grid_sizes list altogether, it uses the standard sizes too.

Each of the above coordinates represent 4 tiles. For instance, the setting above for small maps will set the map to 64x40, which is what you get in "normal" maps. PerfectWorld makes small maps 96x44. The author seems to prefer making the maps quite a bit "longer" in the longitudinal direction.
 
Does anyone else find themselves putting more civs than usual on PerfectWorld maps, to compensate for the sparsity of these maps?

For example, if I play with 7 civs on a Standard size map, it pretty much ensures that I will not meet anyone for a very long time (except scouts and boats that have traveled a long way). There will be no possibility of early war. So to compensate, I put 7 civs on a Small map, 10 civs on Standard, etc.

It seems that PerfectWorld's world sizes are generally larger than other maps. Is this true or is there just something about the starting locations that makes it seem that way?

The reason I made these maps larger, is because I like having alot of land that is not useful like deserts, tundra and ocean. However, PW2 actually has alot more useful land than PW1 did. So I do wonder if these maps are a bit too large.

Changing the size of the map is a bit complicated for those who would like to. You have to change the size of the original heightmap to match the aspect ratio of the results you want. See the comments for the mc.hmWidth and mc.hmHeight variables. You can set the values in getGridSize to anything smaller than those variables, but if the aspect doesn't match you'll stretch the map! Although on a randomly generated map that may not be noticable.
 
First game with PF2. FFH game. Large Map.

Python Exception, Traceback:

line 5085, in addBonuses
line 3179, in addBonuses
line 3352 in AssignBonusAreas
line 3575 in CalculateAreaSuitability
line 3568 in GetSameClassTypeCountInArea

TypeError: unsopported operand type(s) for *: 'int' and 'instancemethod'

Exited, regenerated, same error.

Ok this is something I was a little worried about. Are you using vanilla Civ4 by chance? There's a version difference that I was hoping to handle, but maybe it's not water tight.
 
Nope, BTS, latest patch, and version Y of FFH.

If you use it with normal BtS, does it work? The problem may be that I'm testing the directory structure for BtS, and if that fails, it assumes vanilla or warlords. Did you install to a non-normal directory? I may end up having to make separate versions for vanilla and BtS.
 
[to_xp]Gekko;7842526 said:
would there be a way to set mc.northMargin and mc.southMargin to be random instead of true? even better would be to have it random for each continent. :D

Attached is a version for you that does the former not the latter. Agree that's it nice to not know in advance which pole offers passage.

Also in the attachment there is a custom variable I've put in that initialises Cephalo's code to produce gorgeous new world maps the best I've ever played on but only if you select "Allow Pangaeas" and "Start in Old World"

self.RevolutionDCMWorld = True (set to False for original behaviour but retaining random passage)

The changes I have made are merely personal cosmetic changes to Cephalo's most excellent code. All are commented as #RevolutionDCM and distinguisable from Cephalo's own code.

Cheers.
 
Top Bottom