Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/maps/random/belgian_uplands.js
Show All 33 Lines | |||||
textueByHeight.push({"upperHeightLimit": heightRange.min + 2/3 * (heightSeaGroundAdjusted - heightRange.min), "terrain": terrains}); | textueByHeight.push({"upperHeightLimit": heightRange.min + 2/3 * (heightSeaGroundAdjusted - heightRange.min), "terrain": terrains}); | ||||
// Flat Water | // Flat Water | ||||
textueByHeight.push({"upperHeightLimit": heightRange.min + 3/3 * (heightSeaGroundAdjusted - 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) | // 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"]; | var terrains = ["temp_plants_bog", "temp_plants_bog_aut", "temp_dirt_gravel_plants", "temp_grass_d"]; | ||||
terrains = terrains.concat(terrains, terrains, terrains, terrains, terrains); | terrains = terrains.concat(terrains, terrains, terrains, terrains, terrains); | ||||
terrains = ["temp_plants_bog|gaia/flora_bush_temperate"].concat(terrains, terrains); | terrains = ["temp_plants_bog|gaia/tree/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_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); | terrains = ["temp_plants_bog_aut|gaia/tree/dead"].concat(terrains, terrains); | ||||
textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 1/6 * (heightRange.max - heightSeaGroundAdjusted), "terrain": terrains}); | textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 1/6 * (heightRange.max - heightSeaGroundAdjusted), "terrain": terrains}); | ||||
// Juicy grass near bog | // Juicy grass near bog | ||||
textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 2/6 * (heightRange.max - heightSeaGroundAdjusted), | textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 2/6 * (heightRange.max - heightSeaGroundAdjusted), | ||||
"terrain": ["temp_grass", "temp_grass_d", "temp_grass_long_b", "temp_grass_plants"]}); | "terrain": ["temp_grass", "temp_grass_d", "temp_grass_long_b", "temp_grass_plants"]}); | ||||
// Medium level grass | // Medium level grass | ||||
// var testActor = "actor|geology/decal_stone_medit_a.xml"; | // var testActor = "actor|geology/decal_stone_medit_a.xml"; | ||||
textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 3/6 * (heightRange.max - heightSeaGroundAdjusted), | textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 3/6 * (heightRange.max - heightSeaGroundAdjusted), | ||||
"terrain": ["temp_grass", "temp_grass_b", "temp_grass_c", "temp_grass_mossy"]}); | "terrain": ["temp_grass", "temp_grass_b", "temp_grass_c", "temp_grass_mossy"]}); | ||||
// Long grass near forest border | // Long grass near forest border | ||||
textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 4/6 * (heightRange.max - heightSeaGroundAdjusted), | 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"]}); | "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) | // Forest border (With wood/food plants/deer/rabits) | ||||
var terrains = ["temp_grass_plants|gaia/flora_tree_euro_beech", "temp_grass_mossy|gaia/flora_tree_poplar", "temp_grass_mossy|gaia/flora_tree_poplar_lombardy", | var terrains = ["temp_grass_plants|gaia/tree/euro_beech", "temp_grass_mossy|gaia/tree/poplar", "temp_grass_mossy|gaia/tree/poplar_lombardy", | ||||
"temp_grass_long|gaia/flora_bush_temperate", "temp_mud_plants|gaia/flora_bush_temperate", "temp_mud_plants|gaia/flora_bush_badlands", | "temp_grass_long|gaia/tree/bush_temperate", "temp_mud_plants|gaia/tree/bush_temperate", "temp_mud_plants|gaia/tree/bush_badlands", | ||||
"temp_grass_long|gaia/flora_tree_apple", "temp_grass_clovers|gaia/flora_bush_berry", "temp_grass_clovers_2|gaia/flora_bush_grapes", | "temp_grass_long|gaia/fruit/apple", "temp_grass_clovers|gaia/fruit/berry_01", "temp_grass_clovers_2|gaia/fruit/grapes", | ||||
"temp_grass_plants|gaia/fauna_deer", "temp_grass_long_b|gaia/fauna_rabbit"]; | "temp_grass_plants|gaia/fauna_deer", "temp_grass_long_b|gaia/fauna_rabbit"]; | ||||
var numTerrains = terrains.length; | var numTerrains = terrains.length; | ||||
for (var i = 0; i < numTerrains; i++) | for (var i = 0; i < numTerrains; i++) | ||||
terrains.push("temp_grass_plants"); | terrains.push("temp_grass_plants"); | ||||
textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 5/6 * (heightRange.max - heightSeaGroundAdjusted), "terrain": terrains}); | textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 5/6 * (heightRange.max - heightSeaGroundAdjusted), "terrain": terrains}); | ||||
// Unpassable woods | // Unpassable woods | ||||
textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 6/6 * (heightRange.max - heightSeaGroundAdjusted), | textueByHeight.push({"upperHeightLimit": heightSeaGroundAdjusted + 6/6 * (heightRange.max - heightSeaGroundAdjusted), | ||||
"terrain": ["temp_grass_mossy|gaia/flora_tree_oak", "temp_forestfloor_pine|gaia/flora_tree_pine", | "terrain": ["temp_grass_mossy|gaia/tree/oak", "temp_forestfloor_pine|gaia/tree/pine", | ||||
"temp_grass_mossy|gaia/flora_tree_oak", "temp_forestfloor_pine|gaia/flora_tree_pine", | "temp_grass_mossy|gaia/tree/oak", "temp_forestfloor_pine|gaia/tree/pine", | ||||
"temp_mud_plants|gaia/flora_tree_dead", "temp_plants_bog|gaia/flora_tree_oak_large", | "temp_mud_plants|gaia/tree/dead", "temp_plants_bog|gaia/tree/oak_large", | ||||
"temp_dirt_gravel_plants|gaia/flora_tree_aleppo_pine", "temp_forestfloor_autumn|gaia/flora_tree_carob"]}); | "temp_dirt_gravel_plants|gaia/tree/aleppo_pine", "temp_forestfloor_autumn|gaia/tree/carob"]}); | ||||
Engine.SetProgress(5); | Engine.SetProgress(5); | ||||
var lowerHeightLimit = textueByHeight[3].upperHeightLimit; | var lowerHeightLimit = textueByHeight[3].upperHeightLimit; | ||||
var upperHeightLimit = textueByHeight[6].upperHeightLimit; | var upperHeightLimit = textueByHeight[6].upperHeightLimit; | ||||
var playerPosition; | var playerPosition; | ||||
var playerIDs; | var playerIDs; | ||||
▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | for (let j = 1; j <= 4; ++j) | ||||
{ | { | ||||
let pos = Vector2D.sum([ | let pos = Vector2D.sum([ | ||||
playerPosition[i], | playerPosition[i], | ||||
new Vector2D(resourceDistance, 0).rotate(-uAngle), | new Vector2D(resourceDistance, 0).rotate(-uAngle), | ||||
new Vector2D(k * resourceSpacing, 0).rotate(-uAngle - Math.PI/2), | new Vector2D(k * resourceSpacing, 0).rotate(-uAngle - Math.PI/2), | ||||
new Vector2D(-0.75 * resourceSpacing * Math.floor(resourceCount / 2), 0).rotate(-uAngle - Math.PI/2) | new Vector2D(-0.75 * resourceSpacing * Math.floor(resourceCount / 2), 0).rotate(-uAngle - Math.PI/2) | ||||
]); | ]); | ||||
g_Map.placeEntityPassable(j % 2 ? "gaia/flora_tree_cypress" : "gaia/flora_bush_berry", 0, pos, randomAngle()); | g_Map.placeEntityPassable(j % 2 ? "gaia/tree/cypress" : "gaia/fruit/berry_01", 0, pos, randomAngle()); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
g_Map.ExportMap(); | g_Map.ExportMap(); |
Wildfire Games · Phabricator