Some map options on communitas map
I edited these because I didn't like smooth coastlines.
I think it was a success.
The continent assignment is quite wonky though:
Americas are almost nonexistent and Asia is just a few strips of tundra. The map itself is good ( for me ) but the continents are trippin
.
This is the continent map code. It looks like some people have worked hard on it. I haven't worked out the big picture enough to understand it. It kinda looks like map temp has a lot to do with continent assignment.
local continentMap = PWAreaMap:New(elevationMap.width,elevationMap.height,elevationMap.wrapX,elevationMap.wrapY)
continentMap
efineAreas(oceanMatch)
table.sort(continentMap.areaList,function (a,b) return a.size > b.size end)
--check for jungle
for y=0, elevationMap.height - 1 do
for x=0,elevationMap.width - 1 do
local i = elevationMap:GetIndex(x,y)
local area = continentMap:GetAreaByID(continentMap.data)
area.hasJungle = false
end
end
for y=0, elevationMap.height - 1 do
for x=0, elevationMap.width - 1 do
local plot = Map.GetPlot(x,y)
if plot:GetFeatureType() == FeatureTypes.FEATURE_JUNGLE then
local i = elevationMap:GetIndex(x,y)
local area = continentMap:GetAreaByID(continentMap.data)
area.hasJungle = true
end
end
end
for n=1, #continentMap.areaList do
-- if not continentMap.areaList[n].trueMatch and not continentMap.areaList[n].hasJungle then
if not continentMap.areaList[n].trueMatch then
continentMap.areaList[n].artStyle = 1 + Map.Rand(2, "Continent Art Styles - Lua") -- left out America's orange trees
end
end
for y=0, elevationMap.height - 1 do
for x=0, elevationMap.width - 1 do
local plot = Map.GetPlot(x,y)
local i = elevationMap:GetIndex(x,y)
local artStyle = continentMap:GetAreaByID(continentMap.data).artStyle
if plot:IsWater() then
plot:SetContinentArtType(contArt.OCEAN)
elseif jungleMatch(x,y) then
plot:SetContinentArtType(contArt.EUROPE)
else
plot:SetContinentArtType(contArt.AFRICA)
end
end
end
--Africa has the best looking deserts, so for the biggest
--desert use Africa. America has a nice dirty looking desert also, so
--that should be the second biggest desert.
local desertMap = PWAreaMap:New(elevationMap.width,elevationMap.height,elevationMap.wrapX,elevationMap.wrapY)
desertMap
efineAreas(desertMatch)
table.sort(desertMap.areaList,function (a,b) return a.size > b.size end)
local largestDesertID = nil
local secondLargestDesertID = nil
for n=1,#desertMap.areaList do
--if debugTime then print(string.format("area[%d] size = %d",n,desertMap.areaList[n].size)) end
if desertMap.areaList[n].trueMatch then
if largestDesertID == nil then
largestDesertID = desertMap.areaList[n].id
else
secondLargestDesertID = desertMap.areaList[n].id
break
end
end
end
for y=0,elevationMap.height - 1 do
for x=0,elevationMap.width - 1 do
local plot = Map.GetPlot(x,y)
local i = elevationMap:GetIndex(x,y)
if desertMap.data == largestDesertID then
plot:SetContinentArtType(contArt.AFRICA)
elseif desertMap.data == secondLargestDesertID then
plot:SetContinentArtType(contArt.AFRICA)
elseif plot:GetTerrainType() == TerrainTypes.TERRAIN_DESERT then
plot:SetContinentArtType(contArt.AMERICA)
end
end
end
-- Set tundra/mountains -> snowy when near to snow tiles
for y = 0, mapH-1 do
for x = 0, mapW-1 do
local plot = Map.GetPlot(x,y)
local plotTerrainID = plot:GetTerrainType()
if IsMountain(plot) then
local coldness = 0
local zone = elevationMap:GetZone(y)
if (zone == mg.NPOLAR or zone == mg.SPOLAR) then
coldness = coldness + 2
elseif (zone == mg.NTEMPERATE or zone == mg.STEMPERATE) then
coldness = coldness + 1
else
coldness = coldness - 1
end
for nearPlot in Plot_GetPlotsInCircle(plot, 1, 1) do
local nearTerrainID = nearPlot:GetTerrainType()
local nearFeatureID = nearPlot:GetFeatureType()
if IsMountain(nearPlot) then
coldness = coldness + 0.5
elseif nearTerrainID == TerrainTypes.TERRAIN_SNOW then
coldness = coldness + 2
elseif nearTerrainID == TerrainTypes.TERRAIN_TUNDRA then
coldness = coldness + 1
elseif nearTerrainID == TerrainTypes.TERRAIN_DESERT then
coldness = coldness - 1
elseif nearFeatureID == FeatureTypes.FEATURE_JUNGLE or nearFeatureID == FeatureTypes.FEATURE_MARSH then
coldness = coldness - 8
end
end
for nearPlot in Plot_GetPlotsInCircle(plot, 2, 2) do
if IsMountain(nearPlot) then
coldness = coldness + 0.25
end
end
-- Avoid snow near tropical jungle
if coldness >= 1 then
for nearPlot in Plot_GetPlotsInCircle(plot, 2, 3) do
local nearFeatureID = nearPlot:GetFeatureType()
if nearFeatureID == FeatureTypes.FEATURE_JUNGLE or nearFeatureID == FeatureTypes.FEATURE_MARSH then
coldness = coldness - 8 / math.max(1, Map.PlotDistance(x, y, nearPlot:GetX(), nearPlot:GetY()))
end
end
end
if coldness >= 7 then
--plot:SetTerrainType(TerrainTypes.TERRAIN_SNOW, false, true)
plot:SetContinentArtType(contArt.EUROPE)
elseif coldness >= 1 then
--plot:SetTerrainType(TerrainTypes.TERRAIN_TUNDRA, false, true)
plot:SetContinentArtType(contArt.AMERICA)
elseif coldness >= 0 then
--plot:SetTerrainType(TerrainTypes.TERRAIN_PLAINS, false, true)
plot:SetContinentArtType(contArt.ASIA)
else
--plot:SetTerrainType(TerrainTypes.TERRAIN_PLAINS, false, true)
plot:SetContinentArtType(contArt.AFRICA)
end
elseif plotTerrainID == TerrainTypes.TERRAIN_TUNDRA then
local coldness = 0
for nearPlot in Plot_GetPlotsInCircle(plot, 1, 1) do
local nearTerrainID = nearPlot:GetTerrainType()
local nearFeatureID = nearPlot:GetFeatureType()
if nearTerrainID == TerrainTypes.TERRAIN_SNOW then
coldness = coldness + 5
elseif nearTerrainID == TerrainTypes.TERRAIN_TUNDRA then
coldness = coldness + 1
elseif nearTerrainID == TerrainTypes.TERRAIN_DESERT or nearFeatureID == FeatureTypes.FEATURE_JUNGLE or nearFeatureID == FeatureTypes.FEATURE_MARSH then
coldness = coldness - 2
end
end
for nearPlot in Plot_GetPlotsInCircle(plot, 2, 2) do
if nearTerrainID == TerrainTypes.TERRAIN_DESERT or nearFeatureID == FeatureTypes.FEATURE_JUNGLE or nearFeatureID == FeatureTypes.FEATURE_MARSH then
coldness = coldness - 1
end
end
if coldness >= 5 then
if plot:GetFeatureType() == FeatureTypes.FEATURE_FOREST then
plot:SetContinentArtType(contArt.ASIA)
else
plot:SetContinentArtType(contArt.EUROPE)
end
else
plot:SetContinentArtType(contArt.AFRICA)
end
elseif plotTerrainID == TerrainTypes.TERRAIN_SNOW then
plot:SetContinentArtType(contArt.EUROPE)
end
end
end
end
Lol the forum changed a bit of a line at the start to a smiley -TnK
Thalassicus (Victor Isbell)
I think that this guy did a lot of the work on it. He is credited with ocean rifts, rivers through lakes, natural wonder placement, resource placement, map options, inland seas, & aesthetic polishing. Idk who he is but apparently he is a big deal. I don't want to undo these guys work on this script.... but the pictures don't lie. They are a good representation of what usually is built. And on standard settings there is mostly Africa.
Second Run:
And it's continent map.
I think it's a better map. But still, all Africa.
Spoiler :
--Adjusting these will generate larger or smaller landmasses and features.
mglobal.landMinScatter = 0.132 --Recommended range:[0.02 to 0.1]
mglobal.landMaxScatter = 0.29 --Recommended range:[0.03 to 0.3]
--Higher values makes continental divisions and stringy features more likely,
--and very high values result in a lot of stringy continents and islands.
mglobal.coastScatter = 0.367 --Recommended range:[0.01 to 0.3]
--Higher values result in more islands and variance on landmasses and coastlines.
mglobal.mountainScatter = 455 * mapW --Recommended range:[130 to 1000]
--Lower values make large, long, mountain ranges. Higher values make sporadic mountainous features.
mglobal.landMinScatter = 0.132 --Recommended range:[0.02 to 0.1]
mglobal.landMaxScatter = 0.29 --Recommended range:[0.03 to 0.3]
--Higher values makes continental divisions and stringy features more likely,
--and very high values result in a lot of stringy continents and islands.
mglobal.coastScatter = 0.367 --Recommended range:[0.01 to 0.3]
--Higher values result in more islands and variance on landmasses and coastlines.
mglobal.mountainScatter = 455 * mapW --Recommended range:[130 to 1000]
--Lower values make large, long, mountain ranges. Higher values make sporadic mountainous features.
I edited these because I didn't like smooth coastlines.
I think it was a success.
Spoiler :

