PerfectWorld3

Okay, I'll just wait for them to reply then. But in the meantime I could work in PW3 a bit. :) I noticed that increasing the mountain frequency only puts gaps in mountain ranges, unless you set it really high but then there would be isolated mountains all over the place. Is there no way I can get a few larger mountain ranges and some smaller ones with a lot of land between? Preferably narrow mountain ranges. I don't need whole areas of mountains. Also if I can make the hill script only place some hills near mountains and not so predictable, it would be perfect.
 
Okay, I'll just wait for them to reply then. But in the meantime I could work in PW3 a bit. :) I noticed that increasing the mountain frequency only puts gaps in mountain ranges, unless you set it really high but then there would be isolated mountains all over the place. Is there no way I can get a few larger mountain ranges and some smaller ones with a lot of land between? Preferably narrow mountain ranges. I don't need whole areas of mountains. Also if I can make the hill script only place some hills near mountains and not so predictable, it would be perfect.

I personally don't even use the hill stuff in my own version. Somebody asked because they wanted it so I wrote a snippet and told him where to place it. 4 out of 6 or so tiles next to mountains are already hills due to the way elevation is generated. A lot of mountain placement is RNG though what typically happens is there's only one or two ranges on a large map but they're insane. They stretch the height of the continent with no passes and are often two or even three tiles wide in places. Reducing the mountain percent usually results in one insane mountain range instead of two.

It's really just a matter of getting the mountain frequencey setting where you like it and even then RNG is the dominant factor. You could try playing with the other relevant settings (twistVar, twistMaxFreq and mountainWeight) but those are going to affect landmass generation in general just as much, if not more, than they're going to affect mountains. Mountain ranges are a large part of why I started work on plate tectonics before I went on hiatus :mischief:. That work is nowhere near complete nor do I have intentions to start back on it in the near future. Between living, playing other games, and working on another project I don't really have enough spare time for it right now.

Edit: Keep in mind that you can get very finite with the frequency settings. If 0.1 is too low and 0.2 is too high, you could try 0.15 or 0.175, or 0.314592659.
 
I'm getting close to the map I want now. Just two more things. Is there a way to keep land from not being generated close to the upper and lower edges? This might be random but I get a lot of maps where the continent touches the ice. I would also like the whole map to have the European tileset. That shouldn't be too hard, right? ;)

Thanks for all the help so far.
 
The attenuation factors and attenuation percentages. The percentages do not scale very well from tiny to huge maps though (1 tile on a tiny map is like 12 percent or something; that's like 5 tiles on a huge map).

To make the whole map European, I'd suggest replacing the entire function DetermineContinents() with the following:

Code:
function DetermineContinents()
	for y=0,elevationMap.height - 1,1 do
		for x=0,elevationMap.width - 1,1 do
			local plot = Map.GetPlot(x,y)
			if plot:IsWater() then
				plot:SetContinentArtType(0)
			else
				plot:SetContinentArtType(4)
			end
		end
	end
end

LOL, I just re-read the comments at the top of that function, and it already contains equivalent code to what I just posted as an example... Just do a block comment ("--[[" to open, and "]]--" to close) around all of the current stuff Cephalo has in there and then uncomment the example.
 
...

Is anybody still reading? :hatsoff:

Yes :) Have to spool through that tomorrow. Great post. Please do upload a version of PW with your edits when you feel it's ready. I'm sure everyone would appreciate the work.

And thanks for reminding me to try the optimized Lua compiler with CiV. I recall not having so much success with other games (Shogun:TW comes to mind), but that could very well have been due to mods using older lua conventions.

Concerning DeepSoul's snowy hill problem, isn't that just a case of a high value for the map constant not being able to accommodate the elevation map in spots? I can reproduce that pretty consistently by setting mconst.mountainsPercent = .99 . The tiles would become hills (if they weren't already) with the snow/tundra border check.
 
Yes :) Have to spool through that tomorrow. Great post. Please do upload a version of PW with your edits when you feel it's ready. I'm sure everyone would appreciate the work.

And thanks for reminding me to try the optimized Lua compiler with CiV. I recall not having so much success with other games (Shogun:TW comes to mind), but that could very well have been due to mods using older lua conventions.

Concerning DeepSoul's snowy hill problem, isn't that just a case of a high value for the map constant not being able to accommodate the elevation map in spots? I can reproduce that pretty consistently by setting mconst.mountainsPercent = .99 . The tiles would become hills (if they weren't already) with the snow/tundra border check.

JIT is well worth it for vanilla CiV, and even more so if you run Lua-heavy mods. As previously stated there's a statically linked .dll of LuaJIT already compiled here on the forums (I think it's in the utilities sub-section). You just back up the original .dll and extract the JIT.dll from that post.

