[Map Script] PerfectWorld2.py

The only way that's supposed to happen, is if you somehow accidently chose a flat map. The wrapping options are cylindrical (x wrap), toroidal(x and y wrap) or flat (no wrapping). Generate a few more, and check them out in World Builder to make sure it's what you are expecting.

Crap, I did. Anyway to change it without restarting?
 
Crap, I did. Anyway to change it without restarting?

No not really. Even if you could, PW generates differently depending on wraps. You would have a very ugle line visible where the two ends meet, since the continents only match up if there's wrapping in the particular direction.
 
cephalo, what should I set peakpercent and hillpercent with a land percentage of 0.66? is it:

0.66/0.29(default) = 2.27

pearkpercent=0.035(default) * 2.27 = 0.079
hillpercent=0.1(default) *2.27 = 0.27

is this right or should I use a different method ??
 
Man, this mapscript is incredible! I read this whole thread, and I'm absolutely blown away by the amount of thought and work that has gone into this. It definitely shows.


There's been a lot of mention in this thread of being able to set the bonus frequencies in BonusInfos.xml and BonusClassInfos.xml. I can't seem to figure out exactly how all of the variables come into play though. Does anyone feel like enlightening me?

Purely for example, let's say I want to increase the occurrence of Wheat.

I see that its iConstAppearance is 50, like all of the non-strategic resources. If I increase this to 100, will that double the amount of Wheat that appears (or that can appear)?

For all of the food resources, their iPlayer value is 0. I was under the impression that a value of 100 means one resource per player, 50 means one resource per two players, etc. So presumably 0 is a special case. Would changing the value for Wheat have any effect?

iRandApp1 and 2 are 10 for strategic, 25 for non-strategic. I don't know what these mean. Would they be relevant to this example? 3 and 4 seem unused.

I read that setting bArea to 0 will allow the resource to appear on multiple continents, right?

iTilesPer is a complete mystery to me, as is iUnique.

iGroupRange and iGroupRand seem to control whether or not the bonus can appear in groups and the chance of that occurring. Could I make Wheat a grouping resource with these?

To make the grouping happen, I'm guessing I would also need to modify the BonusClassInfos. Do the numbers in this file represent the minimum distance between resources of these types? So if I changed Grain to 0, then Wheats would be able to appear adjacent to each other, right? Is there a way to reclassify Wheat as a General instead of a Grain to achieve this same effect? Also, which resources are in the Rush and Modern classes?

Everything else seems pretty obvious or inconsequential. Any help on these questions would be greatly appreciated!
 
[to_xp]Gekko;8306025 said:
cephalo, what should I set peakpercent and hillpercent with a land percentage of 0.66? is it:

0.66/0.29(default) = 2.27

pearkpercent=0.035(default) * 2.27 = 0.079
hillpercent=0.1(default) *2.27 = 0.27

is this right or should I use a different method ??

Yeah this should work, but you might make the maps alot smaller or double the amount of players. Otherwise you won't meet your neighbors until the medeival age. :)
 
Man, this mapscript is incredible! I read this whole thread, and I'm absolutely blown away by the amount of thought and work that has gone into this. It definitely shows.


There's been a lot of mention in this thread of being able to set the bonus frequencies in BonusInfos.xml and BonusClassInfos.xml. I can't seem to figure out exactly how all of the variables come into play though. Does anyone feel like enlightening me?

Purely for example, let's say I want to increase the occurrence of Wheat.

I see that its iConstAppearance is 50, like all of the non-strategic resources. If I increase this to 100, will that double the amount of Wheat that appears (or that can appear)?

For all of the food resources, their iPlayer value is 0. I was under the impression that a value of 100 means one resource per player, 50 means one resource per two players, etc. So presumably 0 is a special case. Would changing the value for Wheat have any effect?

iRandApp1 and 2 are 10 for strategic, 25 for non-strategic. I don't know what these mean. Would they be relevant to this example? 3 and 4 seem unused.

I read that setting bArea to 0 will allow the resource to appear on multiple continents, right?

iTilesPer is a complete mystery to me, as is iUnique.