The continent assignment is quite wonky though:
Spoiler :

Americas are almost nonexistent and Asia is just a few strips of tundra. The map itself is good ( for me ) but the continents are trippin

This is the continent map code. It looks like some people have worked hard on it. I haven't worked out the big picture enough to understand it. It kinda looks like map temp has a lot to do with continent assignment.
Spoiler :
local continentMap = PWAreaMap:New(elevationMap.width,elevationMap.height,elevationMap.wrapX,elevationMap.wrapY)
continentMap

table.sort(continentMap.areaList,function (a,b) return a.size > b.size end)
--check for jungle
for y=0, elevationMap.height - 1 do
for x=0,elevationMap.width - 1 do
local i = elevationMap:GetIndex(x,y)
local area = continentMap:GetAreaByID(continentMap.data)
area.hasJungle = false
end
end
for y=0, elevationMap.height - 1 do
for x=0, elevationMap.width - 1 do
local plot = Map.GetPlot(x,y)
if plot:GetFeatureType() == FeatureTypes.FEATURE_JUNGLE then
local i = elevationMap:GetIndex(x,y)
local area = continentMap:GetAreaByID(continentMap.data)
area.hasJungle = true
end
end
end
for n=1, #continentMap.areaList do
-- if not continentMap.areaList[n].trueMatch and not continentMap.areaList[n].hasJungle then
if not continentMap.areaList[n].trueMatch then
continentMap.areaList[n].artStyle = 1 + Map.Rand(2, "Continent Art Styles - Lua") -- left out America's orange trees
end
end
for y=0, elevationMap.height - 1 do
for x=0, elevationMap.width - 1 do
local plot = Map.GetPlot(x,y)
local i = elevationMap:GetIndex(x,y)
local artStyle = continentMap:GetAreaByID(continentMap.data).artStyle
if plot:IsWater() then
plot:SetContinentArtType(contArt.OCEAN)
elseif jungleMatch(x,y) then
plot:SetContinentArtType(contArt.EUROPE)
else
plot:SetContinentArtType(contArt.AFRICA)
end
end
end
--Africa has the best looking deserts, so for the biggest
--desert use Africa. America has a nice dirty looking desert also, so
--that should be the second biggest desert.
local desertMap = PWAreaMap:New(elevationMap.width,elevationMap.height,elevationMap.wrapX,elevationMap.wrapY)
desertMap