I do know the awkward snow tiles are getting called snow due to the temperature map generation however I've produced some extremely strange results... Try dropping the TwistVar to something extremely low (like 0.001) and then setting the mountainWeight to zero and you should see some craziness :p.

Attached is my WIP version of PW3 before I started anything regarding plate tectonics (I hope). It includes a myriad of changes (including atoll placement, oasis placement, much stricter regulation of terrain types [no desert hills completely surrounded by grasslands for example] and god-knows what else :D). There's a lot of things I've never really brought up here because their implementation is on a much larger scope than what can be communicated in a forum post. Let me know if it's doing something strange or not working at all or something as I didn't test before packing and uploading.

The attached thumbnail is a comparison between this file and PW3(v4) in Notepad++. Blue is code that the two files have in common, the other colors aren't. :lol:
 

Attachments

  • PerfectWorld3.7z
    PerfectWorld3.7z
    20.4 KB · Views: 99
  • comparison.png
    comparison.png
    7.5 KB · Views: 162
The attenuation factors and attenuation percentages. The percentages do not scale very well from tiny to huge maps though (1 tile on a tiny map is like 12 percent or something; that's like 5 tiles on a huge map).

That just moves the edges of the map. It doesn't put a restricted zone close to the edges. What is the difference between attenuation factor and range btw?

I have tested your version and the cleanup feature works well but the problems with the PW3 landmass generation is still there. I have been tweaking it for hours and it's impossible to get decent looking continents with some archipelago on the side like Terra or Continents Plus. Either you get a lot of fractals or you get blobs with ring-formed mountain ranges. Between that, it's just a random mess really. It seems like you had New Zealand as an inspiration when making this, or it's just the Perlin script that is flawed. I think this map would benefit from having ocean rifts to more clearly separate landmasses from each other.

But I should mention the good bits too if I didn't do that already. This map has excellent rivers and climate zones, and that's why I got interested in the first place. If you take out just a piece of the map it can look really good.

These are the values I tried with last:

mconst.twistMinFreq = 0.0002 -- Had to go this low to reduce the stringy shapes.
mconst.twistMaxFreq = 0.050
mconst.twistVar = 0.1
mconst.mountainFreq = 0.1
 
The factor is the strength by which it attenuates. I believe higher numbers result in less land (too high and you'll get straight edges on the tops and bottoms of landmasses pretty often). The percent controls how much of the map to attenuate. I thought about possibly implementing Y-shifting at one point but that requires generating an Elevation map that wraps at both the X and Y seams. I know it's possible because the Pangaea script already does exactly this, but it could be a lot of work, especially considering I'd be messing with my tectonics implementation, and I'd have to figure out how to get some of the utility functions the script relies on to wrap (the spiral iterator in particular).

The funny thing is the big reasons why I'm not happy with my tectonics right now are A) it's too blocky; there's no features that resemble Mexico or South America at all; and B) it's got some issues with variation; sometimes there's lots of coastal and deep-water island chains, sometimes there's two 1-tile islands on the whole 128x80 map.
 
I thought the biggest problem with it was the uniform mountain ranges. They often split a continent in two and tend to have the same shape, making it too obvious where the plates are. A tectonic plate only has rough mountains on one side and there can be old mountains from previous collision in the middle, like the Urals in Russia. I think it could become a viable option if you reduced the mountains on the side that is drifting away from the other continent. I don't know about the islands though. Haven't seen it myself but it might be a good idea to take the island script from PW3. The tectonics doesn't have to be ultra-realistic as long as it looks good.
 
Here is a new version of Perfect World, based on the VEM (Vanilla Enhanced Mod by Thalassicus) version, which I called Perfect World 4.0.:)
I updated the file according to this thread, but did some other things as well:

4.1.1 (by Temudjin) [12.Aug.2013]
- New: add entry to custom option. Water Proportions now (80%, 72%, 67%, 50%, 33%, 20%, 13%)
- New: add method to show map-data in a readable way
- New: add custom AddLakes(), which sometimes produces size 2 lakes, great oasis, or hot springs
- New: add MapStatistics() to check final result
- Change: new method of generating polar ice
- Change: small polar lakes are ice free now
- Change: river deltas are now ice free
- Change: water resources have now ice free surroundings
- Change: make river tiles more rainy
- Change: add additional sanity checks (desert near poles, snow/tundra in tropics)
- Change: kill some lengthy terrain stripes/lines
- Change: adjust some parameters for various custom options
- Prettify: produce additional foothills between flat and peak

4.1 (by Temudjin) [30.Mar.2013]
- Fix: Prevent exaggerated Jungle/Marsh banding on the equator (with Bobert13)
- Fix: PWRandSeed() viability (with Jaii der Herr and Bobart13)
- Fix: Shift map to avoid boundary issues at seam (Bobart13)
- Fix: Atolls again depend on mc.atoll... constants
- Fix: Kill coastal rivers of length 1
- New: Custom Option: Water Proportion (80%, 72%, 67%, 50%, 33%, 20%)
NOTE: default number of civs is for 72%/67% - you want less civs for 80%, more civs for 33%/20%
- New: Custom Option: World Boundaries (N.Hemisphere, Normal, S.Hemisphere, Tropic, Polar)
NOTE: you definitely want less civs for Polar
- Change: fewer Oasis (with Jaii der Herr and Bobart13)
- Change: Latitude conversions: y <--> lat
- gives latitudes like (-75,-45,-15,15,45,75) with no poles or equator
- varies result slightly to avoid streight lines (only y --> lat)
- Change: fewer Atolls: now about (2..4) * (WorldSize() + 2)
- Change: avoid possible patterns with ice/atoll placing and terrain fixup
- Change: utilize Map.ChangeAIMapHint() for Island / Continental maps. (Helps AI)

4.0 (updated version taken from VEM - Vanilla Enhanced Mod by Thalassicus)

It's awsome what you can do by tuning all those map constants.
My way to "reduce the stringy shapes" or "terrain stripes/lines" as I call them, is a bit more direct and not fully successful either. Hope you have fun with the additional custom options.
 

Attachments

You should look into some of the optimizations I discussed earlier in this thread. The lookup tables are defined right before PlacePossibleOasis() and first start getting filled at the end of GeneratePlotTypes(). They're used heavily throughout terrain placement, clean-up, and feature placement. IIRC the script I posted two messages back runs in like 17 seconds or something where PW3(v4) takes a little over 40 seconds (with the default .dll).

Another really big optimization I forgot to mention was changing GetRadiusAroundHex() to store the index value of a plot instead of a nested table containing (x,y) coordinates. Nine times out of ten the script wants the index value of the plot anyways and when it needs (x,y) calculating the coordinates takes far less time than dealing with nested tables. In my pseudo-code tests this method was literally three times faster than dealing with nested tables. This one probably requires the most work to implement as the script calls this function and deals with the list it returns quite a bit.

My Oasis placement is also a lot more involved than just adding a rand roll to prevent too many from getting placed. It takes a good, hard, look around the plot being considered for an Oasis and determines how baron it is. The most baron places get Oases first so they're literally getting placed in strategic locations. I shuffle the desert table before iterating on it as well to prevent patterns from forming.

I love the presets; that's something I was eventually going to look into but never got around to it. Excellent work! :goodjob:

Edit: Not a fan of the random seed tinkering by Jaii der Herr. Using all that extra stuff doesn't net any benefits at all, but it does break distribution, take 12 nanoseconds longer to calculate :p, and needlessly complicate the code. I get that the real-world chances of rolling the same map twice are pretty much negligible and that the user is basically unaffected by this stuff, but with his code in there, different numbers have different odds. With you adding the modulo after his stuff, that breaks the even distribution of randomization even more; when the number is too high, it rolls over, effectively doubling the chance to roll any number in a certain range. Map.Rand(2147483647,"") is sufficient for randomization purposes and every number between 0 and 2147483647 has the exact same chance to roll as every other number. His contribution is appreciated as it got us one step closer to having a multiplayer-ready random and he should be credited for that, but there's no need to keep his methodology since we have a simpler working random without uneven distribution.

2nd Edit: I also noticed you did not set the recalc flags where they should be set during your foothills routine. Any time you change a plot type that's already been set before, the second flag should be set to "true". I highlighted them in the snippet below:
Spoiler :
Code:
---------- Temudjin START
	print("Make additional foothills if necessary:")
	local cnt1, cnt2 = 0, 0
	local c1, c2 = 0, 0
	for i, pl in Plots(Shuffle) do
		if pl:GetPlotType() == PlotTypes.PLOT_LAND then
			local a = NumNeighborPlotsList( pl, 1, false )
			if (a[ PlotTypes.PLOT_MOUNTAIN ] >= 2) and (a[ PlotTypes.PLOT_HILLS ] == 0) then
				c1 = c1 + 1
				local dice = PWRandint(1, 100)
				if dice < (20 + a[ PlotTypes.PLOT_MOUNTAIN ] * 10) then
					pl:SetPlotType(PlotTypes.PLOT_HILLS, false, [COLOR="Red"]false[/COLOR])
					cnt1 = cnt1 + 1
				end
			end
		elseif pl:GetPlotType() == PlotTypes.PLOT_MOUNTAIN then
			local a = NumNeighborPlotsList( pl, 1, false )
			if (a[ PlotTypes.PLOT_MOUNTAIN ] < 2) and (a[ PlotTypes.PLOT_HILLS ] == 0) then
				c2 = c2 + 1
				local dice = PWRandint(1, 100)
				if dice < 20 then
					pl:SetPlotType(PlotTypes.PLOT_HILLS, false, [COLOR="Red"]false[/COLOR]) 
					cnt2 = cnt2 + 1
				end
			end
		end
	end
	print( cnt1, "/", c1, "flatlands converted to foothills" )
	print( cnt2, "/", c2, "mountains converted to foothills" )
	---------- Temudjin END

3rd Edit: There's multiple places where Cephalo also makes this mistake in PW3 so you should go through your file and make sure you get them all. How the devs handle recalc is kindof silly but it's what we've got to work with. They should have just added a check to see if the plot had been set before during SetPlotType and recalced on the fly... That or just made two functions, SetPlotType and ChangePlotType.
 
@bobert13

So, took a brief look at your script. I like a lot of what's in Cleanup(), in particular the stray desert removal and marsh placement. I find I'd rather have a convincing looking map than something that's strictly balanced for gameplay (and deal with subsequent tile balancing outside of the script).

I see you've also elected to allow jungle on hills (instead of forcing forest), which is something I had also been playing with recently. Although, for my own taste, I've taken out the plains conversion and allow it on grass (which seems to be what most tiles will be in that temperature zone by default). Cephalo didn't like the artwork for jungle|hills|plains, and I agree that it isn't representational of tropical forest (much too dry looking). However, grass under jungle looks pretty good and what you would expect to see IRL where tropical forest canopy has large natural clearings (or man made clearings, given time for the poor soil to adapt to sunlight). It also gets regular forest away from jungle (somewhat) which looks odd with too many shades of green in close proximity. That combination certainly requires a yield adjustment though, as you get 3 :c5food: to start. I'm thinking of having jungle not increase food yield at all, or even subtract it (like it does :c5production:).

And I see even more folks coming out of the woodwork and posting their additions. Great :)

