View Full Version : [Map Script] PerfectWorld2.py
cephalo Feb 17, 2009, 06:37 PM Hi Folks!
This map script for vanilla Civ4,Warlords, BtS and most mods based on Civ4 generates a random, earth-like map, usually with a 'New World' with no starting locations that can only be reached with ocean going technology. Landforms are created using a random heightfield and a plate tectonic scheme. Climate is simulated using the interaction between the landforms and geostrophic winds. Though great pains are taken to semi-accurately simulate landforms and climate, the goal must be to make unpredictible, beautiful looking maps that are fun to play on.
Download the file here from the downloads database. (http://forums.civfanatics.com/downloads.php?do=file&id=8042)
This script is a rebuilt version of my first map script, PerfectWorld v. 1.13. As this version is almost a complete rewrite, and is quite different from previous versions, I will keep version 1.13 available from it's original thread (http://forums.civfanatics.com/showthread.php?t=239982).
To use this map, put it in your Civilization 4\PublicMaps folder, not in your My Documents\My Games\Civilization 4\PublicMaps folder.
-- Map Options --
New World Rules:
Start in Old World(Default): Reserves some continents to act as a new world
Start Anywhere: Disables the new world functionality
Pangaea Rules:
Break Pangaeas(Default): Breaks up Pangaeas with a simulated meteor shower.
Allow Pangaeas: Allow pangaeas to exist. Keep in mind that this will likely eliminate any 'New World' as well.
-- Summary of creation process: --
First, a random heightfield is created using midpoint displacement. The resulting altitudes are then modified by a plate tectonics scheme that grows random plates and raises the altitudes near the plate borders to create mountain ranges and island chains.
In generating the plot types from a heightmap, I had found that using peaks for high altitude and land for less altitude created large clusters of peaks, surrounded by a donut of hills, surrounded again by a donut of land. This looked absolutely terrible for Civ, so I made it such that peaks and hills are determined by altitude *differences* rather than by absolute altitude. This approach looks much better and more natural.
The terrain generator gives the other needed visual cues to communicate altitude. Since air temperature gets colder with altitude, the peaks will be plots of ice and tundra, even near the equator, if the altitude is high enough. Prevailing winds, temperature and rainfall are all simulated in the terrain generator. You will notice that the deserts and rainforests are where they should be, as well as rain shadows behind mountain ranges.
Rivers and lakes are also generated from the heightmap and follow accurate drainage paths, although with such a small heightmap some randomness needs to be thrown in to prevent rivers from being merely straight lines.
Map bonuses are placed following the XML Rules but slightly differently than the default implimentation to better accomodate this map script.
I've always felt that the most satisfying civ games are the ones that provide a use for those explorers and caravels. Though the map generator does not explicitly create a 'New World', it will take advantage of any continents that can serve that purpose. No starting locations will be placed on these continents. Therefore, the likelyhood of a significant new world is very high, but not guaranteed. It might also come in the form of multiple smaller 'New Worlds' rather than a large continent.
Enjoy!
Here are some screenshots to illustrate some of the features of PerfectWorld2.
Here is a typical map overview, using the same random seed value to generate three different sized maps. Dual, Standard, and Huge.
http://forums.civfanatics.com/attachment.php?attachmentid=204213&stc=1&d=1234915781
Here is an example of how PerfectWorld2 creates an illusion of altitude differences. On the left you can see an area of high mountain peaks covered in snow. As you look to the right you can follow the rivers as they flow into the ocean through lower, warmer altitudes.
http://forums.civfanatics.com/attachment.php?attachmentid=204210&stc=1&d=1234915781
Rivers follow accurate drainage paths governed by the altitudes of each map square. Rivers in PerfectWorld2 are longer and more natural looking compared with previous versions. Here is a typical example.
http://forums.civfanatics.com/attachment.php?attachmentid=204212&stc=1&d=1234915781
The climate model simulates weather patterns caused by geostrophic and monsoon winds. Here is a picture of how high mountains can cause a 'rain shadow' effect by blocking moisture coming in from the ocean.
http://forums.civfanatics.com/attachment.php?attachmentid=204211&stc=1&d=1234915781
Version History
2.06 - Fixed a few bugs from my minimum hill/maximum bad feature function.
2.05 - Made maps of standard size and below a bit smaller. Changed the way I remove jungle to prevent excessive health problems. Tiles in FC on differen continents have zero value. Tiles on different continents will not be boosted with resources or hills. Water tiles have zero value for non-coastal cities. Water tiles will not be boosted with resources for non-coastal cities, land tiles will be boosted instead. (lookout Sid's Sushi!)
2.04 - Changed many percent values to be a percent of land tiles rather than total map tiles for easier, more predictable adjustment. Ensured a minimum number of hills in a starting fat cross. Disabled the normalizeRemovePeaks function a replaced it with a maximum peaks in FC function. Added bonus resources to FC depending on player handicap. Added a value bonus for cities placed on river sides.
2.03 - Fixed an initialization problem related to Blue Marble. Added some enhanced error handling to help me track down some of the intermittant bugs that still remain.
2.02 - Fixed some problems with monsoons that were creating strange artifacts near the tropics. Added an exponential curve to heat loss due to altitude, so that jungles can appear more readily without crawling to inappropriate latitudes.
2.01 - Changed the way I handled a vanilla version difference. Added toroidal and flat map options. Made tree amount more easily adjustable. Added a variable to tune the level of resource bonuses. Changed the rules for fixing tundra/ice next to desert. Added altitude noise to the plate map to improve island chains. Added a variable to control heat loss due to high altitude. Implimented a new interleaved bonus placement scheme so that bonuses are placed individually in random order, rather than all of each bonus type at once. Brought back the meteor code from PerfectWorld 1 and eliminated the east/west continent divide.
2.0 - Rebuilt the landmass and climate model using the FaireWeather.py for Colonization map script engine. Improved the river system. Fixed some old bugs.
RPG Feb 17, 2009, 06:47 PM Well done! Those screen shots look absolutely beautiful and I cannot wait to try this out.
Ambreville Feb 17, 2009, 07:49 PM Looks very interesting. I'd like to run this with Fall from Heaven 2. Do you know by any chance if it happens to be compatible?
cephalo Feb 17, 2009, 08:09 PM Looks very interesting. I'd like to run this with Fall from Heaven 2. Do you know by any chance if it happens to be compatible?
It should be yes. If not, then I made a mistake somewhere. Seven05 is also making a FFH specific map script using the FaireWeather engine also. Check the maps and modmod forum in the FFH section.
RulerOfDaPeople Feb 17, 2009, 11:39 PM Haha, Sweet! Just in time for my next multi-mega-civs game! :D
Jean Elcard Feb 18, 2009, 03:24 AM And here it is! Thanks for all your time you put into this. :)
EDIT: I hope you don't object if I bundle this up with FlavourMod for FfH again?
RulerOfDaPeople Feb 18, 2009, 03:33 AM It's a beautiful map. I'm not sure I like the random tundra and ice hills sections in the middle of perfectly good temperate forrest regions though.
I like how the map seems to automatically adjust the size of it's landmass/continents based on how many civs you have chosen to be in a game. I started a game with 24 civs and it generated a nice map just enough room for 4-5 cities for everybody (Except 2 civs that got screwed on their random start, which happened to be on tiney islands. But one of those was Tokugawa. I'm sure the mercantile won't mind though :lol: )
In quick short simple terms, what's the main difference in this one from Perfect World1?
cephalo Feb 18, 2009, 08:19 AM And here it is! Thanks for all your time you put into this. :)
EDIT: I hope you don't object if I bundle this up with FlavourMod for FfH again?
No objections, buuut there's gotta be some bugs in here. Too much new stuff.
cephalo Feb 18, 2009, 08:27 AM It's a beautiful map. I'm not sure I like the random tundra and ice hills sections in the middle of perfectly good temperate forrest regions though.
High mountains! Those are high mountains!
I like how the map seems to automatically adjust the size of it's landmass/continents based on how many civs you have chosen to be in a game. I started a game with 24 civs and it generated a nice map just enough room for 4-5 cities for everybody (Except 2 civs that got screwed on their random start, which happened to be on tiney islands. But one of those was Tokugawa. I'm sure the mercantile won't mind though :lol: )
No adjustments of the kind you mentioned. Does that mean the map is too big for a normal game? Nobody should be starting on tiny islands, I'd like a screenshot if that's the case because that's a bug.
In quick short simple terms, what's the main difference in this one from Perfect World1?
Faster, more thorough climate generator. Better rivers. Better smaller maps. More tuning variables for different effects (but that's more of a modding thing). Most of the changes are under the hood I guess.
I'm hoping that it is a better map script, but it's kinda like getting a new haircut. It may well be a more fashionable haircut, but if you aren't used to it it can be kinda disconcerting.
Burned Feb 18, 2009, 08:39 AM Great maps. But I'd like fiddle a little with ressources, too scarce for me.
Is there a way to get this sort of change through your bonus placer in the script, or should I learn how to rewrite this whole part ?
I tried to play frankenstein with others scripts bonus placers sewed to yours, but of course it didn't work.
cephalo Feb 18, 2009, 09:20 AM Great maps. But I'd like fiddle a little with ressources, too scarce for me.
Is there a way to get this sort of change through your bonus placer in the script, or should I learn how to rewrite this whole part ?
I tried to play frankenstein with others scripts bonus placers sewed to yours, but of course it didn't work.
By scarce you mean normal correct? If resources are really scarce there might be a problem. There should be alot of bonuses, just as much as the factory maps and maybe more.
Ambreville Feb 18, 2009, 09:26 AM It should be yes. If not, then I made a mistake somewhere. Seven05 is also making a FFH specific map script using the FaireWeather engine also. Check the maps and modmod forum in the FFH section.
Yes, it does work very well in fact! Great map! Thanks! :goodjob:
Would it be possible to make sure Brigit gets placed on a new world spot?
cephalo Feb 18, 2009, 09:34 AM Yes, it does work very well in fact! Great map! Thanks! :goodjob:
Would it be possible to make sure Brigit gets placed on a new world spot?
Well, I would have to make a FFH specific version for that. Seven05 is making a very similar map specifically for FFH so I don't wanna step on his toes. In my experience with PW1 though, I have found that using a 'new world' with FFH will get so ridiculously full of animals and barbarians that it's almost unplayable. When no one is around to kill them they breed and breed and breed.
Burned Feb 18, 2009, 10:33 AM What's a factory map ?
Well, in any case, the maps are playable since ressources seems equally scarce for all players. But there is a clear difference with the big and small maps I usually play.
I just took these screens, from the two first maps generated.
This one is a Big and Small, the total of the bonuses around the starting locations of the three players is 20, with each time at least two food ressources that can be joined directly or by moving the colon in a adjacent case.http://img3.hostingpics.net/pics/947412SmallBigSmall.jpg (http://www.hostingpics.net/viewer.php?id=947412SmallBigSmall.jpg)
This one is a PerfectWorld 2. the total is 9, and one food ressource in each starting location's fat cross.http://img3.hostingpics.net/pics/450956SmallWorld.jpg (http://www.hostingpics.net/viewer.php?id=450956SmallWorld.jpg)
cephalo Feb 18, 2009, 10:59 AM What's a factory map ?
Well, in any case, the maps are playable since ressources seems equally scarce for all players. But there is a clear difference with the big and small maps I usually play.
I just took these screens, from the two first maps generated.
This one is a Big and Small, the total of the bonuses around the starting locations of the three players is 20, with each time at least two food ressources that can be joined directly or by moving the colon in a adjacent case.
By factory map I mean the ones that come with the game.
By looking at these screen shots, I don't see anything obviously broken, but let me explain a little how the starting plot function works that is different than other maps.
The starting plots in the PW2 screens are very good starts with lots of grassland, which is somewhat rare on this map. The quality of the starting plot is measured by not only the fat cross but also the fat cross of any likely city spots you are likely to build first by virtue of path distance. The starting plot 'sweetener' code will give bonuses depending on the relative strength and expandability of each players starting plot. If you look at all the starting plots on a map, you should see some players in weaker positions with a lot of bonuses in their fat cross. If you don't see that, there might be a bug. Check your PythonErr.log file to see if something has failed.
EDT: actually this would be more obvious on a larger map with more players. On this small map, those three players are starting roughly equally, so that might be why there's no sweetening.
Burned Feb 18, 2009, 11:20 AM There's no log recently modified. I understand that this is not a bug, it's the way the ressources are normally implanted in your mapscript.
My request was simply based on a personnal preference - as i like the way the landmasses appear in perfectworld, i like all the couloured or shiny ressources that appear in others maps.
cephalo Feb 18, 2009, 11:26 AM There's no log recently modified. I understand that this is not a bug, it's the way the ressources are normally implanted in your mapscript.
My request was simply based on a personnal preference - as i like the way the landmasses appear in perfectworld, i like all the couloured or shiny ressources that appear in others maps.
You might try commenting out the addBonuses and setStartingPlots functions near the bottom of the script. That will cause it to use the default routines. On small maps, that might be ok, but on larger maps you might find things to be grossly unfair and also the smaller islands won't have resources.
Burned Feb 18, 2009, 11:37 AM Ok. Thanks for these scripts anyway.
Ambreville Feb 19, 2009, 07:12 AM Got a number of Python errors while starting a new game.
Traceback (most recent call last):
File "PerfectWorld2", line 4528, in generatePlotTypes
File "PerfectWorld2", line 1883, in initialize
File "PerfectWorld2", line 2459, in generateContinentMap
File "PerfectWorld2", line 2778, in PrintAreaMap
File "CvUtil", line 110, in write
RuntimeError: unidentifiable C++ exception
ERR: Python function generatePlotTypes failed, module PerfectWorld2
Traceback (most recent call last):
File "PerfectWorld2", line 4584, in addRivers
File "PerfectWorld2", line 4636, in placeRiversInPlot
AttributeError: RiverMap instance has no attribute 'NE'
ERR: Python function addRivers failed, module PerfectWorld2
Traceback (most recent call last):
File "PerfectWorld2", line 4961, in addLakes
AttributeError: RiverMap instance has no attribute 'flowMap'
ERR: Python function addLakes failed, module PerfectWorld2
Traceback (most recent call last):
File "PerfectWorld2", line 5091, in assignStartingPlots
File "PerfectWorld2", line 3613, in SetStartingPlots
File "PerfectWorld2", line 3772, in setupOldWorldAreaList
AttributeError: ContinentMap instance has no attribute 'newWorldID'
ERR: Python function assignStartingPlots failed, module PerfectWorld2
cephalo Feb 19, 2009, 08:58 AM Got a number of Python errors while starting a new game.
The unidentified C++ error happens once in a while. I have no idea what it could be since it's quite rare and I can't reproduce it. If you get it frequently, let me know. The rest of the errors are all caused by the first.
Seven05 Feb 19, 2009, 10:36 AM Well, I would have to make a FFH specific version for that. Seven05 is making a very similar map specifically for FFH so I don't wanna step on his toes. In my experience with PW1 though, I have found that using a 'new world' with FFH will get so ridiculously full of animals and barbarians that it's almost unplayable. When no one is around to kill them they breed and breed and breed.
Stepping on MY toes? It's your map, I just beat on it with a hammer to tweak it a bit to suit my taste :)
And now I'm going to steal examine your new river code :)
cephalo Feb 19, 2009, 11:00 AM Stepping on MY toes? It's your map, I just beat on it with a hammer to tweak it a bit to suit my taste :)
And now I'm going to steal examine your new river code :)
check out the siltOverLakes function and the ones that it calls. It's pretty simple really. It should just go right into your map.
Edit: Actually there is one tweak in the other river code also that prevents rivers from going straight if possible.
Seven05 Feb 19, 2009, 02:04 PM ...so I made it such that peaks and hills are determined by altitude *differences* rather than by absolute altitude. This approach looks much better and more natural.
Didn't the original perfect world work by differences? Or am I imagining things? I know I saw numerous references to the 'lowest neighbor' in FaireWeather too, guess I should dig deeper next time.
2.0 - Rebuilt the landmass and climate model using the FaireWeather.py for Colonization map script engine. Improved the river system. Fixed some old bugs.
Any hints on what the 'old bugs' were? I know there was one in FaireWeather.py with wrapping enabled that I had to fix but everything else i encounted was introduced by me.
check out the siltOverLakes function and the ones that it calls. It's pretty simple really. It should just go right into your map.
Edit: Actually there is one tweak in the other river code also that prevents rivers from going straight if possible.
I'm probably going to end up picking apart quite a bit from PW2 in addition to the rivers. Thanks for the hint though, I think everybody that uses my version for FfH will appreciate longer rivers although honestly the rivers you had with FaireWeather were pretty good to start with. Question though, I couldn't really tell from the screenshots (and I'm at work so I can't test it) do you still get some lakes created by the river system or will I need to adjust the function that fills in lakes prior to river creation to make sure I still get a couple. And then, I suppose, if I do that will they get removed by the siltOverLakes function?
cephalo Feb 19, 2009, 05:00 PM Didn't the original perfect world work by differences? Or am I imagining things? I know I saw numerous references to the 'lowest neighbor' in FaireWeather too, guess I should dig deeper next time.
Yeah, it's the same. The comment is for first time users.
Any hints on what the 'old bugs' were? I know there was one in FaireWeather.py with wrapping enabled that I had to fix but everything else i encounted was introduced by me.
There was an incompatability with vanilla that caused my bonus placer to crash. Also, I made it so that when you change the tuning vars regarding new world and pangaeas it's reflected in the in-game map options, and... I can't remember what else. See the last few complaints on the original thread for PW1.
I'm probably going to end up picking apart quite a bit from PW2 in addition to the rivers. Thanks for the hint though, I think everybody that uses my version for FfH will appreciate longer rivers although honestly the rivers you had with FaireWeather were pretty good to start with. Question though, I couldn't really tell from the screenshots (and I'm at work so I can't test it) do you still get some lakes created by the river system or will I need to adjust the function that fills in lakes prior to river creation to make sure I still get a couple. And then, I suppose, if I do that will they get removed by the siltOverLakes function?
Lakes are actually added later. You just choose how many and it puts them in random spots above a certain altitude. I think it's minLakeAltitude and lakesPerPlot or something like that. There will still be lakes.
Blondel58 Feb 21, 2009, 11:49 AM Sounds really interesting! Could I use that on a Mac too?
RulerOfDaPeople Feb 21, 2009, 05:38 PM No adjustments of the kind you mentioned. Does that mean the map is too big for a normal game? Nobody should be starting on tiny islands, I'd like a screenshot if that's the case because that's a bug.
No actually I mean it's a great map that is finally big enough for me. :goodjob: It generates much better than the other huge maps. (The others seem to not give enough space for 20+ civilizations in a game.)
And I seem to have lost the save files, so I have not way of going back to get you a screen shot. Sorry. However there were 2 or 3 civs that were siting on little tiney islands in the north when I went into world builder. One was the Japanese and I forget the others. I'll let you know if I see something like that again though. :)
cephalo Feb 22, 2009, 09:27 PM Sounds really interesting! Could I use that on a Mac too?
This should work on mac. Let me know if you have any trouble.
[to_xp]Gekko Feb 23, 2009, 03:27 AM wow, awesome job cephalo. version 1.13 didn't work well with duel sized maps, but this one definitely does. thanx :goodjob:
Caldazar Feb 23, 2009, 07:33 AM I absolutely love what you've done with perfectworld, but sometimes especially when I start in the northern or southern regions I feel tempted to add a few luxuries. There are seldom anything to speak of in these places. Is there something I can do to tune this? I've tried python both on and off.
Cheers!
cephalo Feb 23, 2009, 08:18 AM I absolutely love what you've done with perfectworld, but sometimes especially when I start in the northern or southern regions I feel tempted to add a few luxuries. There are seldom anything to speak of in these places. Is there something I can do to tune this? I've tried python both on and off.
Cheers!
Resources are placed according to the rules in the XML, with a few minor exceptions. I pretty much copied the methods used in the SDK except I allow bonuses to overwrite forest and resources to be placed on small islands. Most luxuries are designed to appear on one continent only, and in clusters. The stock maps that use the 'Fractal' terrain tend to break these clusters up alot more, which spreads them out somewhat, but in PW there is alot of clustering since there is alot of contiguous terrain. I kindof like this because it encourages trade rather than self-sufficiency.
Caldazar Feb 23, 2009, 10:48 AM That's a concept I like too... enhanced trade. However, not getting any luxuries is a bit extreme. Land closer to the equator holds much more resources on average per tile. Food a get enough, it's just luxuries that are a bit scarce.
I'll continue to use your beautiful map script, but I just wanted to offer my two :commerce:
ColdFever Feb 23, 2009, 12:29 PM I did not play Civ4 for a while (played too much of it), but since I installed PW2 I am tempted to play again and again, as the game for me is breathing with new life on a new level of realism, surprise and strategy. This map generator is wonderful stuff and we feature it big on civilized.de. Thanks a lot for your this exceptional module!
LDiCesare Feb 23, 2009, 04:20 PM I think the ice is sometimes a bit overdone around the equator.
Here's a screenshot:
http://img100.imageshack.us/img100/1317/screenshotg.jpg
I don't know how there can be ice there between deserts. I think there shouldn't be any water/precipitation up there, so no ice. Maybe tundra if it's very cold?
I also saw occurences of rivers going from plains to hills to plains (corssing hills), which seems a bit unrealistic to me.
River basins are still very nice (compared with v1) but too many rivers start in deserts.
Overall, I think the result is very neat, but generation time is awful.
TheLastOne36 Feb 23, 2009, 04:36 PM I was playing a game with 2 contenents with new world on, and everyone started in one contenent except for me, i started in an isolated island next to the new world. There was ocean between my island and the new world, but i just put a city on the corner of my island, and it's culture reached the other continents waters which let me explore the continent 1000 years before anyone else. I think that in such conditions, even giving a civ a spot in the old world is better then letting a civ take all the goody huts, early exploration and settlement etc. (although you might be technologically backwards, but that wasn't the case for me as i had tons of fish and got Great Lighthouse.)
cephalo Feb 23, 2009, 06:07 PM I think the ice is sometimes a bit overdone around the equator.
I don't know how there can be ice there between deserts. I think there shouldn't be any water/precipitation up there, so no ice. Maybe tundra if it's very cold?
I also saw occurences of rivers going from plains to hills to plains (corssing hills), which seems a bit unrealistic to me.
River basins are still very nice (compared with v1) but too many rivers start in deserts.
Overall, I think the result is very neat, but generation time is awful.
Yeah, right now ice goes purely by temperature. I have a rainfall map which I could use for that I suppose but I haven't. Another thing that makes this screenshot look a little weird is that I made a 'clean up' routine that prevents desert from appearing next to tundra and ice, since it really doesn't look good to put them together. So what happened in this case is that we have what is supposed to be a very high altitude ridge, but the tundra surrounding the ice has been turned to plains to avoid desert+tundra. I may have to revisit the rules regarding this. Maybe turn the desert into plains rather than the tundra.
The generation time is much improved over v1. That's all I have to say about that. :lol: Hey, you only have to generate once per game. :)
cephalo Feb 23, 2009, 06:11 PM I was playing a game with 2 contenents with new world on, and everyone started in one contenent except for me, i started in an isolated island next to the new world. There was ocean between my island and the new world, but i just put a city on the corner of my island, and it's culture reached the other continents waters which let me explore the continent 1000 years before anyone else. I think that in such conditions, even giving a civ a spot in the old world is better then letting a civ take all the goody huts, early exploration and settlement etc. (although you might be technologically backwards, but that wasn't the case for me as i had tons of fish and got Great Lighthouse.)
The starting plot code is definately the most difficult part of a map like this. I think I did about the best I could do on that. You had a good start! Next time you'll have a hopeless one probably. :D
cephalo Feb 23, 2009, 06:12 PM I did not play Civ4 for a while (played too much of it), but since I installed PW2 I am tempted to play again and again, as the game for me is breathing with new life on a new level of realism, surprise and strategy. This map generator is wonderful stuff and we feature it big on civilized.de. Thanks a lot for your this exceptional module!
Thanks CF! Of course it looks much better with blue marble too!
OnmyojiOmn Feb 23, 2009, 08:20 PM I tried the new version in vanilla and it worked fine, but when I tried it with the latest FfH I got, well... see for yourself. This is a custom game, large map, low sea level. The options for new world and pangeas didn't show up at all.
Edit: I move the script from My Games\Beyond the Sword\Fall from Heaven 2\PublicMaps (I use an alternate root folder for FfH) to the maps folder under the main mod folder, and I didn't have that problem. Probably something to do with root folders. However, I did notice that I started with no river and zero visible resources in my BFC. Also, I popped five goody huts in the first 25 turns and every one of them gave me a technology. @_@
RulerOfDaPeople Feb 24, 2009, 01:10 AM I think the ice is sometimes a bit overdone around the equator.
Here's a screenshot:
http://img100.imageshack.us/img100/1317/screenshotg.jpg
I don't know how there can be ice there between deserts. I think there shouldn't be any water/precipitation up there, so no ice. Maybe tundra if it's very cold?
I also saw occurences of rivers going from plains to hills to plains (corssing hills), which seems a bit unrealistic to me.
River basins are still very nice (compared with v1) but too many rivers start in deserts.
Overall, I think the result is very neat, but generation time is awful.
Yeah this is my only issue with the map. Everything else is great but I find ice by the equator and such to be unrealistic... and kind of annoying when discovering it in my terrain during the ancient exploration phase when I'm playing the game. ;)
ColdFever Feb 24, 2009, 05:31 AM I find ice by the equator and such to be unrealistic...
On this BlueMarble satellite image you can see ice by the equator:
http://earthobservatory.nasa.gov/Features/BlueMarble/Images/BlueMarble_2005_SAm_09_4096.jpg
But it is limited to Peaks, so perhaps in PM a high and cold terrain also should be just Desert. Speaking of Deserts: I sometimes seem to have a bit too much of them while Tundra seems to be a bit too little. Perhaps Cephalo could adjust this a bit. In reality there is more Tundra, only the usual map projection (round globe to square map) shows less Tundra because the pole regions appear smaller:
http://en.wikipedia.org/wiki/Map_projection#Choosing_a_projection_surface
Zorzak Feb 24, 2009, 07:02 AM Hello, first i want to say sorry for my english, i am still learning. :) And if my 2 problems was already mentioned in this thread, please tell me where it is becouse i do not understend 100% words in english language. Anyway....
I have 2 problems: First, i made few games with PerfectWorld2 and saw a starting location WITHOUT any food resource or food like banana (requires Calendar technology). I think this is not good thing in this map creator (but i like it :) ). I know that in default creator in game it is imposible that starting map position has NOT a food resource or have food like banana. Can you edit this map creator that every regenerate map every civilization will have minimum 1 food resource on starting position (of course i mean food like rice, cow, pig, NOT like banana (becouse as we know to have bananas we need Calendar technology :) ) I had one game with banana on starting position but i do not have screen. Those are examples about no food resource on starting positions on PerfectWorld2 map creator:
http://img6.imageshack.us/img6/5769/start1.jpg
http://img4.imageshack.us/img4/3571/start2.jpg
And my second problem, this is more like request to you. It is posible that you edit this map creator by ADD one option ?
Option like: World Wrap: Toroidal
cephalo Feb 24, 2009, 09:59 AM Speaking of Deserts: I sometimes seem to have a bit too much of them while Tundra seems to be a bit too little. Perhaps Cephalo could adjust this a bit. In reality there is more Tundra, only the usual map projection (round globe to square map) shows less Tundra because the pole regions appear smaller:
Keep in mind that for matters of taste, I do have a whole bunch of tunable options in the map script. These variables are at the beginning of the script and are well commented, so you don't have to be a programmer to get what you want. You just have to change a number to make less Desert or more Tundra.
dr_s Feb 24, 2009, 09:59 AM Yes, with this script you sometimes get food-poor starts, especially compared to the factory maps. I would like to see this adjusted a bit. Especially the first screenshot above; a lot of tech is required before you'd even have one 3 :food: tile.
About the ice/tundra near the equator; I like it. It makes it a little harder to figure out where you are on the map in the early game. One thing I don't like about the factory maps is that as soon as you see some tundra/ice, you know exactly where you are.
cephalo Feb 24, 2009, 10:08 AM I have 2 problems: First, i made few games with PerfectWorld2 and saw a starting location WITHOUT any food resource or food like banana (requires Calendar technology). I think this is not good thing in this map creator (but i like it :) ). I know that in default creator in game it is imposible that starting map position has NOT a food resource or have food like banana. Can you edit this map creator that every regenerate map every civilization will have minimum 1 food resource on starting position (of course i mean food like rice, cow, pig, NOT like banana (becouse as we know to have bananas we need Calendar technology :) ) I had one game with banana on starting position but i do not have screen. Those are examples about no food resource on starting positions on PerfectWorld2 map creator:
Food bonuses are fun, and that is a very important consideration, but these starts in the screenshots are very food abundant. My starting spot 'sweetener' routine currently saves the food bonuses for those who are forced to start in food poor areas like plains. If I give food bonuses to people who start in grassland, then it's more difficult to help those who start in worse.
And my second problem, this is more like request to you. It is posible that you edit this map creator by ADD one option ?
Option like: World Wrap: Toroidal
I may do that in the future, but it's not as easy as it sounds. I was originally going to impliment that in this version, but I ran into some structural difficulties that I will need to solve.
cephalo Feb 24, 2009, 10:26 AM Yes, with this script you sometimes get food-poor starts, especially compared to the factory maps. I would like to see this adjusted a bit. Especially the first screenshot above; a lot of tech is required before you'd even have one 3 :food: tile.
I thought about this issue a long time since the first version, and let me tell you why I like that there's less food bonuses on the grassland heavy starts. Grassland in Civ4 is overwhelmingly powerful and versatile. On the stock maps, terrain types are sort of evenly scattered around, so your starting plot is never very far from something you need. On a map like this however, where grassland is kindof rare and there's a chance you won't start with grassland near your first city, something needs to be done to counteract the initial power of grassland. As luck would have it, heavy rainfall areas that cause grassland also bring alot of forestation. So, when you are lucky enough to start in the grassy areas, you are likely to have to chop down those trees before you can really take off. Heavy forestation combined with food bonuses on food poor areas help make things more fair for the various possible starting locations.
Zorzak Feb 24, 2009, 11:03 AM If I give food bonuses to people who start in grassland, then it's more difficult to help those who start in worse.
I know that create a map is a difficult thing and i know that you making a great job, we all thank you very much :) Believe me i do not wanna angry you, i just want to help you by my propositions :) On my opinion minimum one food resource is the most important thing to make a good balance in game. I know that one player starts in grassland and second starts near tundra, another near desert, but like you know we do not have only one kind of food resources. What about deer or sheep ? I know that deer/sheep on tundra gives us 3 or maximum 4 food, but everythink is to make it to be a good ballance. Someone who is on grasslands and has a pigs (6 food) is ok becouse another player who start in tundra can have 2xsheep on hills (2x3 food) On my opinion this is something like ballance :) Another example. What about water ? Fish and crabs can appears next to desert and next to icy/tundra too.
From the other side to better understand me:
1). one player has 6 food (pig) = another player has 2x3 food (sheep on hills) = ballance (no need river to farm, or lake to farm or Calendar to plantation)
2). one player has 4 food (wheat) and another for example has no food, no river and no lake. This is no balance :) I know that this is rare situation but it can appears.
About this two options on my opinion option number 1 is more ballanced/better like option number 2.
[to_xp]Gekko Feb 24, 2009, 04:25 PM I may do that in the future, but it's not as easy as it sounds. I was originally going to impliment that in this version, but I ran into some structural difficulties that I will need to solve.
Seven05 had done a wonderful job with toroidal maps in ErebusContinent... maybe you will be able to borrow some of his code since he borrowed a lot of yours :D
TheLastOne36 Feb 24, 2009, 04:26 PM It seems like this map needs some work on starting spots,
http://i39.tinypic.com/2uhplcm.png
Two civs should never start so close, that they have overlapping tiles in their caps. Also note the lack of production near the starting spots. It is almost as if the map just randomly placed the starting positions anywhere without regard to it's surroundings.
cephalo Feb 24, 2009, 05:01 PM It seems like this map needs some work on starting spots,
Two civs should never start so close, that they have overlapping tiles in their caps. Also note the lack of production near the starting spots. It is almost as if the map just randomly placed the starting positions anywhere without regard to it's surroundings.
Haha, that's funny. Well, the reason this happened is because my starting plot finder works hard at arranging players on their respective continents, but doesn't take into account plots that are in use from cities on other continents. This won't be an easy fix. Fortunately, this scenario shouldn't come up too often. At least there's some water separation there. :)
As for the production, the amount of hills on this map usually prevent's problems in this area, but that guy on the right is really going to have a tough time with zero production. I'll have to change the way I evaluate plots to totally prevent this sort of thing. I'll definately work on that for a future version.
TheLastOne36 Feb 24, 2009, 05:12 PM Ahh i get it, it's two islands and two civs are placed on each. The map is designed to do so, however it doesn't place it on an ideal location, just anywhere on the island, thus scenerio's such as this is possible.
One thing i don't get though, is the one on the left is the one on an island, the one on the right is on a continent. Ideally the civ on the continent should have a better starting position, as do some of the other civs on that continent, but on the pic, the one on the right seems to be just randomly placed there as if due to the lack of space.
Also on the production thing, most civs i've encountered so far have had poor production capitals, as well as the lack of food resources. I myself had a Floodplain start with only 2 desert hills to gain production from.
BobTheTerrible Feb 24, 2009, 07:51 PM That's also weird because production has the highest startplot value in the python script, you'd expect starting cities to lack food rather than production.
phungus420 Feb 24, 2009, 09:12 PM Yeah, right now ice goes purely by temperature. I have a rainfall map which I could use for that I suppose but I haven't. Another thing that makes this screenshot look a little weird is that I made a 'clean up' routine that prevents desert from appearing next to tundra and ice, since it really doesn't look good to put them together. So what happened in this case is that we have what is supposed to be a very high altitude ridge, but the tundra surrounding the ice has been turned to plains to avoid desert+tundra. I may have to revisit the rules regarding this. Maybe turn the desert into plains rather than the tundra.
It would make the most sense to leave in the buffer code, but change it's effect. Have it do three things (in this order):
1st) Ice bordering Dessert -> Plains
2nd) Ice Bordering Plains/Grassland -> Tundra
3nd) Dessert bordering Tundra/Grassland -> Plains
Burned Feb 24, 2009, 10:13 PM That's also weird because production has the highest startplot value in the python script, you'd expect starting cities to lack food rather than production.Maybe the normalization counts all values together. That would be explaining that the german starting location in the last screen is so full with food bonuses and irrigated grasslands while the screens of zorzak with hills and/or productive bonuses lack food bonuses and have less irrigated areas.
edit : to increase the global bonus number, not only on starting locations, i tried to change some calculs and limits in the bonus placer, in different functions (addemergencybonus, addbonustype, CalculateNumBonusesToAdd...). It works with sea food and luxury bonuses, but not with land food. I don't really understand how the script works, but i find this strange enough to report.
Kornaki Feb 25, 2009, 02:42 PM Lol... early culture war for the win TheLastOne?
I'm in the wrapping up mode of my first game using this map script, and it's been a total blast... seeing AI civs string their cities along the flood plains of a continent spanning river cutting through a massive desert isn't something you usually get in the factory maps. Thanks for the work you put into this! :)
[to_xp]Gekko Feb 25, 2009, 04:17 PM It would make the most sense to leave in the buffer code, but change it's effect. Have it do three things (in this order):
1st) Ice bordering Dessert -> Plains
2nd) Ice Bordering Plains/Grassland -> Tundra
3nd) Dessert bordering Tundra/Grassland -> Plains
something like this should work nicely. having altitude affect temperature is awesome, but having desert next tundra/ice looks weird.
ColdFever Feb 26, 2009, 12:55 AM I'm in the wrapping up mode of my first game using this map script, and it's been a total blast...
Same here - for me now the 5th game in a row. It is amazing to see how different games behave with these maps. To me the gameplay feels more realistic, more strategic and more entertaining. Even though the lacking food in the beginning delays the game somehow, overall the Civs develop very balanced, it feels more like you are watching real history, and the maps look more natural and are way more thrilling. Currently I cannot image going back to the classic map scripts again, for me Cephalos script really breathes new life into a classic.
Kornaki Feb 26, 2009, 07:19 AM I think the resource spread is a lot better... in most games, once you get past the midway point (especially maps with a new world, which I prefer) everyone seems to have gotten all the resources, except for things like silver (which nobody has) or maybe furs. This is the first time I've ever gone to war... for sugar. And now I have enough to sell to everybody, so it was definitely worth it :)
cephalo Feb 26, 2009, 09:19 AM I think the resource spread is a lot better... in most games, once you get past the midway point (especially maps with a new world, which I prefer) everyone seems to have gotten all the resources, except for things like silver (which nobody has) or maybe furs. This is the first time I've ever gone to war... for sugar. And now I have enough to sell to everybody, so it was definitely worth it :)
I'm very glad you noticed this. A lot of people are shocked when they see large clumps of luxury resources, and suggest that the map is broken. The thing is, those resources are actually designed to do this in the XML. People aren't used to it because the Fractal terrain generators that many of the stock maps are based on break up the terrain cohesion so much that it prevents this clumping functionality from showing itself.
I quite like it. You have to trade, or conquer to get all the resources.
Burned Feb 26, 2009, 10:05 AM Still in view of adapting the script to my personnal preferences, i ended up with something that suits me more or less. Far from perfect, but perfect is not as simple.
I commented out the parts of "def CanPlaceBonusAt" that prevent similar bonuses to be close from one another, and to avoid too large clusters of bonuses (jungles of bananas or mountains of coal don't seem so fun to play with), i rewrited the calcul of "def CalculateNumBonusesToAdd" like that :
players = game.countCivPlayersAlive() * bonusInfo.getPercentPerPlayer()/150
bonusCount = baseCount * (landTiles + players)/150
bonusCount = max(1,bonusCount)
The only problem is that on small maps (and maybe on large ones too, but i didn't generate enough of these to verify that), sometimes a small island gets all of a food bonus, without any on the continents. It's more visible because the modifications allows then the bonus to fill almost completely the island, but i don't know if it is directly caused by these modifications.
cephalo Feb 26, 2009, 10:22 AM Still in view of adapting the script to my personnal preferences, i ended up with something that suits me.
I commented out the parts of "def CanPlaceBonusAt" that prevent similar bonuses to be close from one another, and to avoid too large clusters of bonuses (jungles of bananas or mountains of coal don't seem so fun to play with), i rewrited the calcul of "def CalculateNumBonusesToAdd" like that :
players = game.countCivPlayersAlive() * bonusInfo.getPercentPerPlayer()/150
bonusCount = baseCount * (landTiles + players)/150
bonusCount = max(1,bonusCount)
The only problem is that on small maps (and maybe on large ones too, but i didn't generate enough of these to verify that), sometimes a small island gets all of a food bonus, without any on the continents. It's more visible because the modifications allows then the bonus to fill almost completely the island, but i don't know if it is directly caused by these modifications.
Hmm, this should give you 33% less bonuses overall.
The spacing rules for strategic resources and food help to insure that they are scattered over a wide area. By removing that and decreasing the number of bonuses, you might be making it more, rather than less, likely that a few civs will have monopolies of things like iron and coal.
Burned Feb 26, 2009, 10:31 AM I'm not sure for strategic ressources [edit : no, it seems to scatter them around the map normally]. But removing the food spacing rules did not reduce the area of the continent where they can be found, it just made them to appear in small and relatively realistic clusters (with some exceptions). And the overall number of ressources did not decrease. On the contrary, it seemed to increase. Except for sea food, which now appear almost only on starting locations. Strange.
[second edit]Ho. I understand. I used an old file where i duplicated the addbonuses loop.
Burned Feb 26, 2009, 12:11 PM Oh, and I just noticed that wheat and cows can be absent of one continent, preventing the script from adding food bonuses to starting locations in large area of plains.
cephalo Feb 26, 2009, 12:21 PM Oh, and I just noticed that wheat and cows can be absent of one continent, preventing the script from adding food bonuses to starting locations in large area of plains.
Yes those resources are designed to actually be on one continent only. Ideally, you would have cows on one continent, pigs on another, and then sheep on yet another. Same for wheat, corn, and rice. It can become a slight problem if there are more than 3 major continents, but I try to alleviate that somewhat by finding islands to place them on, but this is by design to promote trade.
EDIT: also, this rule is broken by the default starting plot normalization, so that's why you will sometimes see cows and pigs together on one continent on the stock maps. My normalizer respects this rule.
dr_s Feb 26, 2009, 12:49 PM What happens if you end up with a pangea map, or near-pangea? Will the main landmass have only one of wheat/corn/rice or pigs/cows/sheep, with the rest banished to islands?
cephalo Feb 26, 2009, 01:12 PM What happens if you end up with a pangea map, or near-pangea? Will the main landmass have only one of wheat/corn/rice or pigs/cows/sheep, with the rest banished to islands?
When there's only one or two continents, multiple ones can exist together but what happens is that the one that is placed first will tend to dominate the others by taking up most of the real estate. You'll have like ten cows, 2 sheep, and maybe one pig. In my bonus placement I always have at least one of everything. There's a routine at the end that disregards the rules and places it somewhere.
Ramesses Feb 27, 2009, 04:19 PM Can you add an option to allow elimination of land tiles at the poles? I don't like how you can reach the poles but can't travel through them.
Also, can you let players choose the land, peak, hill, plain, etc. percentages?
cephalo Feb 27, 2009, 09:50 PM Can you add an option to allow elimination of land tiles at the poles? I don't like how you can reach the poles but can't travel through them.
Also, can you let players choose the land, peak, hill, plain, etc. percentages?
There are many adjustable variables at the beginning of the script. Most of them are fairly self explanatory, but the one you might be interested in is mc.northMargin or (self.northMargin as it is written). Set northMargin to 'True' and this will prevent land at the north pole. This will greatly limit the amount of tundra however, and if you increase the tundra by raising the tundra temperature, you might end up with an unacceptable amount of tundra on altitude peaks in the warmer climates.
I like that the land touches the north pole because it mimicks the real world in a way. No northwest or northeast passage.
TheLastOne36 Feb 28, 2009, 10:26 AM well atleast make the option of Toroidal then. It bother's me as well how i can't go past the north poll.
Ramesses Feb 28, 2009, 01:17 PM So I tried to modify your script by adding a third option, to allow the player to choose the land percentage. Now, while I have some programming experience, I have absolutely no knowledge of Python whatsoever. That said, I simply looked at your code and attempted to mimic your syntax.
As far as I know, there are 5 places which need to be altered to add one option. I added code just a little bit below where the static defines were, and in 4 of the blocks beginning with something like "def getCustomMap..." near the bottom of the script.
def getNumCustomMapOptions(): Had it return 3, since I added one more option.
def getCustomMapOptionName(argsList): Named my new option Land Percentage.
def getNumCustomMapOptionValues(argsList): Added the number of choices for Land Percentage.
def getCustomMapOptionDescAt(argsList): Listed all choices for Land Percentage.
Now, when I try to run this script, I get no special choices, and it seems that attempting to build a map by this script freezes the game. So obviously my alterations don't work. Do you think you can take a look at my changes and see if you can get this option working?
http://www.fileden.com/files/2008/6/8/1950977/PerfectWorld3.zip
Burned Feb 28, 2009, 02:02 PM Why don't you use that ?
################################################## ############################
## GLOBAL TUNING VARIABLES: Change these to customize the map results
#Percent of land vs. water
self.landPercent = 0.30
Cephalo, concerning the repartition of ressources on different continents, could you supress some terrain requirements that prevent pigs from appearing on plains and wheat from appearing on grassplains ?
On factory maps these limits only add some difference between areas, but on your maps, since the separation between continents works, it is not necessary, and it can create particularily poor climate zones in certain continents. If one continent has pigs, rice and bananas, while the other one has sheep, cows and wheat, the first one's plains will be advantaged against other areas of the continent, and the second one's jungles will have the same kind of advantage against the rest of the continent.
And maybe, as deer is the only food ressource for toundra areas, and can be found worldwide irl, it would be good also to create an exception for it.
cephalo Feb 28, 2009, 02:13 PM So I tried to modify your script by adding a third option, to allow the player to choose the land percentage. Now, while I have some programming experience, I have absolutely no knowledge of Python whatsoever. That said, I simply looked at your code and attempted to mimic your syntax.
As far as I know, there are 5 places which need to be altered to add one option. I added code just a little bit below where the static defines were, and in 4 of the blocks beginning with something like "def getCustomMap..." near the bottom of the script.
def getNumCustomMapOptions(): Had it return 3, since I added one more option.
def getCustomMapOptionName(argsList): Named my new option Land Percentage.
def getNumCustomMapOptionValues(argsList): Added the number of choices for Land Percentage.
def getCustomMapOptionDescAt(argsList): Listed all choices for Land Percentage.
Now, when I try to run this script, I get no special choices, and it seems that attempting to build a map by this script freezes the game. So obviously my alterations don't work. Do you think you can take a look at my changes and see if you can get this option working?
http://www.fileden.com/files/2008/6/8/1950977/PerfectWorld3.zip
If I were you, I wouldn't worry about making it an option. Just tune the settings to your taste and use it that way. I really don't like putting alot of in-game options cluttering up the interface. There really is no limit to the various options people want in their maps. I could put 3, or 5, or 50, or 200 and people will still ask for more. It's much more efficient to just teach people to tune the map.
I may add some more options, but they can't be matters of taste, it has to be something that people would want to change from game to game.
cephalo Feb 28, 2009, 02:28 PM On factory maps these limits only add some difference between areas, but on your maps, since the separation between continents works, it is not necessary, and it can create particularily poor climate zones in certain continents. If one continent has pigs, rice and bananas, while the other one has sheep, cows and wheat, the first one's plains will be advantaged against other areas of the continent, and the second one's jungles will have the same kind of advantage against the rest of the continent.
And maybe, as deer is the only food ressource for toundra areas, and can be found worldwide irl, it would be good also to create an exception for it.
Sounds to me like rather interesting differences between continents. :)
These kinds of rules are supposed to be set in the XML. Different mods have differing resources and requirements and it's best if the map script doesn't make assumptions about specific resources. If you want to use tundra, it is very nice to have some deer there, but the XML rules say that it should be only on one continent. I would have set that differently myself. But that's the rules and in most cases it does add interest to the game. The flag in question is the bArea flag in the XML.
EDIT: also, the code is supposed to pick the best continent for a resource, so deer should be on the continent with the most tundra for example.
Ramesses Feb 28, 2009, 05:27 PM Why don't you use that ?
################################################## ############################
## GLOBAL TUNING VARIABLES: Change these to customize the map results
#Percent of land vs. water
self.landPercent = 0.30
The problem I have with changing the values from the code directly is that it requires me to restart Civ IV every time to see the results. If there were some way, any way at all, to make the options available for change in-game, it would be a lot faster for me to do what I want to do.
cephalo Feb 28, 2009, 07:48 PM The problem I have with changing the values from the code directly is that it requires me to restart Civ IV every time to see the results. If there were some way, any way at all, to make the options available for change in-game, it would be a lot faster for me to do what I want to do.
I think that you need, in addition to the functions you mentioned, something for getCustomMapOptionDefault and also isRandomCustomMapOption.
GoodGame Mar 02, 2009, 01:21 PM Yeah, right now ice goes purely by temperature. I have a rainfall map which I could use for that I suppose but I haven't. Another thing that makes this screenshot look a little weird is that I made a 'clean up' routine that prevents desert from appearing next to tundra and ice, since it really doesn't look good to put them together. So what happened in this case is that we have what is supposed to be a very high altitude ridge, but the tundra surrounding the ice has been turned to plains to avoid desert+tundra. I may have to revisit the rules regarding this. Maybe turn the desert into plains rather than the tundra.
The generation time is much improved over v1. That's all I have to say about that. :lol: Hey, you only have to generate once per game. :)
But even central Africa has/had/melting glaciers until this century. :)
http://en.wikipedia.org/wiki/Mount_Kilimanjaro
http://news.mongabay.com/2006/0515-agu.html
It actually validates your code, Cephalo. :)
EDIT: Maybe the ice hills could be explained as high plateus?
phungus420 Mar 02, 2009, 02:55 PM Having tried 2 games with this script, I must say, it is very good :goodjob:
Also the build times are greatly exagerated. My old clunker machine builds the map in a couple of minutes, it's a while, but nothing extreme.
glider1 Mar 04, 2009, 02:03 PM Thanks Cephalo for the hard work you have put into this :great job: The maps are really detailed and subtle. Brilliant. I've included it into RevolutionDCM below if that's ok.
Cheers.
cephalo Mar 04, 2009, 05:16 PM Thanks Cephalo for the hard work you have put into this :great job: The maps are really detailed and subtle. Brilliant. I've included it into RevolutionDCM below if that's ok.
Cheers.
no problem.
CyberChrist Mar 05, 2009, 04:25 PM Why doesn't this mapscript create any Snow/Ice land areas near the artic circles at all (not even with land touching the edge of map)?
cephalo Mar 05, 2009, 06:58 PM Why doesn't this mapscript create any Snow/Ice land areas near the artic circles at all (not even with land touching the edge of map)?
That doesn't sound right. Do you have a screenshot?
[to_xp]Gekko Mar 06, 2009, 03:12 AM 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
CyberChrist Mar 06, 2009, 04:05 AM 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)?
cephalo Mar 06, 2009, 08:18 AM Gekko;7840902']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!
cephalo Mar 06, 2009, 08:21 AM 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.
Ramesses Mar 06, 2009, 08:22 AM 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.
self.northWaterBand = 0
self.southWaterBand = x
self.eastWaterBand = 0
self.westWaterBand = 0
self.northCrop = 0
self.southCrop = x
self.eastCrop = 0
self.westCrop = 0
Valynor Mar 06, 2009, 11:12 AM 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?
cephalo Mar 06, 2009, 01:02 PM 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.
Valynor Mar 06, 2009, 01:40 PM Thank you, I enabled python popups and logging.
Now I wait for another map crush :)
TheLastOne36 Mar 06, 2009, 02:31 PM Gekko;7840902']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. :)
[to_xp]Gekko Mar 06, 2009, 02:44 PM 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
cephalo Mar 06, 2009, 04:31 PM 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.
rspeer Mar 06, 2009, 07:00 PM 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?
Mknn Mar 06, 2009, 11:33 PM 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.
Woody1 Mar 07, 2009, 05:53 AM 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.
cephalo Mar 07, 2009, 11:41 AM 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.
cephalo Mar 07, 2009, 11:44 AM 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.
Mknn Mar 07, 2009, 11:50 AM Nope, BTS, latest patch, and version Y of FFH.
cephalo Mar 07, 2009, 03:05 PM 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.
glider1 Mar 07, 2009, 06:17 PM Gekko;7842526']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.
Quklis Mar 07, 2009, 06:51 PM Thanks for this great map script, best I've ever seen. Even Duel sized maps are good, original scripts seem to mess them up too much :mischief:.
:goodjob:
BobTheTerrible Mar 07, 2009, 08:41 PM Wow glider, I generated 1 map so far and I'm already impressed (but perhaps I just got really lucky). What exactly did you add? It looks like you gave it a half and half chance to get either 28% or 38% land, but that can't be it.
Mknn Mar 08, 2009, 01:00 AM 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.
I'll test with BTS and get back to you. The dir is normal, but it is Steam normal, not normal normal. :) The cIV files are buried in Program Files (x86)/Steam/Steamapps/Common/Sid Meir's ...
GoodGame Mar 08, 2009, 12:40 PM Just a thought, if there are massive flood plains, shouldn't they have a risk of turning into a swamp/marsh? I realize that'd be a mod, just a realism thought. Seems like I get Northern Africa-like deserts with heavy riverification and very large flood plains betwen the rivers, and if not a lake/oasis, I'd think they'd be at risk for become a marsh, like the Nile Delta region.
Is there any code in the script for large groupings of floodplains causing underwater reservoirs (forming an oasis, I suspect)?
glider1 Mar 08, 2009, 06:54 PM What exactly did you add? It looks like you gave it a half and half chance to get either 28% or 38% land, but that can't be it.
Cephalo has done the best job. Love the feel of entering and exiting different "climatic regions". Just needs a little bit of "tweaking" for personal player preferences. If you allow pangaea you have to cut it down the middle for two distinct continents so that "start in the old world" works properly. Since then did a little bit more tweaking for the "allow pangaea" option to get the different regions more to liking (see attached):
lesson forests creeping all the way to the polar cap for genuine pole,
decrease a little, the desert in the continent interiors,
increase a little, the size of the world's big rainforest areas.
Allow a little bit more for high snowed "mountain" regions to form.
It's now producing a really nice map virtually every time I think. The one thing I could not do yet is to successfully manipulate the tree factor. It's defaulted at 1.5 but taking it right down doesn't lesson the amount of trees in the globe by anything that I can notice. It's not an issue, because personally I don't mind the heavy tree factor with the maps, but it might not be best for game balance just not sure on that.
Thanks again Cephalo, what a map script it is.
Cheers. :goodjob:
Ramesses Mar 08, 2009, 07:26 PM It's now producing a really nice map virtually every time I think. The one thing I could not do yet is to successfully manipulate the tree factor. It's defaulted at 1.5 but taking it right down doesn't lesson the amount of trees in the globe by anything that I can notice. It's not an issue, because personally I don't mind the heavy tree factor with the maps, but it might not be best for game balance just not sure on that.
You have to increase the number to lower the amount of trees on the map.
glider1 Mar 08, 2009, 07:39 PM @Ramesses
Thanks! What tree factor is good in your humble opinion?
Cheers.
Ramesses Mar 08, 2009, 08:08 PM I haven't really played with it yet, but I would think 1.6 would be a good number.
glider1 Mar 08, 2009, 09:14 PM Thanks Ramesses will give it a go. The interesting aspect to this great map script are the trees. At a guess, the amount of trees are probably no different to any other map, it's just that they are more concentrated in the coastal regions it seems. Just got to find a tree factor that doesn't force me to have to get to bronze working tech and chopping, every game. It's early days yet for working this out and am not sure how it plays out over a number of games.
Cheers.
dr_s Mar 09, 2009, 07:52 AM I modded the script to add three forest levels to the in-game options, "Heavy" (the current amount), "Moderate" and "Light." I could post it here if you're interested. I did a little bit more that modify the tree factor (I think I used 2.0 and 2.25 for moderate and light). I also added a second factor to set a floor for rainfall below which there would never be trees. I haven't played much using the "Light" setting, but I like the "Moderate" one.
BobTheTerrible Mar 09, 2009, 10:12 AM Is there anywhere in the map script to modify the amount of resources placed on the map? I'd like to increase it.
[to_xp]Gekko Mar 09, 2009, 11:59 AM wow glider, thanx for your tweaked version. I'll definitely try it :goodjob:
I'm just not really sure what you're saying about allow pangeas and start in old world though... I always play PerfectWorld with "Break Pangeas" and "Start Anywhere" : would that cause issues with your tweaked version?
glider1 Mar 09, 2009, 04:58 PM @Dr S
Well done on doing the tree mod Dr S.
I could post it here if you're interested.
That would be great, if nothing more than the chance to experiment around with different tree amounts for the future.
@Gekko
I haven't done much at all except to split pangaea down the middle with a supplied variable from Cephalo. A bit of a tweak here and there to other variables, and perfect world makes just the best maps if you keep it on allow pangaea. Actually, Cephalo is scaring me. This type of really coherant map style is probably what will happen with future releases of civ.
@Bob
Kinda know what you mean about the apparent drop in resources. Not sure how to tweak it but not sure I want to. It'll depend what happens in the modern age and corporations. Normally maps spread sea resources so abundantly that it throws the corps out late game. However in perfect world I've noticed a more concentrated and localised distribution of resources even fish. Don't know if it's accidental or not, but clustered distribution like this makes for a fun map I think.
Cheers.
[to_xp]Gekko Mar 09, 2009, 05:16 PM ok then, I'll keep allow pangea enabled. any issue with setting starting positions to "start anywhere" ? :D
glider1 Mar 09, 2009, 05:47 PM @Gekko
No doesn't matter about that. Start anywhere is fine. That option is good too. Will be interested on any thoughts about the density of the coastal forests and any compulsion to have to get to bronze working at double haste.
Cheers.
[to_xp]Gekko Mar 09, 2009, 05:57 PM thanx for the fast reply :D I tried generating a couple maps with your version and they look awesome. I do agree that forests and jungles could use some "softening" though, since they make those lands unimprovable for a while. if manipulating the tree factor doesn't give you what you need, you might want to take a look at Seven05's code in his ErebusContinent mapscript ( based on Cephalo's FaireWeather ) , which softens forest/jungle heavy areas and should be basically what you're looking for ;) : http://forums.civfanatics.com/showthread.php?t=308590 trees will spread even in unforested tiles if given enough time though, so you might want to tweak the chance of a new forest or jungle appearing.
dr_s Mar 10, 2009, 09:24 AM I've attached my modded version. Cephalo, if you don't want this distributed, let me know and I'll take it down.
The original forest planting code works like this: the amount of rain on each tile is compared to a constant called TreeFactor (really it's compared to another constant multiplied by TreeFactor, but that doesn't matter). If the amount of rain is greater than TreeFactor, then the tile will have jungle or forest depending on the temperature. If the amount of rain is less than TreeFactor, then the tile might have forest (but not jungle), with the chance of forest being proportional to the amount of rain.
I added two additional constants, ForestModifier and ForestFloor. In my modification, the amount of rain is first compared to ForestModifier * TreeFactor. If the amount of rain is greater than this, then you get jungle or forest just like before. If the amount of rain is less than ForestFloor * ForestModifier * TreeFactor, then you will not get forest or jungle. If the amount of rain is between these two values, then you have a chance of getting forest (but not jungle) just like before.
There's an in-game option with three levels of forest: Heavy, Moderate, Light. Moderate is the default. The values for these new factors are 1.0 and 0.0 for Heavy (so that Heavy is the same as the current amount of forest), 1.3 and 0.25 for Moderate, and 1.7 and 0.35 for Light.
If you want to modify things further, TreeFactor is still there; increasing it will decrease forest for all options. Or you can modify the values for ForestModifier and ForestFloor.
Ramesses Mar 10, 2009, 09:32 AM Awesome job.
sampo Mar 10, 2009, 09:46 AM Wow a great script. Congrats! But I am having troubles when I play hotseat multiplayer games with my friends. All grasslands with some rivers. Singleplayer works perfectly.
glider1 Mar 10, 2009, 08:03 PM @Dr S
Thanks Doctor S. You have commented your code to distinguish it from Cephalo's that's the most important thing. For the future, a better defacto convention is:
Dr_S start Forest Level
your code.....
Dr_S end
That way people know where the code slab has started and ended and what it does and signifies the author. Sometimes, instead of the author a mod name is used which can be refered back to the author. Good stuff.
Cheers.
[to_xp]Gekko Mar 12, 2009, 03:44 AM dr_s , does your version also include glider's tweaks? it would be great to have a file with both yours and his work in :D
glider1 Mar 13, 2009, 05:44 PM @Gekko
Will do this merge once I loose my first perfect world game to the AI which won't be long now :) This perfect world is very low on corn. This could make it difficult for corps that use corn. I'm not sure why exactly.....Could be just bad luck?
Cheers.
Ramesses Mar 13, 2009, 06:03 PM How can it be a perfect world without yellow kernels of deliciousness!? How!? HOW!?
But yeah, it does seem to be a bit low on corn.
BobTheTerrible Mar 16, 2009, 10:40 AM I've merged glider's PerfectWorldDCM and Dr. S's tree mod. I have no idea if both of these are working correctly together, but I've generated a few maps and it works (tree options show up and work on the custom game screen, and it seems to take glider1's changes into account). I've never used python before, I just opened up winmerge and tried to get everything together. No code is my own, it's all cephalo's with glider1 and Dr s's enhancements.
Burned Mar 16, 2009, 11:33 AM Is there anywhere in the map script to modify the amount of resources placed on the map? I'd like to increase it.
In the bonus placer (search the script for BonusPlacer), i've found some ways to do that. None is very satisfying, but as I don't know how to code the functions needed, i have nothing else to propose.
First, you have to remove or decrease the limits of proximity for the bonuses, in def CanPlaceBonusAt, by comenting out these lines or changing their code (here's a modified version) #Make sure there are no bonuses of the same class (but a different type) nearby:
if classInfo != None:
if mc.BtS or mc.Warlords: #Ugh, annoying version difference
iRange = classInfo.getUniqueRange()
else:
iRange = classInfo.getUniqueRange #<--attribute for vanilla
for dx in range(-iRange,iRange+1):
for dy in range(-iRange,iRange+1):
loopPlot = self.plotXY(x,y,dx,dy)
if loopPlot >= 1:
if areaID == loopPlot.getArea():
if plotDistance(x, y, loopPlot.getX(), loopPlot.getY()) <= 2:
eOtherBonus = loopPlot.getBonusType(TeamTypes.NO_TEAM)
if eOtherBonus != BonusTypes.NO_BONUS:
if gc.getBonusInfo(eOtherBonus).getBonusClassType() == bonusInfo.getBonusClassType():
return False
#Make sure there are no bonuses of the same type nearby:
iRange = bonusInfo.getUniqueRange()
for dx in range(-iRange,iRange+1):
for dy in range(-iRange,iRange+1):
loopPlot = self.plotXY(x,y,dx,dy)
if loopPlot >= 1:
if areaID == loopPlot.getArea():
if plotDistance(x, y, loopPlot.getX(), loopPlot.getY()) <= 2:
eOtherBonus = loopPlot.getBonusType(TeamTypes.NO_TEAM)
if eOtherBonus != BonusTypes.NO_BONUS:
if eOtherBonus == eBonus:
return False
If you remove them, the bonuses will be placed in clusters.
Then, you can increase the number of bonuses in the functions
- def AddBonuses, by duplicating these linesfor order in range(numBonuses):
for i in range(numBonuses):
bonusInfo = gc.getBonusInfo(self.bonusList[i].eBonus)
if bonusInfo.getPlacementOrder() == order:
self.AddBonusType(self.bonusList[i].eBonus)#Both unique and non-unique bonuses
- def CalculateNumBonusesToAdd, by changing the calcul of these lines (dividing by less than 100) players = game.countCivPlayersAlive() *bonusInfo.getPercentPerPlayer()/100
bonusCount = baseCount * (landTiles + players)/100
bonusCount = max(1,bonusCount)This method is more precise than the other, but increase first the number of strategic and sea resources. Using the first and then reducing bonusCount, on the contrary, increase land food resources more than other types; but then as only some of the food resources are available on each continent, and as they are appearing in different areas (plains for wheat and cows, grasslands for pigs, rice and corn), increasing the number of food resources can produce inequalities between the different areas of a continent if it has, for example, only the grassland ones.
[edit] oh, I just found a way to obtain a more balanced map :
http://nsa06.casimages.com/img/2009/03/16/090316115205978155.jpg (http://www.casimages.com)
Ramesses Mar 16, 2009, 11:05 PM - Double Post -
Ramesses Mar 16, 2009, 11:06 PM Yup, that looks to be pretty balanced, alright. :crazyeye:
[to_xp]Gekko Mar 17, 2009, 10:24 AM can anyone who's comfortable with python confirm that BobtheTerrible's merge works exactly as it should? I had already done that merge myself since it looked easy and it does seem to work fine, but one never knows, you know :P
glider1 Mar 17, 2009, 03:28 PM @Burned
Nicely balanced Burned!!!
@Gekk
Ok, lost this game against the AI on perfect world. Somehow I do not understand how to use all the trees properly in the early game. Now that I am disgraced having lost to the AI, I'll work on a new perfect world script over next few days. Most interesting will be Burn's discoveries on resource placement. I suspect that all I will do is up the corn a bit, so that the corporations that need it like Standard Ethanol, have a bit more of a go. It has to be a fine adjustment though. I'm thinking of comparing resource placement with the "tectonics" map, which seems to be the only BTS vanilla map that was updated in the last patch. I think it has dealt with resource placement for corporations a bit better, but not sure.
@Bob the Terrible
Thanks for the merging work Bob.
Cheers.
BobTheTerrible Mar 17, 2009, 04:07 PM Well, you could always have 3 levels of resources - Few, moderate, and many, just like we have 3 levels of forests.
Burned Mar 17, 2009, 05:11 PM Another way to increase the number of food ressources is to disable the separation of different types between continents. Looks like the original script simply removes the bonuses of a type associated with another continent instead of replacing them with others.
I don't understand why, but the way to do that seems to be to change these lines in def PlotCanHaveBonus so that at one point at least the returned value is True instead of False if plot.isHills() == True:
if bonusInfo.isHills() == False:
return False
if plot.isFlatlands() == True:
if bonusInfo.isFlatlands() == False:
return False
if bonusInfo.isNoRiverSide() == True:
if plot.isRiverSide() == True:
return False
dr_s Mar 17, 2009, 06:31 PM If you turn on logging, (which you can do by editing some lines at the end of CivilizationIV.ini), PerfectWorld will very kindly write out a bunch of info to the file PythonDbg.log and you can see what's going on with the bonuses. For example:
Trying to place 4 of BONUS_WHEAT
Successfully placed 4 of BONUS_WHEAT
Trying to place 8 of BONUS_RICE
Successfully placed 8 of BONUS_RICE
Trying to place 12 of BONUS_PIG
Successfully placed 12 of BONUS_PIG
Trying to place 4 of BONUS_DEER
Successfully placed 4 of BONUS_DEER
Trying to place 12 of BONUS_COW
Could not place 8 of BONUS_COW
Trying to place 11 of BONUS_SHEEP
Could not place 8 of BONUS_SHEEP
Trying to place 2 of BONUS_BANANA
Successfully placed 2 of BONUS_BANANA
Trying to place 13 of BONUS_CORN
Could not place 11 of BONUS_CORN
I don't think that willy-nilly increasing the bonuses or decreasing the spacing is the right way to fix up the bonus placement. What's going on with the corn is that when the corn is placed after the wheat/rice, there may be almost no place to put it. If the wheat bonuses (which there are not very many of) land on the largest land mass, then there won't be much room left for the corn (because PW respects the Civ rule that some types of bonuses should be on their own landmass). That's what happened with the map that corresponded to the log above---the wheat and rice were on the big land masses, so there was no place to put the corn except on one small island.
One way to moderate this would be to relax the one-bonus-per-type-per-landmass restriction as discussed above. You can do this by commenting out the following code:
# if bIgnoreArea == False and bonusInfo.isOneArea() == True:
# areaID = plot.getArea()
# areaFound = False
# for i in range(len(self.bonusList)):
# if self.bonusList[i].eBonus == eBonus:
# areaList = self.bonusList[i].areaList
# for n in range(len(areaList)):
# if areaList[n] == areaID:
# areaFound = True
# break
# if areaFound == True:
# break
# if areaFound == False:
# return False
This has the disadvantage (or advantage, I guess, to some) of making the resource placement much more like the factory maps.
A better way to do it would be to assign discrete areas for different resources whose size was based on the number of resources, rather than doing it landmass by landmass. So corn, wheat, and rice wouldn't be intermixed, but some resources wouldn't get crowded out (almost) completely.
cephalo Mar 17, 2009, 07:53 PM Unlike the stock routine, the order that the bonuses are placed should be randomized, so you should see maps where corn will dominate rice, rather than vice versa. Wheat doesn't really compete with the others. Most of the bonus code comes right from the SDK though, I only made minor modifications to it. The reason why you often see cows with sheep on the stock maps is because of the starting plot normalization routine just places random food.
dr_s Mar 17, 2009, 08:34 PM cephalo, I don't understand your comment about the wheat. Are you saying that wheat and corn can (or should) coexist on the same landmass in your script? Because that doesn't seem to be my experience, and it seems in line from what I can grok from CIV4BonusInfos.xml. (But maybe my testing/observations are deficient.) In the map that was generated with that log file above (with only 2 out of 13 corn being placed), one large landmass had only wheat and one had only rice. Corn was relegated to one small island.
Daedraug Mar 17, 2009, 10:17 PM Wow a great script. Congrats! But I am having troubles when I play hotseat multiplayer games with my friends. All grasslands with some rivers. Singleplayer works perfectly.
I had the same issue when I played LAN game (it was with 4 human players, no IA).
Note: The original Perfectworld map works properly in LAN game.
Excellent job for single player, congratulations.
I hope you'll find a solution to make it work properly with multiplayer games, as it is the best map generator I've ever seen.
cephalo Mar 17, 2009, 11:55 PM cephalo, I don't understand your comment about the wheat. Are you saying that wheat and corn can (or should) coexist on the same landmass in your script? Because that doesn't seem to be my experience, and it seems in line from what I can grok from CIV4BonusInfos.xml. (But maybe my testing/observations are deficient.) In the map that was generated with that log file above (with only 2 out of 13 corn being placed), one large landmass had only wheat and one had only rice. Corn was relegated to one small island.
Wheat and corn can coexist on the same continent if they have to, and since wheat appears on plains and corn on grass, they shouldn't get in each others way as much as rice and corn would. Each resource will generally pick the continent with the most left over space to place it. (actually I think I placed a penalty for same class resources on the same continent. I wrote this code more than a year ago, so my memory is a bit fuzzy.)
In the example you mention, it is possible that the corn was not able to be placed on it's chosen continent, but only on it's 'extra' island. Since it was placed however, it did not invoke the emergency placement code that will ignore the rules to place one.
dr_s Mar 18, 2009, 10:37 AM What do you mean by "left over space"? I never see wheat and corn on the same continent. I've attached some screenshots of a map that has only three corns, all on small islands. On the main continent, wheat is the only grain, even though there seems to be plenty of grassland to place corn. This particular map failed to place 10 out of 13 corn.
cephalo Mar 18, 2009, 01:40 PM What do you mean by "left over space"? I never see wheat and corn on the same continent. I've attached some screenshots of a map that has only three corns, all on small islands. On the main continent, wheat is the only grain, even though there seems to be plenty of grassland to place corn. This particular map failed to place 10 out of 13 corn.
Well, because of the spacing rules in the BonusClassInfo file, every time you place a wheat resource, you take up 10x10 plots where no other grain can be placed. So, it doesn't really take much to completely fill up a continent. I believe the number that it tries to place is based on the whole map, not just by continent. It's kindof a separate process that decides how much you are going to try to place, versus where you can actually place them when the time comes.
In the screen shots you showed me, you have a large continent, a smaller one, and then an even smaller Australia type continent. You've got wheat on the largest one and corn on the smallest, I imagine the middle one has rice? In this case, I would say that the smallest continent is probably the best place for the corn. I like it actually because it makes this smaller continent more desireable. Whoever takes the effort to settle here will get an extra grain type on a continent you could probably otherwise ignore.
dr_s Mar 18, 2009, 02:20 PM Well, because of the spacing rules in the BonusClassInfo file, every time you place a wheat resource, you take up 10x10 plots where no other grain can be placed. So, it doesn't really take much to completely fill up a continent. I believe the number that it tries to place is based on the whole map, not just by continent. It's kindof a separate process that decides how much you are going to try to place, versus where you can actually place them when the time comes.
Right, but if you look at the screen shots, you'll see that it's not failing to place the corn because of any 10x10 region due to rice or wheat. There's not a single bonus grain tile in the entire middle screenshot. And if you look at the first screen shot, you'll see a large grassland area in the northeast with no grain. It's not placing the corn for some reason other than nearby grains. As far as I can tell from looking at maps, once you have wheat on a continent, you'll never have corn (unless placed by the emergency placer).
cephalo Mar 18, 2009, 03:10 PM Right, but if you look at the screen shots, you'll see that it's not failing to place the corn because of any 10x10 region due to rice or wheat. There's not a single bonus grain tile in the entire middle screenshot. And if you look at the first screen shot, you'll see a large grassland area in the northeast with no grain. It's not placing the corn for some reason other than nearby grains. As far as I can tell from looking at maps, once you have wheat on a continent, you'll never have corn (unless placed by the emergency placer).
Yeah, There is actually a penalty involved in the continent choosing phase as well anytime there is a bArea resource in the same class already on the continent. That part is my doing. I really wanted same class resources separate, because back in the days before the penalty, I was seeing whole continents devoid of luxuries and other important resources, and I wanted every continent to have something unique to offer.
In the screenshots, if that small continent hadn't been there, it probably would have appeared on the main continent in the grassland area you mentioned. It can only choose one major continent however, and it chose the smaller one.
Why do you prefer that food bonuses be spread over the map evenly? In the case of grassland, you can get more out of it by placing a cottage than you can with developing a food bonus there, as long as you have access to one of a bonus, you really don't need more until corporations enter the picture, but then it doesn't matter what balance of bonuses you have only how many.
Burned Mar 18, 2009, 03:46 PM For specialist economy ?
dr_s Mar 18, 2009, 06:23 PM Why do you prefer that food bonuses be spread over the map evenly? In the case of grassland, you can get more out of it by placing a cottage than you can with developing a food bonus there, as long as you have access to one of a bonus, you really don't need more until corporations enter the picture, but then it doesn't matter what balance of bonuses you have only how many.
That's a great question. I'm not sure if I do, and if I do, it's probably not for any good reason, just that I've been trained by the factory maps. I really just posted those screen shots because something you said made me wonder if I was seeing something that shouldn't happen. But I guess that's not the case. I'm also trying to understand how the code works in case I do want to modify it.
With that said, I did play around with one other thing, and people who are interested in different food distributions (and probably more food) might want to try it. I changed the line
areasPerBonus = 1
in AssignBonusAreas to
areasPerBonus = 1 + PRand.randint(0,1)
If I understand the code correctly, this should give the bonus placer a little more flexibility on where to place bonuses. It also adds a little more randomness, in the sense that sometimes you'll see more mixing of bonuses on a continent and sometimes you won't. (Again, I think, given my understanding of the code.)
glider1 Mar 18, 2009, 10:26 PM I'd be interested in other peoples opinions on this. I'm in the middle of trying to balance the bonus ratio's in perfect world to make it even more perfect. First up, my initial feeling is that Cephalo's default setup is very well thought out for bonus placement. It's hard because you have to look at many generated maps before you can reach a conclusion.
That said, I'm looking at bonus ratio's relative to each other in terms of corporation competitiveness in the late game. I have written some code that collects statistics on Cephalo's perfect world bonus placement with this in mind. The statistics look at the difference between bonuses that each corporation needs to be competitive. Common resources are rejected. The results are given below in the spoiler. The point about collecting the ratio of different bonuses needed by the competing corps is that it tells us how competitive a corp is likely to be with it's natural competitor. By collecting the difference in bonuses, some idea can be gleaned of the unique benefits that each corp brings and how powerful they are. Here is a summary of benefits for those not familiar:
Mining Inc: +1 hammer
CivJewellers: +1 gold, +4 culture
CreativeCo: 0.5 hammer, +3 culture
Aluminium co: +3 sci, generates aluminium
Sid Sushi: 0.5 food, +2 culture
StandardEth: +2 sci, generates oil
CerealMills: +0.75 food
My conclusion so far is that the competitiveness of natural rivals in PerfectWorld2 is this:
1) CerealMills/StandardEth PASS
2) SidSushi/StandardEth PASS
4) SidSushi/CerealMills FAIL(Cereal Mills too weak)
4) MiningInc/CreativeCo PASS WITH RESERVATION
5) MiningInc/AluminiumCo UNCERTAIN
6) MiningInc/CivJewellers FAIL (CivJewellers too weak)
The resources that are wrong that lead to a fail result are:
1) Too few gems for CivJewellers
2) Not enough wheat for CerealMills
Please bare in mind that I have not been able to compare my results with any BTS "standard" because my statistics generator is not plug and play compatible with the BTS code, just perfectworld. Therefore judgements are limited to "gut feel" and other players thoughts. Here is the raw data from a sample set of runs on PerfectWorld2_RevDCM (no change to any perfect world variables accept to split pangaea down the middle into two continents and old and new):
Some outputs two continents (broken/rounded/smattering islands):
MiningInc/CivJewellers: coal+basemetal to gems = 11.333333
MiningInc/CreativeCo: coal+raremetal to marble+stone+aluminium = 0.923077
MiningInc/AluminiumCo: basemetal+raremetal to coal = 4.571429
SidSushi/CerealMills: sea to corn+wheat = 4.461538
SidSushi/StandardEth: sea to corn+sugar = 4.833333
CerealMills/StandardEth: wheat to sugar = 1.333333
Some outputs two continents (two broken):
MiningInc/CivJewellers: coal+basemetal to gems = 11.000000
MiningInc/CreativeCo: coal+raremetal to marble+stone+aluminium = 0.961538
MiningInc/AluminiumCo: basemetal+raremetal to coal = 4.500000
SidSushi/CerealMills: sea to corn+wheat = 3.833333
SidSushi/StandardEth: sea to corn+sugar = 3.833333
CerealMills/StandardEth: wheat to sugar = 1.000000
Some outputs two continents (desertcentre/divided in four)
MiningInc/CivJewellers: coal+basemetal to gems = 12.750000
MiningInc/CreativeCo: coal+raremetal to marble+stone+aluminium = 1.000000
MiningInc/AluminiumCo: basemetal+raremetal to coal = 4.761905
SidSushi/CerealMills: sea to corn+wheat = 4.000000
SidSushi/StandardEth: sea to corn+sugar = 4.255319
CerealMills/StandardEth: wheat to sugar = 1.230769
Definitions:
basemetal = iron + copper
raremetal = gold + silver
sea = fish + clams + crabs
Thoughts welcome. Yes it is complicated!!!
Cheers.
cephalo Mar 19, 2009, 08:15 AM If I understand the code correctly, this should give the bonus placer a little more flexibility on where to place bonuses. It also adds a little more randomness, in the sense that sometimes you'll see more mixing of bonuses on a continent and sometimes you won't. (Again, I think, given my understanding of the code.)
Take care that I didn't abandon this functionality. Sometimes I don't clean up properly after an experiment fails.
cephalo Mar 19, 2009, 08:23 AM That said, I'm looking at bonus ratio's relative to each other in terms of corporation competitiveness in the late game. I have written some code that collects statistics on Cephalo's perfect world bonus placement with this in mind. The statistics look at the difference between bonuses that each corporation needs to be competitive. Common resources are rejected. The results are given below in the spoiler. The point about collecting the ratio of different bonuses needed by the competing corps is that it tells us how competitive a corp is likely to be with it's natural competitor. By collecting the difference in bonuses, some idea can be gleaned of the unique benefits that each corp brings and how powerful they are. Here is a summary of benefits for those not familiar:
Thoughts welcome. Yes it is complicated!!!
Cheers.
Wow, that's a can o worms! Ever since I started playing BtS I definately favored Sid's Shushi over Cereal Mills. It would definately be interesting to see how the stock maps compare.
glider1 Mar 19, 2009, 04:41 PM Wow, that's a can o worms! Ever since I started playing BtS I definately favored Sid's Shushi over Cereal Mills. It would definately be interesting to see how the stock maps compare.
Yes it is a can of worms isn't? But wriggling worms can be a lot of fun! The "issue" at the moment is I do not know how to compare with the stock maps. The BTS map scripts place bonus's in a way that is abstracted from the main map code. In the Terra map you have:
from CvMapGeneratorUtil import BonusBalancer
balancer = BonusBalancer() I cannot find where the files that contain this code are at the moment. In any case, my confidence on the process is not good, because I have suspected from day one of the introduction of corporations for BTS, that the bonus's have not been adjusted accurately enough. I suspect that although Firaxis did a fantastic job at trying to balance a very complex corporations concept, they missed the final iteration in the process, which is to fine tune bonus placement on all the BTS maps. There is really no adjustment made in BTS 3.17 that I can detect except by happenstance in the Tectonics map.
I am not sure, but am thinking that Cephalo's bonus placement is at least as good as BTS and probably an improvement as it is now already, except for wheat and gems. Interestingly, wheat and gems might go well to increase not just for the sake of balancing corps if that turns out to be an accurate assessment, but also to please those like Bob The Terrible who would generally like to see a few more bonuses on the map. Wheat and gems cross the two divides of bonus's, health and happiness.
Cheers.
glider1 Mar 20, 2009, 06:50 PM First pass of perfectworld2 with all latest modifications and better corp balance. Seems to produce nice regions and more bonuses as well. Make sure you select allow pangaea but old world new world doesn't matter.
Enjoy
PTM Mar 20, 2009, 08:54 PM Very cool map script. Cool enough to coax a post out of me despite my not having posted in over two years now.
Some thoughts, primarily on glider's latest variant but encompassing of OP's version as well:
Maps, while significantly more realistic and interesting, are ultimately fairly predictable. Coastlines, particularly on thin continents, are almost always jungle (even at high latitudes) and central regions are always infested with a mix of unforested plains and desert so long as the land mass reaches a certain width threshold. There doesn't appear to be a method of simulating ocean currents - or at least one that operates on a level significant enough to generate a cognizable effect. Everything is, basically, China (http://www.motherplanet.com/images/country/china.jpg).
Personally, I'd much prefer some level of continent-scale climactic variance (e.g., northern continents are primarily temperate, with evergreen forests at the coast instead of jungle and heavily rivered, grain-heavy plains replacing central deserts, while southern continents are more akin to what the map script currently produces). I'd imagine there'd need to be a more robust north/south hemisphere simulation than what is currently in use to allow for this (as it stands, continents tend to divide merely on the east/west), probably coupled with an ocean current simulator.
Height simulation needs some work as well. Mountain/hills often don't chain properly (and instead form clumps in continental interiors) and we don't really get volcanic islands (i.e., islands with a central mountain clump or chain). Height blending is extremely good but still imperfect - I'll be extremely impressed with one or two areas of a map that show proper valley and drainage effects (see this OP screenshot (http://forums.civfanatics.com/attachment.php?attachmentid=204210&stc=1&d=1234915781)) but be less impressed with the rest of the world's blending of jungle flatland into unforested plain or desert.
Anyway, excellent script. Some of what I've posted is obviously opinion, and I'll see what I can do to effect the changes I want for myself. Keep up the good work guys!
Edit: there is also a major problem with the way the script handles jungle starts. I've had unhealthy capitals at level 1. This is an easy fix, however, but does require the ability to edit part of your jungle removal loop (i.e., python knowledge)
Edit2: appears to break in multiplayer...
Opera Mar 21, 2009, 04:31 AM I tried this script multiple times and I compared it with PerfectWorld1. I'm a bit disappointed to find big chunks of desert with small patches of plains or grassland (??) anywhere in the middle... and the reverse happens too: chunks of plains/grasslands with patches of desert. I miss the big Sahara-like deserts of PW1.
I've also seen something weird: two continents, one west one east, each one with some islands on the south. The east one had cows and horses; the west one had pigs, sheeps and no horses. But the southern islands of the east continent had pigs. So pigs were on the two continents; is this supposed to happen? Will it change if I tweak the <bArea> value of pigs to 1?
While I'm talking about continent: I don't have checked the code yet but is there a way to...
... generate more lone islands? Generally, we see a big ocean between east/west and that's it. Occasionally, I see some islands; I would like to see them more frequently.
... to make continents a little less snaky? Long corridors of one tile are irking me. I like them but I think I've seen too many of them.
... to make more continents? Generally, there is two: east/west and they take all the place in their slot, north to south. I would like to see east/west oriented continents and north/west oriented. Or, to put it differently, anything different from the basic east/west distinction. It's boring.
Still, it's a great script. The only one I use, in fact (with PW1, of course).
[to_xp]Gekko Mar 21, 2009, 05:01 AM nice job glider :goodjob: what's new in the latest file? one issue I have noticed in the previous version is that when the margin from the pole is south instead of north, there will be a band of 100% tundra there which looks odd. I think it has something to do with what Ramesses wrote in this post http://forums.civfanatics.com/showpost.php?p=7841460&postcount=85
phungus420 Mar 21, 2009, 07:12 AM First pass of perfectworld2 with all latest modifications and better corp balance. Seems to produce nice regions and more bonuses as well. Make sure you select allow pangaea but old world new world doesn't matter.
Enjoy
The issue with Cereal Mills/Sid Sushi is that Cereal Mills is too weak, it's not a resource issue. Look at Creative Constructor's/Mining inc, it gives +1P for MiningInc and +0.5P + Culture for CC. If you adjust Cereal Mills to give +1F it seems to balance out.
cephalo Mar 21, 2009, 12:49 PM ... to make more continents? Generally, there is two: east/west and they take all the place in their slot, north to south. I would like to see east/west oriented continents and north/west oriented. Or, to put it differently, anything different from the basic east/west distinction. It's boring.
This is one area where PW1 was better. I was able to break up pangaeas in a much more natural and fun way with a simulated meteor shower. I tried to make it work with PW2, but because climate is generated on a larger map that is subsequently shrunk, I could not find a way for the meteors to guarantee continent separation at that stage without massive processing time. If I do it after the map is shrunk then you can end up with huge oceans that have no climactic consequences. I took the easy way out and did east/west. I like having a new world in my games, but I do prefer it to be not so predictable.
glider1 Mar 21, 2009, 03:13 PM Excellent thoughts everyone agree with virtually all of them! Here is a basic list of how the RevDCM variant changes perfectworld2 simply by utilising Cephalo's thoughtful design and making only small changes to the code:
1) Allow pangaea does split pangaea east and west every time, but the shape and position of each continent can be highly variable and thus the environment too. Sometimes you will get even four useable continents but always there is an invisible vertical divide line up the middle of the map. Sometimes you will get an explosion of islands as well. There is a fair bit of variety.
2) Changes the lake formation variables for a great lakes region but at the expense of some snaking on what are quite coarse map grids.
3) Changes to ensure that a tundra region and an ice region does have a reasonable chance of emerging depending on landmass shape at the poles.
4) Changes to ensure that a reasonably expansive jungle region does emerge.
5) Changes to ensure that decent plains area emerges
6) Kept in mind Cephalo's philosophy that there should also be decent unuseable areas too like the desert interiors.
7) Changes to ensure a decent himalayas region.
8) Partially used environment variables to improve corp balance (first pass only). A great plains region is critical for wheat and cereal mills for example.
9) Partially used Cephalo's thoughtful functions to force remove and place extra corp bonuses particularly gems and sugar. Wheat naturally grows from the environment variables.
10) The debug log also prints some corp balance stats.
If you want to get a feel for the shape of the map you have generated without physically looking at the map, check out the debug log. The bonus count virtually gives it away. Heaps of wheat, big plains region. Heaps of rice, bigger jungle region. More sea bonuses relative to land bonuses, greater continent breakup into islands etc. All that information is supplied to us by Cephalo. Remember that a big rounded continent will have a massive desert in the interior. This would probably happen in the real world too!
Again, it takes a lot of maps to be generated to truly get a feel for what is happening. This can be a slow labourious process because changing a python variable only effects if you shutdown and restart BTS which is a pity. I initially thought it would update in-game, only having to click "regenerate", but it is not so.
Cheers.
Opera Mar 22, 2009, 04:53 AM Oh, PW RevDCM is great! I like the big areas of jungle. That's one thing I missed a lot. The areas of plains are a thing I never saw since I play Civilization. I wonder what it would do in game.
However, how could a cow ressource appear in the middle of a desert? Is there a way to not allow such oddities? I like desert to be unsettlable; cows just aren't right for this purpose.
Another question: in PerfectWorld2.py (any version), there is a "horse latitude" variable. Does it overwrite the one in the XML files? It seems unlikely because I see them, the horses, even in tundra. I play with Fall Further, a modmod of Fall From Heaven 2, which places horses from 0 to 90 in latitude.
Another question: since I play Fall Further rather than standard BTS, I have no use for the changes you made to ressources in order to balance corporations. Is there a way to simply remove them? Say, by commenting the self.CorpBalance* lines?
GatlingGun Mar 22, 2009, 05:15 AM However, how could a cow ressource appear in the middle of a desert? Is there a way to not allow such oddities? I like desert to be unsettlable; cows just aren't right for this purpose.
I haven't seen cows on a desert tile... normally they are plains cows with desert (or floodplains) around them... this doesn't bother me so much... I think it's like Africa.
cephalo Mar 22, 2009, 12:21 PM Oh, PW RevDCM is great! I like the big areas of jungle. That's one thing I missed a lot. The areas of plains are a thing I never saw since I play Civilization. I wonder what it would do in game.
However, how could a cow ressource appear in the middle of a desert? Is there a way to not allow such oddities? I like desert to be unsettlable; cows just aren't right for this purpose.
Another question: in PerfectWorld2.py (any version), there is a "horse latitude" variable. Does it overwrite the one in the XML files? It seems unlikely because I see them, the horses, even in tundra. I play with Fall Further, a modmod of Fall From Heaven 2, which places horses from 0 to 90 in latitude.
Another question: since I play Fall Further rather than standard BTS, I have no use for the changes you made to ressources in order to balance corporations. Is there a way to simply remove them? Say, by commenting the self.CorpBalance* lines?
Horse latitudes is a high pressure zone where you normally have less rain. I don't know why they call it "horse" latitudes as it has nothing to do with horses. You should never see cows in desert in the standard version of PW2 unless you found a bug.
Blondel58 Mar 22, 2009, 01:24 PM Horse latitudes (http://en.wikipedia.org/wiki/Horse_latitudes)
edit: Keep tweaking, guys! I'm looking forward to a "final" edition! :thumbsup:
Opera Mar 22, 2009, 03:10 PM Damn! I didn't know that. Well, at least I know what to tweak know :p
As for the cow thing, that was a cow on a plain tile; but that plain tile was in the middle of a desert... However, I don't remember if there was flood plains near. I think there was. So it's nothing.
Thanks for the replies!
glider1 Mar 22, 2009, 06:31 PM Cows in the desert would not have been good! Cows on the plains, that's fine! Remember that most of bonus placement is being dictated by the XML which has not been altered. It would have been real nice to allow gems to be found not just in jungle but the XML won't allow it. The XML could be bypassed but decided not to. Here in the land down under, gems are found in the desert too...
Agree that experiencing coherent plains regions like this in PerfectWorld is something new for me as well. So far I'm liking it!
Cheers.
Blondel58 Mar 23, 2009, 01:56 AM Cows on a single plain tile, sorrounded by desert tiles, is great! Remember, life stock is the way for nomads to gather ressources from the desert, and since there are no goats and camels in CIV account the cattle as them too :)
PTM Mar 23, 2009, 02:12 AM Cows on a single plain tile, sorrounded by desert tiles, is great! Remember, life stock is the way for nomads to gather ressources from the desert, and since there are no goats and camels in CIV account the cattle as them too :)
Would be neat to code a bison or goat resource coupled with something that withheld them from all maps except as replacements for plains cows (if cows were placed as such).
glider1 Mar 23, 2009, 10:13 PM Yeah I see what you mean about cows generally representing bison, camels, goats depending on the environment. Boy does blue marble complement PerfectWorld! Maps begin to feel alive like they are an ecosystem. Even the plains look a lot better. Instead of graphically replacing cows with bison, it is a lot simpler to do that transformation in your mind with imagination. Probably more rewarding too.
Then comes the civilizations upon the perfect world. Gradually the ecosystem on the map is eroded away and cannot be recovered. Trees cut down, plains replaced by workshops and roads. At the end of the game, the perfect world map is largely dead and smoking and looks only a pale shade of how it looked at 4000BC. This is good because it's actually very similar to civilizations playing out in the real world.
Perfect world is pretty darn cool. There are more improvements that could be made, but a lot of them can be just simple transformations in our mind as we look at the regions on the blue marble perfect world at 4000BC.
Cheers.
Kornaki Mar 23, 2009, 11:30 PM I downloaded the rev DCM version; only complaint is that it seems to have largely removed the desert, although I only generated one map so that could be an anomaly.
glider1 Mar 24, 2009, 05:01 PM Yeah seeing desert can initially be a turn off but it so totally depends on landmass shape. A big rounded landmass will have a large desert. You have to think what would happen if the real planet had such a large landmass on it. Probably a big swathe of desert in the interior... In the real world, even a smallish "continent" like Australia is basically a desert with a bit of shrubbery around the edges.
Cheers.
Burned Mar 24, 2009, 05:06 PM I just tried the option to chose a north/south continental separation instead of a east/west one. It doesn't work...
PTM Mar 24, 2009, 05:32 PM Yeah seeing desert can initially be a turn off but it so totally depends on landmass shape. A big rounded landmass will have a large desert. You have to think what would happen if the real planet had such a large landmass on it. Probably a big swathe of desert in the interior... In the real world, even a smallish "continent" like Australia is basically a desert with a bit of shrubbery around the edges.
Cheers.
Honestly, this really isn't how it works [in practice] in the real world.
Africa (http://www.admin.uio.no/fa/felles/countries/africa/images/Africa%20Satellite%20small.jpg)
South America (http://www.geographicguide.net/earth/pictures/south-america-image.jpg)
North America (http://www.lsfoundation.org/images/cms/North_America_satellite_globe.jpg)
Of the posted examples, North America is perhaps most akin to what PW2 generates. But you'll notice this is only really true if you exclude Canada from the continent and desertify the majority of what is fertile plains and grasslands in the United States' midwest region.
At this time, PW2 doesn't seem to properly handle assignment of moisture values for tiles as related to nearby rivers or oceanic currents (as I have previously noted). The net effect is far too few evergreen forests, erroneous placement of jungle (seen at high latitudes too often, too sparse in low latitudes and continental interiors), and over-prevalent and generally too predictable desertification of interior regions.
PW2 is of course the only script I can play on. It's amazing and I love it to death. But it's not wholly accurate or without flaws. :D
glider1 Mar 24, 2009, 10:37 PM Yes, I see your point. In terms of Africa and the Americas in the real world, they are still quite "narrow" more north/south aligned continents compared to some of the shapes in perfect world which can be quite fat east/west. The interesting continent shape to compare perfect world to would be Asia/Europe. Here's a pic. It doesn't show desert very well! Australia looks pretty green but it's basically dead dry desert most of it. Hmmmm.
Cheers
dr_s Mar 25, 2009, 09:49 AM One thing you'll notice if you look at PTM's map of Africa and compare it to a map marked with latitude (e.g. here (http://81.0.149.237/frie_medier/Map_of_Africa.jpg)) is that the green belt surrounds the equator and the deserts are centered at 20 degrees latitude north and south. PW2 has variables that control the latitude components of its model as well as a geostrophicFactor variable to control the strength of the geostrophic flow compared to monsoon rains. Perhaps cranking up the geostrophic factor and adjusting the latitude variables a bit would tidy up the placement of desert.
cephalo Mar 25, 2009, 10:11 AM Honestly, this really isn't how it works [in practice] in the real world.
Africa (http://www.admin.uio.no/fa/felles/countries/africa/images/Africa%20Satellite%20small.jpg)
South America (http://www.geographicguide.net/earth/pictures/south-america-image.jpg)
North America (http://www.lsfoundation.org/images/cms/North_America_satellite_globe.jpg)
Of the posted examples, North America is perhaps most akin to what PW2 generates. But you'll notice this is only really true if you exclude Canada from the continent and desertify the majority of what is fertile plains and grasslands in the United States' midwest region.
At this time, PW2 doesn't seem to properly handle assignment of moisture values for tiles as related to nearby rivers or oceanic currents (as I have previously noted). The net effect is far too few evergreen forests, erroneous placement of jungle (seen at high latitudes too often, too sparse in low latitudes and continental interiors), and over-prevalent and generally too predictable desertification of interior regions.
PW2 is of course the only script I can play on. It's amazing and I love it to death. But it's not wholly accurate or without flaws. :D
Part of the problem also is that I don't currently simulate any erosion. Continents very often jut right out of the ocean to quite high altitudes near the coast, and this blocks the moisture coming in from the ocean. If you look at the Amazon basin you can see that there is really nothing blocking the east wind until you get to the Andes. Sometimes you see this in PW too but not really enough. It's somthing I should work on.
Right now I'm working on a new version that has quite a few new features and bug fixes for some horrendous bugs I can't believe I didn't notice. The toroidal option works and is alot cooler than I thought it would be. :)
PTM Mar 25, 2009, 10:28 AM :goodjob: Looking forward to it ceph.
dr_s Mar 25, 2009, 10:43 AM Have you thought about changing the world sizes for the update? Personally, I would like to see the 1.6:1 aspect ratio of the standard map rather than the 2.2:1 ratio that the current version of PW uses. I'd also like options for forest levels :).
cephalo Mar 25, 2009, 11:10 AM Have you thought about changing the world sizes for the update? Personally, I would like to see the 1.6:1 aspect ratio of the standard map rather than the 2.2:1 ratio that the current version of PW uses. I'd also like options for forest levels :).
Yes and yes.
I reverted back to the ratio in PW1 for two reasons. I really didn't like how the climate zones were compressed into a very thin horizontal line, and also the reason I stretched the map in the first place was to make room for the east/west continent division without scrunching them up too much. Well, I decided I really hate the east/west thing and I am determined to bring back the meteors! (Uh, I still have yet to figure out how, hopefully that won't delay the release too long.) So the reason for the wide maps is going away.
Also, I have a new variable that controls the amount of trees at 'jungle' level in addition to the one that controls where the jungle level is terms of rainfall. By default it's still 100 percent trees at jungle, because I really like wild areas to look wild and also I feel it balances the fertile grassland starts with the plains and desert starts.
Ramesses Mar 25, 2009, 03:52 PM Yes and yes.
I reverted back to the ratio in PW1 for two reasons. I really didn't like how the climate zones were compressed into a very thin horizontal line, and also the reason I stretched the map in the first place was to make room for the east/west continent division without scrunching them up too much. Well, I decided I really hate the east/west thing and I am determined to bring back the meteors! (Uh, I still have yet to figure out how, hopefully that won't delay the release too long.) So the reason for the wide maps is going away.
Also, I have a new variable that controls the amount of trees at 'jungle' level in addition to the one that controls where the jungle level is terms of rainfall. By default it's still 100 percent trees at jungle, because I really like wild areas to look wild and also I feel it balances the fertile grassland starts with the plains and desert starts.
You'll still keep an option for those of us who like wide maps available, right?
cephalo Mar 25, 2009, 04:24 PM You'll still keep an option for those of us who like wide maps available, right?
I'm just talking about the default settings. Really you can have maps of any dimension, but you have to change two different sets of dimensions. I'll make sure to include detailed instructions on how to change the map sizes.
[to_xp]Gekko Mar 25, 2009, 06:44 PM looking forward to the new version. toroidal PW sounds awesome :D
Kornaki Mar 26, 2009, 07:26 AM I know the map script alters resource placement; if I ran this with a mod that had new resources, would they potentially not get placed on the map?
cephalo Mar 26, 2009, 08:12 AM I know the map script alters resource placement; if I ran this with a mod that had new resources, would they potentially not get placed on the map?
All resources are placed generically from the XML, so they should work fine. The things that might not work are terrain and features. Mods that use custom features and terrains would need a special version of the map.
Kornaki Mar 27, 2009, 04:13 PM I tried again and it worked; in retrospect, I might have been using the rev_dcm version; maybe that made the difference?
glider1 Mar 27, 2009, 06:18 PM The RevDCM version makes hard coded references to the XML vanilla corporation bonuses, in an attempt to balance them. If your mod doesn't have these, it may cause the map to dump out? The map is just a curiosity prototype variant of the PerfectWorld main line.
Cheers.
cephalo Mar 28, 2009, 02:34 PM This meteor thing is really difficult. I need another week to think it through. At present its an equal mix of: "works beautifully", "doesn't work", and "destroys the whole world with meteors". I know it's possible to get this right, but I need to start thinking out of the box.
PTM Mar 29, 2009, 02:12 AM Not sure if this has been posted before.
Start location placement in the RevDCM version (glider's recent build) breaks if the number of civilizations exceeds +1 over the recommended limit for a given map size (e.g., 9 players on a standard map). What happens is civilizations are placed randomly and without regard to the "only on old world" setting.
glider1 Mar 29, 2009, 08:06 PM @Cephalo
This meteor thing is really difficult
Yeah I can imagine! Trying to get the continents looking "natural" would not be easy. Sometimes I wonder if tectonic plate simulation might be away forward? Start with a random fluctuation of "matter" on a bare map, conglomerate the "matter" into a heap, then move the heaps toward the centre of the map at different velocities and create elevation differences at the points where they collide using Newtonian equations, then add water to form continents? Sounds simple. Yeah right.
@PTM
Thanks for the info on start location. The revdcm version doesn't change any of that code. Only solution for now is to play the RevDCM mod below with the default number of civilizations and let the barbarian code spawn new civilizations over time. Works well. Note that the perfect world script in the RevDCM download is not as up to date as the one on this forum.
Cheers.
Kornaki Mar 29, 2009, 09:47 PM This meteor thing is really difficult. I need another week to think it through. At present its an equal mix of: "works beautifully", "doesn't work", and "destroys the whole world with meteors". I know it's possible to get this right, but I need to start thinking out of the box.
Perhaps instead of the meteor striking the ground and removing tiles, it could strike the ground and push all the tiles away from it? So you wouldn't risk destroying the world, you'd just move it around a lot
cephalo Mar 30, 2009, 08:44 AM Perhaps instead of the meteor striking the ground and removing tiles, it could strike the ground and push all the tiles away from it? So you wouldn't risk destroying the world, you'd just move it around a lot
Well, at this juncture there are no tiles per say, only measures of altitude. The tiles come only after the climate has been generated.
I have a few promising ideas to try yet that might work perfectly.
cephalo Mar 30, 2009, 03:14 PM I did it!! Hey, I have a rather exciting story to tell about how I solved this problem. Well, maybe it's not that exciting and I'm just nerdy. Anyway, the problem is just how does one break a pangaea continent with a minimal number of meteors programmatically? Basically you want to detect where the thinnest choke points are and throw a meteor at them, hoping to divide the big continent into two.
In PW1 I found chokepoints by drawing a circle around a point, and checked each square in the circles progression for water on opposite points on the circle and also land on opposite points. Then I sorted all the choke points I found by distance to the geographic center of the continent, pick the one closest to the center and put my meteor there. This method worked ok, but there were many meteors that were thrown unnecessarily at the exterior limbs of continents. The center of a continent was not always close to the place where the meteors needed to go. In worst case scenarios much of the land was destroyed before a satisfactory division of continents appeared. In PW1 all this happend after climate generation so the large oceans created by the meteors had no effect on the climate. Fortunately, I was able to tune certain variables so that the meteor scheme worked pretty well almost all the time. The continent shapes in PW1 just happened to avoid worst case behavior mostly by luck.
When I tried to apply this scheme to PW2, I ran into some problems. First of all, I really wanted any oceans created to effect the climate properly, and that meant that I had to throw the meteors before I generated the climate. That meant that I had to work with the heightmap on a different size than the final map, so I could not use 'coast' tiles to test if I had really broken the pangaea or not. Further complicating the situation was the new toroidal option. It is much harder to break up a pangaea that can connect in every direction. I initially just turned the meteor code off when using toroidal, because it failed more times than it worked.
When you look at a pangaea map, the human eye can instantly see where the meteors need to go, so why couldn't I make it happen programatically? It was driving me nuts. So last week I googled and wikepediad and googled again, and I found an interesting article about something called 'betweeness centrality' (http://en.wikipedia.org/wiki/Centrality#Betweenness_centrality). After looking further I found an efficient algorithm, invented by Ulrik Brandes, for determining betweeness centrality over a network. But hold on, finding betweeness centrality involves calculating all shortest paths from each continent square to every other continent square. Obviously that's way too much processing overhead, and it was because I tried it anyway just to see what the results would be like. I let the computer run all night and it still wasn't finished, so I never even got to see if I was on to something.
All was not lost though! I decided to drastically cut the processing time by approximating the continent shape at a much lower resolution, and with four connected neighbors instead of eight. So instead of evaluating the paths to every continent square, I was evaluating every 5th one in the x and y directions. So instead of my network looking like this:
XXXXXXXX
XXXXXXXX
XXXXXXXX
XXXXXXXX
XXXXXXXX
It looked like this:
X...X...
........
........
X...X...
........
Each 'X' is a neighbor of the nearest X.
This reduced the proccessing time enough to be faster than the old way, and it works perfectly without fail. I still have some minor polishing but hopefully the new version will be released tonight. It even works on toroidal!
cephalo Mar 30, 2009, 05:57 PM Ok, it's up! Give it a try.
I changed the way bonus placement is done so that bonuses are placed individually instead of all of one type at once. This virtually eliminates the crowding problems when you increase the amount of resources placed. Also there's a variable now to increase bonuses called BonusBonus.
BobTheTerrible Mar 30, 2009, 06:12 PM Do you think "betweeness centrality" can be used to make the actual AI understand choke points better?
cephalo Mar 30, 2009, 06:37 PM Do you think "betweeness centrality" can be used to make the actual AI understand choke points better?
In terms of a gameplay chokepoint, where there's only one square of passage, calculating the betweeness centrality is probably overkill. There are some cheaper ways to evaluate those kind of chokepoints.
I did those for tower placement on the Erebus.py mapscript for Fall from Heaven.
Ramesses Mar 30, 2009, 07:55 PM Ok, it's up! Give it a try.
I changed the way bonus placement is done so that bonuses are placed individually instead of all of one type at once. This virtually eliminates the crowding problems when you increase the amount of resources placed. Also there's a variable now to increase bonuses called BonusBonus.
Where is it? Is it the PerfectWorld.py download in your sig?
EDIT: Never mind, I got it. But I still want to know how to change the dimensions back to the 2:1 ratio.
BobTheTerrible Mar 30, 2009, 09:01 PM In terms of a gameplay chokepoint, where there's only one square of passage, calculating the betweeness centrality is probably overkill. There are some cheaper ways to evaluate those kind of chokepoints.
I did those for tower placement on the Erebus.py mapscript for Fall from Heaven.
I was thinking more like "If we block these 4 here tiles with culture, other civs cannot expand down this here peninsula without open borders," or "We can make the most efficient use of our military at this 3-tile chokepoint and prevent a land advance into the rest of our territory."
Kornaki Mar 30, 2009, 10:34 PM Nice! Now to give it a try
cephalo Mar 30, 2009, 11:01 PM Where is it? Is it the PerfectWorld.py download in your sig?
EDIT: Never mind, I got it. But I still want to know how to change the dimensions back to the 2:1 ratio.
Oh yeah, I promised detailed instructions. Set the mc.hmHeight and mc.hmWidth variables to multiples of 16 with a 2:1 ratio for your largest map size. Add +1 if the map does not wrap in that direction. By default the XWrap variable is False, so you want the x direction to be +1. My recommendation is 161:80. (16 * 10 + 1 = 161, and 16 * 5 = 80) The new wrapping settings will handle the needed +1 or -1 for flat and toroidal automatically.
Then change the entries in getGridSize function to a 2:1 ratio. Multiply these values by 4 to get the actual map dimensions. These can be anything you want except the largest one cannot be larger than hmHeight and hmWidth. (The heightmap only shrinks, it doesn't grow, so the final maps must be the same size or smaller)
cephalo Mar 30, 2009, 11:38 PM I was thinking more like "If we block these 4 here tiles with culture, other civs cannot expand down this here peninsula without open borders," or "We can make the most efficient use of our military at this 3-tile chokepoint and prevent a land advance into the rest of our territory."
Yeah, I think as a pre-processing step you can quantify an areas importance in a traffic sense. The problem is that the algorithm I mentioned gets slow really fast. I was able to strip it down with a scant approximation, but that's because close counts with meteors kinda like with horse-shoes and hand grenades. Even so, you can see that it does add considerable processing time. (Sorry everyone!)
Fortunately, once the game starts the map usually doesn't change much, so you would only have to calculate it once.
[to_xp]Gekko Mar 31, 2009, 05:01 AM simply awesome job on the new version. it's almost unbelievable how good it is :lol:
I did notice an oddity though, check attached screenshot. map is small size, break pangeas, cylindrical wrap. notice the straight line of desert very near to the south pole.
aside from that, toroidal works perfectly! having a strip of ice cut the map in two looks terrible though. Seven05 made the ice more likely to clump in the central section of the map in his ErebusContinent mapscript, and it looks great, you should check that out ;) it even changes the climate slightly near the pole, so that the central section of the map is colder ( snow ) , and it gets progressively hotter as you move to the left/right ( snow -> tundra ) . it looks really realistic, aside from the fact that there's only one pole instead of two of course :D
actually, this should probably work nicely even with cylindrical and flat wraps.
last thing: jungles seem kinda uncommon, increasing their number a little bit couldn't hurt. glider1's version had overdone that imho, but something between his and what we have now should work nicely.
THANK YOU! :goodjob:
cephalo Mar 31, 2009, 11:41 AM Gekko;7931501']
last thing: jungles seem kinda uncommon, increasing their number a little bit couldn't hurt. glider1's version had overdone that imho, but something between his and what we have now should work nicely.
THANK YOU! :goodjob:
For the next version I'll introduce some erosion. The problem with jungle right now is that the land tends to leap out of the ocean where the high altitude is too cold to support jungle. There are almost no near sea level flatlands on most maps.
Osymandias Mar 31, 2009, 01:32 PM Wow, the results of this mapscript are astonishing! Good work cephalo.
What would be additionally nice is a numbergenerator in the main menu of Civ, so that i can input a number for this map and if it's a good map, i can use this map in different sizes etc. by just typing its number. I hope you know what i mean.
dr_s Mar 31, 2009, 06:00 PM I didn't notice any errors in the PythonErr.log file in Vanilla.
I did notice this in PythonDbg.log:
No room at all found for BONUS_DRAMA!!!
No room at all found for BONUS_MUSIC!!!
No room at all found for BONUS_MOVIES!!!
That doesn't quite seem right, but I would like to have a map with bonus movies on it.
glider1 Mar 31, 2009, 06:49 PM Creativity and imagination at work. Great stuff Cephalo! This proves to me that "nerdy" computer science is still an art form. And an excellent question by BobTheT about whether this algorithm could be used by the AI. I wish Cephalo could contribute to a better AI project. I'm sure Jdog and Yakk would enjoy it!!
Cheers.
Ramesses Mar 31, 2009, 08:58 PM Not to be a nag, Cephalo, but your instructions weren't really detailed enough.
Oh yeah, I promised detailed instructions. Set the mc.hmHeight and mc.hmWidth variables to multiples of 16 with a 2:1 ratio for your largest map size. Add +1 if the map does not wrap in that direction. By default the XWrap variable is False, so you want the x direction to be +1. My recommendation is 161:80. (16 * 10 + 1 = 161, and 16 * 5 = 80) The new wrapping settings will handle the needed +1 or -1 for flat and toroidal automatically.
I ctrl-f'd the script for mc.hmHeight and mc.hmWidth, but I can't find the place where they're defined with numerical values. I tried defining them in a place that I felt might work, but I ended up getting a total grassland map.
This was the section I changed.
mc.hmWidth = newWidth
mc.hmHeight = newHeight
self.heightMap = newHeightMap
I don't know what line no. this is on, but you'll find where I'm talking about by ctrl-f'ing it. You don't even have to do the whole thing; the first line gives one result.
Anyway, I changed it to:
#mc.hmWidth = newWidth
#mc.hmHeight = newHeight
mc.hmWidth = 161
mc.hmHeight = 80
self.heightMap = newHeightMap
Apparently, this was wrong.
Then change the entries in getGridSize function to a 2:1 ratio. Multiply these values by 4 to get the actual map dimensions. These can be anything you want except the largest one cannot be larger than hmHeight and hmWidth. (The heightmap only shrinks, it doesn't grow, so the final maps must be the same size or smaller)
Again, I'm not sure what you mean. Will it work if I change this
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)
...to this?
WorldSizeTypes.WORLDSIZE_DUEL: (16,8),
WorldSizeTypes.WORLDSIZE_TINY: (20,10),
WorldSizeTypes.WORLDSIZE_SMALL: (28,14),
WorldSizeTypes.WORLDSIZE_STANDARD: (32,16),
WorldSizeTypes.WORLDSIZE_LARGE: (40,20),
WorldSizeTypes.WORLDSIZE_HUGE: (48,24)
I can't be sure this works at the moment because of the first step not working.
dr_s Mar 31, 2009, 09:27 PM @Ramesses, the first set of lines you want to change is
#Height and Width of main climate and height maps. This does not
#reflect the resulting map size. Both dimensions( + 1 if wrapping in
#that dimension = False) must be evenly divisble by self.hmMaxGrain
self.hmWidth = 144
self.hmHeight = 97
So if you want a 2:1 aspect ratio, you could make these 192 and 97. Then your second set of changes would be appropriate.
Ramesses Mar 31, 2009, 09:48 PM @Ramesses, the first set of lines you want to change is
#Height and Width of main climate and height maps. This does not
#reflect the resulting map size. Both dimensions( + 1 if wrapping in
#that dimension = False) must be evenly divisble by self.hmMaxGrain
self.hmWidth = 144
self.hmHeight = 97
So if you want a 2:1 aspect ratio, you could make these 192 and 97. Then your second set of changes would be appropriate.
Well I tried doing 160 and 81 before, which should have been just as effective, but I don't believe that actually did anything. I do have several versions though, so it is possible I didn't have the right combination of changes. I'll check and see if this works.
EDIT: Hooray, it works. Thanks for your help.
glider1 Apr 01, 2009, 01:37 AM A better map of the real earth which shows the deserts a bit better, in case anyone is interested.
cheers.
cephalo Apr 01, 2009, 08:43 AM I didn't notice any errors in the PythonErr.log file in Vanilla.
I did notice this in PythonDbg.log:
No room at all found for BONUS_DRAMA!!!
No room at all found for BONUS_MUSIC!!!
No room at all found for BONUS_MOVIES!!!
That doesn't quite seem right, but I would like to have a map with bonus movies on it.
Good news. Thanks for checking that dr_s.
cephalo Apr 01, 2009, 09:14 AM Well I tried doing 160 and 81 before, which should have been just as effective, but I don't believe that actually did anything. I do have several versions though, so it is possible I didn't have the right combination of changes. I'll check and see if this works.
EDIT: Hooray, it works. Thanks for your help.
The problem that you had before was in your WORLDSIZE_HUGE. 48 * 4 = 192, and 24 * 4 = 96, which is bigger than my original recommendation for hmHeight and hmWidth of 160,80. and also I gave you a wrong recommendation it should have been 160,81 not 161,80! :lol:
I hope that clears it up for you. The getGridSize numbers need to be x4 to get the actual map size. (In colonization it's x1)
TheLastOne36 Apr 01, 2009, 04:18 PM Where can i get the latest Version?
[to_xp]Gekko Apr 01, 2009, 05:31 PM http://forums.civfanatics.com/downloads.php?do=file&id=8042&act=down
( yes, it is the very latest version )
NwabudikeMorgan Apr 02, 2009, 12:06 AM you get a cookie for this beauty!
Jonesy79 Apr 03, 2009, 05:29 PM I love this map. I used to play mostly fractal or shuffle with random ai, random personality, unrestricted whatever, random climate, random water level (large map, epic speed, ancient era), because, well, I like things random! But the terrain has always been kinda lame with random peaks and hills and desert and plains. I found this map and it is just awesome fun. The maps look great, and things are nicely randomized. I also enjoy the clumping of resources.
I have two comments however:
1. I can't see the damn tribal huts. The first few times I played the map I thought you had disabled huts because I never saw any. It wasn't until I randomed a civ that started with a scout (I never build those guys) that outlined a regular looking forest plot with a blue circle that I realized the huts are there, I just can't see them. In normal maps huts in forests are much more visible because the forests have receded on the tile around the hut to make it more visible. In your map the forest is right on top of the hut and I now have to explore with the map incredibly zoomed in to see them. Plus your map is covered in forests and jungles so almost all huts are covered. Is there any way to make them more visible a la normal maps?
2. The terrain is too good. Too much grassland, but primarily too many hills. My GP Farms have 3-4 hills, every other city has like 8, its ridiculous, there are simply hills everywhere. All my cities become production powerhouses without even really trying. Depending on my economy I either mine all hills and farm all the rest (inevitably grassland river), or mine all the hills and farm/cottage the rest (inevitably grassland river). It's as if you've lowered the build times of everything, it seems a bit unbalancing. I think things would be improved by cutting back on the hills and increasing the plains.
Regardless, I love the map as is, just offering some constructive criticism.
Bad Player Apr 04, 2009, 02:58 AM 2. The terrain is too good. Too much grassland, but primarily too many hills. My GP Farms have 3-4 hills, every other city has like 8, its ridiculous, there are simply hills everywhere. All my cities become production powerhouses without even really trying. Depending on my economy I either mine all hills and farm all the rest (inevitably grassland river), or mine all the hills and farm/cottage the rest (inevitably grassland river). It's as if you've lowered the build times of everything, it seems a bit unbalancing. I think things would be improved by cutting back on the hills and increasing the plains.
Regardless, I love the map as is, just offering some constructive criticism.
Maybe there could be an Age of Earth option (like Civ 1 was it??) where you can choose 5 or 4 or 3 billion years old. The older the earth, the less mountains and hills around.
Bad Player Apr 04, 2009, 03:00 AM Could you have a realistic nationality proximity option - ie have all european civs start nearby, all american civs start nearby, all asian and middle eastern and african start near to their real life neighbours?
cephalo Apr 04, 2009, 12:14 PM I love this map. I used to play mostly fractal or shuffle with random ai, random personality, unrestricted whatever, random climate, random water level (large map, epic speed, ancient era), because, well, I like things random! But the terrain has always been kinda lame with random peaks and hills and desert and plains. I found this map and it is just awesome fun. The maps look great, and things are nicely randomized. I also enjoy the clumping of resources.
I have two comments however:
1. I can't see the damn tribal huts. The first few times I played the map I thought you had disabled huts because I never saw any. It wasn't until I randomed a civ that started with a scout (I never build those guys) that outlined a regular looking forest plot with a blue circle that I realized the huts are there, I just can't see them. In normal maps huts in forests are much more visible because the forests have receded on the tile around the hut to make it more visible. In your map the forest is right on top of the hut and I now have to explore with the map incredibly zoomed in to see them. Plus your map is covered in forests and jungles so almost all huts are covered. Is there any way to make them more visible a la normal maps?
2. The terrain is too good. Too much grassland, but primarily too many hills. My GP Farms have 3-4 hills, every other city has like 8, its ridiculous, there are simply hills everywhere. All my cities become production powerhouses without even really trying. Depending on my economy I either mine all hills and farm all the rest (inevitably grassland river), or mine all the hills and farm/cottage the rest (inevitably grassland river). It's as if you've lowered the build times of everything, it seems a bit unbalancing. I think things would be improved by cutting back on the hills and increasing the plains.
Regardless, I love the map as is, just offering some constructive criticism.
Thanks for the compliments, and...
For issue one, I have only seen this problem when I use the 'regenerate map' button. Sometimes bonuses and goody huts for some reason don't have the proper z values, and can end up under a hill or something. I don't really know why. One thing that should fix it is to save and reload the game. I don't have this problem when starting fresh.
For issue two, there are many tuning variables at the beginning the script that are well commented. You might want to play with those a bit and tone down the hills and grassland. Usually mess with these every new publish, and I'll keep your observations in mind. I do like alot of hills mainly because they look good. Balance, shmalance. :D
Lord Tirian Apr 04, 2009, 06:17 PM Could you have a realistic nationality proximity option - ie have all european civs start nearby, all american civs start nearby, all asian and middle eastern and african start near to their real life neighbours?
There's something like that already, here (http://forums.civfanatics.com/showthread.php?t=290694) - if you use this, it should work with any map, including PerfectWorld, I think.
Cheers, LT.
NwabudikeMorgan Apr 06, 2009, 01:30 PM for your goody huts issue, go into the art files for terrain improvements i think (it's one of the generic art files) and in the entry for goody huts (as well as every building) you'll see a <size> or <scale> tag, make that number bigger to enlarge the huts on the map.
Jonesy79 Apr 07, 2009, 01:05 PM Thanks for the compliments, and...
For issue one, I have only seen this problem when I use the 'regenerate map' button. Sometimes bonuses and goody huts for some reason don't have the proper z values, and can end up under a hill or something. I don't really know why. One thing that should fix it is to save and reload the game. I don't have this problem when starting fresh.
For issue two, there are many tuning variables at the beginning the script that are well commented. You might want to play with those a bit and tone down the hills and grassland. Usually mess with these every new publish, and I'll keep your observations in mind. I do like alot of hills mainly because they look good. Balance, shmalance. :D
Maybe it looks different with blue marble? I have no mods and I never regenerate maps, also they're hidden under forests and forests only (maybe jungle, i don't recall).
The hills are pretty, especially in the cold areas with the snow on them. I think I'll just leave all tweaking to you.
for your goody huts issue, go into the art files for terrain improvements i think (it's one of the generic art files) and in the entry for goody huts (as well as every building) you'll see a <size> or <scale> tag, make that number bigger to enlarge the huts on the map.
Hey, that'd help, thanks! But I've never tweaked anything like that before, could you tell me the name and path of that file?
A_Hamster Apr 08, 2009, 01:27 PM 2. The terrain is too good. Too much grassland, but primarily too many hills. My GP Farms have 3-4 hills, every other city has like 8, its ridiculous, there are simply hills everywhere. All my cities become production powerhouses without even really trying. Depending on my economy I either mine all hills and farm all the rest (inevitably grassland river), or mine all the hills and farm/cottage the rest (inevitably grassland river). It's as if you've lowered the build times of everything, it seems a bit unbalancing. I think things would be improved by cutting back on the hills and increasing the plains.
Regardless, I love the map as is, just offering some constructive criticism.That might be luck of the draw. While there do seem to be more hills that usual, they also clump more, so my experience is that I'll have dry steppes with little to no food resources, and mostly plains for the flatland, but large swathes of coastal grassland with few to no hills. Again, just the maps I've seen/played on. Apparently it works differently for you.
Didn't have problems seeing the huts myself.
@Bad Player. Don't know about Civ I, but it was in Civ II.
Kornaki Apr 09, 2009, 10:49 PM If you allow pangaea, does it still launch a meteor shower?
GoodGame Apr 10, 2009, 12:26 AM Cephalo, Can you make a option that forces Panageas (maybe by placing continents closer together, and linking them with an island archipelago, as a failsafe)? I prefer them sometimes. Thanks :)
cephalo Apr 10, 2009, 09:12 AM Cephalo, Can you make a option that forces Panageas (maybe by placing continents closer together, and linking them with an island archipelago, as a failsafe)? I prefer them sometimes. Thanks :)
If you allow pangaeas, and then turn up the land percent a few notches, you are almost sure to get a pangaea. It's kinda hard to control really.
cephalo Apr 10, 2009, 09:13 AM If you allow pangaea, does it still launch a meteor shower?
No, it skps that and probably won't take as long to generate.
GoodGame Apr 11, 2009, 02:40 PM If you allow pangaeas, and then turn up the land percent a few notches, you are almost sure to get a pangaea. It's kinda hard to control really.
Cephalo, is there a bug in the python of the current version then? The climate and sea level options are there, but greyed out.
I looked in the Python, and it looks like Climate and Sealevel options are left out also.
def getCustomMapOptionName(argsList):
"""
Returns name of specified option
argsList[0] is Option ID (int)
Return a Unicode string
"""
optionID = argsList[0]
if optionID == 0:
return "New World Rules"
elif optionID == 1:
return "Pangaea Rules"
elif optionID == 2:
return "Wrap Option"
cephalo Apr 11, 2009, 04:37 PM Cephalo, is there a bug in the python of the current version then? The climate and sea level options are there, but greyed out.
I looked in the Python, and it looks like Climate and Sealevel options are left out also.
Toward the beginning of the file there are a bunch of variables that you can adjust for different effects. LandPercentage is the first one I believe. Turn it to .30 or above, and you'll likely get pangaeas.
NwabudikeMorgan Apr 11, 2009, 05:07 PM As to the Goody huts The file is ArtDefines_Improvements.xml
change:
<fScale>1.0</fScale>
to a larger number
Bad Player Apr 13, 2009, 03:01 AM There's something like that already, here (http://forums.civfanatics.com/showthread.php?t=290694) - if you use this, it should work with any map, including PerfectWorld, I think.
Cheers, LT.
thx for the link! :)
SlightlyMad May 02, 2009, 07:43 PM Didn't there used to be a tunable variable to reduce the floodplain threshold? I love the massive deserts, but they have a tendency to have huge rivers running through them, making for way too many floodplains.
Jabarto May 07, 2009, 07:27 PM Hey, is it possible ot add new terrains to this script? I'm trying to make it work (fully; it wlaready works with no tweaking, just that some new terrains won't generate) with Rise of Mankind (which adds marshes and storms) but I have no idea where to start.
Also, is there any way to disable the grouping of resources by continent?
Ramesses May 08, 2009, 12:03 AM Hey, is it possible ot add new terrains to this script? I'm trying to make it work (fully; it wlaready works with no tweaking, just that some new terrains won't generate) with Rise of Mankind (which adds marshes and storms) but I have no idea where to start.
Also, is there any way to disable the grouping of resources by continent?
How are storms a terrain, exactly?
Jabarto May 08, 2009, 01:16 AM How are storms a terrain, exactly?
Well, they're actually a terrain feature like forests.
Ramesses May 08, 2009, 11:39 AM Well, they're actually a terrain feature like forests.
Well, I don't know about you, but I've never heard of any storm staying in a single place for 30 years (1 early game turn). How can you possibly make weather work with the way turns are set up?
Blondel58 May 09, 2009, 01:19 AM Neither do earthquakes or volcanic eruptions. I guess, it might be an incident which happens once during these 30 years. Remember Katrina in New Orleans.
Ramesses May 09, 2009, 01:35 AM Neither do earthquakes or volcanic eruptions. I guess, it might be an incident which happens once during these 30 years. Remember Katrina in New Orleans.
Oh, right, right, I see how it works. Tiles from which disasters spawn and zones surrounding the tile in which everything is at risk.
For hurricanes, you create tiles in the middle of the ocean from where full-fledged hurricanes tend to spawn, and any city within range of this ocean tile is at risk. Earthquakes would also appear around faults, and volcanoes could appear on mountains.
But I think storm features should be invisible until a disaster occurs from one (the people of Pompeii didn't know they were near a volcano until it erupted). Maybe reveal all storm features when an appropriate tech is researched, which also allows reduced damage from disasters.
achilleszero May 09, 2009, 08:44 AM Cephalo: Perfect World has instantly become my favorite map script. Probably the best map script out there. It has elevated my enjoyment of civ several times over. It is really is just about perfect, except for one thing that almost negates my gained enjoyment(for me at least). The resource placement.
I thought the way resources were split up was a great idea at first. New level of strategy, encouraging/demanding cunning trade from player and AI. However the more I played it the more I disliked it. Even playing on large maps there is never enough resources for 3/4 of the civs. Large islands will get say all the dye, maybe like 6, when there are 10 civs. Even the resources that are assigned to large continents, are too few in number. Without being available on multiple landmasses every resource gets shafted. This inturn severly stifles growth. It encourages trade but forces everyone to small cities and poor health. This feature is one of those things that is a great idea but in practice it makes the game unfun (kinda like how firaxis took out unfun but great concepts of pollution and dissappearing resources). Any civ not near or not one of the first to contact a landmass that holds a particular resource is just screwed. AI is stingy and even if they hate a civ they were trading the resource first to, they may never break the deal. Also AI cant plan like a human and realize it may never gain a certain resource so it needs to attack to do so. So it cripple's AI even more.
Is there anyway I can disable this and go back to normal resource placement
Neither do earthquakes or volcanic eruptions. I guess, it might be an incident which happens once during these 30 years. Remember Katrina in New Orleans.
30 Years seems about right, especially if you live where I do. Katrina destroyed my city and 30 som odd years ago was destroyed by the other most powerful hurricane in human history, Camille. What are the odds?!?
cephalo May 09, 2009, 03:04 PM I thought the way resources were split up was a great idea at first. New level of strategy, encouraging/demanding cunning trade from player and AI. However the more I played it the more I disliked it. Even playing on large maps there is never enough resources for 3/4 of the civs. Large islands will get say all the dye, maybe like 6, when there are 10 civs. Even the resources that are assigned to large continents, are too few in number. Without being available on multiple landmasses every resource gets shafted. This inturn severly stifles growth. It encourages trade but forces everyone to small cities and poor health. This feature is one of those things that is a great idea but in practice it makes the game unfun (kinda like how firaxis took out unfun but great concepts of pollution and dissappearing resources). Any civ not near or not one of the first to contact a landmass that holds a particular resource is just screwed. AI is stingy and even if they hate a civ they were trading the resource first to, they may never break the deal. Also AI cant plan like a human and realize it may never gain a certain resource so it needs to attack to do so. So it cripple's AI even more.
Is there anyway I can disable this and go back to normal resource placement
Well, keep in mind that my resource placement mostly tries to copy the normal code, so it is in fact normal placement in this regard. The reason you don't see it turn out that way on the factory maps is the wildly random fractal terrain generation that several factory maps are based on actually breaks this functionality.
The fact that the AI is so stingy with trading is a valid argument for changing this behavior, but most of my efforts were based on preserving the intention of the original code. All I really wanted to change was to prevent forests from blocking resources. I played this map quite a few times and I do like the difficulty in obtaining self sufficiency, so I didn't see a need to change it. It's alot of work after all! Whether it slows growth, or what the growth speed ought to be is kinda subjective.
As far as the amount of resources present, the default settings are supposed to place the amount specified in the XML along some random factors that are also in the XML. However, in the latest version of PW2, there is a variable called 'BonusBonus' that you can change to increase the amount of bonuses. Values higher than 1.0 will increase the amount that will try to be placed, so a value of 2.0 would about double the amount of resources, but it's not an exact process.
dr_s May 09, 2009, 05:29 PM @achilleszero, cephalo can correct me on this, but there's a variable in the script called areasPerBonus that I think determines how many different areas a bonus can appear in. In the default PerfectWorld script this is set to 1. I changed it to:
areasPerBonus = 1 + PRand.randint(0,1)
which makes it either 1 or 2 with a 50% probability. My experience is that this makes the bonuses more widespread. You might try playing around with that value.
achilleszero May 10, 2009, 01:11 PM The fact that the AI is so stingy with trading is a valid argument for changing this behavior, but most of my efforts were based on preserving the intention of the original code. All I really wanted to change was to prevent forests from blocking resources. I played this map quite a few times and I do like the difficulty in obtaining self sufficiency, so I didn't see a need to change it. It's alot of work after all! Whether it slows growth, or what the growth speed ought to be is kinda subjective.
As far as the amount of resources present, the default settings are supposed to place the amount specified in the XML along some random factors that are also in the XML. However, in the latest version of PW2, there is a variable called 'BonusBonus' that you can change to increase the amount of bonuses. Values higher than 1.0 will increase the amount that will try to be placed, so a value of 2.0 would about double the amount of resources, but it's not an exact process.
Yeah I was afraid it would require massive work to change and/or ruin aesthetics of the maps. Maybe also I have an older version of PW. The aspect of resources in PW that irks me is so many resources being assigned to only 1 continent (pangea maps are boring).
@achilleszero, cephalo can correct me on this, but there's a variable in the script called areasPerBonus that I think determines how many different areas a bonus can appear in. In the default PerfectWorld script this is set to 1. I changed it to:
areasPerBonus = 1 + PRand.randint(0,1)
which makes it either 1 or 2 with a 50% probability. My experience is that this makes the bonuses more widespread. You might try playing around with that value.
Thanks for tip. Will try out your suggestion now.
coffee junkie May 18, 2009, 03:47 AM Cephalo: Perfect World has instantly become my favorite map script. Probably the best map script out there. It has elevated my enjoyment of civ several times over. It is really is just about perfect, except for one thing that almost negates my gained enjoyment(for me at least). The resource placement.
Thank you for this Cephalo. Indeed :)
ayronis May 20, 2009, 02:17 PM Cephalo: Perfect World has instantly become my favorite map script. Probably the best map script out there. It has elevated my enjoyment of civ several times over. It is really is just about perfect,...
I would just like to reiterate what the above gentleman has said. This mapscript is fantastic, and it has significantly prolonged the enjoyment of my favorite game even further. It does everything I want in a mapscript. Every game is fresh. Every game is fun. Thank you Cephalo.
wanderer07 May 22, 2009, 11:21 AM This might be a dumb question, but is there any way for the script to guarantee 3 or 4 continents? I don't like how it always seems to create 2 gigantic ones instead. Otherwise I love it, I hate how the retail maps just randomly place deserts and hills everywhere.
Romaq May 23, 2009, 11:28 AM Would it be feasible to add a variable into the code that simply doubles all map sizes? It looks like you are starting with the 'largest allowed' map, and then shrinking down the results to fit the actual map size requested. My notion for the change would be to add a 'Supersize' flag in the code, that if set 'true' will simply double all map sizes across the board. And, of course, the obligatory warning in the code, "Setting this 'true' may cause the game to behave erratic or to crash on PCs with insufficient memory, or may cause game play to be so slow as to be unplayable." With that warning out of the way, and buried in the code, people who just straight run the script will not see anything unusual.
Based upon feedback and if this suggestion proves workable, perhaps the 'supersize' flag can be offered as a menu option at a later time.
Is this a mod that can be done 'cheaply'?
--Romaq
Beornhard May 24, 2009, 09:49 AM If I want to use this with TBS, I need to put the file in Civ4/Beyond the Sword/PublicMaps, right? Or it also works if I put it in Civ4/PMs?
Romaq May 24, 2009, 11:34 AM I'm making the attempt by just doubling the map size factors in hmWidth=288, hmHeight=193, then doubling all of the grid_sizes values. The problem with doing things this way, of course, is that even a 'dual' has to calculate the entire "OH MY GOD IT'S SO HUGE" doubled map, then 'shrink' the result to suit what grid size is selected. Unless you have a big, fast machine, I think most people would find just creating the map somewhere between unlikely and impossible, even for the 'dual' size.
But I'm willing to wait for results, you only calculate the map once. THEN the problem becomes the natural length between turns as you get way up in advanced. But that's a different issue that strikes no matter what. And it also comes down to finding the sweet spot between 'bigger than normal huge', but smaller than 'my computer just caught on fire'. And that's why I think such a 'feature' would have to be a toggle within the code for those bold and daring enough to see if software *can* cause a CPU to melt. :)
EDIT: It works up to the point of loading the world in, dropping starters on the map and allowing me to go into World Builder. I'm going to hack a few other things together, then start a game to see how playable it is.
EDIT2: On thinking about this, a better approach would be to make a value scale. The first part is to make the behavior of self.hmWidth and self.hmHeight consistent. That is, their values should be Width = 144 and Height = 96, according to the current script. The '+1' to self.hmHeight for wrapping should be added in the 'wrap options' code. This leaves us the following table of values:
------ Width x Height
Overall 96 x 144
Duel 12 x 8
Tiny 16 x 10
Small 22 x 14
Standard 26 x 16
Large 32 x 20
Huge 36 x 24
All I did was double all the numbers, which is great for *me*, but will punish anyone who wants a bigger map, but not THAT much larger. The smallest consistent value for 'Duel' is 6 x 4. We multiple * 2 to get the original values, so a 'standard factor' is the value 2. The factor I used is value 4. A factor of 3 will be just fine for someone who wants 'larger, but not that much larger', and a factor of 5 or higher is simple enough for those who can afford a Sun Blackbox to run Civ4 on. :)
A total rework of the scripts might allow 'x' and 'y' to be arbitrarily set, and the python need only calculate based upon the requested map size and aspect ratio, rather than calculate the largest allowed map and then scaling it down to fit the requested alloted sizes. One of the problems with my hack to the code is that even if I do not want a 'huge' map, I only want one 'small' which is slightly larger than the standard 'huge', the full-size map has to be calculated anyway.
I hope this helps, and I look forward to seeing the responses.
cephalo May 28, 2009, 08:25 PM This might be a dumb question, but is there any way for the script to guarantee 3 or 4 continents? I don't like how it always seems to create 2 gigantic ones instead. Otherwise I love it, I hate how the retail maps just randomly place deserts and hills everywhere.
It might be possible to do that, but it would be very difficult to preserve the natural looking coastlines. I don't currently know how that would be accomplished with this type of map. I think that Smart map can do this, but it uses a different genration method.
cephalo May 28, 2009, 08:33 PM EDIT2: On thinking about this, a better approach would be to make a value scale. The first part is to make the behavior of self.hmWidth and self.hmHeight consistent. That is, their values should be Width = 144 and Height = 96, according to the current script. The '+1' to self.hmHeight for wrapping should be added in the 'wrap options' code. This leaves us the following table of values:
This map uses midpoint displacement to generate the landforms, so the hmWidth and hmHeight variables have to always be evenly divisible by the hmMaxGrain variable, which must be a power of 2. The max grain blocks must be repetitively divisible by 2 all the way down to 1. i.e. 16 - 8 - 4 - 2 - 1.
cephalo May 28, 2009, 08:53 PM I just released 2.02!
I found a problem with the monsoon code that was creating those strange bands of heavy rainfall. I added an adjustment variable to make the uplift in the low pressure zones to better match the geostrophic rainfall. 99% of the monsoon rain was clustering right near the point of lowest pressure, so I evened it out.
Also, I played around with some erosion code to try and get more jungle on the map, and the result was that the lack of altitude diversity created visible latitude bands of temperature change which was not good. The effect was exactly the same as if I turned the heat loss due to high altitude off. It turns out the forces that break up those latitude bands in a nice way were the very same that greatly limited jungle. If I kept the strong altitude cooling and turned down the jungle temperature, jungles would creep up toward the arctic circle rather than moving inland. If I used weak altitude cooling to move the jungles further inland, then you would get obvious bands of pine trees and then tundra which looked pretty bad.
The solution that I think works is to add a curve to the rate of heat loss due to altitude. It allows more of these competing desires to come through. How much jungle you get still depends on other factors as well, so nothing is guaranteed. If you have no landmasses near the equator you will get very little jungle. If most of the land masses are near the equator you will get huuuge jungles. Continent configuration is still a big decider, but I think this change is a big improvement.
Romaq May 29, 2009, 08:19 AM This map uses midpoint displacement to generate the landforms, so the hmWidth and hmHeight variables have to always be evenly divisible by the hmMaxGrain variable, which must be a power of 2. The max grain blocks must be repetitively divisible by 2 all the way down to 1. i.e. 16 - 8 - 4 - 2 - 1.
Thank you for your response. :) The 'four times the area space' map I'm using works well. Would it be feasible to implement my proposal of an 'xl size multiplier' given the max grain? Even just writing out the "self.hmHeight" in the code to have +1 added in the wrapping portion of the script would be a big start in that direction. :)
I didn't tamper with the max grain blocks in my hack. I have noticed 'banding' of light and dark ocean, and it sounds as if that may be what you just fixed in your code, but I'm not clear on that. Would the interaction between the hmMaxGrain and the hmHeight/ HmWidth values preclude an easy means to make an 'xl size' map variable?
cephalo May 29, 2009, 08:39 AM Thank you for your response. :) The 'four times the area space' map I'm using works well. Would it be feasible to implement my proposal of an 'xl size multiplier' given the max grain? Even just writing out the "self.hmHeight" in the code to have +1 added in the wrapping portion of the script would be a big start in that direction. :)
I didn't tamper with the max grain blocks in my hack. I have noticed 'banding' of light and dark ocean, and it sounds as if that may be what you just fixed in your code, but I'm not clear on that. Would the interaction between the hmMaxGrain and the hmHeight/ HmWidth values preclude an easy means to make an 'xl size' map variable?
The final grid sizes can be any size smaller than the heightmap size. The heightmap size has to be multiples of the max grain. If you double the hm size, and leave the hmMaxGrain, you will get a map with smaller, more numerous continents, and continent shapes that are more irregular. If you want the same feel, but double the size, you might double the hmMaxGrain to 32. It's all subjective.
The problem with playing on a map that huge is that it makes for a loooooong game, where you are taking very long turns moving gigantic armies. I kinda like big maps, and the default PW maps are already quite a bit bigger than the stock maps. Doubling them would be way to much game for me, that's for sure! :D
There shouldn't be any dark ocean unless you are using a mod. Seven05's World Piece mod actually has a 'deep ocean' that looks pretty cool with PW, but the normal game only has coast and ocean. Coast simply follows the coast, there shouldn't be any banding in the water.
[to_xp]Gekko May 29, 2009, 08:38 PM the last version is very much nearing perfection :D
the only thing I'd like to see changed is the way ice works in toroidal maps... right now, sometimes all the land clumps in the southern/northern portion of the map, which means there's a lot of ice and tundra and little useful land...
also, ice instead of creating a stripe should be more or less circular to look like a pole imho. the way it's done in Seven05's Erebus Continent is great, climate even gets warmer as you move to east/west from the pole, so snow clumps in the middle of the map and tundra tends to sorround it.
Romaq May 30, 2009, 01:42 AM Again, thank you for your response. Yes, it does make for a rather long game. I'll follow your suggestion of doubling the grain value. :)
Navee May 31, 2009, 07:14 PM This script is great, I can't find much wrong with it, but there is one fairly major bug.
Perfectworld2 does not work in multiplayer. It generates a huge flat grassland with interspersed rivers for the entire world. After checking this thread I have only seen a couple of passing mentions to this, so I'm not even sure if you are aware of it.
If it is at all possible to fix this script for multiplayer, that would be great. I suppose you can generate a map in singleplayer and then load it up in multiplayer, but that is kind of a hassle. Otherwise, it is pretty darn near, well, perfect.
cephalo May 31, 2009, 08:21 PM This script is great, I can't find much wrong with it, but there is one fairly major bug.
Perfectworld2 does not work in multiplayer. It generates a huge flat grassland with interspersed rivers for the entire world. After checking this thread I have only seen a couple of passing mentions to this, so I'm not even sure if you are aware of it.
If it is at all possible to fix this script for multiplayer, that would be great. I suppose you can generate a map in singleplayer and then load it up in multiplayer, but that is kind of a hassle. Otherwise, it is pretty darn near, well, perfect.
It should work in multiplayer unless I introduced a new bug. If you could check the PythonErr.log that would be helpful. Usually when I mess up multiplayer it causes a synch error. All grassland is an actual map crash, usually caused by something else.
Navee Jun 01, 2009, 12:40 PM Any size from duel to huge causes the grassland if I start it in multiplayer. That includes just starting a DIP game with an AI which is what I am doing to test.
I can start in single player with no problems, then load that game in multiplayer with no problems.
PythonErr.log has quite a few errors involving Perfectworld, the file is attached. (txt format to agree with the forum)
cephalo Jun 01, 2009, 01:06 PM Any size from duel to huge causes the grassland if I start it in multiplayer. That includes just starting a DIP game with an AI which is what I am doing to test.
I can start in single player with no problems, then load that game in multiplayer with no problems.
PythonErr.log has quite a few errors involving Perfectworld, the file is attached. (txt format to agree with the forum)
Yeah, I'll have to fix this. Thanks for the error file. I think the problem is that I'm initializing the map constants in a weird place so that the choices you make for those will reflect the defaults in the map. Maybe the multiplayer setup doesn't call things in the same order. I definately want this to work in MP. I'm guessing I broke it in 2.01.
|
|