Index: binaries/data/mods/public/maps/random/fields_of_meroe.js =================================================================== --- binaries/data/mods/public/maps/random/fields_of_meroe.js +++ binaries/data/mods/public/maps/random/fields_of_meroe.js @@ -28,8 +28,10 @@ const oLion = "gaia/fauna_lion"; const oFish = "gaia/fauna_fish"; const oHawk = "gaia/fauna_hawk"; -const oStoneSmall = "gaia/geology_stone_savanna_small"; +const oStoneLarge = "gaia/geology_stonemine_savanna_quarry"; +const oStoneSmall = "gaia/geology_stone_desert_small"; const oMetalLarge = "gaia/geology_metal_savanna_slabs"; +const oMetalSmall = "gaia/geology_metal_desert_small"; const oHouse = "structures/kush_house"; const oFarmstead = "structures/kush_farmstead"; @@ -43,12 +45,15 @@ const aBushB = g_Decoratives.bushB; const aBushes = [aBushA, aBushB]; const aReeds = "actor|props/flora/reeds_pond_lush_a.xml"; -const aRock = "actor|geology/stone_desert_med.xml"; +const aRockA = "actor|geology/stone_desert_med.xml"; +const aRockB = "actor|geology/shoreline_large.xml"; +const aRockC = "actor|geology/shoreline_small.xml"; const pForestP = [tForestFloor + TERRAIN_SEPARATOR + oAcacia, tForestFloor]; const heightSeaGround = g_Heights.seaGround; const heightReedsDepth = -2.5; +const heightCataract = -1; const heightShore = 1; const heightLand = 2; const heightDunes = 11; @@ -71,6 +76,7 @@ var clFood = g_Map.createTileClass(); var clBaseResource = g_Map.createTileClass(); var clRain = g_Map.createTileClass(); +var clCataract = g_Map.createTileClass(); var kushVillageBuildings = { "houseA": { "template": oHouse, "offset": new Vector2D(5, 5) }, @@ -126,6 +132,38 @@ }); Engine.SetProgress(10); +g_Map.log("Creating cataracts and placing decoratives"); +for (let x of [fractionToTiles(randFloat(0.15, 0.25)), fractionToTiles(randFloat(0.75, 0.85))]) +{ + let randAngle = randFloat(0.8, 1.2); + let areaPassage = createPassage({ + "start": new Vector2D(x, mapBounds.bottom).rotateAround(riverAngle + Math.PI / 2 * randAngle, mapCenter), + "end": new Vector2D(x, mapBounds.top).rotateAround(riverAngle + Math.PI / 2 * randAngle, mapCenter), + "startWidth": scaleByMapSize(20, 30), + "endWidth": scaleByMapSize(20, 30), + "smoothWidth": 2, + "tileClass": clCataract, + "startHeight": heightCataract, + "endHeight": heightCataract, + "constraints": new HeightConstraint(-Infinity, 0)}); + + createAreasInAreas( + new ClumpPlacer(4, 0.4, 0.6), + new SmoothElevationPainter(ELEVATION_MODIFY, 4, 2), + undefined, + scaleByMapSize(15, 30), + 100, + [areaPassage]); + + createObjectGroupsByAreas( + new SimpleGroup([new SimpleObject(aReeds, 2, 4, 0, 1)], true), + 0, + undefined, + scaleByMapSize(20, 50), + 50, + [areaPassage]) +} + var [playerIDs, playerPosition] = playerPlacementRandom(sortAllPlayers(), avoidClasses(clRiver, 15, clPlayer, 30)); placePlayerBases({ "PlayerPlacement": [playerIDs, playerPosition], @@ -240,28 +278,24 @@ Engine.SetProgress(60); g_Map.log("Creating stone mines"); -createObjectGroups( - new SimpleGroup([new SimpleObject(oStoneSmall, 1, 1, 0, 4), new RandomObject(aBushes, 2, 4, 0, 2)], true, clRock), - 0, - [avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clDunes, 1, clRiver, 15, clKushiteVillages, 10)], - scaleByMapSize(2, 8), - 100); - -g_Map.log("Creating small stone quarries"); -createObjectGroups( - new SimpleGroup([new SimpleObject(oStoneSmall, 2, 5, 1, 3), new RandomObject(aBushes, 2, 4, 0, 2)], true, clRock), - 0, - [avoidClasses(clForest, 1, clPlayer, 10, clRock, 10, clDunes, 1, clRiver, 15, clKushiteVillages, 10)], - scaleByMapSize(2, 8), - 100); +createMines( + [ + [new SimpleObject(oStoneSmall, 0, 2, 0, 4, 0, 2 * Math.PI, 1), new SimpleObject(oStoneLarge, 1, 1, 0, 4, 0, 2 * Math.PI, 4)], + [new SimpleObject(oStoneSmall, 2, 5, 1, 3, 0, 2 * Math.PI, 1)] + ], + avoidClasses(clRiver, 4, clCataract, 4, clPlayer, 20, clRock, 10, clKushiteVillages, 5, clDunes, 2, clForest, 4), + clRock, + scaleByMapSize(6, 24)); g_Map.log("Creating metal mines"); -createObjectGroups( - new SimpleGroup([new SimpleObject(oMetalLarge, 1, 1, 0, 4), new RandomObject(aBushes, 2, 4, 0, 2)], true, clMetal), - 0, - [avoidClasses(clForest, 1, clPlayer, 10, clMetal, 10, clRock, 5, clDunes, 1, clRiver, 15, clKushiteVillages, 10)], - scaleByMapSize(2, 8), - 100); +createMines( + [ + [new SimpleObject(oMetalSmall, 0, 2, 0, 4, 0, 2 * Math.PI, 1), new SimpleObject(oMetalLarge, 1, 1, 0, 4, 0, 2 * Math.PI, 4)], + [new SimpleObject(oMetalSmall, 2, 5, 1, 3, 0, 2 * Math.PI, 1)] + ], + avoidClasses(clRiver, 4, clCataract, 4, clPlayer, 20, clRock, 10, clKushiteVillages, 5, clDunes, 2, clForest, 4), + clMetal, + scaleByMapSize(6, 24)); Engine.SetProgress(70); g_Map.log("Creating gazelle"); @@ -297,7 +331,7 @@ createObjectGroups( new SimpleGroup([new SimpleObject(oFish, 1, 2, 0, 1)], true, clFood), 0, - [stayClasses(clRiver, 4), avoidClasses(clFood, 16)], + [stayClasses(clRiver, 4), avoidClasses(clFood, 16, clCataract, 10)], scaleByMapSize(15, 80), 50); Engine.SetProgress(80); @@ -322,21 +356,33 @@ Engine.SetProgress(90); -g_Map.log("Creating reeds on the shore."); +g_Map.log("Creating reeds on the shore"); createObjectGroups( new SimpleGroup([new SimpleObject(aReeds, 3, 5, 0, 1)], true), 0, - new HeightConstraint(heightReedsDepth, heightShore), + [ + new HeightConstraint(heightReedsDepth, heightShore), + avoidClasses(clCataract, 2) + ], scaleByMapSize(500, 1000), 50); g_Map.log("Creating small decorative rocks"); createObjectGroups( - new SimpleGroup([new SimpleObject(aRock, 1, 3, 0, 1)], true), + new SimpleGroup([new SimpleObject(aRockA, 1, 3, 0, 1)], true), 0, avoidClasses(clForest, 0, clPlayer, 0, clDunes, 0), scaleByMapSize(16, 262), 50); +createObjectGroups( + new SimpleGroup([new SimpleObject(aRockB, 1, 2, 0, 1), new SimpleObject(aRockC, 1, 3, 0, 1)], true), + 0, + [ + new NearTileClassConstraint(clCataract, 5), + new HeightConstraint(-Infinity, heightShore) + ], + scaleByMapSize(30, 50), + 50); g_Map.log("Creating bushes"); createObjectGroups(