EDIT: Incidentally, does anyone recall why cephalo restricted jungle to the European tileset? Are the others that bad? Firaxis did some work recently on various tilesets (jungle included) so it might be worth looking at.
 
The jungle hills bit is pretty much a matter of taste. Honestly, both methods (allowing jungle-plains-hills and forcing forest) are noticeable eye-sores. However, I feel jungle-plains-hills is a welcome eye-sore since it helps you easily identify the hills in an area of mostly jungle (for combat or chopping/mine-building purposes). Forcing forests still looks bad (to me atleast) and makes identifying hills at-a-glance difficult as with PW3 sometimes you get a random forest surrounded by jungle :p.

As far as grasslands and balance issues go, I figure it's better to leave well-enough alone. The devs did it the way they did, and that's what works for the masses. For your personal version, I say have-at-it! but for a distributed version, there's no sense in making changes that require other mods/files for them to be balanced (even if it is an improvement to the visual appeal of the map).
:spear:

He liked European jungle the best :dunno:. I'm using the default continent art-style function in the script I posted so if it looks good there, you may want to pursue looking into using every continent's jungle art.
 
How could i increase the likelihood that 1 or both of the largest continents were "Anchored to a polar zone", meaning that they both had tundra stretching to the upper or lower limit of the map AND that hte opposite end of the map was circumnavigable by uninterrupted ocean?