table.sort(desertMap.areaList,function (a,b) return a.size > b.size end)
local largestDesertID = nil
local secondLargestDesertID = nil
for n=1,#desertMap.areaList do
--if debugTime then print(string.format("area[%d] size = %d",n,desertMap.areaList[n].size)) end
if desertMap.areaList[n].trueMatch then
if largestDesertID == nil then
largestDesertID = desertMap.areaList[n].id
else
secondLargestDesertID = desertMap.areaList[n].id
break
end
end
end
for y=0,elevationMap.height - 1 do
for x=0,elevationMap.width - 1 do
local plot = Map.GetPlot(x,y)
local i = elevationMap:GetIndex(x,y)
if desertMap.data == largestDesertID then
plot:SetContinentArtType(contArt.AFRICA)
elseif desertMap.data == secondLargestDesertID then
plot:SetContinentArtType(contArt.AFRICA)
elseif plot:GetTerrainType() == TerrainTypes.TERRAIN_DESERT then
plot:SetContinentArtType(contArt.AMERICA)
end
end
end
-- Set tundra/mountains -> snowy when near to snow tiles
for y = 0, mapH-1 do
for x = 0, mapW-1 do
local plot = Map.GetPlot(x,y)
local plotTerrainID = plot:GetTerrainType()
if IsMountain(plot) then
local coldness = 0
local zone = elevationMap:GetZone(y)
if (zone == mg.NPOLAR or zone == mg.SPOLAR) then
coldness = coldness + 2
elseif (zone == mg.NTEMPERATE or zone == mg.STEMPERATE) then
coldness = coldness + 1
else
coldness = coldness - 1
end
for nearPlot in Plot_GetPlotsInCircle(plot, 1, 1) do
local nearTerrainID = nearPlot:GetTerrainType()
local nearFeatureID = nearPlot:GetFeatureType()
if IsMountain(nearPlot) then
coldness = coldness + 0.5
elseif nearTerrainID == TerrainTypes.TERRAIN_SNOW then
coldness = coldness + 2
elseif nearTerrainID == TerrainTypes.TERRAIN_TUNDRA then
coldness = coldness + 1
elseif nearTerrainID == TerrainTypes.TERRAIN_DESERT then
coldness = coldness - 1
elseif nearFeatureID == FeatureTypes.FEATURE_JUNGLE or nearFeatureID == FeatureTypes.FEATURE_MARSH then
coldness = coldness - 8
end
end
for nearPlot in Plot_GetPlotsInCircle(plot, 2, 2) do
if IsMountain(nearPlot) then
coldness = coldness + 0.25
end
end
-- Avoid snow near tropical jungle
if coldness >= 1 then
for nearPlot in Plot_GetPlotsInCircle(plot, 2, 3) do
local nearFeatureID = nearPlot:GetFeatureType()
if nearFeatureID == FeatureTypes.FEATURE_JUNGLE or nearFeatureID == FeatureTypes.FEATURE_MARSH then
coldness = coldness - 8 / math.max(1, Map.PlotDistance(x, y, nearPlot:GetX(), nearPlot:GetY()))
end
end
end
if coldness >= 7 then
--plot:SetTerrainType(TerrainTypes.TERRAIN_SNOW, false, true)
plot:SetContinentArtType(contArt.EUROPE)
elseif coldness >= 1 then
--plot:SetTerrainType(TerrainTypes.TERRAIN_TUNDRA, false, true)
plot:SetContinentArtType(contArt.AMERICA)
elseif coldness >= 0 then
--plot:SetTerrainType(TerrainTypes.TERRAIN_PLAINS, false, true)
plot:SetContinentArtType(contArt.ASIA)
else
--plot:SetTerrainType(TerrainTypes.TERRAIN_PLAINS, false, true)
plot:SetContinentArtType(contArt.AFRICA)
end
elseif plotTerrainID == TerrainTypes.TERRAIN_TUNDRA then
local coldness = 0
for nearPlot in Plot_GetPlotsInCircle(plot, 1, 1) do
local nearTerrainID = nearPlot:GetTerrainType()
local nearFeatureID = nearPlot:GetFeatureType()
if nearTerrainID == TerrainTypes.TERRAIN_SNOW then
coldness = coldness + 5
elseif nearTerrainID == TerrainTypes.TERRAIN_TUNDRA then
coldness = coldness + 1
elseif nearTerrainID == TerrainTypes.TERRAIN_DESERT or nearFeatureID == FeatureTypes.FEATURE_JUNGLE or nearFeatureID == FeatureTypes.FEATURE_MARSH then
coldness = coldness - 2
end
end
for nearPlot in Plot_GetPlotsInCircle(plot, 2, 2) do
if nearTerrainID == TerrainTypes.TERRAIN_DESERT or nearFeatureID == FeatureTypes.FEATURE_JUNGLE or nearFeatureID == FeatureTypes.FEATURE_MARSH then
coldness = coldness - 1
end
end
if coldness >= 5 then
if plot:GetFeatureType() == FeatureTypes.FEATURE_FOREST then
plot:SetContinentArtType(contArt.ASIA)
else
plot:SetContinentArtType(contArt.EUROPE)
end
else
plot:SetContinentArtType(contArt.AFRICA)
end
elseif plotTerrainID == TerrainTypes.TERRAIN_SNOW then
plot:SetContinentArtType(contArt.EUROPE)
end
end
end
end
Lol the forum changed a bit of a line at the start to a smiley -TnK
Thalassicus (Victor Isbell)
I think that this guy did a lot of the work on it. He is credited with ocean rifts, rivers through lakes, natural wonder placement, resource placement, map options, inland seas, & aesthetic polishing. Idk who he is but apparently he is a big deal. I don't want to undo these guys work on this script.... but the pictures don't lie. They are a good representation of what usually is built. And on standard settings there is mostly Africa.
Second Run:
Spoiler :

And it's continent map.
Spoiler :

I think it's a better map. But still, all Africa.