forked from mirrors/0ad
Delete BaseHeight property from random map JSON files and rmgen library, refs #6, #4973, 9ee44bd9b8, 0e0ed94926.
The height is only a concern to the random map script, not the rmgen library, nor the gamesetup, nor the simulation. Reveals the actual initial elevation to the random map script author without looking up the JSON file. Group and rename all height constants of random maps below the template names. Rename waterHeight to heightSeaGround to prevent confusion with the actual waterlevel. Remove useless paintTerrainBasedOnHeight calls on African Plains and Polar Sea. This was SVN commit r20904.
This commit is contained in:
@@ -44,7 +44,15 @@ const aDecorativeRock = "actor|geology/stone_granite_med.xml";
|
||||
|
||||
const pForest = [tForestFloor, tForestFloor + TERRAIN_SEPARATOR + oCarob, tForestFloor + TERRAIN_SEPARATOR + oDatePalm, tForestFloor + TERRAIN_SEPARATOR + oSDatePalm, tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround = -3;
|
||||
const heightSeaBump = -2.5;
|
||||
const heightCorralsLower = -2;
|
||||
const heightCorralsUpper = -1.5;
|
||||
const heightShore = 1;
|
||||
const heightLand = 2;
|
||||
const heightIsland = 6;
|
||||
|
||||
InitMap(heightShore, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapCenter = getMapCenter();
|
||||
@@ -62,12 +70,6 @@ var clGrass = createTileClass();
|
||||
var clHill = createTileClass();
|
||||
var clIsland = createTileClass();
|
||||
|
||||
var waterHeight = -3;
|
||||
var corralsHeightLower = -2;
|
||||
var corralsHeightUpper = -1.5;
|
||||
var shoreHeight = 1;
|
||||
var landHeight = 2;
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementRiver(0, fractionToTiles(0.6)),
|
||||
"PlayerTileClass": clPlayer,
|
||||
@@ -104,16 +106,16 @@ paintRiver({
|
||||
"width": fractionToTiles(0.35),
|
||||
"fadeDist": scaleByMapSize(6, 25),
|
||||
"deviation": 0,
|
||||
"waterHeight": waterHeight,
|
||||
"landHeight": landHeight,
|
||||
"heightRiverbed": heightSeaGround,
|
||||
"heightLand": heightLand,
|
||||
"meanderShort": 20,
|
||||
"meanderLong": 0
|
||||
});
|
||||
|
||||
paintTileClassBasedOnHeight(-Infinity, 0.7, Elevation_ExcludeMin_ExcludeMax, clWater);
|
||||
|
||||
paintTerrainBasedOnHeight(-Infinity, shoreHeight, Elevation_ExcludeMin_ExcludeMax, tShoreLower);
|
||||
paintTerrainBasedOnHeight(shoreHeight, landHeight, Elevation_ExcludeMin_ExcludeMax, tShoreUpper);
|
||||
paintTerrainBasedOnHeight(-Infinity, heightShore, Elevation_ExcludeMin_ExcludeMax, tShoreLower);
|
||||
paintTerrainBasedOnHeight(heightShore, heightLand, Elevation_ExcludeMin_ExcludeMax, tShoreUpper);
|
||||
Engine.SetProgress(40);
|
||||
|
||||
createBumps(avoidClasses(clWater, 2, clPlayer, 20));
|
||||
@@ -157,7 +159,7 @@ Engine.SetProgress(60);
|
||||
log("Creating undersea bumps...");
|
||||
createAreas(
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(4, 6)), Math.floor(scaleByMapSize(16, 40)), 0.5),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -2.5, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaBump, 3),
|
||||
stayClasses(clWater, 6),
|
||||
scaleByMapSize(10, 50));
|
||||
|
||||
@@ -166,16 +168,16 @@ createAreas(
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(4, 6)), Math.floor(scaleByMapSize(30, 80)), 0.5),
|
||||
[
|
||||
new LayeredPainter([tShoreLower, tShoreUpper, tHill], [2 ,1]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 6, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightIsland, 4),
|
||||
paintClass(clIsland)
|
||||
],
|
||||
[avoidClasses(clPlayer, 8, clForest, 1, clIsland, 15), stayClasses (clWater, 6)],
|
||||
scaleByMapSize(1, 4) * numPlayers
|
||||
);
|
||||
|
||||
paintTerrainBasedOnHeight(-Infinity, waterHeight, Elevation_IncludeMin_IncludeMax, tSeaDepths);
|
||||
paintTerrainBasedOnHeight(waterHeight, corralsHeightLower, Elevation_ExcludeMin_IncludeMax, tCoralsLower);
|
||||
paintTerrainBasedOnHeight(corralsHeightLower, corralsHeightUpper, Elevation_ExcludeMin_IncludeMax, tCoralsUpper);
|
||||
paintTerrainBasedOnHeight(-Infinity, heightSeaGround, Elevation_IncludeMin_IncludeMax, tSeaDepths);
|
||||
paintTerrainBasedOnHeight(heightSeaGround, heightCorralsLower, Elevation_ExcludeMin_IncludeMax, tCoralsLower);
|
||||
paintTerrainBasedOnHeight(heightCorralsLower, heightCorralsUpper, Elevation_ExcludeMin_IncludeMax, tCoralsUpper);
|
||||
|
||||
log("Creating island stone mines...");
|
||||
createMines(
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "aegean_sea.js",
|
||||
"Description" : "Players start on two sides of a sea with scattered islands.",
|
||||
"BaseTerrain" : ["medit_grass_shrubs", "medit_rocks_grass_shrubs", "medit_rocks_shrubs", "medit_rocks_grass", "medit_shrubs"],
|
||||
"BaseHeight" : 1,
|
||||
"Keywords": ["naval"],
|
||||
"CircularMap" : true,
|
||||
"Preview" : "aegean_sea.png"
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
Engine.LoadLibrary("rmgen");
|
||||
|
||||
var tPrimary = ["savanna_grass_a"];
|
||||
var tPrimary = "savanna_grass_a";
|
||||
var tForestFloor = "savanna_forestfloor_a";
|
||||
var tCliff = ["savanna_cliff_a", "savanna_cliff_a_red", "savanna_cliff_b", "savanna_cliff_b_red"];
|
||||
var tSecondary = "savanna_grass_b";
|
||||
var tGrassShrubs = ["savanna_shrubs_a"];
|
||||
var tGrass = ["savanna_grass_a_wetseason", "savanna_grass_b_wetseason"];
|
||||
var tGrassShrubs = "savanna_shrubs_a";
|
||||
var tDirt = "savanna_dirt_a";
|
||||
var tDirt2 = "savanna_dirt_a_red";
|
||||
var tDirt3 = "savanna_dirt_b";
|
||||
@@ -38,7 +37,11 @@ var aRock = "actor|geology/stone_savanna_med.xml";
|
||||
|
||||
const pForest = [tForestFloor + TERRAIN_SEPARATOR + oPalm, tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
var heightSeaGround = -5;
|
||||
var heightLand = 2;
|
||||
var heightCliff = 3;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -107,7 +110,7 @@ createAreas(
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(3, 5)), Math.floor(scaleByMapSize(60, 100)), 5),
|
||||
[
|
||||
new LayeredPainter([tShore, tWater], [1]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -5, 7),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 7),
|
||||
paintClass(clWater)
|
||||
],
|
||||
avoidClasses(clPlayer, 22, clWater, 8, clHill, 2),
|
||||
@@ -115,8 +118,7 @@ createAreas(
|
||||
);
|
||||
Engine.SetProgress(45);
|
||||
|
||||
paintTerrainBasedOnHeight(3, Math.floor(scaleByMapSize(20, 40)), 0, tCliff);
|
||||
paintTerrainBasedOnHeight(Math.floor(scaleByMapSize(20, 40)), 100, 3, tGrass);
|
||||
paintTerrainBasedOnHeight(heightCliff, Infinity, 0, tCliff);
|
||||
|
||||
createBumps(avoidClasses(clWater, 2, clPlayer, 20));
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "african_plains.js",
|
||||
"Description" : "The central region of the vast continent of Africa, birthplace of humanity. Players start in a lush area teeming with vegetation and wildlife.",
|
||||
"BaseTerrain" : ["savanna_grass_a"],
|
||||
"BaseHeight" : 2,
|
||||
"Keywords": [],
|
||||
"Preview" : "african_plains.png",
|
||||
"CircularMap" : true
|
||||
|
||||
@@ -80,7 +80,10 @@ else
|
||||
|
||||
const pForest = [tForestFloor + TERRAIN_SEPARATOR + oPine, tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, tPrimary);
|
||||
var heightSeaGround = -5;
|
||||
var heightLand = 3;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -155,7 +158,7 @@ for (var i = 0; i < numLakes; ++i)
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(4, 8)), Math.floor(scaleByMapSize(40, 180)), 0.7, chosenPoint[0], chosenPoint[1]),
|
||||
[
|
||||
new LayeredPainter([tShore, tWater, tWater], [1, 3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -5, 5),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 5),
|
||||
paintClass(clWater)
|
||||
],
|
||||
avoidClasses(clPlayer, 20, clWater, 8),
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "alpine_lakes.js",
|
||||
"Description" : "High Alpine mountains surrounding deep valleys strung with mountain streams and finger-like lakes.",
|
||||
"BaseTerrain" : ["alpine_dirt_grass_50"],
|
||||
"BaseHeight" : 3,
|
||||
"CircularMap" : true,
|
||||
"Preview" : "alpine_lakes.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,9 +278,14 @@ else
|
||||
var aBushSmall = "actor|props/flora/bush_medit_sm_dry.xml";
|
||||
}
|
||||
|
||||
var heightLand = 3;
|
||||
var heightOffsetBump = 2;
|
||||
var snowlineHeight = 29;
|
||||
var heightMountain = 30;
|
||||
|
||||
const pForest = [tForestFloor + TERRAIN_SEPARATOR + oPine, tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, tPrimary);
|
||||
InitMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapCenter = getMapCenter();
|
||||
@@ -294,12 +299,6 @@ var clMetal = createTileClass();
|
||||
var clFood = createTileClass();
|
||||
var clBaseResource = createTileClass();
|
||||
|
||||
/**
|
||||
* Minimum distance between two mountainranges.
|
||||
*/
|
||||
var snowlineHeight = 29;
|
||||
var mountainHeight = 30;
|
||||
|
||||
var [playerIDs, playerPosition, playerAngle, startAngle] = playerPlacementCircle(fractionToTiles(0.35));
|
||||
|
||||
placePlayerBases({
|
||||
@@ -334,7 +333,7 @@ new MountainRangeBuilder({
|
||||
"pathplacer": new PathPlacer(undefined, undefined, undefined, undefined, undefined, 0.4, scaleByMapSize(3, 12), 0.1, 0.1, 0.1),
|
||||
"painters":[
|
||||
new LayeredPainter([tCliff, tPrimary], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, mountainHeight, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightMountain, 2),
|
||||
paintClass(clHill)
|
||||
],
|
||||
"constraint": avoidClasses(clPlayer, 20),
|
||||
@@ -353,13 +352,13 @@ new MountainRangeBuilder({
|
||||
|
||||
Engine.SetProgress(35);
|
||||
|
||||
paintTerrainBasedOnHeight(getMapBaseHeight() + 0.1, snowlineHeight, 0, tCliff);
|
||||
paintTerrainBasedOnHeight(snowlineHeight, mountainHeight, 3, tSnowLimited);
|
||||
paintTerrainBasedOnHeight(heightLand + 0.1, snowlineHeight, 0, tCliff);
|
||||
paintTerrainBasedOnHeight(snowlineHeight, heightMountain, 3, tSnowLimited);
|
||||
|
||||
log("Creating bumps...");
|
||||
createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 50), 0.3, 0.06, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 2, 2),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBump, 2),
|
||||
avoidClasses(clPlayer, 10),
|
||||
scaleByMapSize(100, 200));
|
||||
Engine.SetProgress(40);
|
||||
@@ -369,7 +368,7 @@ createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(40, 150), 0.2, 0.1, 1),
|
||||
[
|
||||
new LayeredPainter([tCliff, tSnowLimited], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, mountainHeight, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightMountain, 2),
|
||||
paintClass(clHill)
|
||||
],
|
||||
avoidClasses(clPlayer, 20, clHill, 14),
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "alpine_valley.js",
|
||||
"Description" : "High Alpine mountains bordering deep valleys.",
|
||||
"BaseTerrain" : ["alpine_dirt_grass_50"],
|
||||
"BaseHeight" : 3,
|
||||
"Preview" : "alpine_valley.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ Engine.LoadLibrary("rmbiome");
|
||||
|
||||
setSelectedBiome();
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_Terrains.mainTerrain);
|
||||
var heightLand = 2;
|
||||
|
||||
InitMap(heightLand, g_Terrains.mainTerrain);
|
||||
|
||||
initTileClasses();
|
||||
|
||||
@@ -21,7 +23,7 @@ Engine.SetProgress(20);
|
||||
addElements([
|
||||
{
|
||||
"func": addBluffs,
|
||||
"baseHeight": getMapBaseHeight(),
|
||||
"baseHeight": heightLand,
|
||||
"avoid": [
|
||||
g_TileClasses.bluff, 12,
|
||||
g_TileClasses.hill, 5,
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "ambush.js",
|
||||
"Description" : "High bluffs overlook the terrain below. Bountiful resources await on the cliffs, but beware of enemies planning an ambush.",
|
||||
"BaseTerrain" : ["medit_sea_depths"],
|
||||
"BaseHeight" : 2,
|
||||
"Preview" : "ambush.png",
|
||||
"SupportedBiomes": true,
|
||||
"CircularMap" : true
|
||||
|
||||
@@ -28,7 +28,10 @@ const aBushSmall = "actor|props/flora/bush_medit_sm.xml";
|
||||
|
||||
const pForest = [tForestFloor + TERRAIN_SEPARATOR + oPoplar, tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
var heightLand = 1;
|
||||
var heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
|
||||
@@ -73,7 +76,7 @@ Engine.SetProgress(20);
|
||||
log("Creating bumps...");
|
||||
createAreas(
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(4, 6)), Math.floor(scaleByMapSize(2, 5)), 0.5),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 2, 2),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBump, 2),
|
||||
avoidClasses(clPlayer, 13),
|
||||
scaleByMapSize(300, 800));
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "anatolian_plateau.js",
|
||||
"Description" : "An indefensible open land with little wood and stone, representing the central basin of Asia Minor.",
|
||||
"BaseTerrain" : ["steppe_grass_a", "steppe_grass_c", "steppe_grass_d"],
|
||||
"BaseHeight" : 1,
|
||||
"Preview" : "anatolian_plateau.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,11 @@ const aBushSmall = g_Decoratives.bushSmall;
|
||||
const pForest1 = [tForestFloor2 + TERRAIN_SEPARATOR + oTree1, tForestFloor2 + TERRAIN_SEPARATOR + oTree2, tForestFloor2];
|
||||
const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TERRAIN_SEPARATOR + oTree5, tForestFloor1];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
var heightSeaGround = -5;
|
||||
var heightLand = 3;
|
||||
var heightShore = 1;
|
||||
|
||||
InitMap(heightSeaGround, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
|
||||
@@ -57,9 +61,6 @@ var clFood = createTileClass();
|
||||
var clBaseResource = createTileClass();
|
||||
var clLand = createTileClass();
|
||||
|
||||
var landHeight = 3;
|
||||
var shoreHeight = 1;
|
||||
|
||||
var islandRadius = scaleByMapSize(22, 31);
|
||||
|
||||
var [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.35));
|
||||
@@ -76,7 +77,7 @@ for (let i = 0; i < numPlayers; ++i)
|
||||
playerPosition[i].y,
|
||||
0,
|
||||
[Math.floor(islandRadius)]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 4));
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 4));
|
||||
|
||||
log("Creating random islands...");
|
||||
createAreas(
|
||||
@@ -89,15 +90,15 @@ createAreas(
|
||||
undefined,
|
||||
scaleByMapSize(30, 70)),
|
||||
[
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 4),
|
||||
paintClass(clLand)
|
||||
],
|
||||
null,
|
||||
scaleByMapSize(1, 5) * randIntInclusive(5, 10));
|
||||
|
||||
paintTerrainBasedOnHeight(landHeight - 0.6, landHeight + 0.4, 3, tMainTerrain);
|
||||
paintTerrainBasedOnHeight(shoreHeight, landHeight, 0, tShore);
|
||||
paintTerrainBasedOnHeight(getMapBaseHeight(), shoreHeight, 2, tWater);
|
||||
paintTerrainBasedOnHeight(heightLand - 0.6, heightLand + 0.4, 3, tMainTerrain);
|
||||
paintTerrainBasedOnHeight(heightShore, heightLand, 0, tShore);
|
||||
paintTerrainBasedOnHeight(heightSeaGround, heightShore, 2, tWater);
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": [playerIDs, playerPosition],
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "archipelago.js",
|
||||
"Description" : "A maze of islands of different sizes and shapes. Players start with more wood than normal.",
|
||||
"BaseTerrain" : ["medit_sand_wet"],
|
||||
"BaseHeight" : -5,
|
||||
"Keywords": ["naval"],
|
||||
"Preview" : "archipelago.png",
|
||||
"SupportedBiomes": true,
|
||||
|
||||
@@ -39,7 +39,10 @@ var aRockMedium = "actor|geology/stone_granite_med.xml";
|
||||
|
||||
const pForest = [tForestFloor + TERRAIN_SEPARATOR + oBush, tForestFloor + TERRAIN_SEPARATOR + oBush2, tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
var heightSeaGround = -5;
|
||||
var heightLand = 2;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
|
||||
@@ -112,7 +115,7 @@ createAreas(
|
||||
1),
|
||||
[
|
||||
new LayeredPainter([tShore, tWater, tWater], [1, 3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -5, 5),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 5),
|
||||
paintClass(clWater)
|
||||
],
|
||||
avoidClasses(clPlayer, 15),
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "arctic_summer.js",
|
||||
"Description" : "Summer has arrived to the cold regions of the north and with it have many animals, profiting from its milder climate. Wolves, ever present, have shed their winter clothes; deer, hares and muskox populate the plains. The last traces of winter are rapidly disappearing, only to reappear very soon.",
|
||||
"BaseTerrain" : ["alpine_grass_rocky"],
|
||||
"BaseHeight" : 2,
|
||||
"Keywords": [],
|
||||
"Preview" : "arctic_summer.png",
|
||||
"CircularMap" : true
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
Engine.LoadLibrary("rmgen");
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
const mapCenter = getMapCenter();
|
||||
|
||||
const tGrass = ["new_alpine_grass_b", "new_alpine_grass_c", "new_alpine_grass_d"];
|
||||
const tPineForestFloor = "temp_forestfloor_pine";
|
||||
const tForestFloor = [tPineForestFloor, tPineForestFloor, "alpine_dirt_grass_50"];
|
||||
@@ -52,6 +46,18 @@ var pForest = [
|
||||
tForestFloor
|
||||
];
|
||||
|
||||
const heightRavineValley = 2;
|
||||
const heightLand = 30;
|
||||
const heightRavineHill = 40;
|
||||
const heightHill = 50;
|
||||
const heightOffsetRavine = 10;
|
||||
|
||||
InitMap(heightHill, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
const mapCenter = getMapCenter();
|
||||
|
||||
var clPlayer = createTileClass();
|
||||
var clHill = createTileClass();
|
||||
var clForest = createTileClass();
|
||||
@@ -67,7 +73,7 @@ createArea(
|
||||
new ClumpPlacer(diskArea(fractionToTiles(0.42)), 0.94, 0.05, 0.1, mapCenter.x, mapCenter.y),
|
||||
[
|
||||
new LayeredPainter([tCliff, tGrass], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 30, 3)
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 3)
|
||||
]);
|
||||
Engine.SetProgress(5);
|
||||
|
||||
@@ -164,7 +170,7 @@ for (let size of [scaleByMapSize(50, 800), scaleByMapSize(50, 400), scaleByMapSi
|
||||
new ClumpPlacer(size, 0.1, 0.2, 0.1),
|
||||
[
|
||||
new LayeredPainter([tCliff, [tForestFloor, tForestFloor, tCliff]], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 50, size < 50 ? 2 : 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, size < 50 ? 2 : 4),
|
||||
paintClass(clHill)
|
||||
],
|
||||
avoidClasses(clPlayer, 8, clBaseResource, 2, clHill, 5),
|
||||
@@ -175,7 +181,7 @@ for (let size of [scaleByMapSize(50, 800), scaleByMapSize(50, 400), scaleByMapSi
|
||||
new ClumpPlacer(size * 0.3, 0.94, 0.05, 0.1),
|
||||
[
|
||||
new LayeredPainter([tCliff, tForestFloor], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 10, 3)
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetRavine, 3)
|
||||
],
|
||||
stayClasses(clHill, 4),
|
||||
mountains.length * 2,
|
||||
@@ -186,7 +192,7 @@ for (let size of [scaleByMapSize(50, 800), scaleByMapSize(50, 400), scaleByMapSi
|
||||
new ClumpPlacer(size, 0.1, 0.2, 0.1),
|
||||
[
|
||||
new LayeredPainter([tCliff, tForestFloor], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 10, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightRavine, 2),
|
||||
paintClass(clHill)
|
||||
],
|
||||
avoidClasses(clPlayer, 6, clBaseResource, 2, clHill, 5),
|
||||
@@ -220,7 +226,7 @@ for (let size of [scaleByMapSize(50, 800), scaleByMapSize(50, 400), scaleByMapSi
|
||||
new ClumpPlacer(size * 0.3, 0.94, 0.05, 0.1),
|
||||
[
|
||||
new LayeredPainter([tCliff, tForestFloor], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 2, 2)
|
||||
new SmoothElevationPainter(ELEVATION_SET, hRavineValley, 2)
|
||||
],
|
||||
[avoidClasses(clHillDeco, 2), stayClasses(clHill, 0)],
|
||||
ravine.length * 2,
|
||||
@@ -231,7 +237,7 @@ for (let size of [scaleByMapSize(50, 800), scaleByMapSize(50, 400), scaleByMapSi
|
||||
new ClumpPlacer(size * 0.1, 0.3, 0.05, 0.1),
|
||||
[
|
||||
new LayeredPainter([tCliff, tForestFloor], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 40, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, hRavineHill, 2),
|
||||
paintClass(clHill)
|
||||
],
|
||||
[avoidClasses(clHillDeco, 2), borderClasses(clHill, 15, 1)],
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"BaseTerrain" : [
|
||||
"temp_forestfloor_pine", "temp_forestfloor_pine", "alpine_cliff_c", "alpine_grass_rocky"
|
||||
],
|
||||
"BaseHeight" : 50,
|
||||
"CircularMap" : true,
|
||||
"Preview" : "ardennes_forest.png"
|
||||
}
|
||||
|
||||
@@ -33,7 +33,9 @@ const aAleppoPine = "actor|flora/trees/aleppo_pine.xml";
|
||||
const pForest1 = [tForestFloor + TERRAIN_SEPARATOR + oCarob, tForestFloor];
|
||||
const pForest2 = [tForestFloor + TERRAIN_SEPARATOR + oAleppoPine, tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightLand = 3;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "atlas_mountains.js",
|
||||
"Description" : "A rugged land with small room for buildings with scarce wood. Represents the mountain range in the north-west africa.",
|
||||
"BaseTerrain" : ["medit_rocks_grass", "medit_rocks_grass", "medit_rocks_grass", "medit_rocks_grass", "medit_rocks_grass_shrubs", "medit_rocks_shrubs"],
|
||||
"BaseHeight" : 3,
|
||||
"Preview" : "atlas_mountains.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
Engine.LoadLibrary("rmgen");
|
||||
Engine.LoadLibrary("heightmap");
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightLand = 0;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -24,25 +26,25 @@ var averageWaterCoverage = 1/3; // NOTE: Since errosion is not predictable actua
|
||||
if (mapSize < 200) // Sink the waterlevel on tiny maps to ensure enough space
|
||||
averageWaterCoverage = 2/3 * averageWaterCoverage;
|
||||
|
||||
var waterHeight = -MIN_HEIGHT + heightRange.min + averageWaterCoverage * (heightRange.max - heightRange.min);
|
||||
var waterHeightAdjusted = waterHeight + MIN_HEIGHT;
|
||||
setWaterHeight(waterHeight);
|
||||
var heightSeaGround = -MIN_HEIGHT + heightRange.min + averageWaterCoverage * (heightRange.max - heightRange.min);
|
||||
var heightSeaGroundAdjusted = heightSeaGround + MIN_HEIGHT;
|
||||
setWaterHeight(heightSeaGround);
|
||||
|
||||
// Prepare terrain texture by height placement
|
||||
var textueByHeight = [];
|
||||
|
||||
// Deep water
|
||||
textueByHeight.push({"upperHeightLimit": heightRange.min + 1/3 * (waterHeightAdjusted - heightRange.min), "terrain": "temp_sea_rocks"});
|
||||
textueByHeight.push({"upperHeightLimit": heightRange.min + 1/3 * (heightSeaGroundAdjusted - heightRange.min), "terrain": "temp_sea_rocks"});
|
||||
|
||||
// Medium deep water (with fish)
|
||||
var terrains = ["temp_sea_weed"];
|
||||
terrains = terrains.concat(terrains, terrains, terrains, terrains);
|
||||
terrains = terrains.concat(terrains, terrains, terrains, terrains);
|
||||
terrains.push("temp_sea_weed|gaia/fauna_fish");
|
||||
textueByHeight.push({"upperHeightLimit": heightRange.min + 2/3 * (waterHeightAdjusted - heightRange.min), "terrain": terrains});
|
||||
textueByHeight.push({"upperHeightLimit": heightRange.min + 2/3 * (heightSeaGroundAdjusted - heightRange.min), "terrain": terrains});
|
||||
|
||||
// Flat Water
|
||||
textueByHeight.push({"upperHeightLimit": heightRange.min + 3/3 * (waterHeightAdjusted - heightRange.min), "terrain": "temp_mud_a"});
|
||||
textueByHeight.push({"upperHeightLimit": heightRange.min + 3/3 * (heightSeaGroundAdjusted - heightRange.min), "terrain": "temp_mud_a"});
|
||||
|
||||
// Water surroundings/bog (with stone/metal some rabits and bushes)
|
||||
var terrains = ["temp_plants_bog", "temp_plants_bog_aut", "temp_dirt_gravel_plants", "temp_grass_d"];
|
||||
@@ -50,19 +52,19 @@ terrains = terrains.concat(terrains, terrains, terrains, terrains, terrains);
|
||||
terrains = ["temp_plants_bog|gaia/flora_bush_temperate"].concat(terrains, terrains);
|
||||
terrains = ["temp_dirt_gravel_plants|gaia/geology_metal_temperate", "temp_dirt_gravel_plants|gaia/geology_stone_temperate", "temp_plants_bog|gaia/fauna_rabbit"].concat(terrains, terrains);
|
||||
terrains = ["temp_plants_bog_aut|gaia/flora_tree_dead"].concat(terrains, terrains);
|
||||
textueByHeight.push({"upperHeightLimit": waterHeightAdjusted + 1/6 * (heightRange.max - waterHeightAdjusted), "terrain": terrains});
|
||||
textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 1/6 * (heightRange.max - heightSeaGroundAdjusted), "terrain": terrains});
|
||||
|
||||
// Juicy grass near bog
|
||||
textueByHeight.push({"upperHeightLimit": waterHeightAdjusted + 2/6 * (heightRange.max - waterHeightAdjusted),
|
||||
textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 2/6 * (heightRange.max - heightSeaGroundAdjusted),
|
||||
"terrain": ["temp_grass", "temp_grass_d", "temp_grass_long_b", "temp_grass_plants"]});
|
||||
|
||||
// Medium level grass
|
||||
// var testActor = "actor|geology/decal_stone_medit_a.xml";
|
||||
textueByHeight.push({"upperHeightLimit": waterHeightAdjusted + 3/6 * (heightRange.max - waterHeightAdjusted),
|
||||
textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 3/6 * (heightRange.max - heightSeaGroundAdjusted),
|
||||
"terrain": ["temp_grass", "temp_grass_b", "temp_grass_c", "temp_grass_mossy"]});
|
||||
|
||||
// Long grass near forest border
|
||||
textueByHeight.push({"upperHeightLimit": waterHeightAdjusted + 4/6 * (heightRange.max - waterHeightAdjusted),
|
||||
textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 4/6 * (heightRange.max - heightSeaGroundAdjusted),
|
||||
"terrain": ["temp_grass", "temp_grass_b", "temp_grass_c", "temp_grass_d", "temp_grass_long_b", "temp_grass_clovers_2", "temp_grass_mossy", "temp_grass_plants"]});
|
||||
|
||||
// Forest border (With wood/food plants/deer/rabits)
|
||||
@@ -74,10 +76,10 @@ var terrains = ["temp_grass_plants|gaia/flora_tree_euro_beech", "temp_grass_moss
|
||||
var numTerrains = terrains.length;
|
||||
for (var i = 0; i < numTerrains; i++)
|
||||
terrains.push("temp_grass_plants");
|
||||
textueByHeight.push({"upperHeightLimit": waterHeightAdjusted + 5/6 * (heightRange.max - waterHeightAdjusted), "terrain": terrains});
|
||||
textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 5/6 * (heightRange.max - heightSeaGroundAdjusted), "terrain": terrains});
|
||||
|
||||
// Unpassable woods
|
||||
textueByHeight.push({"upperHeightLimit": waterHeightAdjusted + 6/6 * (heightRange.max - waterHeightAdjusted),
|
||||
textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 6/6 * (heightRange.max - heightSeaGroundAdjusted),
|
||||
"terrain": ["temp_grass_mossy|gaia/flora_tree_oak", "temp_forestfloor_pine|gaia/flora_tree_pine",
|
||||
"temp_grass_mossy|gaia/flora_tree_oak", "temp_forestfloor_pine|gaia/flora_tree_pine",
|
||||
"temp_mud_plants|gaia/flora_tree_dead", "temp_plants_bog|gaia/flora_tree_oak_large",
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
],
|
||||
"CircularMap" : false,
|
||||
"BaseTerrain" : ["temp_grass", "temp_grass_b", "temp_grass_c", "temp_grass_d", "temp_grass_long_b", "temp_grass_clovers_2", "temp_grass_mossy", "temp_grass_plants"],
|
||||
"BaseHeight" : 0,
|
||||
"Preview" : "belgian_uplands.png"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,13 @@ const aShrub = "actor|props/flora/shrub_tropic_plant_flower.xml";
|
||||
const aFlower = "actor|props/flora/flower_bright.xml";
|
||||
const aPalm = "actor|props/flora/shrub_fanpalm.xml";
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightMarsh = -2;
|
||||
const heightOffsetBump = 1;
|
||||
const heightLand = 3;
|
||||
const heightHill = 15;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
|
||||
@@ -87,7 +93,7 @@ Engine.SetProgress(15);
|
||||
log("Creating bumps...");
|
||||
createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 50), 0.6, 0.1, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 2, 2),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBump, 2),
|
||||
avoidClasses(clPlayer, 13),
|
||||
scaleByMapSize(300, 800));
|
||||
|
||||
@@ -96,7 +102,7 @@ createAreas(
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(4, 6)), Math.floor(scaleByMapSize(16, 40)), 0.5),
|
||||
[
|
||||
new LayeredPainter([tCliff, tHill], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 15, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 2),
|
||||
paintClass(clHill)
|
||||
],
|
||||
avoidClasses(clPlayer, 20, clHill, 15, clWater, 0),
|
||||
@@ -108,7 +114,7 @@ for (let i = 0; i < 2; ++i)
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(6, 12)), Math.floor(scaleByMapSize(15, 60)), 0.8),
|
||||
[
|
||||
new LayeredPainter([tShoreBlend, tShore, tWater], [1, 1]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -2, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, hMarsh, 3),
|
||||
paintClass(clWater)
|
||||
],
|
||||
avoidClasses(clPlayer, 25, clWater, Math.round(scaleByMapSize(7, 16) * randFloat(0.8, 1.35))),
|
||||
@@ -132,7 +138,7 @@ Engine.SetProgress(40);
|
||||
log("Creating bumps...");
|
||||
createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 50), 0.3, 0.06, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 1, 2),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBump, 2),
|
||||
stayClasses(clWater, 2),
|
||||
scaleByMapSize(50, 100));
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "botswanan_haven.js",
|
||||
"Description" : "Botswanan Africa during the wet season, a land which was arid and inhospitable just weeks before has come to life totally transformed. Herds of zebras graze amid the tall, lush grasses in which lions lie waiting, while in the shallow pools lurk fearsome crocodiles.",
|
||||
"BaseTerrain" : ["savanna_grass_b_wetseason"],
|
||||
"BaseHeight" : 3,
|
||||
"Keywords": [],
|
||||
"CircularMap" : true,
|
||||
"Preview" : "botswanan_haven.png"
|
||||
|
||||
@@ -2,7 +2,7 @@ Engine.LoadLibrary("rmgen");
|
||||
Engine.LoadLibrary("rmbiome");
|
||||
Engine.LoadLibrary("heightmap");
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
InitMap(0, g_MapSettings.BaseTerrain);
|
||||
|
||||
/**
|
||||
* Drags a path to a target height smoothing it at the edges and return some points along the path.
|
||||
@@ -226,9 +226,9 @@ let heightRange = { "min": MIN_HEIGHT * heightScale, "max": MAX_HEIGHT * heightS
|
||||
|
||||
// Water coverage
|
||||
let averageWaterCoverage = 1/5; // NOTE: Since terrain generation is quite unpredictable actual water coverage might vary much with the same value
|
||||
let waterHeight = -MIN_HEIGHT + heightRange.min + averageWaterCoverage * (heightRange.max - heightRange.min); // Water height in environment and the engine
|
||||
let waterHeightAdjusted = waterHeight + MIN_HEIGHT; // Water height in RMGEN
|
||||
setWaterHeight(waterHeight);
|
||||
let heightSeaGround = -MIN_HEIGHT + heightRange.min + averageWaterCoverage * (heightRange.max - heightRange.min); // Water height in environment and the engine
|
||||
let heightSeaGroundAdjusted = heightSeaGround + MIN_HEIGHT; // Water height in RMGEN
|
||||
setWaterHeight(heightSeaGround);
|
||||
|
||||
log("Generating terrain using diamon-square...");
|
||||
let medH = (heightRange.min + heightRange.max) / 2;
|
||||
@@ -244,17 +244,17 @@ rescaleHeightmap(heightRange.min, heightRange.max);
|
||||
Engine.SetProgress(25);
|
||||
|
||||
let heighLimits = [
|
||||
heightRange.min + 1/3 * (waterHeightAdjusted - heightRange.min), // 0 Deep water
|
||||
heightRange.min + 2/3 * (waterHeightAdjusted - heightRange.min), // 1 Medium Water
|
||||
heightRange.min + (waterHeightAdjusted - heightRange.min), // 2 Shallow water
|
||||
waterHeightAdjusted + 1/8 * (heightRange.max - waterHeightAdjusted), // 3 Shore
|
||||
waterHeightAdjusted + 2/8 * (heightRange.max - waterHeightAdjusted), // 4 Low ground
|
||||
waterHeightAdjusted + 3/8 * (heightRange.max - waterHeightAdjusted), // 5 Player and path height
|
||||
waterHeightAdjusted + 4/8 * (heightRange.max - waterHeightAdjusted), // 6 High ground
|
||||
waterHeightAdjusted + 5/8 * (heightRange.max - waterHeightAdjusted), // 7 Lower forest border
|
||||
waterHeightAdjusted + 6/8 * (heightRange.max - waterHeightAdjusted), // 8 Forest
|
||||
waterHeightAdjusted + 7/8 * (heightRange.max - waterHeightAdjusted), // 9 Upper forest border
|
||||
waterHeightAdjusted + (heightRange.max - waterHeightAdjusted)]; // 10 Hilltop
|
||||
heightRange.min + 1/3 * (heightSeaGroundAdjusted - heightRange.min), // 0 Deep water
|
||||
heightRange.min + 2/3 * (heightSeaGroundAdjusted - heightRange.min), // 1 Medium Water
|
||||
heightRange.min + (heightSeaGroundAdjusted - heightRange.min), // 2 Shallow water
|
||||
heightSeaGroundAdjusted + 1/8 * (heightRange.max - heightSeaGroundAdjusted), // 3 Shore
|
||||
heightSeaGroundAdjusted + 2/8 * (heightRange.max - heightSeaGroundAdjusted), // 4 Low ground
|
||||
heightSeaGroundAdjusted + 3/8 * (heightRange.max - heightSeaGroundAdjusted), // 5 Player and path height
|
||||
heightSeaGroundAdjusted + 4/8 * (heightRange.max - heightSeaGroundAdjusted), // 6 High ground
|
||||
heightSeaGroundAdjusted + 5/8 * (heightRange.max - heightSeaGroundAdjusted), // 7 Lower forest border
|
||||
heightSeaGroundAdjusted + 6/8 * (heightRange.max - heightSeaGroundAdjusted), // 8 Forest
|
||||
heightSeaGroundAdjusted + 7/8 * (heightRange.max - heightSeaGroundAdjusted), // 9 Upper forest border
|
||||
heightSeaGroundAdjusted + (heightRange.max - heightSeaGroundAdjusted)]; // 10 Hilltop
|
||||
|
||||
let playerHeight = (heighLimits[4] + heighLimits[5]) / 2; // Average player height
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"Description" : "Fertile lands surrounded by harsh terrain.\nRemains of recent snowfalls still haunt the forests, and torrential rivers from the snowmelt have barely died away.\nAiming at a realistic terrain, this map might not always be balanced.",
|
||||
"CircularMap" : true,
|
||||
"BaseTerrain" : "whiteness",
|
||||
"Keywords": [],
|
||||
"BaseHeight" : 0
|
||||
"Keywords": []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,11 @@ const aBushSmall = "actor|props/flora/bush_medit_sm.xml";
|
||||
const pForestD = [tGrassDForest + TERRAIN_SEPARATOR + oOak, tGrassDForest + TERRAIN_SEPARATOR + oOakLarge, tGrassDForest];
|
||||
const pForestP = [tGrassPForest + TERRAIN_SEPARATOR + oPine, tGrassPForest + TERRAIN_SEPARATOR + oAleppoPine, tGrassPForest];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround = -7;
|
||||
const heightLand = 3;
|
||||
const heightHill = 20;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -57,7 +61,6 @@ var clFood = createTileClass();
|
||||
var clBaseResource = createTileClass();
|
||||
|
||||
var playerHillRadius = defaultPlayerBaseRadius() / (isNomad() ? 1.5 : 1);
|
||||
var playerHillElevation = 20;
|
||||
|
||||
var [playerIDs, playerPosition, playerAngle] = playerPlacementCircle(fractionToTiles(0.35));
|
||||
|
||||
@@ -68,7 +71,7 @@ for (let i = 0; i < numPlayers; ++i)
|
||||
new ClumpPlacer(diskArea(playerHillRadius), 0.95, 0.6, 10, playerPosition[i].x, playerPosition[i].y),
|
||||
[
|
||||
new LayeredPainter([tCliff, tHill], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, playerHillElevation, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 2),
|
||||
paintClass(clPlayer)
|
||||
]);
|
||||
|
||||
@@ -121,7 +124,7 @@ var waterAreas = createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(100, 250), 0.8, 0.1, 10),
|
||||
[
|
||||
new LayeredPainter([tShoreBlend, tShore, tWater], [1, 1]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -7, 6),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 6),
|
||||
paintClass(clWater)
|
||||
],
|
||||
avoidClasses(clPlayer, 2, clWater, 20),
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "cantabrian_highlands.js",
|
||||
"Description" : "Each player starts on a hill surrounded by steep cliffs. Represents Cantabria, a mountainous region in the North of the Iberian peninsula.",
|
||||
"BaseTerrain" : ["temp_grass_long"],
|
||||
"BaseHeight" : 3,
|
||||
"Preview" : "cantabrian_highlands.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,10 @@ const aTree = g_Decoratives.tree;
|
||||
const pForest1 = [tForestFloor2 + TERRAIN_SEPARATOR + oTree1, tForestFloor2 + TERRAIN_SEPARATOR + oTree2, tForestFloor2];
|
||||
const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TERRAIN_SEPARATOR + oTree5, tForestFloor1];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, tMainTerrain);
|
||||
const heightLand = 3;
|
||||
const heightHill = 30;
|
||||
|
||||
InitMap(heightHill, tMainTerrain);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -57,9 +60,6 @@ var clFood = createTileClass();
|
||||
var clBaseResource = createTileClass();
|
||||
var clLand = createTileClass();
|
||||
|
||||
var landHeight = 3;
|
||||
var hillHeight = 30;
|
||||
|
||||
var playerCanyonRadius = scaleByMapSize(18, 32);
|
||||
|
||||
var [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.35));
|
||||
@@ -77,7 +77,7 @@ for (let i = 0; i < numPlayers; ++i)
|
||||
playerPosition[i].y),
|
||||
[
|
||||
new LayeredPainter([tMainTerrain, tMainTerrain], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 2),
|
||||
paintClass(j == 1 || isNomad() ? clLand : clPlayer)
|
||||
]);
|
||||
|
||||
@@ -86,7 +86,7 @@ createArea(
|
||||
new ClumpPlacer(diskArea(fractionToTiles(0.16)), 0.7, 0.1, 10, mapCenter.x, mapCenter.y),
|
||||
[
|
||||
new LayeredPainter([tMainTerrain, tMainTerrain], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 3),
|
||||
paintClass(clLand)
|
||||
]);
|
||||
|
||||
@@ -108,7 +108,7 @@ for (let i = 0; i < scaleByMapSize(9, 16); ++i)
|
||||
0.1,
|
||||
0),
|
||||
[
|
||||
new SmoothElevationPainter(ELEVATION_SET, hillHeight, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 3),
|
||||
paintClass(clHill2)
|
||||
],
|
||||
avoidClasses(clPlayer, 6, clHill2, 3, clHill, 2));
|
||||
@@ -122,7 +122,7 @@ for (let g = 0; g < scaleByMapSize(5, 30); ++g)
|
||||
new ClumpPlacer(diskArea(fractionToTiles(0.06)), 0.7, 0.1, 10, tx, tz),
|
||||
[
|
||||
new LayeredPainter([tMainTerrain, tMainTerrain], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 3),
|
||||
paintClass(clLand)
|
||||
],
|
||||
avoidClasses(clLand, 6));
|
||||
@@ -160,7 +160,7 @@ for (let g = 0; g < scaleByMapSize(5, 30); ++g)
|
||||
new PathPlacer(tx, tz, playerPosition[playerID].x, playerPosition[playerID].y, scaleByMapSize(11, 17), 0.4, scaleByMapSize(3, 12), 0.1, 0.1),
|
||||
[
|
||||
new LayeredPainter([tMainTerrain, tMainTerrain], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 3),
|
||||
paintClass(clLand)
|
||||
]);
|
||||
}
|
||||
@@ -184,7 +184,7 @@ for (let i = 0; i < numPlayers; ++i)
|
||||
0),
|
||||
[
|
||||
new LayeredPainter([tRoadWild, tRoad], [1]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 2),
|
||||
paintClass(clLand),
|
||||
paintClass(clHill)
|
||||
]);
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "canyon.js",
|
||||
"Description" : "Players start around the map in deep canyons.",
|
||||
"BaseTerrain" : ["medit_sea_depths"],
|
||||
"BaseHeight" : 30,
|
||||
"Preview" : "canyon.png",
|
||||
"SupportedBiomes": true,
|
||||
"CircularMap" : true
|
||||
|
||||
@@ -40,7 +40,10 @@ const aBushSmall = g_Decoratives.bushSmall;
|
||||
const pForest1 = [tForestFloor2 + TERRAIN_SEPARATOR + oTree1, tForestFloor2 + TERRAIN_SEPARATOR + oTree2, tForestFloor2];
|
||||
const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TERRAIN_SEPARATOR + oTree5, tForestFloor1];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround = -5;
|
||||
const heightLand = 3;
|
||||
|
||||
InitMap(heightSeaGround, g_MapSettings.BaseTerrain);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -68,7 +71,7 @@ createArea(
|
||||
0,
|
||||
[Math.floor(fractionToTiles(0.33))]),
|
||||
[
|
||||
new SmoothElevationPainter(ELEVATION_SET, 3, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 4),
|
||||
paintClass(clLand)
|
||||
]);
|
||||
|
||||
@@ -87,7 +90,7 @@ for (let i = 0; i < numPlayers; ++i)
|
||||
0,
|
||||
[Math.floor(scaleByMapSize(23, 50))]),
|
||||
[
|
||||
new SmoothElevationPainter(ELEVATION_SET, 3, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 4),
|
||||
paintClass(clLand)
|
||||
]);
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "continent.js",
|
||||
"Description" : "All players starts on a continent surrounded by water.",
|
||||
"BaseTerrain" : ["medit_sea_depths"],
|
||||
"BaseHeight" : -5,
|
||||
"Preview" : "continent.png",
|
||||
"SupportedBiomes": true,
|
||||
"CircularMap" : true
|
||||
|
||||
@@ -41,7 +41,10 @@ const aDecorativeRock = "actor|geology/stone_granite_med.xml";
|
||||
|
||||
const pForest = [tForestFloor, tForestFloor + TERRAIN_SEPARATOR + oCarob, tForestFloor + TERRAIN_SEPARATOR + oDatePalm, tForestFloor + TERRAIN_SEPARATOR + oSDatePalm, tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
var heightSeaGround = -4;
|
||||
var heightLand = 3;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -58,9 +61,6 @@ var clBaseResource = createTileClass();
|
||||
var clGrass = createTileClass();
|
||||
var clHill = createTileClass();
|
||||
|
||||
var landHeight = getMapBaseHeight();
|
||||
var waterHeight = -4;
|
||||
|
||||
log("Creating the main river");
|
||||
var riverAngle = randFloat(0, Math.PI);
|
||||
var riverWidth = scaleByMapSize(15, 70);
|
||||
@@ -69,13 +69,13 @@ var riverEnd = new Vector2D(mapCenter.x, mapSize).rotateAround(riverAngle, mapCe
|
||||
|
||||
createArea(
|
||||
new PathPlacer(riverStart.x, riverStart.y, riverEnd.x, riverEnd.y, riverWidth, 0.2, 15 * scaleByMapSize(1, 3), 0.04, 0.01),
|
||||
new SmoothElevationPainter(ELEVATION_SET, waterHeight, 4));
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 4));
|
||||
|
||||
log("Creating small puddles at the map border to ensure players being separated...");
|
||||
for (let point of [riverStart, riverEnd])
|
||||
createArea(
|
||||
new ClumpPlacer(Math.floor(diskArea(riverWidth / 2)), 0.95, 0.6, 10, point.x, point.y),
|
||||
new SmoothElevationPainter(ELEVATION_SET, waterHeight, 4));
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 4));
|
||||
|
||||
log("Creating passage connecting the two riversides...");
|
||||
var passageStart = riverStart.rotateAround(Math.PI / 2, mapCenter);
|
||||
@@ -91,7 +91,7 @@ createArea(
|
||||
3 * scaleByMapSize(1, 4),
|
||||
0.1,
|
||||
0.01),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 4));
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 4));
|
||||
|
||||
paintTerrainBasedOnHeight(-6, 1, 1, tWater);
|
||||
paintTerrainBasedOnHeight(1, 2, 1, tShore);
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "corinthian_isthmus.js",
|
||||
"Description" : "Two Mediterranean land masses connected by a narrow spit of land, called an 'Isthmus'.",
|
||||
"BaseTerrain" : ["medit_grass_shrubs", "medit_rocks_grass_shrubs", "medit_rocks_shrubs", "medit_rocks_grass", "medit_shrubs"],
|
||||
"BaseHeight" : 3,
|
||||
"CircularMap" : true,
|
||||
"Preview" : "corinthian_isthmus.png"
|
||||
}
|
||||
|
||||
@@ -38,7 +38,18 @@ var aPlantC = "actor|props/flora/grass_soft_tuft_a.xml";
|
||||
|
||||
var aStandingStone = "actor|props/special/eyecandy/standing_stones.xml";
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, tVeryDeepWater);
|
||||
var heightSeaGround = -8;
|
||||
var heightCreeks = -5;
|
||||
var heightBeaches = -1;
|
||||
var heightMain = 5;
|
||||
|
||||
var heightOffsetMainRelief = 30;
|
||||
var heightOffsetLevel1 = 9;
|
||||
var heightOffsetLevel2 = 8;
|
||||
var heightOffsetBumps = 2;
|
||||
var heightOffsetAntiBumps = -5;
|
||||
|
||||
InitMap(heightSeaGround, tVeryDeepWater);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -70,15 +81,6 @@ var nbBeaches = scaleByMapSize(2, 5);
|
||||
var nbPassagesLevel1 = scaleByMapSize(4, 8);
|
||||
var nbPassagesLevel2 = scaleByMapSize(2, 4);
|
||||
|
||||
var heightMain = 5;
|
||||
var heightCreeks = -5;
|
||||
var heightBeaches = -1;
|
||||
var heightOffsetMainRelief = 30;
|
||||
var heightOffsetLevel1 = 9;
|
||||
var heightOffsetLevel2 = 8;
|
||||
var heightOffsetBumps = 2;
|
||||
var heightOffsetAntiBumps = -5;
|
||||
|
||||
log("Creating Corsica and Sardinia...");
|
||||
var swapAngle = randBool() ? Math.PI / 2 : 0;
|
||||
var islandLocations = [new Vector2D(0.05, 0.05), new Vector2D(0.95, 0.95)].map(v => v.mult(mapSize).rotateAround(-swapAngle, mapCenter));
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"Script" : "corsica.js",
|
||||
"Description" : "The players start on two opposing islands, both with a very jagged relief that will make landing difficult.",
|
||||
"BaseTerrain" : ["medit_dirt", "medit_dirt_b", "medit_dirt_c"],
|
||||
"BaseHeight" : -8,
|
||||
"Keywords": ["naval"],
|
||||
"Preview" : "corsica.png",
|
||||
"CircularMap" : false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,12 @@ const pPineForest = [tForestFloor+TERRAIN_SEPARATOR+oPine, tGrass];
|
||||
const pPoplarForest = [tForestFloor+TERRAIN_SEPARATOR+oLombardyPoplar, tGrass];
|
||||
const pMainForest = [tForestFloor+TERRAIN_SEPARATOR+oCarob, tForestFloor+TERRAIN_SEPARATOR+oBeech, tGrass, tGrass];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround = -5;
|
||||
const heightLand = 3;
|
||||
const heightHill = 12;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightSeaGround, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -98,7 +103,7 @@ function createCycladicArchipelagoIsland(position, tileClass, radius, coralRadiu
|
||||
new ClumpPlacer(diskArea(radius), 0.7, 0.1, 10, position.x, position.y),
|
||||
[
|
||||
new LayeredPainter([tOceanCoral, tBeachWet, tBeachDry, tBeach, tBeachBlend, tGrass], [1, 3, 1, 1, 2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 3, 5),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 5),
|
||||
paintClass(tileClass)
|
||||
],
|
||||
avoidClasses(clPlayer, 0)));
|
||||
@@ -155,7 +160,7 @@ Engine.SetProgress(20);
|
||||
log("Creating bumps...");
|
||||
createAreasInAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 60), 0.3, 0.06, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 2, 3),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBump, 3),
|
||||
avoidClasses(clCity, 0),
|
||||
scaleByMapSize(25, 75),15,
|
||||
areas);
|
||||
@@ -167,7 +172,7 @@ createAreasInAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 150), 0.2, 0.1, 1),
|
||||
[
|
||||
new LayeredPainter([tCliff, tCliffShrubs], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 12, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 2),
|
||||
paintClass(clHill)
|
||||
],
|
||||
avoidClasses(clCity, 15, clHill, 15),
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "cycladic_archipelago.js",
|
||||
"Description" : "Each player starts on an island surrounded by water.\n\nThe Cyclades is an island group in the Aegean Sea, south-east of the mainland of Greece. They are one of the island groups which constitute the Aegean archipelago. The name refers to the islands around the sacred island of Delos. The Cyclades comprise about 220 islands. The islands are peaks of a submerged mountainous terrain, with the exception of two volcanic islands, Milos and Santorini. The climate is generally dry and mild, but with the exception of Naxos the soil is not very fertile.",
|
||||
"BaseTerrain" : ["medit_sea_depths"],
|
||||
"BaseHeight" : -5,
|
||||
"Keywords": ["naval"],
|
||||
"Preview" : "cycladic_archipelago.png",
|
||||
"CircularMap" : true
|
||||
|
||||
@@ -117,7 +117,13 @@ const normalMapSize = 320;
|
||||
// Minimum distance from the map border to ship ungarrison points
|
||||
const ShorelineDistance = 15;
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround = -3;
|
||||
const heightShore = 1;
|
||||
const heightLand = 3;
|
||||
const heightPath = 5;
|
||||
const heightIsland = 6;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -151,9 +157,6 @@ var clPath = createTileClass();
|
||||
var clRitualPlace = createTileClass();
|
||||
|
||||
var waterWidth = fractionToTiles(0.3);
|
||||
var waterHeight = -3;
|
||||
var shoreHeight = 1;
|
||||
var landHeight = 2;
|
||||
|
||||
// How many treasures will be placed near the gallic civic centers
|
||||
var gallicCCTreasureCount = randIntInclusive(8, 12);
|
||||
@@ -204,7 +207,7 @@ if (gallicCC)
|
||||
placer,
|
||||
[
|
||||
new LayeredPainter([tShore, tRoad, tRoad], [1, 3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 5, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightPath, 4),
|
||||
paintClass(clPath)
|
||||
]);
|
||||
|
||||
@@ -359,8 +362,8 @@ paintRiver({
|
||||
"width": waterWidth,
|
||||
"fadeDist": scaleByMapSize(6, 25),
|
||||
"deviation": 0,
|
||||
"waterHeight": waterHeight,
|
||||
"landHeight": landHeight,
|
||||
"heightRiverbed": heightSeaGround,
|
||||
"heightLand": heightLand,
|
||||
"meanderShort": 30,
|
||||
"meanderLong": 0,
|
||||
"waterFunc": (ix, iz, height, riverFraction) => {
|
||||
@@ -382,8 +385,8 @@ Engine.SetProgress(30);
|
||||
paintTileClassBasedOnHeight(-Infinity, 0.7, Elevation_ExcludeMin_ExcludeMax, clWater);
|
||||
|
||||
log("Creating shores...");
|
||||
paintTerrainBasedOnHeight(-Infinity, shoreHeight, 0, tWater);
|
||||
paintTerrainBasedOnHeight(shoreHeight, landHeight, 0, tShore);
|
||||
paintTerrainBasedOnHeight(-Infinity, heightShore, 0, tWater);
|
||||
paintTerrainBasedOnHeight(heightShore, heightLand, 0, tShore);
|
||||
Engine.SetProgress(35);
|
||||
|
||||
log("Creating bumps...");
|
||||
@@ -429,7 +432,7 @@ createAreas(
|
||||
new ChainPlacer(Math.floor(scaleByMapSize(3, 4)), Math.floor(scaleByMapSize(4, 8)), Math.floor(scaleByMapSize(50, 80)), 0.5),
|
||||
[
|
||||
new LayeredPainter([tWater, tShore, tIsland], [2, 1]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 6, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightIsland, 4),
|
||||
paintClass(clIsland)
|
||||
],
|
||||
[avoidClasses(clIsland, 30), stayClasses (clWater, 10)],
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "danubius.js",
|
||||
"Description" : "Players start along the banks of the river Danube in the period following the expansion into Pannonia by the Celtic Boii tribe. Seeking to consolidate their hold on this land, celtic reinforcements have been sent to root out the remaining foreign cultures. Players not only have to vie for power amongst themselves, but also beat back these ruthless invaders. Ultimately, the Boii were defeated by the rising power of the Dacians, hence leading to the reemergence of the Geto-Dacian Confederation under King Burebista.",
|
||||
"BaseTerrain" : ["temp_grass_aut", "temp_grass_plants_aut", "temp_grass_c_aut", "temp_grass_d_aut"],
|
||||
"BaseHeight" : 4,
|
||||
"Keywords": ["trigger"],
|
||||
"CircularMap" : true,
|
||||
"Preview" : "danubius.png",
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
Engine.LoadLibrary("rmgen");
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
|
||||
var clPlayer = createTileClass();
|
||||
var clPath = createTileClass();
|
||||
var clHill = createTileClass();
|
||||
var clForest = createTileClass();
|
||||
var clBaseResource = createTileClass();
|
||||
|
||||
var templateStone = "gaia/geology_stone_temperate";
|
||||
var templateStoneMine = "gaia/geology_stonemine_temperate_quarry";
|
||||
var templateMetalMine = "gaia/geology_metal_temperate_slabs";
|
||||
@@ -34,11 +26,23 @@ var terrainHillBorder = ["temp_highlands", "temp_highlands", "temp_highlands", "
|
||||
"temp_highlands", "temp_highlands", "temp_highlands", "temp_cliff_b", "temp_dirt_gravel_plants",
|
||||
"temp_highlands|gaia/fauna_goat"];
|
||||
|
||||
var heightPath = -2;
|
||||
var heightLand = 0;
|
||||
var heightOffsetRandomPath = 1;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
var mapSize = getMapSize();
|
||||
var mapArea = getMapArea();
|
||||
var mapRadius = mapSize/2;
|
||||
var mapCenter = getMapCenter();
|
||||
|
||||
var clPlayer = createTileClass();
|
||||
var clPath = createTileClass();
|
||||
var clHill = createTileClass();
|
||||
var clForest = createTileClass();
|
||||
var clBaseResource = createTileClass();
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var baseRadius = 20;
|
||||
var minPlayerRadius = Math.min(mapRadius - 1.5 * baseRadius, 5/8 * mapRadius);
|
||||
@@ -113,7 +117,7 @@ for (let i = 0; i < numPlayers + (pathBlending ? 1 : 0); ++i)
|
||||
new RandomPathPlacer(pathStart, pathEnd, 1.25, baseRadius / 2, pathBlending),
|
||||
[
|
||||
new TerrainPainter(terrainPath),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -2, 2, 1),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightPath, 2, heightOffsetRandomPath),
|
||||
paintClass(clPath)
|
||||
],
|
||||
avoidClasses(clHill, 0, clBaseResource, 4));
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "deep_forest.js",
|
||||
"Description" : "A deep dark forest in Germania.",
|
||||
"BaseTerrain" : ["temp_grass", "temp_grass_b", "temp_grass_c", "temp_grass_d", "temp_grass_long_b", "temp_grass_clovers_2", "temp_grass_mossy", "temp_grass_plants"],
|
||||
"BaseHeight" : 0,
|
||||
"Preview" : "deep_forest.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ Engine.LoadLibrary("rmbiome");
|
||||
|
||||
setSelectedBiome();
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_Terrains.mainTerrain);
|
||||
InitMap(2, g_Terrains.mainTerrain);
|
||||
|
||||
initTileClasses();
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "empire.js",
|
||||
"Description" : "A neighboring province has pledged alegiance to your rule. It's up to you to command them to victory.",
|
||||
"BaseTerrain" : ["medit_sea_depths"],
|
||||
"BaseHeight" : 2,
|
||||
"Keywords": [],
|
||||
"Preview" : "empire.png",
|
||||
"SupportedBiomes": true,
|
||||
|
||||
@@ -38,7 +38,11 @@ const aLillies = "actor|props/flora/water_lillies.xml";
|
||||
|
||||
const pForestD = [tGrassDForest + TERRAIN_SEPARATOR + oBeech, tGrassDForest];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
var heightSeaGround = -4;
|
||||
var heightShore = 1;
|
||||
var heightLand = 3;
|
||||
|
||||
InitMap(heightShore, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapCenter = getMapCenter();
|
||||
@@ -55,9 +59,6 @@ var clFood = createTileClass();
|
||||
var clBaseResource = createTileClass();
|
||||
var clShallow = createTileClass();
|
||||
|
||||
var landHeight = 3;
|
||||
var waterHeight = -4;
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementRiver(Math.PI / 2, fractionToTiles(0.6)),
|
||||
"PlayerTileClass": clPlayer,
|
||||
@@ -94,15 +95,15 @@ paintRiver({
|
||||
"width": fractionToTiles(0.25),
|
||||
"fadeDist": scaleByMapSize(3, 10),
|
||||
"deviation": 0,
|
||||
"waterHeight": waterHeight,
|
||||
"landHeight": landHeight,
|
||||
"heightRiverbed": heightSeaGround,
|
||||
"heightLand": heightLand,
|
||||
"meanderShort": 20,
|
||||
"meanderLong": 0,
|
||||
"waterFunc": (ix, iz, height, riverFraction) => {
|
||||
createTerrain(height < -1.5 ? tWater : tShore).place(ix, iz);
|
||||
},
|
||||
"landFunc": (ix, iz, shoreDist1, shoreDist2) => {
|
||||
setHeight(ix, iz, landHeight + 0.1);
|
||||
setHeight(ix, iz, heightLand + 0.1);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -112,7 +113,7 @@ createTributaryRivers(
|
||||
true,
|
||||
randIntInclusive(9, scaleByMapSize(13, 21)),
|
||||
scaleByMapSize(10, 20),
|
||||
waterHeight,
|
||||
heightSeaGround,
|
||||
[-6, -1.5],
|
||||
Math.PI / 5,
|
||||
clWater,
|
||||
@@ -120,7 +121,7 @@ createTributaryRivers(
|
||||
avoidClasses(clPlayer, 8, clBaseResource, 4));
|
||||
|
||||
paintTerrainBasedOnHeight(-5, 1, 1, tWater);
|
||||
paintTerrainBasedOnHeight(1, landHeight, 1, tShore);
|
||||
paintTerrainBasedOnHeight(1, heightLand, 1, tShore);
|
||||
paintTileClassBasedOnHeight(-6, 0.5, 1, clWater);
|
||||
Engine.SetProgress(25);
|
||||
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"Script" : "english_channel.js",
|
||||
"Description" : "Players start in either northern France or southern Britain while the English channel separates them.",
|
||||
"BaseTerrain" : ["temp_grass_long"],
|
||||
"BaseHeight" : 1,
|
||||
"Keywords": ["naval"],
|
||||
"Preview" : "english_channel.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,12 @@ const pForestP = [
|
||||
tForestFloor1
|
||||
];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
var heightSeaGround = -4;
|
||||
var heightLand = 1;
|
||||
var heightHill = 18;
|
||||
var heightPlayerHill = 25;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapCenter = getMapCenter();
|
||||
@@ -69,8 +74,7 @@ var clBumps = createTileClass();
|
||||
var clTower = createTileClass();
|
||||
var clRain = createTileClass();
|
||||
|
||||
var ccMountainHeight = 25;
|
||||
var ccMountainSize = defaultPlayerBaseRadius();
|
||||
var playerMountainSize = defaultPlayerBaseRadius();
|
||||
|
||||
var [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.35));
|
||||
|
||||
@@ -80,9 +84,9 @@ if (!isNomad())
|
||||
{
|
||||
// This one consists of many bumps, creating an omnidirectional ramp
|
||||
createMountain(
|
||||
ccMountainHeight,
|
||||
ccMountainSize,
|
||||
ccMountainSize,
|
||||
heightPlayerHill,
|
||||
playerMountainSize,
|
||||
playerMountainSize,
|
||||
Math.floor(scaleByMapSize(4, 10)),
|
||||
undefined,
|
||||
playerPosition[i].x,
|
||||
@@ -93,10 +97,10 @@ if (!isNomad())
|
||||
|
||||
// Flatten the initial CC area
|
||||
createArea(
|
||||
new ClumpPlacer(diskArea(ccMountainSize), 0.95, 0.6, 10, playerPosition[i].x,playerPosition[i].y),
|
||||
new ClumpPlacer(diskArea(playerMountainSize), 0.95, 0.6, 10, playerPosition[i].x,playerPosition[i].y),
|
||||
[
|
||||
new LayeredPainter([tHillVeryDark, tHillMedium1], [ccMountainSize]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, ccMountainHeight, ccMountainSize),
|
||||
new LayeredPainter([tHillVeryDark, tHillMedium1], [playerMountainSize]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightPlayerHill, playerMountainSize),
|
||||
paintClass(clPlayer)
|
||||
]);
|
||||
}
|
||||
@@ -138,7 +142,7 @@ createAreas(
|
||||
new ChainPlacer(5, 6, Math.floor(scaleByMapSize(10, 14)), 0.1),
|
||||
[
|
||||
new LayeredPainter([tShoreBlend, tShore, tWater], [1, 1]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -4, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 3),
|
||||
paintClass(clWater)
|
||||
],
|
||||
avoidClasses(clPlayer, 0, clHill, 2, clWater, 12),
|
||||
@@ -154,7 +158,7 @@ createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 150), 0.2, 0.1, 1),
|
||||
[
|
||||
new LayeredPainter([tHillDark, tHillDark, tHillDark], [2, 2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 18, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 2),
|
||||
paintClass(clHill)
|
||||
],
|
||||
avoidClasses(clPlayer, 0, clHill, 15, clWater, 2, clBaseResource, 2),
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"structures/ptol_lighthouse"
|
||||
],
|
||||
"BaseTerrain" : "ocean_rock_a",
|
||||
"BaseHeight" : 1,
|
||||
"Keywords": ["trigger"],
|
||||
"CircularMap" : true,
|
||||
"Preview" : "extinctvolcano.png",
|
||||
|
||||
@@ -46,7 +46,11 @@ const aBushSmall = g_Decoratives.bushSmall;
|
||||
const pForest1 = [tForestFloor2 + TERRAIN_SEPARATOR + oTree1, tForestFloor2 + TERRAIN_SEPARATOR + oTree2, tForestFloor2];
|
||||
const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TERRAIN_SEPARATOR + oTree5, tForestFloor1];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, tWater);
|
||||
const heightSeaGround = -2;
|
||||
const heightLand = 2;
|
||||
const shoreRadius = 6;
|
||||
|
||||
InitMap(heightSeaGround, tWater);
|
||||
|
||||
const clPlayer = createTileClass();
|
||||
const clHill = createTileClass();
|
||||
@@ -62,16 +66,12 @@ const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
const mapCenter = getMapCenter();
|
||||
|
||||
const landHeight = 2;
|
||||
const waterHeight = getMapBaseHeight();
|
||||
const shoreRadius = 6;
|
||||
|
||||
log("Creating the water...");
|
||||
createArea(
|
||||
new ClumpPlacer(getMapArea(), 1, 1, 1, mapCenter.x, mapCenter.y),
|
||||
[
|
||||
new LayeredPainter([tWater, tWater, tShore], [1, 4]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, waterHeight, 2)
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 2)
|
||||
],
|
||||
avoidClasses(clPlayer, 5));
|
||||
|
||||
@@ -89,7 +89,7 @@ for (let i = 0; i < numPlayers; ++i)
|
||||
playerPosition[i].y),
|
||||
[
|
||||
new LayeredPainter([tShore, tMainTerrain], [shoreRadius]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, shoreRadius),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, shoreRadius),
|
||||
paintClass(clHill)
|
||||
]);
|
||||
|
||||
@@ -138,7 +138,7 @@ createArea(
|
||||
[Math.floor(mapSize * 0.01)]),
|
||||
[
|
||||
new LayeredPainter([tShore, tMainTerrain], [shoreRadius, 100]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, shoreRadius),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, shoreRadius),
|
||||
paintClass(clHill)
|
||||
],
|
||||
avoidClasses(clPlayer, 40));
|
||||
@@ -242,8 +242,8 @@ for (let size of [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8,
|
||||
numb * scaleByMapSize(15, 45));
|
||||
|
||||
log("Painting shorelines...");
|
||||
paintTerrainBasedOnHeight(1, landHeight, 0, tMainTerrain);
|
||||
paintTerrainBasedOnHeight(waterHeight, 1, 3, tTier1Terrain);
|
||||
paintTerrainBasedOnHeight(1, heightLand, 0, tMainTerrain);
|
||||
paintTerrainBasedOnHeight(heightSeaGround, 1, 3, tTier1Terrain);
|
||||
|
||||
log("Creating grass patches...");
|
||||
for (let size of [scaleByMapSize(2, 4), scaleByMapSize(3, 7), scaleByMapSize(5, 15)])
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "flood.js",
|
||||
"Description" : "A great flood has moved across the valley enabling ships and troops to battle in chest deep waters.",
|
||||
"BaseTerrain" : ["medit_sand_wet"],
|
||||
"BaseHeight" : -2,
|
||||
"SupportedBiomes": [
|
||||
"temperate",
|
||||
"snowy",
|
||||
|
||||
@@ -40,7 +40,10 @@ const pForestD = [tForestFloor + TERRAIN_SEPARATOR + oBeech, tForestFloor];
|
||||
const pForestO = [tForestFloor + TERRAIN_SEPARATOR + oOak, tForestFloor];
|
||||
const pForestP = [tForestFloor + TERRAIN_SEPARATOR + oPine, tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
var heightSeaGround = -4;
|
||||
var heightLand = 3;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -137,7 +140,7 @@ var waterAreas = createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(100,250), 0.8, 0.1, 10),
|
||||
[
|
||||
new LayeredPainter([tShore, tWater, tWater], [1, 1]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -4, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 3),
|
||||
paintClass(clWater)
|
||||
],
|
||||
avoidClasses(clPlayer, 7, clWater, 20),
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "fortress.js",
|
||||
"Description" : "Players start in a ready-made fortress with piles of resources.",
|
||||
"BaseTerrain" : ["temp_grass_aut", "temp_grass_aut", "temp_grass_d_aut"],
|
||||
"BaseHeight" : 3,
|
||||
"CircularMap" : true,
|
||||
"Preview" : "fortress.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"Description" : "A wild, unknown landscape awaits rival explorers.",
|
||||
"BaseTerrain" : ["medit_sea_depths"],
|
||||
"Preview" : "frontier.png",
|
||||
"BaseHeight" : 2,
|
||||
"SupportedBiomes": true,
|
||||
"CircularMap" : true
|
||||
}
|
||||
|
||||
@@ -42,7 +42,13 @@ const aBushSmall = g_Decoratives.bushSmall;
|
||||
const pForest1 = [tForestFloor2 + TERRAIN_SEPARATOR + oTree1, tForestFloor2 + TERRAIN_SEPARATOR + oTree2, tForestFloor2];
|
||||
const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TERRAIN_SEPARATOR + oTree5, tForestFloor1];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, tMainTerrain);
|
||||
var heightSeaGround = -4;
|
||||
var heightShallow = -2;
|
||||
var heightLand = 3;
|
||||
var heighRing = 4;
|
||||
var heightHill = 20;
|
||||
|
||||
InitMap(heightLand, tMainTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -105,7 +111,7 @@ else if (mapSize == 448)
|
||||
log("Creating big circular lake...");
|
||||
createArea(
|
||||
new ClumpPlacer(mapArea * 0.23, 1, 1, 10, mapCenter.x, mapCenter.y),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -3, 4));
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightShallow, 4));
|
||||
|
||||
for (let m = 0; m < numPlayers * split; ++m)
|
||||
{
|
||||
@@ -115,7 +121,7 @@ for (let m = 0; m < numPlayers * split; ++m)
|
||||
let position2 = Vector2D.add(mapCenter, new Vector2D(fractionToTiles(0.6), 0).rotate(-angle));
|
||||
createArea(
|
||||
new PathPlacer(position1.x, position1.y, position2.x, position2.y, scaleByMapSize(14, 40), 0, scaleByMapSize(3, 9), 0.2, 0.05),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -4, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 4),
|
||||
avoidClasses(clPlayer, 5));
|
||||
|
||||
log("Create path from the island to the center...");
|
||||
@@ -124,28 +130,28 @@ for (let m = 0; m < numPlayers * split; ++m)
|
||||
position2 = Vector2D.add(mapCenter, new Vector2D(fractionToTiles(0.49), 0).rotate(-angle));
|
||||
createArea(
|
||||
new PathPlacer(position1.x, position1.y, position2.x, position2.y, scaleByMapSize(10, 40), 0, scaleByMapSize(3, 9), 0.2, 0.05),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 3, 4));
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 4));
|
||||
}
|
||||
|
||||
log("Creating ring of land connecting players...");
|
||||
createArea(
|
||||
new ClumpPlacer(mapArea * 0.15, 1, 1, 10, mapCenter.x, mapCenter.y),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 4, 4));
|
||||
new SmoothElevationPainter(ELEVATION_SET, heighRing, 4));
|
||||
|
||||
log("Creating ring of water separating the central hill from the ring...");
|
||||
createArea(
|
||||
new ClumpPlacer(mapArea * 0.09, 1, 1, 10, mapCenter.x, mapCenter.y),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -2, 3));
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightShallow, 3));
|
||||
|
||||
log("Creating central island...");
|
||||
createArea(
|
||||
new ClumpPlacer(Math.square(mapSize - 50) * 0.09, 1, 1, 10, mapCenter.x, mapCenter.y),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 4, 3));
|
||||
new SmoothElevationPainter(ELEVATION_SET, heighRing, 3));
|
||||
|
||||
log("Creating hill on the central island...");
|
||||
createArea(
|
||||
new ClumpPlacer(diskArea(scaleByMapSize(6, 18)) * 7, 1, 1, 10, mapCenter.x, mapCenter.y),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 20, 8));
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 8));
|
||||
|
||||
paintTerrainBasedOnHeight(-6, 1, 1, tWater);
|
||||
paintTerrainBasedOnHeight(1, 2, 1, tShore);
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "gear.js",
|
||||
"Description" : "A land with waterways decorated in a manner similar to spider web.",
|
||||
"BaseTerrain" : ["medit_sea_depths"],
|
||||
"BaseHeight" : 4,
|
||||
"CircularMap" : true,
|
||||
"SupportedBiomes": true,
|
||||
"Preview" : "gear.png"
|
||||
|
||||
@@ -35,7 +35,12 @@ const aBushSmall = "actor|props/flora/bush_medit_sm.xml";
|
||||
const pForestP = [tForestFloorP + TERRAIN_SEPARATOR + oPoplar, tForestFloorP];
|
||||
const pForestC = [tForestFloorC + TERRAIN_SEPARATOR + oCarob, tForestFloorC];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
var heightSeaGround = -3;
|
||||
var heightShallow = -1.5;
|
||||
var heightShore = 2;
|
||||
var heightLand = 3;
|
||||
|
||||
InitMap(heightSeaGround, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -53,11 +58,6 @@ var clLand = createTileClass();
|
||||
var clRiver = createTileClass();
|
||||
var clShallow = createTileClass();
|
||||
|
||||
var landHeight = 3;
|
||||
var shoreHeight = 2;
|
||||
var shallowHeight = -1.5;
|
||||
var waterHeight = -3;
|
||||
|
||||
log("Create the continent body");
|
||||
var continentCenter = new Vector2D(fractionToTiles(0.5), fractionToTiles(0.7)).round();
|
||||
createArea(
|
||||
@@ -72,7 +72,7 @@ createArea(
|
||||
[Math.floor(fractionToTiles(0.49))]),
|
||||
[
|
||||
new LayeredPainter([tGrass, tGrass, tGrass], [4, 2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 4),
|
||||
paintClass(clLand)
|
||||
]);
|
||||
|
||||
@@ -117,20 +117,20 @@ paintRiver({
|
||||
"width": fractionToTiles(0.07),
|
||||
"fadeDist": scaleByMapSize(3, 12),
|
||||
"deviation": 1,
|
||||
"waterHeight": waterHeight,
|
||||
"landHeight": shoreHeight,
|
||||
"heightRiverbed": heightSeaGround,
|
||||
"heightLand": heightShore,
|
||||
"meanderShort": 12,
|
||||
"meanderLong": 0,
|
||||
"waterFunc": (ix, iz, height, z) => {
|
||||
addToClass(ix, iz, clRiver);
|
||||
createTerrain(tWater).place(ix, iz);
|
||||
|
||||
if (height < shallowHeight && (
|
||||
if (height < heightShallow && (
|
||||
z > 0.3 && z < 0.4 ||
|
||||
z > 0.5 && z < 0.6 ||
|
||||
z > 0.7 && z < 0.8))
|
||||
{
|
||||
setHeight(ix, iz, shallowHeight);
|
||||
setHeight(ix, iz, heightShallow);
|
||||
addToClass(ix, iz, clShallow);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "guadalquivir_river.js",
|
||||
"Description" : "Players start in the shores of the Mediterranean Sea with a river flowing between them.\n\nThe Guadalquivir is the fifth longest river in the Iberian peninsula and the second longest river with its entire length in Spain. The Guadalquivir river is the only great navigable river in Spain. Currently it is navigable to Seville, but in Roman times it was navigable to Cordoba. The ancient city of Tartessos was said to have been located at the mouth of the Guadalquivir, although its site has not yet been found.",
|
||||
"BaseTerrain" : ["medit_sand_wet"],
|
||||
"BaseHeight" : -5,
|
||||
"Preview" : "guadalquivir_river.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
|
||||
@@ -7,8 +7,9 @@ var biome = pickRandom(["late_spring", "winter", "frozen_lake"]);
|
||||
if (biome == "late_spring")
|
||||
{
|
||||
log("Late spring biome...");
|
||||
var waterHeight = -3;
|
||||
var shoreHeight = 1;
|
||||
var heightSeaGround = -3;
|
||||
var heightShore = 1;
|
||||
var heightLand = 3;
|
||||
|
||||
var fishCount = { "min": 20, "max": 80 };
|
||||
var bushCount = { "min": 13, "max": 200 };
|
||||
@@ -51,8 +52,9 @@ if (biome == "late_spring")
|
||||
else if (biome == "winter")
|
||||
{
|
||||
log("Winter biome...");
|
||||
var waterHeight = -3;
|
||||
var shoreHeight = 1;
|
||||
var heightSeaGround = -3;
|
||||
var heightShore = 1;
|
||||
var heightLand = 3;
|
||||
|
||||
var fishCount = { "min": 20, "max": 80 };
|
||||
var bushCount = { "min": 13, "max": 200 };
|
||||
@@ -92,8 +94,9 @@ else if (biome == "winter")
|
||||
else if (biome == "frozen_lake")
|
||||
{
|
||||
log("Frozen lake biome...");
|
||||
var waterHeight = 0;
|
||||
var shoreHeight = 2;
|
||||
var heightSeaGround = 0;
|
||||
var heightShore = 2;
|
||||
var heightLand = 3;
|
||||
|
||||
var fishCount = { "min": 0, "max": 0 };
|
||||
var bushCount = { "min": 0, "max": 0 };
|
||||
@@ -133,7 +136,7 @@ else if (biome == "frozen_lake")
|
||||
|
||||
const pForest = [tForestFloor + TERRAIN_SEPARATOR + oPine, tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, tPrimary);
|
||||
InitMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -203,13 +206,13 @@ for (let position of gulfLakePositions)
|
||||
[Math.floor(position.radius)]),
|
||||
[
|
||||
new LayeredPainter([tPrimary, tPrimary, tPrimary, tPrimary], [1, 4, 2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, waterHeight, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 4),
|
||||
paintClass(clWater)
|
||||
],
|
||||
avoidClasses(clPlayer,scaleByMapSize(20, 28)));
|
||||
|
||||
paintTerrainBasedOnHeight(shoreHeight, getMapBaseHeight(), Elevation_ExcludeMin_ExcludeMax, tShore);
|
||||
paintTerrainBasedOnHeight(-Infinity, shoreHeight, Elevation_ExcludeMin_IncludeMax, tWater);
|
||||
paintTerrainBasedOnHeight(heightShore, heightLand, Elevation_ExcludeMin_ExcludeMax, tShore);
|
||||
paintTerrainBasedOnHeight(-Infinity, heightShore, Elevation_ExcludeMin_IncludeMax, tWater);
|
||||
|
||||
createBumps(avoidClasses(clWater, 2, clPlayer, 10));
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "gulf_of_bothnia.js",
|
||||
"Description" : "Players start around a gulf dotted with small islands.\n\nThe Gulf of Bothnia is the northernmost arm of the Baltic Sea.",
|
||||
"BaseTerrain" : ["alpine_dirt_grass_50"],
|
||||
"BaseHeight" : 3,
|
||||
"Preview" : "gulf_of_bothnia.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,11 @@ Engine.LoadLibrary("rmbiome");
|
||||
|
||||
setSelectedBiome();
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_Terrains.mainTerrain);
|
||||
var heightSeaGround = -18;
|
||||
var heightLand = 2;
|
||||
var heightOffsetHarbor = -11;
|
||||
|
||||
InitMap(heightLand, g_Terrains.mainTerrain);
|
||||
|
||||
initTileClasses();
|
||||
|
||||
@@ -84,7 +88,7 @@ addElements(shuffleArray([
|
||||
},
|
||||
{
|
||||
"func": addBluffs,
|
||||
"baseHeight": getMapBaseHeight(),
|
||||
"baseHeight": heightLand,
|
||||
"avoid": [
|
||||
g_TileClasses.bluff, 20,
|
||||
g_TileClasses.mountain, 25,
|
||||
@@ -291,7 +295,7 @@ function addCenterLake()
|
||||
],
|
||||
[1, 100]
|
||||
),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -18, 10),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 10),
|
||||
paintClass(g_TileClasses.water)
|
||||
],
|
||||
avoidClasses(g_TileClasses.player, 20)
|
||||
@@ -322,14 +326,12 @@ function addHarbors(players)
|
||||
{
|
||||
for (let player of players)
|
||||
{
|
||||
let playerPosition = player.position;
|
||||
let harborPosition = Vector2D.add(playerPosition, Vector2D.sub(mapCenter, playerPosition).div(2.5).round());
|
||||
|
||||
let harborPosition = Vector2D.add(player.position, Vector2D.sub(mapCenter, player.position).div(2.5).round());
|
||||
createArea(
|
||||
new ClumpPlacer(scaleByMapSize(1200, 1200), 0.5, 0.5, 1, harborPosition.x, harborPosition.y),
|
||||
new ClumpPlacer(1200, 0.5, 0.5, 1, harborPosition.x, harborPosition.y),
|
||||
[
|
||||
new LayeredPainter([g_Terrains.shore, g_Terrains.water], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, -11, 3),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetHarbor, 3),
|
||||
paintClass(g_TileClasses.water)
|
||||
],
|
||||
avoidClasses(
|
||||
@@ -358,9 +360,13 @@ function addHarbors(players)
|
||||
|
||||
function addSpines()
|
||||
{
|
||||
let smallSpines = mapSize <= 192;
|
||||
let spineSize = smallSpines ? 0.5 : 0.02;
|
||||
let spineTapering = smallSpines ? -1.4 : -0.1;
|
||||
let heightOffsetSpine = smallSpines ? 20 : 35;
|
||||
|
||||
let numPlayers = getNumPlayers();
|
||||
let spineTile = g_Terrains.dirt;
|
||||
let elevation = 35;
|
||||
|
||||
if (currentBiome() == "snowy")
|
||||
spineTile = g_Terrains.tier1Terrain;
|
||||
@@ -378,37 +384,14 @@ function addSpines()
|
||||
for (let i = 0; i < numPlayers * split; ++i)
|
||||
{
|
||||
let tang = startAngle + (i + 0.5) * 2 * Math.PI / (numPlayers * split);
|
||||
|
||||
let mStartCo = 0.12;
|
||||
let mStopCo = 0.40;
|
||||
let mSize = 0.5;
|
||||
let mWaviness = 0.6;
|
||||
let mOffset = 0.4;
|
||||
let mTaper = -1.4;
|
||||
|
||||
// make small mountain dividers if we're on a small map
|
||||
if (mapSize <= 192)
|
||||
{
|
||||
mSize = 0.02;
|
||||
mTaper = -0.1;
|
||||
elevation = 20;
|
||||
}
|
||||
let start = Vector2D.add(mapCenter, new Vector2D(fractionToTiles(0.12), 0).rotate(-tang));
|
||||
let end = Vector2D.add(mapCenter, new Vector2D(fractionToTiles(0.4), 0).rotate(-tang));
|
||||
|
||||
createArea(
|
||||
new PathPlacer(
|
||||
fractionToTiles(0.5 + mStartCo * Math.cos(tang)),
|
||||
fractionToTiles(0.5 + mStartCo * Math.sin(tang)),
|
||||
fractionToTiles(0.5 + mStopCo * Math.cos(tang)),
|
||||
fractionToTiles(0.5 + mStopCo * Math.sin(tang)),
|
||||
scaleByMapSize(14, mSize),
|
||||
mWaviness,
|
||||
0.1,
|
||||
mOffset,
|
||||
mTaper
|
||||
),
|
||||
new PathPlacer(start.x, start.y, end.x, end.y, scaleByMapSize(14, spineSize), 0.6, 0.1, 0.4, spineTapering),
|
||||
[
|
||||
new LayeredPainter([g_Terrains.cliff, spineTile], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, elevation, 3),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetSpine, 3),
|
||||
paintClass(g_TileClasses.spine)
|
||||
],
|
||||
avoidClasses(g_TileClasses.player, 5)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "harbor.js",
|
||||
"Description" : "Players start with some light fishing opportunities in the calm waters of a sheltered harbor. A large bounty of seafood lays beyond the protective cliffs in the deep ocean. Small passages at the base of the cliffs make for tight fighting and easy fortification. Will you fight your way through the narrow passageways or take to the sea?",
|
||||
"BaseTerrain" : ["medit_sea_depths"],
|
||||
"BaseHeight" : 2,
|
||||
"Keywords": [],
|
||||
"Preview" : "harbor.png",
|
||||
"SupportedBiomes": true,
|
||||
|
||||
@@ -4,10 +4,15 @@ Engine.LoadLibrary("rmbiome");
|
||||
|
||||
setSelectedBiome();
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, Terrains.mainTerrain);
|
||||
const heightLand = 1;
|
||||
const heightBarrier = 30;
|
||||
|
||||
InitMap(heightLand, g_Terrains.mainTerrain);
|
||||
|
||||
initTileClasses();
|
||||
|
||||
const mapCenter = getMapCenter();
|
||||
|
||||
createArea(
|
||||
new MapBoundsPlacer(),
|
||||
paintClass(g_TileClasses.land));
|
||||
@@ -25,7 +30,7 @@ Engine.SetProgress(40);
|
||||
addElements(shuffleArray([
|
||||
{
|
||||
"func": addBluffs,
|
||||
"baseHeight": getMapBaseHeight(),
|
||||
"baseHeight": heightLand,
|
||||
"avoid": [
|
||||
g_TileClasses.bluff, 20,
|
||||
g_TileClasses.hill, 5,
|
||||
@@ -258,8 +263,6 @@ function placeBarriers()
|
||||
|
||||
for (let i = 0; i < spineCount; ++i)
|
||||
{
|
||||
var mStartCo = 0.07;
|
||||
var mStopCo = 0.42;
|
||||
var mSize = 8;
|
||||
var mWaviness = 0.6;
|
||||
var mOffset = 0.5;
|
||||
@@ -281,20 +284,13 @@ function placeBarriers()
|
||||
}
|
||||
|
||||
let angle = startAngle + (i + 0.5) * 2 * Math.PI / spineCount;
|
||||
let start = Vector2D.add(mapCenter, new Vector2D(fractionToTiles(0.075), 0).rotate(-angle));
|
||||
let end = Vector2D.add(mapCenter, new Vector2D(fractionToTiles(0.42), 0).rotate(-angle));
|
||||
createArea(
|
||||
new PathPlacer(
|
||||
fractionToTiles(0.5 + mStartCo * Math.cos(angle)),
|
||||
fractionToTiles(0.5 + mStartCo * Math.sin(angle)),
|
||||
fractionToTiles(0.5 + mStopCo * Math.cos(angle)),
|
||||
fractionToTiles(0.5 + mStopCo * Math.sin(angle)),
|
||||
scaleByMapSize(14, mSize),
|
||||
mWaviness,
|
||||
0.1,
|
||||
mOffset,
|
||||
mTaper),
|
||||
new PathPlacer(start.x, start.y, end.x, end.y, scaleByMapSize(14, mSize), mWaviness, 0.1, mOffset, mTaper),
|
||||
[
|
||||
new LayeredPainter([g_Terrains.cliff, spineTerrain], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 30, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightBarrier, 2),
|
||||
paintClass(g_TileClasses.spine)
|
||||
],
|
||||
avoidClasses(g_TileClasses.player, 5, g_TileClasses.baseResource, 5));
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "hells_pass.js",
|
||||
"Description" : "A narrow pass between steep mountains promotes tight, defensive combat. With bountiful resources far from the front lines, teams may choose to support their exposed teammates financially, or retreat to more fertile, but less defensible ground.",
|
||||
"BaseTerrain" : ["medit_sea_depths"],
|
||||
"BaseHeight" : 1,
|
||||
"Preview" : "hells_pass.png",
|
||||
"SupportedBiomes": true,
|
||||
"CircularMap" : true
|
||||
|
||||
@@ -37,7 +37,14 @@ const aBushSmall = "actor|props/flora/bush_medit_sm_lush.xml";
|
||||
const pForestD = [tGrassDForest + TERRAIN_SEPARATOR + oPoplar, tGrassDForest];
|
||||
const pForestP = [tGrassPForest + TERRAIN_SEPARATOR + oOak, tGrassPForest];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround1 = -3;
|
||||
const heightShore1 = -1.5;
|
||||
const heightShore2 = 0;
|
||||
const heightLand = 1;
|
||||
const heightOffsetBump = 4;
|
||||
const heightHill = 15;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const mapCenter = getMapCenter();
|
||||
const mapBounds = getMapBounds();
|
||||
@@ -92,16 +99,16 @@ paintRiver({
|
||||
"width": fractionToTiles(0.5),
|
||||
"fadeDist": scaleByMapSize(6, 25),
|
||||
"deviation": 0,
|
||||
"waterHeight": -3,
|
||||
"landHeight": 1,
|
||||
"heightRiverbed": heightSeaGround1,
|
||||
"heightLand": heightLand,
|
||||
"meanderShort": 20,
|
||||
"meanderLong": 0,
|
||||
"waterFunc": (ix, iz, height, riverFraction) => {
|
||||
|
||||
if (height < 0)
|
||||
if (height < heightShore2)
|
||||
addToClass(ix, iz, clWater);
|
||||
|
||||
createTerrain(height < -1.5 ? tWater : tShore).place(ix, iz);
|
||||
createTerrain(height < heightShore1 ? tWater : tShore).place(ix, iz);
|
||||
}
|
||||
});
|
||||
Engine.SetProgress(20);
|
||||
@@ -122,8 +129,8 @@ createArea(
|
||||
|
||||
log("Creating bumps...");
|
||||
createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 50), 0.3, 0.06, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 4, 3),
|
||||
new ClumpPlacer(scaleByMapSize(10, 60), 0.3, 0.06, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBump, 3),
|
||||
stayClasses(clHighlands, 1),
|
||||
scaleByMapSize(300, 600));
|
||||
|
||||
@@ -134,7 +141,7 @@ createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 150), 0.2, 0.1, 1),
|
||||
[
|
||||
new LayeredPainter([tCliff, tHill], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 15, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 2),
|
||||
paintClass(clHill)
|
||||
],
|
||||
avoidClasses(clPlayer, 20, clWater, 5, clHill, 15, clHighlands, 5),
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "hyrcanian_shores.js",
|
||||
"Description" : "Each player starts in a coastal area between forested hills and the Caspian Sea.",
|
||||
"BaseTerrain" : ["temp_grass_long"],
|
||||
"BaseHeight" : 1,
|
||||
"Preview" : "hyrcanian_shores.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,12 @@ const oMetalLarge = "gaia/geology_metal_savanna_slabs";
|
||||
const aBush = "actor|props/flora/bush_medit_sm_dry.xml";
|
||||
const aRock = "actor|geology/stone_savanna_med.xml";
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround = -3;
|
||||
const heightLand = 1;
|
||||
const heightShore = 3;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -73,7 +78,7 @@ Engine.SetProgress(20);
|
||||
log("Creating bumps...");
|
||||
createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 50), 0.5, 0.08, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 2, 2),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBump, 2),
|
||||
avoidClasses(clPlayer, 13),
|
||||
scaleByMapSize(300, 800)
|
||||
);
|
||||
@@ -90,7 +95,7 @@ createArea(
|
||||
0,
|
||||
[Math.floor(mapSize * 0.008 * Math.pow(scaleByMapSize(1, 66), 1/8))]),
|
||||
[
|
||||
new SmoothElevationPainter(ELEVATION_SET, -3, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 4),
|
||||
paintClass(clWater)
|
||||
],
|
||||
avoidClasses(clPlayer, 20));
|
||||
@@ -99,7 +104,7 @@ log("Creating more shore jaggedness...");
|
||||
createAreas(
|
||||
new ChainPlacer(2, Math.floor(scaleByMapSize(4, 6)), 3, 1),
|
||||
[
|
||||
new SmoothElevationPainter(ELEVATION_SET, 3, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightShore, 4),
|
||||
unPaintClass(clWater)
|
||||
],
|
||||
borderClasses(clWater, 4, 7),
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "india.js",
|
||||
"Description" : "Central India just before the monsoon season - a parched land awaits the life-bringing rain which is already two months late. Due to the extended dryness and scorching heat, only the largest lake remains. The hardy trees which have survived the climate are spread out, yet not too scarce.",
|
||||
"BaseTerrain" : "savanna_grass_a",
|
||||
"BaseHeight" : 1,
|
||||
"Preview" : "india.png",
|
||||
"Keywords": [],
|
||||
"CircularMap" : true
|
||||
|
||||
@@ -45,7 +45,11 @@ const aRockMedium = g_Decoratives.rockMedium;
|
||||
const pForest1 = [tForestFloor2 + TERRAIN_SEPARATOR + oTree1, tForestFloor2 + TERRAIN_SEPARATOR + oTree2, tForestFloor2];
|
||||
const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TERRAIN_SEPARATOR + oTree5, tForestFloor1];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, tWater);
|
||||
const heightSeaGround = -10;
|
||||
const heightLand = 3;
|
||||
const heightHill = 18;
|
||||
|
||||
InitMap(heightSeaGround, tWater);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -61,9 +65,6 @@ const clFood = createTileClass();
|
||||
const clBaseResource = createTileClass();
|
||||
const clLand = createTileClass();
|
||||
|
||||
const shoreRadius = 6;
|
||||
const landHeight = 3;
|
||||
|
||||
var startAngle = randomAngle();
|
||||
|
||||
var teams = getTeamsArray();
|
||||
@@ -90,8 +91,8 @@ for (let i = 0; i < teams.length; ++i)
|
||||
createArea(
|
||||
new ChainPlacer(2, Math.floor(scaleByMapSize(5, 11)), Math.floor(scaleByMapSize(60, 250)), 1, playerPosition[p].x, playerPosition[p].y, 0, [Math.floor(fractionToTiles(0.01))]),
|
||||
[
|
||||
new LayeredPainter([tMainTerrain, tMainTerrain, tMainTerrain], [1, shoreRadius]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, shoreRadius),
|
||||
new LayeredPainter([tMainTerrain, tMainTerrain, tMainTerrain], [1, 6]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 6),
|
||||
paintClass(clLand)
|
||||
]);
|
||||
|
||||
@@ -199,7 +200,7 @@ for (let i = 0; i < numIslands; ++i)
|
||||
scaleByMapSize(30, 70)),
|
||||
[
|
||||
new LayeredPainter([tMainTerrain, tMainTerrain], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 6),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 6),
|
||||
paintClass(clLand)
|
||||
],
|
||||
avoidClasses(clLand, 3, clPlayer, 3),
|
||||
@@ -237,7 +238,7 @@ for (let i = 0; i < numIslands; ++i)
|
||||
new ChainPlacer(Math.floor(scaleByMapSize(4, 7)), Math.floor(scaleByMapSize(7, 10)), Math.floor(scaleByMapSize(16, 40)), 0.07, chosenPoint[0], chosenPoint[1], scaleByMapSize(22, 40)),
|
||||
[
|
||||
new LayeredPainter([tMainTerrain, tMainTerrain], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 6),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 6),
|
||||
paintClass(clLand)
|
||||
],
|
||||
avoidClasses(clLand, 3, clPlayer, 3),
|
||||
@@ -301,7 +302,7 @@ createAreas(
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(4, 6)), Math.floor(scaleByMapSize(16, 40)), 0.5),
|
||||
[
|
||||
new LayeredPainter([tCliff, tHill], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 18, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 2),
|
||||
paintClass(clHill)
|
||||
],
|
||||
[avoidClasses(clBaseResource, 20, clHill, 15, clRock, 6, clMetal, 6), stayClasses(clLand, 0)],
|
||||
@@ -455,7 +456,7 @@ createObjectGroupsDeprecated(group, 0,
|
||||
);
|
||||
|
||||
paintTerrainBasedOnHeight(1, 2, 0, tShore);
|
||||
paintTerrainBasedOnHeight(getMapBaseHeight(), 1, 3, tWater);
|
||||
paintTerrainBasedOnHeight(heightSeaGround, 1, 3, tWater);
|
||||
|
||||
placePlayersNomad(clPlayer, [stayClasses(clLand, 4), avoidClasses(clHill, 2, clForest, 1, clMetal, 4, clRock, 4, clFood, 2)]);
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "island_stronghold.js",
|
||||
"Description" : "Teams start off with nearly adjacent civic centers on a small island, offering a fortified base from which to expand.",
|
||||
"BaseTerrain" : ["medit_sand_wet"],
|
||||
"BaseHeight" : -10,
|
||||
"Keywords": ["naval"],
|
||||
"Preview" : "island_stronghold.png",
|
||||
"SupportedBiomes": [
|
||||
|
||||
@@ -44,7 +44,12 @@ const aBushSmall = g_Decoratives.bushSmall;
|
||||
const pForest1 = [tForestFloor2 + TERRAIN_SEPARATOR + oTree1, tForestFloor2 + TERRAIN_SEPARATOR + oTree2, tForestFloor2];
|
||||
const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TERRAIN_SEPARATOR + oTree5, tForestFloor1];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround = -5;
|
||||
const heightLand = 3;
|
||||
const heightOffsetBump = 2;
|
||||
const heightHill = 18;
|
||||
|
||||
InitMap(heightSeaGround, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -60,7 +65,6 @@ var clFood = createTileClass();
|
||||
var clBaseResource = createTileClass();
|
||||
var clLand = createTileClass();
|
||||
|
||||
var landHeight = 3;
|
||||
var playerIslandRadius = scaleByMapSize(20, 29);
|
||||
|
||||
var [playerIDs, playerPosition, playerAngle] = playerPlacementCircle(fractionToTiles(0.35));
|
||||
@@ -74,12 +78,12 @@ if (!isNomad())
|
||||
new ClumpPlacer(diskArea(playerIslandRadius), 0.8, 0.1, 10, playerPosition[i].x, playerPosition[i].y),
|
||||
[
|
||||
new LayeredPainter([tMainTerrain , tMainTerrain, tMainTerrain], [1, 6]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 6),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 6),
|
||||
paintClass(clLand),
|
||||
paintClass(clPlayer)
|
||||
]);
|
||||
|
||||
let dockLocation = findLocationInDirectionBasedOnHeight(playerPosition[i], mapCenter, -3 , landHeight - 0.5, landHeight);
|
||||
let dockLocation = findLocationInDirectionBasedOnHeight(playerPosition[i], mapCenter, -3 , heightLand - 0.5, heightLand);
|
||||
placeObject(dockLocation.x, dockLocation.y, oDock, playerIDs[i], playerAngle[i] + Math.PI);
|
||||
}
|
||||
}
|
||||
@@ -93,7 +97,7 @@ createAreas(
|
||||
0.07),
|
||||
[
|
||||
new LayeredPainter([tMainTerrain, tMainTerrain], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 6),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 6),
|
||||
paintClass(clLand)
|
||||
],
|
||||
avoidClasses(clLand, scaleByMapSize(8, 12)),
|
||||
@@ -108,7 +112,7 @@ createAreas(
|
||||
0.07),
|
||||
[
|
||||
new LayeredPainter([tMainTerrain, tMainTerrain], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 6),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 6),
|
||||
paintClass(clLand)
|
||||
],
|
||||
avoidClasses(clLand, scaleByMapSize(8, 12)),
|
||||
@@ -158,7 +162,7 @@ placePlayerBases({
|
||||
log("Creating bumps...");
|
||||
createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 50), 0.3, 0.06, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 2, 2),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBump, 2),
|
||||
[avoidClasses(clPlayer, 0), stayClasses(clLand, 3)],
|
||||
scaleByMapSize(20, 100));
|
||||
|
||||
@@ -167,7 +171,7 @@ createAreas(
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(4, 6)), Math.floor(scaleByMapSize(16, 40)), 0.5),
|
||||
[
|
||||
new LayeredPainter([tCliff, tHill], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 18, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 2),
|
||||
paintClass(clHill)
|
||||
],
|
||||
[avoidClasses(clPlayer, 2, clHill, 15), stayClasses(clLand, 0)],
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "islands.js",
|
||||
"Description" : "Players start in small islands while there are many others around.",
|
||||
"BaseTerrain" : ["medit_sand_wet"],
|
||||
"BaseHeight" : -5,
|
||||
"Keywords": ["naval"],
|
||||
"Preview" : "islands.png",
|
||||
"SupportedBiomes": true,
|
||||
|
||||
@@ -32,10 +32,13 @@ const aBush3 = "actor|props/flora/plant_tropic_large.xml";
|
||||
const pForestD = [tForestFloor + TERRAIN_SEPARATOR + oTree, tForestFloor];
|
||||
const pForestP = [tForestFloor + TERRAIN_SEPARATOR + oPalm, tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround = -5;
|
||||
const heightLand = 3;
|
||||
const heightHill = 25;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
const mapCenter = getMapCenter();
|
||||
const mapBounds = getMapBounds();
|
||||
|
||||
@@ -91,8 +94,8 @@ paintRiver({
|
||||
"width": 2 * waterPosition,
|
||||
"fadeDist": 8,
|
||||
"deviation": 0,
|
||||
"waterHeight": -5,
|
||||
"landHeight": 3,
|
||||
"heightRiverbed": heightSeaGround,
|
||||
"heightLand": heightLand,
|
||||
"meanderShort": 20,
|
||||
"meanderLong": 0,
|
||||
"waterFunc": (ix, iz, height, riverFraction) => {
|
||||
@@ -116,7 +119,7 @@ for (let i = 0; i < scaleByMapSize(20, 120); ++i)
|
||||
Math.floor(fractionToTiles(randFloat(0.1, 0.9)))),
|
||||
[
|
||||
new LayeredPainter([tGrass, tGrass], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 3, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 3),
|
||||
unPaintClass(clWater)
|
||||
]);
|
||||
|
||||
@@ -132,7 +135,7 @@ createAreas(
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(4, 6)), Math.floor(scaleByMapSize(16, 40)), 0.1),
|
||||
[
|
||||
new LayeredPainter([tCliff, tGrass], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 25, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 3),
|
||||
paintClass(clHill)
|
||||
],
|
||||
[avoidClasses(clPlayer, 20, clHill, 5, clWater, 2, clBaseResource, 2), stayClasses(clMountains, 0)],
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "kerala.js",
|
||||
"Description" : "Players start in the southwestern shores of India between a sea and mountains.",
|
||||
"BaseTerrain" : ["tropic_grass_c", "tropic_grass_c", "tropic_grass_c", "tropic_grass_c", "tropic_grass_plants", "tropic_plants", "tropic_plants_b"],
|
||||
"BaseHeight" : 3,
|
||||
"Preview" : "kerala.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,10 @@ const aBushSmall = g_Decoratives.bushSmall;
|
||||
const pForest1 = [tForestFloor2 + TERRAIN_SEPARATOR + oTree1, tForestFloor2 + TERRAIN_SEPARATOR + oTree2, tForestFloor2];
|
||||
const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TERRAIN_SEPARATOR + oTree5, tForestFloor1];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, tMainTerrain);
|
||||
const heightSeaGround = -3;
|
||||
const heightLand = 3;
|
||||
|
||||
InitMap(heightLand, tMainTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -74,7 +77,7 @@ createArea(
|
||||
0,
|
||||
[Math.floor(fractionToTiles(0.2))]),
|
||||
[
|
||||
new SmoothElevationPainter(ELEVATION_SET, -3, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 4),
|
||||
paintClass(clWater)
|
||||
],
|
||||
avoidClasses(clPlayer, 20));
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "lake.js",
|
||||
"Description" : "Players start around a lake in the center of the map.",
|
||||
"BaseTerrain" : ["medit_sea_depths"],
|
||||
"BaseHeight" : 3,
|
||||
"Preview" : "lake.png",
|
||||
"SupportedBiomes": true,
|
||||
"CircularMap" : true
|
||||
|
||||
@@ -49,7 +49,12 @@ const pPineForest = [tForestFloor+TERRAIN_SEPARATOR+oPine, tGrass];
|
||||
const pPoplarForest = [tForestFloor+TERRAIN_SEPARATOR+oLombardyPoplar, tGrass];
|
||||
const pMainForest = [tForestFloor+TERRAIN_SEPARATOR+oCarob, tForestFloor+TERRAIN_SEPARATOR+oBeech, tGrass, tGrass];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround = -16;
|
||||
const heightLand = 0;
|
||||
const heightPlayer = 5;
|
||||
const heightHill = 12;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -67,10 +72,6 @@ var clBaseResource = createTileClass();
|
||||
|
||||
var WATER_WIDTH = 0.1;
|
||||
|
||||
var waterHeight = -16;
|
||||
var landHeight = getMapBaseHeight();
|
||||
var hillHeight = 12;
|
||||
|
||||
log("Creating players...");
|
||||
var [playerIDs, playerPosition] = playerPlacementLine(false, mapCenter, fractionToTiles(randFloat(0.42, 0.46)));
|
||||
|
||||
@@ -107,8 +108,8 @@ for (let x of [mapBounds.left, mapBounds.right])
|
||||
"width": 2 * fractionToTiles(WATER_WIDTH),
|
||||
"fadeDist": 16,
|
||||
"deviation": 0,
|
||||
"waterHeight": waterHeight,
|
||||
"landHeight": landHeight,
|
||||
"heightRiverbed": heightSeaGround,
|
||||
"heightLand": heightLand,
|
||||
"meanderShort": 0,
|
||||
"meanderLong": 0,
|
||||
"waterFunc": (ix, iz, height, z) => {
|
||||
@@ -137,7 +138,7 @@ for (var ix = 0; ix <= mapSize; ix++)
|
||||
var pn = playerNearness(x, z);
|
||||
|
||||
let distToWater = stayClasses(clWater, 1).allows(ix, iz) ? 0 : (0.5 - WATER_WIDTH - Math.abs(x - 0.5));
|
||||
let h = distToWater ? hillHeight * (1 - Math.abs(x - 0.5) / (0.5 - WATER_WIDTH)) : getHeight(ix, iz);
|
||||
let h = distToWater ? heightHill * (1 - Math.abs(x - 0.5) / (0.5 - WATER_WIDTH)) : getHeight(ix, iz);
|
||||
|
||||
// add some base noise
|
||||
var baseNoise = 16*noise0.get(x,z) + 8*noise1.get(x,z) + 4*noise2.get(x,z) - (16+8+4)/2;
|
||||
@@ -323,7 +324,7 @@ placePlayerBases({
|
||||
"innerTerrain": tCity,
|
||||
"width": 4,
|
||||
"painters": [
|
||||
new SmoothElevationPainter(ELEVATION_SET, 5, 2)
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightPlayer, 2)
|
||||
]
|
||||
},
|
||||
"Chicken": {
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "latium.js",
|
||||
"Description" : "The Italian peninsula \n\n Latium is the region of central western Italy in which the city of Rome was founded and grew to be the capital city of the Roman Empire. Latium was originally a small triangle of fertile, volcanic soil on which resided the tribe of the Latins. It was located on the left bank (east and south) of the Tiber river, extending northward to the Anio river (a left-bank tributary of the Tiber) and southeastward to the Pomptina Palus (Pontine Marshes, now the Pontine Fields) as far south as the Circeian promontory. The right bank of the Tiber was occupied by the Etruscan city of Veii, and the other borders were occupied by Italic tribes. Subsequently Rome defeated Veii and then its Italic neighbors, expanding Latium to the Apennine Mountains in the northeast and to the opposite end of the marsh in the southeast. The modern descendant, the Italian Regione of Lazio, also called Latium in Latin, and occasionally in modern English, is somewhat larger still, but not as much as double the original Latium.",
|
||||
"BaseTerrain" : ["medit_grass_field_dry", "medit_grass_field_brown", "medit_grass_field_b"],
|
||||
"BaseHeight" : 0,
|
||||
"Preview" : "latium.png",
|
||||
"CircularMap" : false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,12 +6,13 @@ setSelectedBiome();
|
||||
|
||||
const topTerrain = g_Terrains.tier2Terrain;
|
||||
|
||||
const valleyHeight = 0;
|
||||
const pathHeight = 10;
|
||||
const denHeight = 15;
|
||||
const hillHeight = getMapBaseHeight();
|
||||
const heightValley = 0;
|
||||
const heightPath = 10;
|
||||
const heightDen = 15;
|
||||
const heightHill = 50;
|
||||
|
||||
InitMap(heightHill, topTerrain);
|
||||
|
||||
InitMap(hillHeight, topTerrain);
|
||||
const mapArea = getMapArea();
|
||||
const mapCenter = getMapCenter();
|
||||
const numPlayers = getNumPlayers();
|
||||
@@ -414,7 +415,7 @@ Engine.SetProgress(95);
|
||||
placePlayersNomad(
|
||||
g_TileClasses.player,
|
||||
[
|
||||
new HeightConstraint(valleyHeight, pathHeight),
|
||||
new HeightConstraint(heightValley, heightPath),
|
||||
avoidClasses(
|
||||
g_TileClasses.forest, 1,
|
||||
g_TileClasses.metal, 4,
|
||||
@@ -485,7 +486,7 @@ function createSunkenTerrain()
|
||||
new ClumpPlacer(mapArea * 0.26, 1, 1, 1, mapCenter.x, mapCenter.y),
|
||||
[
|
||||
new LayeredPainter([g_Terrains.cliff, lower], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, valleyHeight, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightValley, 3),
|
||||
paintClass(g_TileClasses.valley)
|
||||
]);
|
||||
|
||||
@@ -494,57 +495,58 @@ function createSunkenTerrain()
|
||||
new ClumpPlacer(mapArea * 0.14, 1, 1, 1, mapCenter.x, mapCenter.y),
|
||||
[
|
||||
new LayeredPainter([g_Terrains.cliff, topTerrain], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, hillHeight, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 3),
|
||||
paintClass(g_TileClasses.mountain)
|
||||
]);
|
||||
|
||||
let getCoords = (distance, playerID, playerIDOffset) => {
|
||||
let angle = startAngle + (playerID + playerIDOffset) * 2 * Math.PI / numPlayers;
|
||||
return [
|
||||
Math.round(fractionToTiles(0.5 + distance * Math.cos(angle))),
|
||||
Math.round(fractionToTiles(0.5 + distance * Math.sin(angle)))
|
||||
];
|
||||
return Vector2D.add(mapCenter, new Vector2D(fractionToTiles(distance), 0).rotate(-angle)).round();
|
||||
};
|
||||
|
||||
for (let i = 0; i < numPlayers; ++i)
|
||||
{
|
||||
let playerCoords = getCoords(0.4, i, 0);
|
||||
let playerPosition = getCoords(0.4, i, 0);
|
||||
|
||||
log("Creating path from player to expansion...");
|
||||
let expansionCoords = getCoords(expDist, i, expAngle);
|
||||
let expansionPosition = getCoords(expDist, i, expAngle);
|
||||
createArea(
|
||||
new PathPlacer(...playerCoords, ...expansionCoords, 12, 0.7, 0.5, 0.1, -1),
|
||||
new PathPlacer(playerPosition.x, playerPosition.y, expansionPosition.x, expansionPosition.y, 12, 0.7, 0.5, 0.1, -1),
|
||||
[
|
||||
new LayeredPainter([g_Terrains.cliff, middle, road], [3, 4]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, pathHeight, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightPath, 3),
|
||||
paintClass(g_TileClasses.step)
|
||||
]);
|
||||
|
||||
log("Creating path from player to the neighbor...");
|
||||
for (let neighborOffset of [-0.5, 0.5])
|
||||
{
|
||||
let neighborPosition = getCoords(nRoad, i, neighborOffset);
|
||||
let pathPosition = getCoords(0.47, i, 0);
|
||||
createArea(
|
||||
new PathPlacer(...getCoords(0.47, i, 0), ...getCoords(nRoad, i, neighborOffset), 19, 0.4, 0.5, 0.1, -0.6),
|
||||
new PathPlacer(pathPosition.x, pathPosition.y, neighborPosition.x, neighborPosition.y, 19, 0.4, 0.5, 0.1, -0.6),
|
||||
[
|
||||
new LayeredPainter([g_Terrains.cliff, middle, road], [3, 6]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, pathHeight, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightPath, 3),
|
||||
paintClass(g_TileClasses.step)
|
||||
]);
|
||||
}
|
||||
|
||||
log("Creating the den of the player...");
|
||||
createArea(
|
||||
new ClumpPlacer(mapArea * 0.03 / (isNomad() ? 2 : 1), 0.9, 0.3, 1, ...playerCoords),
|
||||
new ClumpPlacer(mapArea * 0.03 / (isNomad() ? 2 : 1), 0.9, 0.3, 1, playerPosition.x, playerPosition.y),
|
||||
[
|
||||
new LayeredPainter([g_Terrains.cliff, base], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, denHeight, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightDen, 3),
|
||||
paintClass(g_TileClasses.valley)
|
||||
]);
|
||||
|
||||
log("Creating the expansion of the player...");
|
||||
createArea(
|
||||
new ClumpPlacer(expSize, 0.9, 0.3, 1, ...expansionCoords),
|
||||
new ClumpPlacer(expSize, 0.9, 0.3, 1, expansionPosition.x, expansionPosition.y),
|
||||
[
|
||||
new LayeredPainter([g_Terrains.cliff, base], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, denHeight, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightDen, 3),
|
||||
paintClass(g_TileClasses.settlement)
|
||||
],
|
||||
[avoidClasses(g_TileClasses.settlement, 2)]);
|
||||
@@ -552,11 +554,14 @@ function createSunkenTerrain()
|
||||
|
||||
log("Creating the expansions between players after the paths were created...");
|
||||
for (let i = 0; i < numPlayers; ++i)
|
||||
{
|
||||
let position = getCoords(nExp, i, 0.5);
|
||||
createArea(
|
||||
new ClumpPlacer(expSize, 0.9, 0.3, 1, ...getCoords(nExp, i, 0.5)),
|
||||
new ClumpPlacer(expSize, 0.9, 0.3, 1, position.x, position.y),
|
||||
[
|
||||
new LayeredPainter([g_Terrains.cliff, lower], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, valleyHeight, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightValley, 3),
|
||||
paintClass(g_TileClasses.settlement)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "lions_den.js",
|
||||
"Description" : "High cliffs protect each player's main base. Venturing into the unknown can be risky, but necessary.",
|
||||
"BaseTerrain" : ["medit_sea_depths"],
|
||||
"BaseHeight" : 50,
|
||||
"Preview" : "lions_den.png",
|
||||
"Keywords": [],
|
||||
"SupportedBiomes": true,
|
||||
|
||||
@@ -35,7 +35,12 @@ const pForestB = [tGrassDForest + TERRAIN_SEPARATOR + oBeech, tGrassDForest];
|
||||
const pForestO = [tGrassPForest + TERRAIN_SEPARATOR + oOak, tGrassPForest];
|
||||
const pForestR = [tGrassDForest + TERRAIN_SEPARATOR + oBeech, tGrassDForest, tGrassDForest + TERRAIN_SEPARATOR + oOak, tGrassDForest, tGrassDForest, tGrassDForest];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround = -4;
|
||||
const heightShallows = -2;
|
||||
const heightLand = 3;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -53,8 +58,6 @@ var clFood = createTileClass();
|
||||
var clBaseResource = createTileClass();
|
||||
var clShallow = createTileClass();
|
||||
|
||||
var waterHeight = -4;
|
||||
var shallowHeight = -2;
|
||||
var shallowWidth = scaleByMapSize(8, 12);
|
||||
|
||||
placePlayerBases({
|
||||
@@ -98,7 +101,7 @@ var riverPositions = [
|
||||
log("Creating the main river...");
|
||||
createArea(
|
||||
new PathPlacer(riverPositions[0].x, riverPositions[0].y, riverPositions[1].x, riverPositions[1].y, scaleByMapSize(10, 20), 0.5, 3 * scaleByMapSize(1, 4), 0.1, 0.01),
|
||||
new SmoothElevationPainter(ELEVATION_SET, waterHeight, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 4),
|
||||
avoidClasses(clPlayer, 4));
|
||||
Engine.SetProgress(25);
|
||||
|
||||
@@ -106,7 +109,7 @@ log("Creating small puddles at the map border to ensure players being separated.
|
||||
for (let riverPosition of riverPositions)
|
||||
createArea(
|
||||
new ClumpPlacer(Math.floor(diskArea(scaleByMapSize(5, 10))), 0.95, 0.6, 10, riverPosition.x, riverPosition.y),
|
||||
new SmoothElevationPainter(ELEVATION_SET, waterHeight, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 2),
|
||||
avoidClasses(clPlayer, 8));
|
||||
Engine.SetProgress(30);
|
||||
|
||||
@@ -120,9 +123,9 @@ for (let i = 0; i <= randIntInclusive(3, scaleByMapSize(4, 6)); ++i)
|
||||
"startWidth": shallowWidth,
|
||||
"endWidth": shallowWidth,
|
||||
"smoothWidth": 2,
|
||||
"startHeight": shallowHeight,
|
||||
"endHeight": shallowHeight,
|
||||
"maxHeight": shallowHeight,
|
||||
"startHeight": heightShallows,
|
||||
"endHeight": heightShallows,
|
||||
"maxHeight": heightShallows,
|
||||
"tileClass": clShallow
|
||||
});
|
||||
}
|
||||
@@ -132,7 +135,7 @@ createTributaryRivers(
|
||||
true,
|
||||
randIntInclusive(9, scaleByMapSize(13, 21)),
|
||||
scaleByMapSize(10, 20),
|
||||
waterHeight,
|
||||
heightSeaGround,
|
||||
[-6, -1.5],
|
||||
Math.PI / 5,
|
||||
clWater,
|
||||
@@ -150,7 +153,7 @@ Engine.SetProgress(50);
|
||||
log("Creating bumps...");
|
||||
createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 50), 0.3, 0.06, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 2, 2),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBump, 2),
|
||||
avoidClasses(clWater, 2, clPlayer, 15),
|
||||
scaleByMapSize(100, 200)
|
||||
);
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "lorraine_plain.js",
|
||||
"Description" : "Players start in a nearly flat Gallic plain divided by a river and its tributaries.",
|
||||
"BaseTerrain" : ["temp_grass_long"],
|
||||
"BaseHeight" : 3,
|
||||
"Preview" : "lorraine_plain.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,9 @@ const aBushSmall = g_Decoratives.bushSmall;
|
||||
const pForest1 = [tForestFloor2 + TERRAIN_SEPARATOR + oTree1, tForestFloor2 + TERRAIN_SEPARATOR + oTree2, tForestFloor2];
|
||||
const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TERRAIN_SEPARATOR + oTree5, tForestFloor1];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, tMainTerrain);
|
||||
const heightLand = 3;
|
||||
|
||||
InitMap(heightLand, tMainTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "mainland.js",
|
||||
"Description" : "A typical map without any water.",
|
||||
"BaseTerrain" : ["medit_sea_depths"],
|
||||
"BaseHeight" : 3,
|
||||
"Preview" : "mainland.png",
|
||||
"SupportedBiomes": true,
|
||||
"CircularMap" : true
|
||||
|
||||
@@ -42,7 +42,12 @@ const aBushSmall = g_Decoratives.bushSmall;
|
||||
const pForest1 = [tForestFloor2 + TERRAIN_SEPARATOR + oTree1, tForestFloor2 + TERRAIN_SEPARATOR + oTree2, tForestFloor2];
|
||||
const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TERRAIN_SEPARATOR + oTree5, tForestFloor1];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround = -5;
|
||||
const heightLand = 3;
|
||||
const heightHill = 18;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightSeaGround, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -60,8 +65,6 @@ var clBaseResource = createTileClass();
|
||||
var clLand = createTileClass();
|
||||
var clIsland = createTileClass();
|
||||
|
||||
var landHeight = 3;
|
||||
|
||||
var startAngle = 4/7 * Math.PI;
|
||||
var playerIDs = sortAllPlayers();
|
||||
var [playerPosition, playerAngle] = playerPlacementCustomAngle(
|
||||
@@ -76,7 +79,7 @@ for (let i = 0; i < numPlayers; ++i)
|
||||
new ClumpPlacer(diskArea(defaultPlayerBaseRadius()), 0.8, 0.1, 10, playerPosition[i].x, playerPosition[i].y),
|
||||
[
|
||||
new LayeredPainter([tWater, tShore, tMainTerrain], [1, 4]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 4),
|
||||
paintClass(clIsland),
|
||||
paintClass(isNomad() ? clLand : clPlayer)
|
||||
]);
|
||||
@@ -129,7 +132,7 @@ createArea(
|
||||
new ClumpPlacer(mapArea * 0.50, 0.8, 0.08, 10, Math.round(fractionToTiles(0.12)), Math.round(fractionToTiles(0.5))),
|
||||
[
|
||||
new LayeredPainter([tWater, tShore, tMainTerrain], [4, 2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 4),
|
||||
paintClass(clLand)
|
||||
],
|
||||
avoidClasses(clIsland, 8));
|
||||
@@ -140,7 +143,7 @@ createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(15, 80), 0.2, 0.1, 1),
|
||||
[
|
||||
new LayeredPainter([tMainTerrain, tMainTerrain], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 4),
|
||||
paintClass(clLand)
|
||||
],
|
||||
[
|
||||
@@ -157,7 +160,7 @@ Engine.SetProgress(25);
|
||||
log("Creating bumps...");
|
||||
createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 50), 0.3, 0.06, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 2, 2),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBump, 2),
|
||||
[avoidClasses(clIsland, 10), stayClasses(clLand, 3)],
|
||||
scaleByMapSize(100, 200)
|
||||
);
|
||||
@@ -168,7 +171,7 @@ createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 150), 0.2, 0.1, 1),
|
||||
[
|
||||
new LayeredPainter([tCliff, tHill], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 18, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 2),
|
||||
paintClass(clHill)
|
||||
],
|
||||
[avoidClasses(clIsland, 10, clHill, 15), stayClasses(clLand, 7)],
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "migration.js",
|
||||
"Description" : "Players start in small islands in the eastern part of the map. There is a big continent in the west ready for expansion.",
|
||||
"BaseTerrain" : ["medit_sand_wet"],
|
||||
"BaseHeight" : -5,
|
||||
"Keywords": ["naval"],
|
||||
"Preview" : "migration.png",
|
||||
"SupportedBiomes": true,
|
||||
|
||||
@@ -36,7 +36,15 @@ const aDecorativeRock = "actor|geology/stone_desert_med.xml";
|
||||
const pForest = [tForestFloor + TERRAIN_SEPARATOR + oDatePalm, tForestFloor + TERRAIN_SEPARATOR + oSDatePalm, tForestFloor];
|
||||
const pForestOasis = [tGrass + TERRAIN_SEPARATOR + oDatePalm, tGrass + TERRAIN_SEPARATOR + oSDatePalm, tGrass];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightLand = 10;
|
||||
|
||||
const heightOffsetOasis = -11;
|
||||
const heightOffsetHill1 = 16;
|
||||
const heightOffsetHill2 = 16;
|
||||
const heightOffsetHill3 = 16;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -53,11 +61,6 @@ var clFood = createTileClass();
|
||||
var clBaseResource = createTileClass();
|
||||
|
||||
var oasisRadius = scaleByMapSize(14, 40);
|
||||
var oasisHeight = -11;
|
||||
|
||||
var hillHeight1 = 16;
|
||||
var hillHeight2 = 16;
|
||||
var hillHeight3 = 16;
|
||||
|
||||
var [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.35));
|
||||
|
||||
@@ -139,7 +142,7 @@ createArea(
|
||||
new ClumpPlacer(diskArea(oasisRadius), 0.6, 0.15, 0, mapCenter.x, mapCenter.y),
|
||||
[
|
||||
new LayeredPainter([[tSand, pForest], [tGrassSand25, pForestOasis], tGrassSand25, tShore, tWaterDeep], [2, 3, 1, 1]),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, oasisHeight, 8),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetOasis, 8),
|
||||
paintClass(clOasis)
|
||||
]);
|
||||
|
||||
@@ -199,7 +202,7 @@ var hillAreas = createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(50,300), 0.25, 0.1, 0.5),
|
||||
[
|
||||
new LayeredPainter([tCliff, tSand], [1]),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, hillHeight1, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetHill1, 1),
|
||||
paintClass(clHill1)
|
||||
],
|
||||
avoidClasses(clOasis, 3, clPlayer, 0, clHill1, 10),
|
||||
@@ -213,7 +216,7 @@ hillAreas = hillAreas.concat(
|
||||
new ClumpPlacer(scaleByMapSize(25,150), 0.25, 0.1, 0.5),
|
||||
[
|
||||
new LayeredPainter([tCliff, tSand], [1]),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, hillHeight2, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetHill2, 1),
|
||||
paintClass(clHill1)
|
||||
],
|
||||
avoidClasses(clOasis, 3, clPlayer, 0, clHill1, 3),
|
||||
@@ -239,7 +242,7 @@ createAreasInAreas(
|
||||
new ClumpPlacer(scaleByMapSize(25, 150), 0.25, 0.1, 0),
|
||||
[
|
||||
new LayeredPainter([tCliff, tSand], [1]),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, hillHeight2, 1)
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetHill2, 1)
|
||||
],
|
||||
[stayClasses(clHill1, 0)],
|
||||
scaleByMapSize(15, 25),
|
||||
@@ -253,7 +256,7 @@ createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(12, 75), 0.25, 0.1, 0),
|
||||
[
|
||||
new LayeredPainter([tCliff, tSand], [1]),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, hillHeight3, 1)
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetHill3, 1)
|
||||
],
|
||||
[stayClasses(clHill1, 0)],
|
||||
scaleByMapSize(15,25),
|
||||
@@ -264,7 +267,7 @@ Engine.SetProgress(60);
|
||||
log("Creating bumps...");
|
||||
createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 50), 0.3, 0.06, 0),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 2, 2),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBump, 2),
|
||||
avoidClasses(clOasis, 0, clPlayer, 0, clHill1, 2),
|
||||
scaleByMapSize(100, 200)
|
||||
);
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "neareastern_badlands.js",
|
||||
"Description" : "A jumbled maze of cliffs, canyons, and rugged terrain with an oasis in the center\n\nCappadocia is a historical region in Central Anatolia. In the time of Herodotus, the Cappadocians were reported as occupying the whole region from Mount Taurus to the vicinity of the the Black Sea. Cappadocia, in this sense, was bounded in the south by the chain of the Taurus Mountains that separate it from Cilicia, to the east by the upper Euphrates and the Armenian Highland, to the north by Pontus, and to the west by Lycaonia and eastern Galatia. Cappadocia lies in eastern Anatolia. The relief consists of a high plateau over 1000 m in altitude that is pierced by volcanic peaks. Due to its inland location and high altitude, Cappadocia has a markedly continental climate, with hot dry summers and cold snowy winters. Rainfall is sparse and the region is largely semi-arid.",
|
||||
"BaseTerrain" : ["desert_sand_smooth", "desert_sand_smooth_b"],
|
||||
"BaseHeight" : 10,
|
||||
"Preview" : "neareastern_badlands.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
Engine.LoadLibrary("rmgen");
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
InitMap(0, g_MapSettings.BaseTerrain);
|
||||
|
||||
if (isNomad())
|
||||
placePlayersNomad(createTileClass());
|
||||
else
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.39))
|
||||
});
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.39))
|
||||
});
|
||||
|
||||
placePlayersNomad(createTileClass());
|
||||
|
||||
ExportMap();
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "new_rms_test.js",
|
||||
"Description" : "A basic test of the random map generator - not playable.",
|
||||
"BaseTerrain" : "grass1_spring",
|
||||
"BaseHeight" : 0,
|
||||
"Keywords": ["demo"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,12 @@ const aIceberg = "actor|props/special/eyecandy/iceberg.xml";
|
||||
const pForestD = [tForestFloor + TERRAIN_SEPARATOR + oPine, tForestFloor, tForestFloor];
|
||||
const pForestS = [tForestFloor + TERRAIN_SEPARATOR + oPine, tForestFloor, tForestFloor, tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround = -5;
|
||||
const heightLake = -4;
|
||||
const heightLand = 3;
|
||||
const heightHill = 25;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -44,8 +49,6 @@ var clMetal = createTileClass();
|
||||
var clFood = createTileClass();
|
||||
var clBaseResource = createTileClass();
|
||||
|
||||
var landHeight = getMapBaseHeight();
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementLine(true, new Vector2D(fractionToTiles(0.45), mapCenter.y), fractionToTiles(0.2)),
|
||||
"PlayerTileClass": clPlayer,
|
||||
@@ -76,8 +79,8 @@ paintRiver({
|
||||
"width": 2 * fractionToTiles(0.31),
|
||||
"fadeDist": 8,
|
||||
"deviation": 0,
|
||||
"waterHeight": -5,
|
||||
"landHeight": landHeight,
|
||||
"heightRiverbed": heightSeaGround,
|
||||
"heightLand": heightLand,
|
||||
"meanderShort": 0,
|
||||
"meanderLong": 0
|
||||
});
|
||||
@@ -96,7 +99,7 @@ for (let i = 0; i < scaleByMapSize(20, 120); ++i)
|
||||
Math.floor(fractionToTiles(randFloat(0.67, 0.74)))),
|
||||
[
|
||||
new LayeredPainter([tSnowA, tSnowA], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 3),
|
||||
unPaintClass(clWater)
|
||||
]);
|
||||
|
||||
@@ -105,7 +108,7 @@ createAreas(
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(4, 6)), Math.floor(scaleByMapSize(16, 40)), 0.1),
|
||||
[
|
||||
new LayeredPainter([tSnowA, tSnowA], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, landHeight, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLand, 3),
|
||||
paintClass(clIsland),
|
||||
unPaintClass(clWater)
|
||||
],
|
||||
@@ -119,7 +122,7 @@ createAreas(
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(5, 7)), Math.floor(scaleByMapSize(20, 50)), 0.1),
|
||||
[
|
||||
new LayeredPainter([tShoreBlend, tShore, tWater], [1, 1]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -4, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightLake, 3),
|
||||
paintClass(clWater)
|
||||
],
|
||||
avoidClasses(clPlayer, 20, clWater, 20),
|
||||
@@ -135,7 +138,7 @@ createAreas(
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(4, 6)), Math.floor(scaleByMapSize(16, 40)), 0.1),
|
||||
[
|
||||
new LayeredPainter([tCliff, tSnowA], [3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 25, 3),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 3),
|
||||
paintClass(clHill)
|
||||
],
|
||||
avoidClasses(clPlayer, 20, clHill, 15, clWater, 2, clBaseResource, 2),
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "northern_lights.js",
|
||||
"Description" : "Players start in a tough map to play with scarce wood and dangerous polar animals.",
|
||||
"BaseTerrain" : ["polar_snow_b"],
|
||||
"BaseHeight" : 3,
|
||||
"Preview" : "northern_lights.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,13 @@ const pForestMain = [tForestFloor + TERRAIN_SEPARATOR + ePalmShort, tForestFloor
|
||||
const pOasisForestLight = [tForestFloor + TERRAIN_SEPARATOR + ePalmShort, tForestFloor + TERRAIN_SEPARATOR + ePalmTall, tForestFloor,tForestFloor,tForestFloor
|
||||
,tForestFloor,tForestFloor,tForestFloor,tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, tSand);
|
||||
const heightSeaGround = -3;
|
||||
const heightLand = 1;
|
||||
const heightOasisPath = 4;
|
||||
const heightOffsetBump = 4;
|
||||
const heightOffsetDune = 18;
|
||||
|
||||
InitMap(heightLand, tSand);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -105,7 +111,7 @@ for (let i = 0; i < numPlayers; ++i)
|
||||
new ClumpPlacer(60, 0.9, 0.4, 5, watX, watY),
|
||||
[
|
||||
new LayeredPainter([tShore, tWater], [1]),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, -5, 3)
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 3)
|
||||
],
|
||||
avoidClasses(clBaseResource, 0)));
|
||||
}
|
||||
@@ -146,7 +152,7 @@ createArea(
|
||||
new ClumpPlacer(diskArea(forestDistance + shoreDistance + waterRadius), 0.8, 0.2, 10, mapCenter.x, mapCenter.y),
|
||||
[
|
||||
new LayeredPainter([pOasisForestLight, tWater], [forestDistance]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, -3, forestDistance + shoreDistance),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, forestDistance + shoreDistance),
|
||||
paintClass(clOasis)
|
||||
]);
|
||||
|
||||
@@ -155,7 +161,7 @@ Engine.SetProgress(40);
|
||||
log("Creating bumps...");
|
||||
createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 50), 0.3, 0.06, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 4, 3),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBump, 3),
|
||||
avoidClasses(clPlayer, 10, clBaseResource, 6, clOasis, 4),
|
||||
scaleByMapSize(30, 70));
|
||||
|
||||
@@ -171,7 +177,7 @@ createAreas(
|
||||
new ClumpPlacer(120, 0.3, 0.06, 1),
|
||||
[
|
||||
new TerrainPainter(tDune),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 18, 30)
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetDune, 30)
|
||||
],
|
||||
avoidClasses(clPlayer, 10, clBaseResource, 6, clOasis, 4, clForest, 4),
|
||||
scaleByMapSize(15, 50));
|
||||
@@ -187,7 +193,7 @@ if (mapSize > 150 && randBool())
|
||||
new PathPlacer(points[0].x, points[0].y, points[1].x, points[1].y, pathWidth, 0.4, 1, 0.2, 0),
|
||||
[
|
||||
new TerrainPainter(tSand),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 4, 5),
|
||||
new SmoothElevationPainter(ELEVATION_SET, hOasisPath, 5),
|
||||
paintClass(clPassage)
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "oasis.js",
|
||||
"Description" : "Players start around a small oasis in the center of the map which holds much of the available wood on the map.",
|
||||
"BaseTerrain" : ["medit_dirt", "medit_dirt_b", "medit_dirt_c"],
|
||||
"BaseHeight" : 1,
|
||||
"Preview" : "oasis.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,10 @@ const aDecorativeRock = "actor|geology/stone_desert_med.xml";
|
||||
|
||||
const pForestO = [tForestFloor + TERRAIN_SEPARATOR + oOak, tForestFloor + TERRAIN_SEPARATOR + oOak, tForestFloor, tDirtMain, tDirtMain];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, tDirtMain);
|
||||
const heightLand = 10;
|
||||
const heightOffsetValley = -10;
|
||||
|
||||
InitMap(heightLand, tDirtMain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -143,7 +146,7 @@ createArea(
|
||||
[Math.floor(scaleByMapSize(18, 68))]),
|
||||
[
|
||||
new LayeredPainter([tLakebed2, tLakebed1], [6]),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, -10, 8),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetValley, 8),
|
||||
paintClass(clCP)
|
||||
],
|
||||
avoidClasses(clPlayer, 18));
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "persian_highlands.js",
|
||||
"Description" : "A dry central plateau rich in minerals surrounded by rocky hills\n\nThe southern parts of Zagros Mountains were the heart of the Persian empires and population. Although the altitude is high, the southern parts are drier that the northern Zagros, leading to a semi-arid climate. Still there are some sparse oak forests in the higher grounds.",
|
||||
"BaseTerrain" : ["desert_dirt_persia_2", "desert_dirt_persia_1" , "desert_dirt_persia_2", "grass_field_dry", "grass_field_dry"],
|
||||
"BaseHeight" : 10,
|
||||
"Preview" : "persian_highlands.png",
|
||||
"CircularMap" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,14 @@ const aDecorativeRock = "actor|geology/stone_granite_med.xml";
|
||||
|
||||
const pForest = [tForestFloor + TERRAIN_SEPARATOR + oDatePalm, tForestFloor + TERRAIN_SEPARATOR + oSDatePalm, tForestFloor + TERRAIN_SEPARATOR + oCarob, tForestFloor, tForestFloor];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightSeaGround = -3;
|
||||
const heightShore = -1.5;
|
||||
const heightLand = 1;
|
||||
const heightIsland = 6;
|
||||
const heightHill = 15;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -58,10 +65,6 @@ var clGrass = createTileClass();
|
||||
var clHill = createTileClass();
|
||||
var clIsland = createTileClass();
|
||||
|
||||
var waterHeight = -3;
|
||||
var shoreHeight = -1.5;
|
||||
var landHeight = getMapBaseHeight();
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementLine(false, new Vector2D(fractionToTiles(0.76), mapCenter.y), fractionToTiles(0.2)),
|
||||
"PlayerTileClass": clPlayer,
|
||||
@@ -98,21 +101,21 @@ paintRiver({
|
||||
"width": mapSize,
|
||||
"fadeDist": scaleByMapSize(6, 25),
|
||||
"deviation": 0,
|
||||
"waterHeight": waterHeight,
|
||||
"landHeight": landHeight,
|
||||
"heightRiverbed": heightSeaGround,
|
||||
"heightLand": heightLand,
|
||||
"meanderShort": 20,
|
||||
"meanderLong": 0
|
||||
});
|
||||
Engine.SetProgress(40);
|
||||
|
||||
paintTileClassBasedOnHeight(-Infinity, landHeight, Elevation_ExcludeMin_ExcludeMax, clWater);
|
||||
paintTerrainBasedOnHeight(-Infinity, shoreHeight, Elevation_ExcludeMin_ExcludeMax, tWater);
|
||||
paintTerrainBasedOnHeight(shoreHeight, landHeight, Elevation_ExcludeMin_ExcludeMax, tShore);
|
||||
paintTileClassBasedOnHeight(-Infinity, heightLand, Elevation_ExcludeMin_ExcludeMax, clWater);
|
||||
paintTerrainBasedOnHeight(-Infinity, heightShore, Elevation_ExcludeMin_ExcludeMax, tWater);
|
||||
paintTerrainBasedOnHeight(heightShore, heightLand, Elevation_ExcludeMin_ExcludeMax, tShore);
|
||||
|
||||
log("Creating bumps...");
|
||||
createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(20, 50), 0.3, 0.06, 1),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 2, 2),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBump, 2),
|
||||
avoidClasses(clWater, 2, clPlayer, 20),
|
||||
scaleByMapSize(100, 200));
|
||||
|
||||
@@ -121,7 +124,7 @@ createAreas(
|
||||
new ChainPlacer(1, Math.floor(scaleByMapSize(4, 6)), Math.floor(scaleByMapSize(16, 40)), 0.5),
|
||||
[
|
||||
new LayeredPainter([tCliff, tHill], [2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 15, 2),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightHill, 2),
|
||||
paintClass(clHill)
|
||||
],
|
||||
avoidClasses(clPlayer, 20, clForest, 1, clHill, 15, clWater, 0),
|
||||
@@ -174,7 +177,7 @@ createAreas(
|
||||
new ClumpPlacer(diskArea(fractionToTiles(0.08)), 0.2, 0.1, 0.01),
|
||||
[
|
||||
new LayeredPainter([tShore, tHill], [12]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, 6, 8),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightIsland, 8),
|
||||
paintClass(clIsland),
|
||||
unPaintClass(clWater)
|
||||
],
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"Script" : "phoenician_levant.js",
|
||||
"Description" : "Players start in the eastern part of the map while a great sea is located to the west.",
|
||||
"BaseTerrain" : ["medit_dirt", "medit_dirt_b", "medit_dirt_c", "medit_rocks_grass", "medit_rocks_grass"],
|
||||
"BaseHeight" : 1,
|
||||
"Preview" : "phoenician_levant.png",
|
||||
"CircularMap" : false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
Engine.LoadLibrary("rmgen");
|
||||
|
||||
var tPrimary = ["polar_snow_a"];
|
||||
var tCliff = ["polar_cliff_a", "polar_cliff_b", "polar_cliff_snow"];
|
||||
var tSecondary = "polar_snow_glacial";
|
||||
var tHalfSnow = ["ice_01", "ice_dirt"];
|
||||
var tSnowLimited = ["polar_snow_b", "polar_ice"];
|
||||
@@ -28,7 +27,11 @@ var aRockLarge = "actor|geology/stone_granite_med.xml";
|
||||
var aRockMedium = "actor|geology/stone_granite_med.xml";
|
||||
var aIceberg = "actor|props/special/eyecandy/iceberg.xml";
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
var heightSeaGround = -4;
|
||||
var heightLand = 2;
|
||||
var heightCliff = 3;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -44,10 +47,6 @@ var clFood = createTileClass();
|
||||
var clBaseResource = createTileClass();
|
||||
var clArcticWolf = createTileClass();
|
||||
|
||||
var waterHeight = -4;
|
||||
var cliffHeight = getMapBaseHeight() + 1;
|
||||
var snowHeight = Math.floor(scaleByMapSize(20, 40));
|
||||
|
||||
var [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.35));
|
||||
|
||||
var treasures = [{
|
||||
@@ -102,13 +101,11 @@ createArea(
|
||||
[Math.floor(fractionToTiles(0.17))]),
|
||||
[
|
||||
new LayeredPainter([tShore, tWater, tWater, tWater], [1, 4, 2]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, waterHeight, 4),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 4),
|
||||
paintClass(clWater)
|
||||
],
|
||||
avoidClasses(clPlayer, 20));
|
||||
|
||||
paintTerrainBasedOnHeight(cliffHeight, snowHeight, Elevation_ExcludeMin_ExcludeMax, tCliff);
|
||||
paintTerrainBasedOnHeight(snowHeight, Infinity, Elevation_IncludeMin_IncludeMax, tSnowLimited);
|
||||
Engine.SetProgress(40);
|
||||
|
||||
log("Creating small lakes...");
|
||||
@@ -137,7 +134,7 @@ for (let i = 0; i < numLakes ; ++i)
|
||||
chosenPoint[1]),
|
||||
[
|
||||
new LayeredPainter([tShore, tWater, tWater], [1, 3]),
|
||||
new SmoothElevationPainter(ELEVATION_SET, waterHeight, 5),
|
||||
new SmoothElevationPainter(ELEVATION_SET, heightSeaGround, 5),
|
||||
paintClass(clWater)
|
||||
],
|
||||
avoidClasses(clPlayer, 20),
|
||||
@@ -153,7 +150,8 @@ log("Creating hills...");
|
||||
createHills(
|
||||
[tPrimary, tPrimary, tSecondary],
|
||||
avoidClasses(clPlayer, 20, clHill, 35),
|
||||
clHill, scaleByMapSize(20, 240));
|
||||
clHill,
|
||||
scaleByMapSize(20, 240));
|
||||
Engine.SetProgress(65);
|
||||
|
||||
log("Creating dirt patches...");
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Script" : "polar_sea.js",
|
||||
"Description" : "Players start in a cold polar region barren of vegetation. In the sea fish and whales abound, while the fragile icy land teems with huntable walruses and deadly wolves. These wolves, made ravenous by the harsh and forbidding climate, drawn by the scent of prey, have started appearing in terrifying numbers. A wise and strong ruler will not only achieve victory over his enemies, but also keep the number of these beasts at bay, lest they undermine his economy and cause his downfall. [color=\"red\"]Warning: It is inadvisable to disable treasures, since there is no gatherable wood. Not recommended for inexperienced players.[/color]",
|
||||
"BaseTerrain" : ["polar_snow_a"],
|
||||
"BaseHeight" : 2,
|
||||
"Keywords": ["trigger"],
|
||||
"Preview" : "polar_sea.png",
|
||||
"CircularMap" : true,
|
||||
|
||||
@@ -58,7 +58,11 @@ const pForestLandVeryLight = [ tGrassLandForest2 + TERRAIN_SEPARATOR + oPine,tGr
|
||||
tGrassLandForest,tForestTransition,tGrassLandForest2,tForestTransition,
|
||||
tGrassLandForest2,tGrassLandForest2,tGrassLandForest2,tGrassLandForest2];
|
||||
|
||||
InitMap(g_MapSettings.BaseHeight, g_MapSettings.BaseTerrain);
|
||||
const heightLand = -100;
|
||||
const heightOffsetHill = 7;
|
||||
const heightOffsetHillRandom = 2;
|
||||
|
||||
InitMap(heightLand, g_MapSettings.BaseTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -204,7 +208,6 @@ Engine.SetProgress(48);
|
||||
|
||||
log("Creating passages...");
|
||||
var passageLocation = 0.35;
|
||||
var passageHeight = MountainHeight - 25;
|
||||
var passageLength = scaleByMapSize(8, 50);
|
||||
var passageVec = mountainVec.perpendicular().normalize().mult(passageLength);
|
||||
|
||||
@@ -217,7 +220,7 @@ for (let passLoc of [passageLocation, 1 - passageLocation])
|
||||
createPassage({
|
||||
"start": passageStart,
|
||||
"end": passageEnd,
|
||||
"startHeight": passageHeight,
|
||||
"startHeight": MountainHeight - 25,
|
||||
"startWidth": 7,
|
||||
"endWidth": 7,
|
||||
"smoothWidth": 2,
|
||||
@@ -289,7 +292,7 @@ log("Creating hills...");
|
||||
createAreas(
|
||||
new ClumpPlacer(scaleByMapSize(60, 120), 0.3, 0.06, 5),
|
||||
[
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, 7, 4, 2),
|
||||
new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetHill, 4, heightOffsetHillRandom),
|
||||
new TerrainPainter(tGrassSpecific),
|
||||
paintClass(clHill)
|
||||
],
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user