Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: binaries/data/mods/public/maps/random/fields_of_meroe.js
- ===================================================================
- --- binaries/data/mods/public/maps/random/fields_of_meroe.js (revision 21660)
- +++ binaries/data/mods/public/maps/random/fields_of_meroe.js (working copy)
- @@ -26,12 +26,14 @@ const oSDatePalm = "gaia/flora_tree_cret
- const oGazelle = "gaia/fauna_gazelle";
- const oGiraffe = "gaia/fauna_giraffe";
- 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";
- const oField = "structures/kush_field";
- const oPyramid = "structures/kush_pyramid_small";
- @@ -41,20 +43,24 @@ const oKushSoldiers = "units/kush_infant
- const aRain = g_Decoratives.rain;
- const aBushA = g_Decoratives.bushA;
- 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;
- const heightOffsetBump = 1.4;
- +const heightOffsetBumpPassage = 4;
- const g_Map = new RandomMap(heightLand, tMainDirt);
- const numPlayers = getNumPlayers();
- const mapCenter = g_Map.getCenter();
- @@ -69,10 +75,11 @@ var clForest = g_Map.createTileClass();
- var clRock = g_Map.createTileClass();
- var clMetal = g_Map.createTileClass();
- 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) },
- "houseB": { "template": oHouse, "offset": new Vector2D(5, 0) },
- "houseC": { "template": oHouse, "offset": new Vector2D(5, -5) },
- @@ -124,10 +131,48 @@ paintRiver({
- }
- }
- });
- Engine.SetProgress(10);
- +g_Map.log("Creating cataracts");
- +for (let x of [fractionToTiles(randFloat(0.15, 0.25)), fractionToTiles(randFloat(0.75, 0.85))])
- +{
- + let anglePassage = riverAngle + Math.PI / 2 * randFloat(0.8, 1.2);
- +
- + let areaPassage = createArea(
- + new PathPlacer(
- + new Vector2D(x, mapBounds.bottom).rotateAround(anglePassage, mapCenter),
- + new Vector2D(x, mapBounds.top).rotateAround(anglePassage, mapCenter),
- + scaleByMapSize(20, 30),
- + 0,
- + 1,
- + 0,
- + 0,
- + Infinity),
- + [
- + new SmoothElevationPainter(ELEVATION_SET, heightCataract, 2),
- + new TileClassPainter(clCataract)
- + ],
- + new HeightConstraint(-Infinity, 0));
- +
- + createAreasInAreas(
- + new ClumpPlacer(4, 0.4, 0.6),
- + new SmoothElevationPainter(ELEVATION_MODIFY, heightOffsetBumpPassage, 2),
- + undefined,
- + scaleByMapSize(15, 30),
- + 20,
- + [areaPassage]);
- +
- + createObjectGroupsByAreas(
- + new SimpleGroup([new SimpleObject(aReeds, 2, 4, 0, 1)], true),
- + 0,
- + undefined,
- + scaleByMapSize(20, 50),
- + 20,
- + [areaPassage])
- +}
- +
- var [playerIDs, playerPosition] = playerPlacementRandom(sortAllPlayers(), avoidClasses(clRiver, 15, clPlayer, 30));
- placePlayerBases({
- "PlayerPlacement": [playerIDs, playerPosition],
- "BaseResourceClass": clBaseResource,
- "CityPatch": {
- @@ -238,32 +283,28 @@ for (let size of [scaleByMapSize(30, 40)
- avoidClasses(clDunes, 3, clForest, 3, clPlayer, 5, clKushiteVillages, 5, clRiver, 10),
- scaleByMapSize(1, 10));
- 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");
- createObjectGroups(
- new SimpleGroup([new SimpleObject(oGazelle, 4, 6, 1, 4)], true, clFood),
- @@ -295,11 +336,11 @@ for (let i = 0; i < scaleByMapSize(1, 3)
- g_Map.log("Creating fish");
- 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);
- createStragglerTrees(
- @@ -320,26 +361,39 @@ createStragglerTrees(
- clForest,
- stragglerTrees * 10);
- 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),
- + 200);
- +
- g_Map.log("Creating bushes");
- createObjectGroups(
- new SimpleGroup([new SimpleObject(aBushB, 1, 2, 0, 1), new SimpleObject(aBushA, 1, 3, 0, 2)], true),
- 0,
- avoidClasses(clForest, 0, clPlayer, 0, clDunes, 0, clRiver, 15),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement