forked from 0ad/0ad
add placement options for many maps
This commit is contained in:
parent
357c31acbf
commit
6e68277b98
@ -74,8 +74,17 @@ function* GenerateMap(mapSettings)
|
||||
const clFood = g_Map.createTileClass();
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.35)),
|
||||
"PlayerPlacement": [playerIDs, playerPosition],
|
||||
"PlayerTileClass": clPlayer,
|
||||
"BaseResourceClass": clBaseResource,
|
||||
"CityPatch": {
|
||||
|
@ -5,6 +5,13 @@
|
||||
"Description" : "The central region of the vast continent of Africa, birthplace of humanity. Players start in a lush area teeming with vegetation and wildlife.",
|
||||
"SupportedBiomes": ["generic/savanna", "generic/sahara", "generic/nubia"],
|
||||
"Preview" : "african_plains.png",
|
||||
"CircularMap" : true
|
||||
"CircularMap" : true,
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"groupedLines",
|
||||
"randomGroup",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -38,8 +38,17 @@ function* GenerateMap(mapSettings)
|
||||
const clFood = g_Map.createTileClass();
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.35)),
|
||||
"PlayerPlacement": [playerIDs, playerPosition],
|
||||
"PlayerTileClass": clPlayer,
|
||||
"BaseResourceClass": clBaseResource,
|
||||
"CityPatch": {
|
||||
|
@ -3,8 +3,15 @@
|
||||
"Name" : "Alpine Lakes",
|
||||
"Script" : "alpine_lakes.js",
|
||||
"Description" : "High Alpine mountains surrounding deep valleys strung with mountain streams and finger-like lakes.",
|
||||
"CircularMap" : true,
|
||||
"Preview" : "alpine_lakes.png",
|
||||
"SupportedBiomes": "alpine/"
|
||||
"SupportedBiomes": "alpine/",
|
||||
"CircularMap" : true,
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"groupedLines",
|
||||
"randomGroup",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -52,8 +52,17 @@ function* GenerateMap()
|
||||
const clFood = g_Map.createTileClass();
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.35)),
|
||||
"PlayerPlacement": [playerIDs, playerPosition],
|
||||
"PlayerTileClass": clPlayer,
|
||||
"BaseResourceClass": clBaseResource,
|
||||
"CityPatch": {
|
||||
|
@ -4,6 +4,13 @@
|
||||
"Script" : "anatolian_plateau.js",
|
||||
"Description" : "An indefensible open land with little wood and stone, representing the central basin of Asia Minor.",
|
||||
"Preview" : "anatolian_plateau.png",
|
||||
"CircularMap" : true
|
||||
"CircularMap" : true,
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"groupedLines",
|
||||
"randomGroup",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,14 @@ function* GenerateMap()
|
||||
|
||||
const islandRadius = scaleByMapSize(22, 31);
|
||||
|
||||
const [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.35));
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
g_Map.log("Creating player islands");
|
||||
for (let i = 0; i < numPlayers; ++i)
|
||||
|
@ -6,6 +6,13 @@
|
||||
"Keywords": ["naval"],
|
||||
"Preview" : "archipelago.png",
|
||||
"SupportedBiomes": "generic/",
|
||||
"CircularMap" : true
|
||||
"CircularMap" : true,
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"groupedLines",
|
||||
"randomGroup",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -63,8 +63,17 @@ function* GenerateMap()
|
||||
const clFood = g_Map.createTileClass();
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.35)),
|
||||
"PlayerPlacement": [playerIDs, playerPosition],
|
||||
"PlayerTileClass": clPlayer,
|
||||
"BaseResourceClass": clBaseResource,
|
||||
"CityPatch": {
|
||||
|
@ -5,6 +5,13 @@
|
||||
"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.",
|
||||
"Keywords": [],
|
||||
"Preview" : "arctic_summer.png",
|
||||
"CircularMap" : true
|
||||
"CircularMap" : true,
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"groupedLines",
|
||||
"randomGroup",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,14 @@ function* GenerateMap()
|
||||
}
|
||||
}
|
||||
|
||||
const [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.3));
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
function distanceToPlayers(x, z)
|
||||
{
|
||||
|
@ -5,6 +5,12 @@
|
||||
"Description" : "Each player starts deep in the forest.\n\nThe Ardennes is a region of extensive forests, rolling hills and ridges formed within the Givetian Ardennes mountain range, primarily in modern day Belgium and Luxembourg. The region took its name from the ancient Silva, a vast forest in Roman times called Arduenna Silva.",
|
||||
"Keywords": ["multiplayer"],
|
||||
"CircularMap" : true,
|
||||
"Preview" : "ardennes_forest.png"
|
||||
"Preview" : "ardennes_forest.png",
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"groupedLines",
|
||||
"randomGroup"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -60,8 +60,17 @@ function* GenerateMap()
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
const clTreasure = g_Map.createTileClass();
|
||||
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.35)),
|
||||
"PlayerPlacement": [playerIDs, playerPosition],
|
||||
"PlayerTileClass": clPlayer,
|
||||
"BaseResourceClass": clBaseResource,
|
||||
"CityPatch": {
|
||||
|
@ -4,6 +4,13 @@
|
||||
"Script" : "atlas_mountains.js",
|
||||
"Description" : "A rugged land with small room for buildings with scarce wood. Represents the mountain range in the Northwest Africa.",
|
||||
"Preview" : "atlas_mountains.png",
|
||||
"CircularMap" : true
|
||||
"CircularMap" : true,
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"groupedLines",
|
||||
"randomGroup",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -66,8 +66,17 @@ function* GenerateMap()
|
||||
const clFood = g_Map.createTileClass();
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.35)),
|
||||
"PlayerPlacement": [playerIDs, playerPosition],
|
||||
"PlayerTileClass": clPlayer,
|
||||
"BaseResourceClass": clBaseResource,
|
||||
"CityPatch": {
|
||||
|
@ -3,8 +3,14 @@
|
||||
"Name" : "Botswanan Haven",
|
||||
"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.",
|
||||
"Keywords": [],
|
||||
"Preview" : "botswanan_haven.png",
|
||||
"CircularMap" : true,
|
||||
"Preview" : "botswanan_haven.png"
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"groupedLines",
|
||||
"randomGroup",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +86,14 @@ function* GenerateMap()
|
||||
new TileClassPainter(clLand)
|
||||
]);
|
||||
|
||||
const [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.25));
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.25),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
g_Map.log("Ensuring initial player land");
|
||||
for (let i = 0; i < numPlayers; ++i)
|
||||
|
@ -6,6 +6,11 @@
|
||||
"Preview" : "continent.png",
|
||||
"Keywords": ["multiplayer"],
|
||||
"SupportedBiomes": "generic/",
|
||||
"CircularMap" : true
|
||||
"CircularMap" : true,
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"randomGroup",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,14 @@ function* GenerateMap()
|
||||
|
||||
const playerMountainSize = defaultPlayerBaseRadius();
|
||||
|
||||
const [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.35));
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
g_Map.log("Creating CC mountains");
|
||||
if (!isNomad())
|
||||
|
@ -1,11 +1,16 @@
|
||||
{
|
||||
"settings" : {
|
||||
"Name" : "Extinct Volcano",
|
||||
"Script" : "extinct_volcano.js",
|
||||
"Description" : "[color=\"red\"]IMPORTANT NOTE: AI PLAYERS DO NOT WORK WITH THIS MAP[/color]\n\nA once fertile valley, desolated by the eruption of the long-dormant volcano in the heart of the region. Following years of empty, scorched deadness, signs of life started reappearing and spreading. Now the land is half-way to the full lushness of its former era. Alas, it is not to be: following a long stretch of drought, interminable rains have set in in the higher regions to the north. Water levels are rising at drastic levels, slowly forcing players to seek the high ground of the lesser, extinct volcanoes or the now again dormant great cone.",
|
||||
"Keywords": ["trigger"],
|
||||
"CircularMap" : true,
|
||||
"Preview" : "extinctvolcano.png",
|
||||
"settings": {
|
||||
"Name": "Extinct Volcano",
|
||||
"Script": "extinct_volcano.js",
|
||||
"Description": "[color=\"red\"]IMPORTANT NOTE: AI PLAYERS DO NOT WORK WITH THIS MAP[/color]\n\nA once fertile valley, desolated by the eruption of the long-dormant volcano in the heart of the region. Following years of empty, scorched deadness, signs of life started reappearing and spreading. Now the land is half-way to the full lushness of its former era. Alas, it is not to be: following a long stretch of drought, interminable rains have set in in the higher regions to the north. Water levels are rising at drastic levels, slowly forcing players to seek the high ground of the lesser, extinct volcanoes or the now again dormant great cone.",
|
||||
"Keywords": [ "trigger" ],
|
||||
"CircularMap": true,
|
||||
"Preview": "extinctvolcano.png",
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"randomGroup"
|
||||
],
|
||||
"SeaLevelRise": {
|
||||
"Min": 0,
|
||||
"Max": 60,
|
||||
|
@ -44,8 +44,17 @@ function* GenerateMap()
|
||||
const clFood = g_Map.createTileClass();
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.35)),
|
||||
"PlayerPlacement": [playerIDs, playerPosition],
|
||||
"PlayerTileClass": clPlayer,
|
||||
"BaseResourceClass": clBaseResource,
|
||||
// No city patch
|
||||
|
@ -5,6 +5,11 @@
|
||||
"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.",
|
||||
"Preview" : "india.png",
|
||||
"Keywords": [],
|
||||
"CircularMap" : true
|
||||
"CircularMap" : true,
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,15 @@ function* GenerateMap()
|
||||
const clFood = g_Map.createTileClass();
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
|
||||
const [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.35));
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const teamDist = (pattern == 'river') ? .55 : .35;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(teamDist),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
g_Map.log("Preventing water in player territory");
|
||||
for (let i = 0; i < numPlayers; ++i)
|
||||
|
@ -6,6 +6,10 @@
|
||||
"Keywords": ["multiplayer"],
|
||||
"Preview" : "lake.png",
|
||||
"SupportedBiomes": "generic/",
|
||||
"CircularMap" : true
|
||||
"CircularMap" : true,
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ function* GenerateMap()
|
||||
|
||||
createBases(
|
||||
...playerPlacementByPattern(
|
||||
"radial",
|
||||
"circle",
|
||||
fractionToTiles(0.4),
|
||||
fractionToTiles(randFloat(0.05, 0.1)),
|
||||
startAngle,
|
||||
|
@ -64,8 +64,17 @@ function* GenerateMap()
|
||||
const clFood = g_Map.createTileClass();
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.35)),
|
||||
"PlayerPlacement": [playerIDs, playerPosition],
|
||||
"PlayerTileClass": clPlayer,
|
||||
"BaseResourceClass": clBaseResource,
|
||||
"CityPatch": {
|
||||
|
@ -6,6 +6,13 @@
|
||||
"Preview" : "mainland.png",
|
||||
"Keywords": ["multiplayer"],
|
||||
"SupportedBiomes": "generic/",
|
||||
"CircularMap" : true
|
||||
"CircularMap" : true,
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"groupedLines",
|
||||
"randomGroup",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,14 @@ function* GenerateMap(mapSettings)
|
||||
|
||||
const oasisRadius = scaleByMapSize(14, 40);
|
||||
|
||||
const [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.35));
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
if (!isNomad())
|
||||
for (let i = 0; i < numPlayers; ++i)
|
||||
|
@ -6,6 +6,9 @@
|
||||
"SupportedBiomes": ["generic/sahara", "generic/nubia", "generic/savanna"],
|
||||
"Keywords": ["multiplayer"],
|
||||
"Preview" : "neareastern_badlands.png",
|
||||
"CircularMap" : true
|
||||
"CircularMap" : true,
|
||||
"PlayerPlacements": [
|
||||
"circle"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -63,8 +63,18 @@ function* GenerateMap(mapSettings)
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
const clCP = g_Map.createTileClass();
|
||||
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const teamDist = (pattern == "river") ? .50 : .35;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(teamDist),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.35)),
|
||||
"PlayerPlacement": [playerIDs, playerPosition],
|
||||
"BaseResourceClass": clBaseResource,
|
||||
"CityPatch": {
|
||||
"outerTerrain": tCity,
|
||||
|
@ -1,11 +1,16 @@
|
||||
{
|
||||
"settings" : {
|
||||
"Name" : "Persian Highlands",
|
||||
"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.",
|
||||
"Keywords": ["multiplayer"],
|
||||
"Preview" : "persian_highlands_summer.png",
|
||||
"CircularMap" : true,
|
||||
"SupportedBiomes": "persian_highlands/"
|
||||
"settings": {
|
||||
"Name": "Persian Highlands",
|
||||
"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.",
|
||||
"Keywords": [ "multiplayer" ],
|
||||
"Preview": "persian_highlands_summer.png",
|
||||
"CircularMap": true,
|
||||
"SupportedBiomes": "persian_highlands/",
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -55,8 +55,17 @@ function* GenerateMap()
|
||||
const clFood = g_Map.createTileClass();
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.35)),
|
||||
"PlayerPlacement": [playerIDs, playerPosition],
|
||||
"PlayerTileClass": clPlayer,
|
||||
"BaseResourceClass": clBaseResource,
|
||||
"CityPatch": {
|
||||
|
@ -4,6 +4,13 @@
|
||||
"Script" : "rhine_marshlands.js",
|
||||
"Description" : "Shallow, passable wetlands with little room for building. Represents the lowlands of the Rhine basin in Europe.",
|
||||
"Preview" : "rhine_marshlands.png",
|
||||
"CircularMap" : true
|
||||
"CircularMap" : true,
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"groupedLines",
|
||||
"randomGroup",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -46,8 +46,17 @@ function* GenerateMap()
|
||||
const clFood = g_Map.createTileClass();
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.35)),
|
||||
"PlayerPlacement": [playerIDs, playerPosition],
|
||||
"PlayerTileClass": clPlayer,
|
||||
"BaseResourceClass": clBaseResource,
|
||||
"CityPatch": {
|
||||
|
@ -4,6 +4,13 @@
|
||||
"Script" : "sahel.js",
|
||||
"Description" : "A somewhat open map with an abundance of food and mineral resources, while wood is somewhat scarce.",
|
||||
"Preview" : "sahel.png",
|
||||
"CircularMap" : true
|
||||
"CircularMap" : true,
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"groupedLines",
|
||||
"randomGroup",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,14 @@ function* GenerateMap()
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
const clGrass = g_Map.createTileClass();
|
||||
|
||||
const [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.35));
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
g_Map.log("Creating big grass patches around the playerbases");
|
||||
for (let i = 0; i < numPlayers; ++i)
|
||||
|
@ -1,9 +1,15 @@
|
||||
{
|
||||
"settings" : {
|
||||
"Name" : "Syria",
|
||||
"Script" : "syria.js",
|
||||
"Description" : "Players start in a plains with slightly rolling highlands.",
|
||||
"Preview" : "syria.png",
|
||||
"CircularMap" : true
|
||||
"settings": {
|
||||
"Name": "Syria",
|
||||
"Script": "syria.js",
|
||||
"Description": "Players start in a plains with slightly rolling highlands.",
|
||||
"Preview": "syria.png",
|
||||
"CircularMap": true,
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"randomGroup",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -41,8 +41,17 @@ function* GenerateMap()
|
||||
const clMetal = g_Map.createTileClass();
|
||||
const clBaseResource = g_Map.createTileClass();
|
||||
|
||||
const pattern = g_MapSettings.PlayerPlacement;
|
||||
const [playerIDs, playerPosition] =
|
||||
playerPlacementByPattern(
|
||||
pattern,
|
||||
fractionToTiles(0.35),
|
||||
fractionToTiles(0.1),
|
||||
randomAngle(),
|
||||
undefined);
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.35)),
|
||||
"PlayerPlacement": [playerIDs, playerPosition],
|
||||
"PlayerTileClass": clPlayer,
|
||||
"BaseResourceClass": clBaseResource,
|
||||
"CityPatch": {
|
||||
|
@ -4,6 +4,11 @@
|
||||
"Script" : "volcanic_lands.js",
|
||||
"Description" : "A charred dead land where players start around a smoking volcano.",
|
||||
"CircularMap" : true,
|
||||
"Preview" : "volcanic_lands.png"
|
||||
"Preview" : "volcanic_lands.png",
|
||||
"PlayerPlacements": [
|
||||
"circle",
|
||||
"river",
|
||||
"stronghold"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user