1 Engine.LoadLibrary("rmgen");
2 Engine.LoadLibrary("rmgen-common");
3 Engine.LoadLibrary("rmgen2");
4 Engine.LoadLibrary("rmbiome");
8 var g_Map = new RandomMap(2, g_Terrains.mainTerrain);
13 new MapBoundsPlacer(),
14 new TileClassPainter(g_TileClasses.land));
16 Engine.SetProgress(10);
18 const teamsArray = getTeamsArray();
19 const startAngle = randomAngle();
20 createBasesByPattern("stronghold", fractionToTiles(0.37), fractionToTiles(0.04), startAngle);
21 Engine.SetProgress(20);
23 // Change the starting angle and add the players again
24 var rotation = Math.PI;
26 if (teamsArray.length == 2)
27 rotation = Math.PI / 2;
29 if (teamsArray.length == 4)
30 rotation = 5/4 * Math.PI;
32 createBasesByPattern("stronghold", fractionToTiles(0.15), fractionToTiles(0.04), startAngle + rotation);
33 Engine.SetProgress(40);
35 addElements(shuffleArray([
39 g_TileClasses.bluff, 5,
40 g_TileClasses.hill, 15,
41 g_TileClasses.mountain, 2,
42 g_TileClasses.plateau, 5,
43 g_TileClasses.player, 20,
44 g_TileClasses.valley, 2,
45 g_TileClasses.water, 2
54 g_TileClasses.bluff, 20,
55 g_TileClasses.mountain, 25,
56 g_TileClasses.plateau, 20,
57 g_TileClasses.player, 20,
58 g_TileClasses.valley, 10,
59 g_TileClasses.water, 15
62 "mixes": ["same", "similar"],
68 g_TileClasses.bluff, 20,
69 g_TileClasses.mountain, 25,
70 g_TileClasses.plateau, 20,
71 g_TileClasses.player, 40,
72 g_TileClasses.valley, 10,
73 g_TileClasses.water, 15
76 "mixes": ["same", "similar"],
80 Engine.SetProgress(50);
84 "func": addLayeredPatches,
86 g_TileClasses.bluff, 2,
87 g_TileClasses.dirt, 5,
88 g_TileClasses.forest, 2,
89 g_TileClasses.mountain, 2,
90 g_TileClasses.plateau, 2,
91 g_TileClasses.player, 12,
92 g_TileClasses.water, 3
99 "func": addDecoration,
101 g_TileClasses.bluff, 2,
102 g_TileClasses.forest, 2,
103 g_TileClasses.mountain, 2,
104 g_TileClasses.plateau, 2,
105 g_TileClasses.player, 12,
106 g_TileClasses.water, 3
110 "amounts": ["normal"]
113 Engine.SetProgress(60);
115 addElements(shuffleArray([
119 g_TileClasses.berries, 5,
120 g_TileClasses.bluff, 5,
121 g_TileClasses.forest, 3,
122 g_TileClasses.mountain, 2,
123 g_TileClasses.player, 30,
124 g_TileClasses.rock, 10,
125 g_TileClasses.metal, 20,
126 g_TileClasses.plateau, 2,
127 g_TileClasses.water, 3
131 "amounts": g_AllAmounts
135 "avoid": [g_TileClasses.berries, 5,
136 g_TileClasses.bluff, 5,
137 g_TileClasses.forest, 3,
138 g_TileClasses.mountain, 2,
139 g_TileClasses.player, 30,
140 g_TileClasses.rock, 20,
141 g_TileClasses.metal, 10,
142 g_TileClasses.plateau, 2,
143 g_TileClasses.water, 3
147 "amounts": g_AllAmounts
152 g_TileClasses.berries, 5,
153 g_TileClasses.bluff, 5,
154 g_TileClasses.forest, 18,
155 g_TileClasses.metal, 3,
156 g_TileClasses.mountain, 5,
157 g_TileClasses.plateau, 2,
158 g_TileClasses.player, 20,
159 g_TileClasses.rock, 3,
160 g_TileClasses.water, 2
164 "amounts": ["few", "normal", "many", "tons"]
167 Engine.SetProgress(80);
169 addElements(shuffleArray([
173 g_TileClasses.berries, 30,
174 g_TileClasses.bluff, 5,
175 g_TileClasses.forest, 5,
176 g_TileClasses.metal, 10,
177 g_TileClasses.mountain, 2,
178 g_TileClasses.plateau, 2,
179 g_TileClasses.player, 20,
180 g_TileClasses.rock, 10,
181 g_TileClasses.water, 3
185 "amounts": g_AllAmounts
190 g_TileClasses.animals, 20,
191 g_TileClasses.bluff, 5,
192 g_TileClasses.forest, 2,
193 g_TileClasses.metal, 2,
194 g_TileClasses.mountain, 1,
195 g_TileClasses.plateau, 2,
196 g_TileClasses.player, 20,
197 g_TileClasses.rock, 2,
198 g_TileClasses.water, 3
202 "amounts": g_AllAmounts
205 "func": addStragglerTrees,
207 g_TileClasses.berries, 5,
208 g_TileClasses.bluff, 5,
209 g_TileClasses.forest, 7,
210 g_TileClasses.metal, 2,
211 g_TileClasses.mountain, 1,
212 g_TileClasses.plateau, 2,
213 g_TileClasses.player, 12,
214 g_TileClasses.rock, 2,
215 g_TileClasses.water, 5
219 "amounts": g_AllAmounts
222 Engine.SetProgress(90);
225 g_TileClasses.player,
227 g_TileClasses.plateau, 4,
228 g_TileClasses.forest, 1,
229 g_TileClasses.metal, 4,
230 g_TileClasses.rock, 4,
231 g_TileClasses.mountain, 4,
232 g_TileClasses.animals, 2));