iGroupRange and iGroupRand seem to control whether or not the bonus can appear in groups and the chance of that occurring. Could I make Wheat a grouping resource with these?

To make the grouping happen, I'm guessing I would also need to modify the BonusClassInfos. Do the numbers in this file represent the minimum distance between resources of these types? So if I changed Grain to 0, then Wheats would be able to appear adjacent to each other, right? Is there a way to reclassify Wheat as a General instead of a Grain to achieve this same effect? Also, which resources are in the Rush and Modern classes?

Everything else seems pretty obvious or inconsequential. Any help on these questions would be greatly appreciated!

I can't remember what iConstApperance does.

RandApp1 and 2 are like two dice to control the randomness of how many resources are placed.

iTilesPer is how many to be placed per x tiles that can legally recieve the bonus. Usually this will be used instead of iPlayer for non strategic bonuses to set the number of bonuses. Some bonuses are per player, some are per how much room on the map there is.

iUnique is a minimum distance to place from the same resource. It works like the one in bonusClassInfo but usually less strict.

Generally, the one in bonusClassInfo is your main bottleneck in getting more wheat for example. The game usually calculates more bonuses to be placed than is possible do to the default iUnique in the class info of 5. Anything you do to increase wheat will fail unless you reduce this number.

Everything else you mentioned is correct.
 
thanx cephalo. I had already done some maths and found out that for those values to be reasonable, you need to set the grid to 18*12, for 8 players. it works very nicely, but you really need flavourmod to make sure the Lanun near the largest body of water otherwise they'll be really sad :lol:
 
I have a question about this script.

I'm not sure what I did this time, but before I reformatted the map would generate maps like the ones in the previews(Black bars on the top and bottom making the map have more width). It also didn't take over a minute to generate a map.

This time around however, it makes maps like those below (a lot less horizontal room and more vertical) and takes forever to generate.
 

Attachments

  • civ4.jpg
    civ4.jpg
    178.2 KB · Views: 184
I have a question about this script.

I'm not sure what I did this time, but before I reformatted the map would generate maps like the ones in the previews(Black bars on the top and bottom making the map have more width). It also didn't take over a minute to generate a map.

This time around however, it makes maps like those below (a lot less horizontal room and more vertical) and takes forever to generate.

This map takes forever to generate. If you remember less than a minute, it must have been a different map.
 
No it was this map, and maybe it wasn't exactly under a minute, but it was very quick. I have a very good PC.

But like I asked, why do I have the vertical black bars instead of horizontal? It looks like the map is the original perfectworld.
 
No it was this map, and maybe it wasn't exactly under a minute, but it was very quick. I have a very good PC.

But like I asked, why do I have the vertical black bars instead of horizontal? It looks like the map is the original perfectworld.

Ah, I remember now. Check out post #171 in this thread. It also explains why the map might take a little longer to generate. It was the changes I made in 2.02.
 
Ah, I remember now. Check out post #171 in this thread. It also explains why the map might take a little longer to generate. It was the changes I made in 2.02.

Oh I see. Do you happen to have a version of the script where the maps had less vertical distance?
 
Oh I see. Do you happen to have a version of the script where the maps had less vertical distance?

Check out post #191 and the related discussion after. I actually made a mistake with those instructions, the dimensions should be 160,81 not 161,80
 
How are marshes an improvement? They are a terrain type and as they were not included in vanilla civ4, I would venture to call them new, granted other people have included marsh terrain in their mods, but all PerfectWorld2.03_WithMarshes does is give you the ability to play on the PerfectWorld2.03 mapscript and have marshes be represented in your maps. I don't even know if I consider it an actual mod, it adds nothing in the way of game functionality (if you don't count the Swamp Fox promotions from Colonization), it is simply intended to take a frigging awesome mapscript and add one more terrain option.

Hi - TheLadiesOgre : You have not posted on this thread for some time. How is your conversion to add Marshes coming along.

I would love to use it with Total Realism, as they are adding marshes to their mod, (world map only). I can not play World Map (XP problem) but using PW2 and marshes would be great. :goodjob:
 
First of all thanks for this great Mapscript! I don't use any others any more...

But there is one thing that really bugs me:
It seems to be almost impossible to get non-coastal starting locations.
...

Hah! My first game using the script (huge map, marathon, using the Hephmod Beyond* mod v1.0 Beta, Prince difficulty), I am over a dozen tiles from the nearest shore. One grass, the rest plains (incl. 2 hills) 2-3 forests, no food, but at least I have a RIVER (and one Horse)! :lol:

Actually no, PW does everything differently than the default way. I never used the iStartingLoc value for the placement routines in PW.

ACK! This is an OUTRAGE! :lol: Don't you have easy access to iStartingLocPercent within the script?

I'm playing as ROME -- I DESERVE an excellent starting position. So I altered the HandicapInfo file so my iStartingLocPercent is TEN, not fifty.
Fortunately, nearby there is lots of rivered grassland with hills, pig and stone within my 2nd city radius. Bad news is it may take a few hundred years to develop this (and the horse next to Roma): Hephmod Beyond includes Raging Barbarians, and they are terrible! I may LOSE Antium next turn.

* Freakin' AWESOME mod, BTW, as PerfectWorld promises to be.
 
Cephalo, I have a question, I have noticed something in _WithMarshes that I find to be aesthically unpleasing -- marshes on hill plots. I have tried adding "and not (self.plotMap == mc.HILLS)" to the if statements that determine terrain allocation and still no luck. Any idea what could cause this?

Hi - TheLadiesOgre : You have not posted on this thread for some time. How is your conversion to add Marshes coming along.

I would love to use it with Total Realism, as they are adding marshes to their mod, (world map only). I can not play World Map (XP problem) but using PW2 and marshes would be great. :goodjob:

@Harrier check my sig, but be aware, in my opinion it is still a work in progress, I'd like to get this marshes on hills thing fixed and at some point I'd like to add marsh-related events.
 
Cephalo, I have a question, I have noticed something in _WithMarshes that I find to be aesthically unpleasing -- marshes on hill plots. I have tried adding "and not (self.plotMap == mc.HILLS)" to the if statements that determine terrain allocation and still no luck. Any idea what could cause this?

I tried to make sure that the sm.plotMap was updated with correct info, but it's possible I missed something toward the end of the process. Also, it's possible that the hill is created after you have placed marsh. Check the final global function calls that send the info to the game, like generatePlots.
 
Hah! My first game using the script (huge map, marathon, using the Hephmod Beyond* mod v1.0 Beta, Prince difficulty), ... One grass, the rest plains (incl. 2 hills) 2-3 forests, no food, but at least I have a RIVER (and one Horse)! :lol:

I'm playing as ROME -- I DESERVE an excellent starting position.
Fortunately, nearby there is lots of rivered grassland with hills, pig and stone within my 2nd city radius. Bad news is it may take a few hundred years to develop this (and the horse next to Roma): Hephmod Beyond includes Raging Barbarians, and they are terrible! I may LOSE Antium next turn.

* Freakin' AWESOME mod, BTW, as PerfectWorld promises to be.

(Spent a few days reading & CivReving on my iPodT.)

Didn't lose Antium, and I withdraw any seeming complaints or protests. :)
On turn 201 (1690 BC) I got Iron Working (just after my industrious citizens built a pasture for me -- I had lost my worker) and TWO Iron popped by Rome, one of them already mined. That mine on the river (and the just-built pasture) are all the improvements I had left.

Too bad I won't be able to WORK both those irons. Won't have the food surplus to do so until biology.
 
Anyone else find that the maps generated with this have too much desert in them?
The last several games I've played have had -way- too much desert, I've also noticed a lack of production resources, yet an overabundance of plantation resources.
It could just be me having bad luck, though.
 
Hey, it's been a while since I last played a game past 0 CE, and now I can't remember...
Is this kind of things normal in a prince-level game ? Most of the IA territory is still covered with forests in 1025 CE. I wonder if this is a bug, and if it could be related to some of the values I changed in the map script. For this map i made a mistake and put less than 1 in self.TreeFactor, and that resulted in disallowing jungles.
It doesn't seem related but this is the only "illegal" change i made, so...
Spoiler :
 
Top Bottom