1 Engine.LoadLibrary("rmgen");
2 Engine.LoadLibrary("rmgen-common");
3 Engine.LoadLibrary("rmgen2");
4 Engine.LoadLibrary("rmbiome");
10 var g_Map = new RandomMap(heightLand, g_Terrains.mainTerrain);
15 new MapBoundsPlacer(),
16 new TileClassPainter(g_TileClasses.land));
18 Engine.SetProgress(20);
20 const [playerIDs, playerPosition] = createBasesByPattern("stronghold", fractionToTiles(randFloat(0.2, 0.35)), fractionToTiles(randFloat(0.05, 0.1)), randomAngle());
21 markPlayerAvoidanceArea(playerPosition, defaultPlayerBaseRadius());
23 Engine.SetProgress(30);
25 addElements(shuffleArray([
28 "baseHeight": heightLand,
30 g_TileClasses.bluff, 20,
31 g_TileClasses.hill, 5,
32 g_TileClasses.mountain, 20,
33 g_TileClasses.plateau, 20,
34 g_TileClasses.player, 30,
35 g_TileClasses.valley, 5,
36 g_TileClasses.water, 7
38 "sizes": ["big", "huge"],
40 "amounts": g_AllAmounts
45 g_TileClasses.bluff, 5,
46 g_TileClasses.hill, 15,
47 g_TileClasses.mountain, 2,
48 g_TileClasses.plateau, 2,
49 g_TileClasses.player, 20,
50 g_TileClasses.valley, 2,
51 g_TileClasses.water, 2
53 "sizes": ["normal", "big"],
55 "amounts": g_AllAmounts
60 g_TileClasses.bluff, 20,
61 g_TileClasses.mountain, 25,
62 g_TileClasses.plateau, 20,
63 g_TileClasses.player, 20,
64 g_TileClasses.valley, 10,
65 g_TileClasses.water, 15
67 "sizes": ["big", "huge"],
69 "amounts": g_AllAmounts
74 g_TileClasses.bluff, 20,
75 g_TileClasses.mountain, 25,
76 g_TileClasses.plateau, 25,
77 g_TileClasses.player, 40,
78 g_TileClasses.valley, 10,
79 g_TileClasses.water, 15
81 "sizes": ["big", "huge"],
83 "amounts": g_AllAmounts
87 "baseHeight": heightLand,
89 g_TileClasses.bluff, 5,
90 g_TileClasses.hill, 5,
91 g_TileClasses.mountain, 25,
92 g_TileClasses.plateau, 10,
93 g_TileClasses.player, 40,
94 g_TileClasses.valley, 15,
95 g_TileClasses.water, 10
97 "sizes": ["normal", "big"],
99 "amounts": g_AllAmounts
104 createBluffsPassages(playerPosition);
106 Engine.SetProgress(60);
110 "func": addLayeredPatches,
112 g_TileClasses.bluff, 2,
113 g_TileClasses.dirt, 5,
114 g_TileClasses.forest, 2,
115 g_TileClasses.mountain, 2,
116 g_TileClasses.plateau, 2,
117 g_TileClasses.player, 12,
118 g_TileClasses.valley, 5,
119 g_TileClasses.water, 3
123 "amounts": ["normal"]
126 "func": addDecoration,
128 g_TileClasses.bluff, 2,
129 g_TileClasses.forest, 2,
130 g_TileClasses.mountain, 2,
131 g_TileClasses.plateau, 2,
132 g_TileClasses.player, 12,
133 g_TileClasses.water, 3
137 "amounts": ["normal"]
140 Engine.SetProgress(70);
142 addElements(shuffleArray([
146 g_TileClasses.berries, 5,
147 g_TileClasses.bluff, 5,
148 g_TileClasses.forest, 3,
149 g_TileClasses.mountain, 2,
150 g_TileClasses.plateau, 2,
151 g_TileClasses.player, 30,
152 g_TileClasses.rock, 10,
153 g_TileClasses.metal, 20,
154 g_TileClasses.water, 3
158 "amounts": g_AllAmounts
163 g_TileClasses.berries, 5,
164 g_TileClasses.bluff, 5,
165 g_TileClasses.forest, 3,
166 g_TileClasses.mountain, 2,
167 g_TileClasses.plateau, 2,
168 g_TileClasses.player, 30,
169 g_TileClasses.rock, 20,
170 g_TileClasses.metal, 10,
171 g_TileClasses.water, 3
175 "amounts": g_AllAmounts
180 g_TileClasses.berries,
181 5, g_TileClasses.bluff,
182 5, g_TileClasses.forest,
183 18, g_TileClasses.metal, 3,
184 g_TileClasses.mountain, 5,
185 g_TileClasses.plateau, 5,
186 g_TileClasses.player, 20,
187 g_TileClasses.rock, 3,
188 g_TileClasses.water, 2
192 "amounts": ["few", "normal", "many", "tons"]
195 Engine.SetProgress(80);
197 addElements(shuffleArray([
201 g_TileClasses.berries, 30,
202 g_TileClasses.bluff, 5,
203 g_TileClasses.forest, 5,
204 g_TileClasses.metal, 10,
205 g_TileClasses.mountain, 2,
206 g_TileClasses.plateau, 2,
207 g_TileClasses.player, 20,
208 g_TileClasses.rock, 10,
209 g_TileClasses.spine, 2,
210 g_TileClasses.water, 3
214 "amounts": g_AllAmounts
219 g_TileClasses.animals, 20,
220 g_TileClasses.bluff, 5,
221 g_TileClasses.forest, 2,
222 g_TileClasses.metal, 2,
223 g_TileClasses.mountain, 1,
224 g_TileClasses.plateau, 2,
225 g_TileClasses.player, 20,
226 g_TileClasses.rock, 2,
227 g_TileClasses.spine, 2,
228 g_TileClasses.water, 3
232 "amounts": g_AllAmounts
235 "func": addStragglerTrees,
237 g_TileClasses.berries, 5,
238 g_TileClasses.bluff, 5,
239 g_TileClasses.forest, 7,
240 g_TileClasses.metal, 2,
241 g_TileClasses.mountain, 1,
242 g_TileClasses.plateau, 2,
243 g_TileClasses.player, 12,
244 g_TileClasses.rock, 2,
245 g_TileClasses.spine, 2,
246 g_TileClasses.water, 5
250 "amounts": g_AllAmounts
253 Engine.SetProgress(90);
256 g_TileClasses.player,
258 g_TileClasses.bluff, 4,
259 g_TileClasses.plateau, 4,
260 g_TileClasses.forest, 1,
261 g_TileClasses.metal, 4,
262 g_TileClasses.rock, 4,
263 g_TileClasses.mountain, 4,
264 g_TileClasses.animals, 2));