Sid Meier's Civilization V

Sid Meier's Civilization V

PerfectWorld3 - Updated
Bobert13  [developer] 23 Aug, 2013 @ 12:45pm
Presets. Now taking submissions!
One thing I've been wanting to implement for some time is presets. You, the users, could help expedite this process by submitting your own preset! I've already got two continents presets (Cephalo's and my own) so, unless I'm just floored by the results, I probably won't accept any more of those.

What's planned:
User-Defined (using the main constants)
Continents (by Cephalo)
Continents (by Bobert13)
Terra (Needs to roll at least one huge continent every time to give everyone some leg room)
Pangaea (This one seems like it would be the trickiest)
Small Continents/Large Islands (self explanatory)
Other (surprise me!)

I don't feel like Small Islands or Archipelago would benefit from being rolled with Perfect World's script so I probably won't include them.

To submit a preset, simply tell me which category your preset falls under and then copy and paste everything in the main constants to your post.
< >
Showing 1-8 of 8 comments
Bobert13  [developer] 23 Aug, 2013 @ 12:50pm 
To get this thread started, I'll go ahead and share my continents preset. If you guys would like to give this a test, simply place a block comment (--[[ to open; ]] to close) around the existing main constants (above the line that states "Below are map constants that should not be altered.") and then copy and paste my configuration to your script.

Continents:

------------------------------------------------------------------------------------------- --Landmass constants ------------------------------------------------------------------------------------------- mconst.landPercent = 0.30 --Percent of land tiles on the map. mconst.hillsPercent = 0.60 --Percent of dry land that is below the hill elevation deviance threshold. mconst.mountainsPercent = 0.94 --Percent of dry land that is below the mountain elevation deviance threshold. mconst.mountainWeight = 0.7 --Weight of the mountain elevation map versus the coastline elevation map. --Adjusting these frequences will generate larger or smaller landmasses and features. Default frequencies for map of width 128. mconst.twistMinFreq = 0.02 --Recommended range:[0.02 to 0.1] Lower values result in more blob-like landmasses, higher values make more stringy landmasses, even higher values results in lots and lots of islands. mconst.twistMaxFreq = 0.055 --Recommended range:[0.03 to 0.3] Lower values result in Pangeas, higher values makes continental divisions and stringy features more likely, and very high values result in a lot of stringy continents and islands. mconst.twistVar = 0.14 --Recommended range:[0.01 to 0.3] Determines the deviation range in elevation from one plot to another. Low values result in regular landmasses with few islands, higher values result in more islands and more variance on landmasses and coastlines. mconst.mountainFreq = 0.4 --Recommended range:[0.1 to 0.8] Lower values make large, long, mountain ranges. Higher values make sporadic mountainous features. --These attenuation factors lower the altitude of the map edges. This is currently used to prevent large continents in the uninhabitable polar regions. mconst.northAttenuationFactor = 0.80 mconst.northAttenuationRange = 0.10 --percent of the map height. mconst.southAttenuationFactor = 0.80 mconst.southAttenuationRange = 0.10 --percent of the map height. --East/west attenuation is set to zero, but modded maps may have need for them. mconst.eastAttenuationFactor = 0.0 mconst.eastAttenuationRange = 0.0 --percent of the map width. mconst.westAttenuationFactor = 0.0 mconst.westAttenuationRange = 0.0 --percent of the map width. --Hex maps are shorter in the y direction than they are wide per unit by this much. We need to know this to sample the perlin maps properly so they don't look squished. local W,H = Map.GetGridSize() mconst.YtoXRatio = math.sqrt(W/H) ------------------------------------------------------------------------------------------- --Terrain type constants ------------------------------------------------------------------------------------------- mconst.desertPercent = 0.30 --Percent of land that is below the desert rainfall threshold. mconst.desertMinTemperature = 0.31 --Coldest absolute temperature allowed to be desert, plains if colder. mconst.plainsPercent = 0.50 --Percent of land that is below the plains rainfall threshold. mconst.tundraTemperature = 0.33 --Absolute temperature below which is tundra. mconst.snowTemperature = 0.26 --Absolute temperature below which is snow. mconst.simpleCleanup = false --Turns parts of the terrain matching function on or off. ------------------------------------------------------------------------------------------- --Terrain feature constants ------------------------------------------------------------------------------------------- mconst.zeroTreesPercent = 0.50 --Percent of land that is below the rainfall threshold where no trees can appear. mconst.treesMinTemperature = 0.28 --Coldest absolute temperature where trees appear. mconst.junglePercent = 0.88 --Percent of land below the jungle rainfall threshold. mconst.jungleMinTemperature = 0.66 --Coldest absolute temperature allowed to be jungle, forest if colder. mconst.riverPercent = 0.15 --percent of river junctions that are large enough to become rivers. mconst.riverRainCheatFactor = 1.6 --This value is multiplied by each river step. Values greater than one favor watershed size. Values less than one favor actual rain amount. mconst.minRiverSize = 24 --Helps to prevent a lot of really short rivers. Recommended values are 15 to 40. -Bobert13 mconst.minOceanSize = 5 --Fill in any lakes smaller than this. It looks bad to have large river systems flowing into a tiny lake. --mconst.marshPercent = 0.92 --(Defunct) Percent of land below the jungle marsh rainfall threshold. mconst.marshElevation = 0.07 --Percent of land below the lowlands marsh threshold. mconst.OasisThreshold = 7 --Maximum food around a tile for it to be considered for an Oasis -Bobert13 mconst.atollNorthLatitudeLimit = 47 --Northern Atoll latitude limit. mconst.atollSouthLatitudeLimit = -47 --Southern Atoll latitude limit. mconst.atollMinDeepWaterNeighbors = 4 --Minimum nearby deeap water tiles for it to be considered for an Atoll. mconst.iceNorthLatitudeLimit = 60 --Northern Ice latitude limit. mconst.iceSouthLatitudeLimit = -60 --Southern Ice latitude limit. ------------------------------------------------------------------------------------------- --Weather constants ------------------------------------------------------------------------------------------- --Important latitude markers used for generating climate. mconst.polarFrontLatitude = 65 mconst.tropicLatitudes = 23 mconst.horseLatitudes = 31 mconst.topLatitude = 70 mconst.bottomLatitude = -70 --These set the water temperature compression that creates the land/sea seasonal temperature differences that cause monsoon winds. mconst.minWaterTemp = 0.10 mconst.maxWaterTemp = 0.50 --Strength of geostrophic climate generation versus monsoon climate generation. mconst.geostrophicFactor = 3.0 mconst.geostrophicLateralWindStrength = 0.4 --Crazy rain tweaking variables. I wouldn't touch these if I were you. mconst.minimumRainCost = 0.0001 mconst.upLiftExponent = 4 mconst.polarRainBoost = 0.00 mconst.pressureNorm = 0.90 --[1.0 = no normalization] Helps to prevent exaggerated Jungle/Marsh banding on the equator. -Bobert13
Last edited by Bobert13; 28 Aug, 2013 @ 5:20pm
Typhos 28 Aug, 2013 @ 4:46pm 
I attempted to use your presets for Continents, but every time I load into a game with that set of variables, the game ends on turn 1 with a defeat without finding a starting location. I'm not sure if something is missing or a value is misplaced, but it doesn't appear to work.
Bobert13  [developer] 28 Aug, 2013 @ 5:18pm 
Originally posted by Typhos:
I attempted to use your presets for Continents, but every time I load into a game with that set of variables, the game ends on turn 1 with a defeat without finding a starting location. I'm not sure if something is missing or a value is misplaced, but it doesn't appear to work.

I was missing a setting, but even without it being defined, I got no crash nor error because the script should just pull "nil". I've updated my post to include the missing setting.

Did you comment out the constants below "Below are map constants that should not be altered."? If so, that's the issue. Those should not be altered! =P
Typhos 28 Aug, 2013 @ 5:22pm 
No, I didn't comment out those settings. I actually ran the two through WinMerge just to check the differences. It seemed the only thing different between them (besides the various values) was the "mconst.simpleCleanup = true" constant.

Unless that constant breaks the map script, I'm not sure what else would do it. If the values work for you, there's not much of a reason. Hence my confusion. D:

After some further work, it appears the issue is the comments themselves. The map script .lua doesn't seem to like them. When I manually replaced the default values with your new values, the game had no issue at all. Something to keep in mind, I guess.
Last edited by Typhos; 28 Aug, 2013 @ 5:33pm
Bobert13  [developer] 28 Aug, 2013 @ 5:33pm 
Could you get me an lua.log of the crash? Alternatively, (if you have the Civ V SDK installed), a printscreen of the error message and surrounding text in either FireTuner's lua console or the WorldBuilder's debug window should be sufficient.

How you were commenting the default settings was your issue?

Edit: Apparently Steam's forums don't like the string comment... I'd post a "proper usage" example but it won't let me O.o I've used the block comment in a number of places throughout the script so I know they work.

Example and explanation of the block comment in Lua[www.lua.org].
Last edited by Bobert13; 28 Aug, 2013 @ 5:59pm
Typhos 28 Aug, 2013 @ 6:08pm 
Thanks for the link, that made my issue very clear. It was the comment tags. I was using [[ instead of --[[ and same on the other end. The wonders of programming languages.
Batrach 9 Jan, 2022 @ 10:41am 
Ancient thread, but for those still playing civ in 2022 here is my preset: Comes close to Pangea sometimes, usually one or two big continents and a few smaller landmasses.

-------------------------------------------------------------------------------- --PerfectWorld3.lua map script (c)2010 Rich Marinaccio --Updated by Bobert13 --version 5 -------------------------------------------------------------------------------- --This map script uses various manipulations of Perlin noise to create --landforms, and generates climate based on a simplified model of geostrophic --and monsoon wind patterns. Rivers are generated along accurate drainage paths --governed by the elevation map used to create the landforms. -- --Version History -- 5b -Fixed and Optimized SiltifyLakes(). Purged the first random number after seeding. -- -- 5a -Fixed the possibility rivers that can't path to a body of water. Minor bugfixes. -- Adjusted YtoX Ratio used in landmass generation. -- -- 5 - Highly optimized with fixes ranging from Oasis placement to crashes. -- -- 4 - A working version of v3 -- -- 3 - Placed Atolls. Shrank the huge map size based on advice from Sirian. -- -- 2 - Shrank the map sizes except for huge. Added a better way to adjust river -- lengths. Used the continent art styles in a more diverse way. Cleaned up the -- mountain ranges a bit. -- --1 - initial release! 11/24/2010 include("MapGenerator"); include("FeatureGenerator"); include("TerrainGenerator"); MapConstants = {} Time = nil function MapConstants:New() local mconst = {} setmetatable(mconst, self) self.__index = self ------------------------------------------------------------------------------------------- --Landmass constants ------------------------------------------------------------------------------------------- mconst.landPercent = 0.29 --Percent of land tiles on the map. mconst.hillsPercent = 0.50 --Percent of dry land that is below the hill elevation deviance threshold. mconst.mountainsPercent = 0.85 --Percent of dry land that is below the mountain elevation deviance threshold. mconst.mountainWeight = 0.7 --Weight of the mountain elevation map versus the coastline elevation map. --Adjusting these frequences will generate larger or smaller landmasses and features. Default frequencies for map of width 128. mconst.twistMinFreq = 0.02 --Recommended range:[0.02 to 0.1] Lower values result in more blob-like landmasses, higher values make more stringy landmasses, even higher values results in lots and lots of islands. mconst.twistMaxFreq = 0.02 --Recommended range:[0.03 to 0.3] Lower values result in Pangeas, higher values makes continental divisions and stringy features more likely, and very high values result in a lot of stringy continents and islands. mconst.twistVar = 0.052 --Recommended range:[0.01 to 0.3] Determines the deviation range in elevation from one plot to another. Low values result in regular landmasses with few islands, higher values result in more islands and more variance on landmasses and coastlines. mconst.mountainFreq = 0.078 --Recommended range:[0.1 to 0.8] Lower values make large, long, mountain ranges. Higher values make sporadic mountainous features. --These attenuation factors lower the altitude of the map edges. This is currently used to prevent large continents in the uninhabitable polar regions. mconst.northAttenuationFactor = 0.1 mconst.northAttenuationRange = 0.0 --percent of the map height. mconst.southAttenuationFactor = 0.1 mconst.southAttenuationRange = 0.0 --percent of the map height. --East/west attenuation is set to zero, but modded maps may have need for them. mconst.eastAttenuationFactor = 0.0 mconst.eastAttenuationRange = 0.0 --percent of the map width. mconst.westAttenuationFactor = 0.0 mconst.westAttenuationRange = 0.0 --percent of the map width. --Hex maps are shorter in the y direction than they are wide per unit by this much. We need to know this to sample the perlin maps properly so they don't look squished. local W,H = Map.GetGridSize() mconst.YtoXRatio = math.sqrt(W/H) ------------------------------------------------------------------------------------------- --Terrain type constants ------------------------------------------------------------------------------------------- mconst.desertPercent = 0.35 --Percent of land that is below the desert rainfall threshold. mconst.desertMinTemperature = 0.34 --Coldest absolute temperature allowed to be desert, plains if colder. mconst.plainsPercent = 0.54 --Percent of land that is below the plains rainfall threshold. mconst.tundraTemperature = 0.30 --Absolute temperature below which is tundra. mconst.snowTemperature = 0.25 --Absolute temperature below which is snow. mconst.simpleCleanup = true --Turns parts of the terrain matching function on or off. ------------------------------------------------------------------------------------------- --Terrain feature constants ------------------------------------------------------------------------------------------- mconst.zeroTreesPercent = 0.29 --Percent of land that is below the rainfall threshold where no trees can appear. mconst.treesMinTemperature = 0.26 --Coldest absolute temperature where trees appear. mconst.junglePercent = 0.65 --Percent of land below the jungle rainfall threshold. mconst.jungleMinTemperature = 0.69 --Coldest absolute temperature allowed to be jungle, forest if colder. mconst.riverPercent = 0.19 --percent of river junctions that are large enough to become rivers. mconst.riverRainCheatFactor = 2.6 --This value is multiplied by each river step. Values greater than one favor watershed size. Values less than one favor actual rain amount. mconst.minRiverSize = 16 --Helps to prevent a lot of really short rivers. Recommended values are 15 to 40. -Bobert13 mconst.minOceanSize = 5 --Fill in any lakes smaller than this. It looks bad to have large river systems flowing into a tiny lake. --mconst.marshPercent = 0.92 --(Deprecated) Percent of land below the jungle marsh rainfall threshold. mconst.marshElevation = 0.22 --Percent of land below the lowlands marsh threshold. mconst.OasisThreshold = 1 --Maximum fertility around a tile for it to be considered for an Oasis -Bobert13 mconst.atollNorthLatitudeLimit = 20 --Northern Atoll latitude limit. mconst.atollSouthLatitudeLimit = -20 --Southern Atoll latitude limit. mconst.atollMinDeepWaterNeighbors = 4 --Minimum nearby deeap water tiles for it to be considered for an Atoll. mconst.iceNorthLatitudeLimit = 60 --Northern Ice latitude limit. mconst.iceSouthLatitudeLimit = -60 --Southern Ice latitude limit. ------------------------------------------------------------------------------------------- --Weather constants ------------------------------------------------------------------------------------------- --Important latitude markers used for generating climate. mconst.polarFrontLatitude = 60 mconst.tropicLatitudes = 23 mconst.horseLatitudes = 38 mconst.topLatitude = 70 mconst.bottomLatitude = -70 --These set the water temperature compression that creates the land/sea seasonal temperature differences that cause monsoon winds. mconst.minWaterTemp = 0.10 mconst.maxWaterTemp = 0.60 --Strength of geostrophic climate generation versus monsoon climate generation. mconst.geostrophicFactor = 3.0 mconst.geostrophicLateralWindStrength = 0.6 --Crazy rain tweaking variables. I wouldn't touch these if I were you. mconst.minimumRainCost = 0.0001 mconst.upLiftExponent = 4 mconst.polarRainBoost = 0.00 mconst.pressureNorm = 0.90 --[1.0 = no normalization] Helps to prevent exaggerated Jungle/Marsh banding on the equator. -Bobert13
Last edited by Batrach; 9 Jan, 2022 @ 10:41am
Bobert13  [developer] 9 Jan, 2022 @ 11:20am 
Awesome to see this thread getting used. I probably won't be pushing out an update ever though.
< >
Showing 1-8 of 8 comments
Per page: 1530 50