1 // Coordinates: 49.665548, 10.541500
4 RMS.LoadLibrary("rmgen");
5 RMS.LoadLibrary("rmgen2");
6 RMS.LoadLibrary("rmbiome");
10 log("Initializing environment...");
11 setBiome("temperate");
12 initTileClasses(["autumn", "desert", "medit", "polar", "steppe", "temp"]);
14 setSunColor(0.733, 0.746, 0.574);
16 setWindAngle(-0.589049);
17 setWaterTint(0.556863, 0.615686, 0.643137);
18 setWaterColor(0.494118, 0.639216, 0.713726);
20 setWaterMurkiness(0.87);
21 setWaterType("ocean");
23 setTerrainAmbientColor(0.72, 0.72, 0.82);
25 setSunRotation(PI * 0.95);
26 setSunElevation(PI / 6);
31 setFogColor(0.69, 0.616, 0.541);
35 setPPSaturation(0.42);
38 log("Resetting terrain...");
39 resetTerrain(g_Terrains.mainTerrain, g_TileClasses.land, getMapBaseHeight());
45 "mainTerrain": "temp_grass_d_aut",
46 "forestFloor1": "temp_grass_long_b_aut",
47 "forestFloor2": "temp_grass_long_b_aut",
48 "roadWild": "road_rome_a",
51 "tree1": "gaia/flora_tree_oak_aut_new",
52 "tree2": "gaia/flora_tree_oak_dead",
53 "tree3": "gaia/flora_tree_apple",
54 "tree4": "gaia/flora_tree_euro_beech_aut",
55 "tree5": "gaia/flora_tree_pine",
56 "fruitBush": "gaia/flora_bush_berry",
57 "mainHuntableAnimal": "gaia/fauna_sheep",
58 "secondaryHuntableAnimal": "gaia/fauna_wolf",
59 "stoneLarge": "gaia/geology_stonemine_temperate_quarry",
60 "stoneSmall": "gaia/geology_stone_temperate",
61 "metalLarge": "gaia/geology_metal_temperate_slabs",
62 "metalSmall": "gaia/geology_metal_temperate",
64 "grass": "actor|props/flora/grass_soft_dry_small.xml",
65 "grassShort": "actor|props/flora/grass_soft_dry_tuft_a.xml",
66 "rockLarge": "actor|geology/stone_granite_med.xml",
67 "rockMedium": "actor|geology/stone_granite_small.xml",
68 "bushMedium": "actor|props/flora/bush_medit_me_dry.xml",
69 "bushSmall": "actor|props/flora/bush_medit_sm_dry.xml",
73 "mainTerrain": "sand_scrub_100",
74 "forestFloor1": "sand_scrub_25",
75 "forestFloor2": "sand_scrub_25",
76 "roadWild": "desert_city_tile_pers",
77 "road": "desert_city_tile_pers_dirt",
79 "tree1": "gaia/flora_tree_cretan_date_palm_short",
80 "tree2": "gaia/flora_tree_senegal_date_palm",
81 "tree3": "gaia/flora_tree_date_palm",
82 "tree4": "gaia/flora_tree_cretan_date_palm_tall",
83 "tree5": "gaia/flora_tree_date_palm",
84 "fruitBush": "gaia/flora_bush_grapes",
85 "mainHuntableAnimal": "gaia/fauna_camel",
86 "secondaryHuntableAnimal": "gaia/fauna_gazelle",
87 "stoneLarge": "gaia/geology_stonemine_desert_quarry",
88 "stoneSmall": "gaia/geology_stone_desert_small",
89 "metalLarge": "gaia/geology_metal_desert_slabs",
90 "metalSmall": "gaia/geology_metal_desert_small",
92 "grass": "actor|props/flora/grass_field_parched_tall.xml",
93 "grassShort": "actor|props/flora/grass_soft_dry_tuft_a.xml",
94 "rockLarge": "actor|structures/gravestone.xml",
95 "rockMedium": "actor|geology/stone_desert_med.xml",
96 "bushMedium": "actor|props/flora/bush_desert_dry_a.xml",
97 "bushSmall": "actor|props/flora/plant_desert_a.xml",
101 "mainTerrain": "medit_grass_field_a",
102 "forestFloor1": "medit_grass_wild",
103 "forestFloor2": "medit_grass_wild",
104 "roadWild": "road_rome_a",
105 "road": "road_muddy",
107 "tree1": "gaia/flora_tree_poplar_lombardy",
108 "tree2": "gaia/flora_tree_cypress",
109 "tree3": "gaia/flora_tree_olive",
110 "tree4": "gaia/flora_tree_carob",
111 "tree5": "gaia/flora_tree_tamarix",
112 "fruitBush": "gaia/flora_bush_grapes",
113 "mainHuntableAnimal": "gaia/fauna_deer",
114 "secondaryHuntableAnimal": "gaia/fauna_goat",
115 "stoneLarge": "gaia/geology_stonemine_medit_quarry",
116 "stoneSmall": "gaia/geology_stone_mediterranean",
117 "metalLarge": "gaia/geology_metal_mediterranean_slabs",
118 "metalSmall": "gaia/geology_metal_greek",
120 "grass": "actor|props/flora/grass_soft_small_tall.xml",
121 "grassShort": "actor|props/flora/grass_soft_small.xml",
122 "rockLarge": "actor|geology/stone_granite_greek_large.xml",
123 "rockMedium": "actor|geology/stone_granite_greek_med.xml",
124 "bushMedium": "actor|props/flora/bush_medit_underbrush.xml",
125 "bushSmall": "actor|props/flora/bush_medit_me_lush.xml",
129 "mainTerrain": "polar_tundra_snow",
130 "forestFloor1": "ice_dirt",
131 "forestFloor2": "ice_dirt",
132 "roadWild": "road_flat",
135 "tree1": "gaia/flora_tree_pine_w",
136 "tree2": "gaia/flora_tree_dead",
137 "tree3": "gaia/flora_tree_dead",
138 "tree4": "gaia/flora_tree_pine_w",
139 "tree5": "gaia/flora_tree_pine_w",
140 "fruitBush": "gaia/fauna_wolf_snow",
141 "mainHuntableAnimal": "gaia/fauna_muskox",
142 "secondaryHuntableAnimal": "gaia/fauna_wolf",
143 "stoneLarge": "gaia/geology_stonemine_alpine_quarry",
144 "stoneSmall": "gaia/geology_stone_alpine_a",
145 "metalLarge": "gaia/geology_metal_alpine_slabs",
146 "metalSmall": "gaia/geology_metal_alpine",
148 "grass": "actor|props/flora/grass_field_parched_short.xml",
149 "grassShort": "actor|props/flora/grass_soft_dry_tuft_a.xml",
150 "rockLarge": "actor|geology/stone_granite_med.xml",
151 "rockMedium": "actor|geology/stone_granite_small.xml",
152 "bushMedium": "actor|props/flora/bush_highlands.xml",
153 "bushSmall": "actor|props/flora/bush_medit_sm.xml",
157 "mainTerrain": "steppe_grass_a",
158 "forestFloor1": "steppe_grass_c",
159 "forestFloor2": "steppe_grass_c",
161 "road": "medit_city_tile_dirt",
163 "tree1": "gaia/flora_tree_poplar",
164 "tree2": "gaia/flora_tree_toona",
165 "tree3": "gaia/flora_tree_dead",
166 "tree4": "gaia/flora_tree_acacia",
167 "tree5": "gaia/flora_tree_poplar_lombardy",
168 "fruitBush": "gaia/flora_bush_grapes",
169 "mainHuntableAnimal": "gaia/fauna_deer",
170 "secondaryHuntableAnimal": "gaia/fauna_horse",
171 "stoneLarge": "gaia/geology_stonemine_alpine_quarry",
172 "stoneSmall": "gaia/geology_stone_alpine_a",
173 "metalLarge": "gaia/geology_metal_alpine_slabs",
174 "metalSmall": "gaia/geology_metal_alpine",
176 "grass": "actor|props/flora/grass_medit_flowering_tall.xml",
177 "grassShort": "actor|props/flora/grass_field_bloom_short.xml",
178 "rockLarge": "actor|geology/stone_granite_greek_med.xml",
179 "rockMedium": "actor|geology/stone_granite_greek_small.xml",
180 "bushMedium": "actor|props/flora/bush_dry_a.xml",
181 "bushSmall": "actor|props/flora/bush_highlands.xml",
185 "mainTerrain": "temp_grass_long",
186 "forestFloor1": "temp_grass_clovers_2",
187 "forestFloor2": "temp_grass_clovers_2",
188 "roadWild": "temp_road_overgrown",
191 "tree1": "gaia/flora_tree_oak_new",
192 "tree2": "gaia/flora_tree_oak_dead",
193 "tree3": "gaia/flora_tree_apple",
194 "tree4": "gaia/flora_tree_euro_beech",
195 "tree5": "gaia/flora_tree_oak_large",
196 "fruitBush": "gaia/flora_bush_berry",
197 "mainHuntableAnimal": "gaia/fauna_pig",
198 "secondaryHuntableAnimal": "gaia/fauna_boar",
199 "stoneLarge": "gaia/geology_stonemine_temperate_quarry",
200 "stoneSmall": "gaia/geology_stone_temperate",
201 "metalLarge": "gaia/geology_metal_temperate_slabs",
202 "metalSmall": "gaia/geology_metal_temperate",
204 "grass": "actor|props/flora/grass_soft_large_tall.xml",
205 "grassShort": "actor|props/flora/grass_soft_large.xml",
206 "rockLarge": "actor|geology/stone_granite_large.xml",
207 "rockMedium": "actor|geology/stone_granite_med.xml",
208 "bushMedium": "actor|props/flora/bush_tempe_b.xml",
209 "bushSmall": "actor|props/flora/bush_tempe_underbrush.xml",
213 log("Copying heightmap...");
214 var scale = paintHeightmap("mediterranean", (tile, x, y) => {
216 if (tile.indexOf("cliff") >= 0)
217 addToClass(x, y, g_TileClasses.mountain);
219 if (tile.indexOf("desert") >= 0)
220 addToClass(x, y, g_TileClasses.desert);
222 if (tile.indexOf("medit") >= 0 && tile.indexOf("sand") < 0)
223 addToClass(x, y, g_TileClasses.medit);
225 if (tile.indexOf("polar") >= 0)
226 addToClass(x, y, g_TileClasses.polar);
228 if (tile.indexOf("steppe") >= 0)
229 addToClass(x, y, g_TileClasses.steppe);
231 if (tile.indexOf("temp") >= 0)
232 addToClass(x, y, g_TileClasses.temp);
234 if (tile.indexOf("aut") >= 0)
235 addToClass(x, y, g_TileClasses.autumn);
239 log("Rendering water...");
240 paintTileClassBasedOnHeight(-100, -1, 3, g_TileClasses.water);
243 log("Placing player bases...");
244 // Coordinate system of the heightmap
253 if (getMapSize() >= 320 || getNumPlayers() > singleBases.length)
262 var strongholdBases = [
268 randomPlayerPlacementAt(getTeamsArray(), singleBases, strongholdBases, scale, 0.06, (tileX, tileY) => {
270 for (let biome in biomes)
271 if (checkIfInClass(tileX, tileY, g_TileClasses[biome]))
273 setLocalBiome(biomes[biome]);
279 function setLocalBiome(b)
281 g_Terrains.mainTerrain = b.mainTerrain;
282 g_Terrains.forestFloor1 = b.forestFloor1;
283 g_Terrains.forestFloor2 = b.forestFloor2;
284 g_Terrains.roadWild = b.roadWild;
285 g_Terrains.road = b.road;
286 g_Gaia.tree1 = b.tree1;
287 g_Gaia.tree2 = b.tree2;
288 g_Gaia.tree3 = b.tree3;
289 g_Gaia.tree4 = b.tree4;
290 g_Gaia.tree5 = b.tree5;
291 g_Gaia.fruitBush = b.fruitBush;
292 g_Gaia.mainHuntableAnimal = b.mainHuntableAnimal;
293 g_Gaia.secondaryHuntableAnimal = b.secondaryHuntableAnimal;
294 g_Gaia.stoneLarge = b.stoneLarge;
295 g_Gaia.stoneSmall = b.stoneSmall;
296 g_Gaia.metalLarge = b.metalLarge;
297 g_Gaia.metalSmall = b.metalSmall;
298 g_Decoratives.grass = b.grass;
299 g_Decoratives.grassShort = b.grassShort;
300 g_Decoratives.rockLarge = b.rockLarge;
301 g_Decoratives.rockMedium = b.rockMedium;
302 g_Decoratives.bushMedium = b.bushMedium;
303 g_Decoratives.bushSmall = b.bushSmall;
306 log("Placing fish...");
307 g_Gaia.fish = "gaia/fauna_fish";
312 g_TileClasses.fish, 10,
314 "stay": [g_TileClasses.water, 4],
316 "mixes": ["similar"],
322 log("Placing whale...");
323 g_Gaia.fish = "gaia/fauna_whale_fin";
328 g_TileClasses.fish, 2,
329 g_TileClasses.desert, 50,
330 g_TileClasses.steppe, 50
332 "stay": [g_TileClasses.water, 7],
335 "amounts": ["scarce"]
340 log("Rendering local biomes...");
341 for (let biome in biomes)
343 setLocalBiome(biomes[biome]);
345 let localAvoid = g_TileClasses[biome == "temp" ? "plateau" : "autumn"];
351 g_TileClasses.berries, 5,
352 g_TileClasses.forest, 3,
353 g_TileClasses.mountain, 2,
354 g_TileClasses.player, 30,
355 g_TileClasses.rock, 10,
356 g_TileClasses.metal, 25,
357 g_TileClasses.water, 4,
360 "stay": [g_TileClasses[biome], 0],
368 g_TileClasses.berries, 5,
369 g_TileClasses.forest, 3,
370 g_TileClasses.mountain, 2,
371 g_TileClasses.player, 30,
372 g_TileClasses.rock, 10,
373 g_TileClasses.metal, 25,
374 g_TileClasses.water, 4,
377 "stay": [g_TileClasses[biome], 0],
385 g_TileClasses.berries, 3,
386 g_TileClasses.forest, 15,
387 g_TileClasses.metal, 3,
388 g_TileClasses.mountain, 2,
389 g_TileClasses.player, 12,
390 g_TileClasses.rock, 2,
391 g_TileClasses.water, 2,
394 "stay": [g_TileClasses[biome], 0],
397 "amounts": ["normal"]
400 "func": addSmallMetal,
402 g_TileClasses.berries, 5,
403 g_TileClasses.forest, 3,
404 g_TileClasses.mountain, 2,
405 g_TileClasses.player, 30,
406 g_TileClasses.rock, 10,
407 g_TileClasses.metal, 15,
408 g_TileClasses.water, 4,
411 "stay": [g_TileClasses[biome], 0],
414 "amounts": ["few", "normal", "many"]
419 g_TileClasses.berries, 30,
420 g_TileClasses.forest, 2,
421 g_TileClasses.metal, 4,
422 g_TileClasses.mountain, 2,
423 g_TileClasses.player, 20,
424 g_TileClasses.rock, 4,
425 g_TileClasses.water, 2,
428 "stay": [g_TileClasses[biome], 0],
436 g_TileClasses.animals, 10,
437 g_TileClasses.forest, 1,
438 g_TileClasses.metal, 2,
439 g_TileClasses.mountain, 1,
440 g_TileClasses.player, 15,
441 g_TileClasses.rock, 2,
442 g_TileClasses.water, 1,
445 "stay": [g_TileClasses[biome], 0],
453 g_TileClasses.animals, 10,
454 g_TileClasses.forest, 1,
455 g_TileClasses.metal, 2,
456 g_TileClasses.mountain, 1,
457 g_TileClasses.player, 15,
458 g_TileClasses.rock, 2,
459 g_TileClasses.water, 1,
462 "stay": [g_TileClasses[biome], 0],
468 "func": addStragglerTrees,
470 g_TileClasses.berries, 5,
471 g_TileClasses.forest, 5,
472 g_TileClasses.metal, 2,
473 g_TileClasses.mountain, 1,
474 g_TileClasses.player, 12,
475 g_TileClasses.rock, 2,
476 g_TileClasses.water, 3,
479 "stay": [g_TileClasses[biome], 0],
485 "func": addDecoration,
487 g_TileClasses.forest, 2,
488 g_TileClasses.mountain, 2,
489 g_TileClasses.player, 12,
490 g_TileClasses.water, 4,
493 "stay": [g_TileClasses[biome], 0],
496 "amounts": ["normal"]