Basically, that it resembled the world as we see it now. I hate that i have to cheat and glance at the map whenever i start a new game, but i hate more discovering that continents are so snakey that they span the entire north-south longitude
 
How could i increase the likelihood that 1 or both of the largest continents were "Anchored to a polar zone", meaning that they both had tundra stretching to the upper or lower limit of the map AND that hte opposite end of the map was circumnavigable by uninterrupted ocean?

Basically, that it resembled the world as we see it now. I hate that i have to cheat and glance at the map whenever i start a new game, but i hate more discovering that continents are so snakey that they span the entire north-south longitude

mconst.twistMinFreq --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 --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 --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.

These are what you're looking for. There's not really any tweakables that will outright guaranteed any of the conditions you specified, but tweaking these can at least raise the likelihood of all of them.
 
Turns out my random is flawed. Apparently Map.Rand caps at 16 bits (65535). New seed:

Code:
seed = (Map.Rand(32767,"") * 65536) + Map.Rand(65535,"")

This simulates a 31 bit random number by first making a 15 bit number, shifting it left 16 bits (* 65536) then adding a 16 bit random. I don't like it and may look into alternatives, but for now it will have to do...

P.S.: Looks like you guys have drug me back to civ maps for now... :wallbash::lol::hammer2:
 
As far as grasslands and balance issues go, I figure it's better to leave well-enough alone. The devs did it the way they did, and that's what works for the masses. For your personal version, I say have-at-it! but for a distributed version, there's no sense in making changes that require other mods/files for them to be balanced (even if it is an improvement to the visual appeal of the map).
:spear:

He liked European jungle the best :dunno:. I'm using the default continent art-style function in the script I posted so if it looks good there, you may want to pursue looking into using every continent's jungle art.

Yes, agreed... re-balancing is a giant can of worms. Just tossing the idea around as it does come closer to what I think cephalo was describing early on.

Actually, after playing a couple of opening games with your script and default continent art placement, I'm certain that the artwork has changed from the time PW was last updated. The European jungles don't sit well next to other tilesets like they may have previously. The consistency with your choice is a noticeable improvement.

One small, unrelated glitch I came across with your maps... forest and relevant resources sometimes appear on lake tiles (at least on singles).
 
One small, unrelated glitch I came across with your maps... forest and relevant resources sometimes appear on lake tiles (at least on singles).

:confused:

I've definitely never seen that. Could you get me a seed that produces this? (Or at least has a chance to, since resource generation is handled externally and never happens the same way twice due to it rolling it's own rands instead of using the seeded PWRand).
 
:confused:

I've definitely never seen that. Could you get me a seed that produces this? (Or at least has a chance to, since resource generation is handled externally and never happens the same way twice due to it rolling it's own rands instead of using the seeded PWRand).

I'll see if I can reproduce it or find one of the saves. I came across it twice on (I think) different maps. One instance had deer (which is why I noticed). Otherwise the forest is invisible, but shows in the tooltip.

EDIT:

OK, found the game and saved out the map. These show in WorldBuilder as coast with forest. There's several tiles, two of them nearby in the same row (just SE of center) and another NW of center. I generated the map in game, not in WB.

Plots (70,26), (75,26) and (52,55)

I'm not sure where to find the map seed at this point... the lua.log is overwritten. Don't see it in the civ5map file unless it's binary.

I did push some map constants around looking for more trees, mountain chains and such... but nothing wacky. Changes are highlighted:

Spoiler :
MapConstants = {}
Time = nil
function MapConstants:New()
local mconst = {}
setmetatable(mconst, self)
self.__index = self

-------------------------------------------------------------------------------------------
--Landmass constants
-------------------------------------------------------------------------------------------
mconst.landPercent = 0.31 --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.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.045 --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.1 --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.
-------------------------------------------------------------------------------------------
--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.
-------------------------------------------------------------------------------------------
--Terrain feature constants
-------------------------------------------------------------------------------------------
mconst.zeroTreesPercent = 0.25 --Percent of land that is below the rainfall threshold where no trees can appear. 50
mconst.treesMinTemperature = 0.15 --Coldest absolute temperature where trees appear. 28

mconst.junglePercent = 0.70 --Percent of land below the jungle rainfall threshold. 88
mconst.jungleMinTemperature = 0.60 --Coldest absolute temperature allowed to be jungle, forest if colder. 66

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

--#######################################################################################--
--Below are map constants that should not be altered.
--#######################################################################################--
--directions
mconst.C = 0
mconst.W = 1
mconst.NW = 2
mconst.NE = 3
mconst.E = 4
mconst.SE = 5
mconst.SW = 6

--flow directions
mconst.NOFLOW = 0
mconst.WESTFLOW = 1
mconst.EASTFLOW = 2
mconst.VERTFLOW = 3

--wind zones
mconst.NOZONE = -1
mconst.NPOLAR = 0
mconst.NTEMPERATE = 1
mconst.NEQUATOR = 2
mconst.SEQUATOR = 3
mconst.STEMPERATE = 4
mconst.SPOLAR = 5

--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.
--mconst.YtoXRatio = 1.6875/(math.sqrt(0.75) * 2)
mconst.YtoXRatio = 1.61
return mconst
end


Script is attached with the map file. Let me know if there's anything else that would be useful.
 

Attachments

Back
Top Bottom