forked from DokimiCU/aotearoa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspawn_trees.lua
342 lines (303 loc) · 31.8 KB
/
spawn_trees.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
-------------------------------------------------------------------
--SPAWN TREES
--Terrestrial schematic plants and decorations.
---------------------------------------------------------------
--DENSITIES.
--canopy
local can_fill = 0.0039
local can_dense_fill = can_fill * 2
local can_x_dense_fill = can_fill * 3
local can_sparse_fill = can_fill/2
local can_rare_fill = can_fill/10
--sub-canopy
local scan_fill = 0.01
local scan_dense_fill = scan_fill * 2
local scan_x_dense_fill = scan_fill * 10
local scan_sparse_fill = scan_fill/4
local scan_rare_fill = scan_fill/10
-- clumping
local cl_spr = {x = 64, y = 64, z = 64}
local cl_spr2 = {x = 128, y = 128, z = 128}
local cl_oct = 2
-----------------------------------------------------------------
--ALTITUDES
--make sure matches mapgen file
--basement
local basement_max = -400
local basement_min = -15000
--ocean
local ocean_max = -21
local ocean_min = basement_max - 2
------------
--beaches
local beach_max = 3
local beach_min = ocean_max -2
--dunes
local dune_max = 5
local dune_min = beach_max -2
--coastal forest etc
local coastf_max = 14
local coastf_min = dune_max -2
--lowland forest etc
local lowf_max = 80
local lowf_min = coastf_max -2
--highland forest etc
local highf_max = 120
local highf_min = lowf_max -2
--alpine
local alp_max = 140
local alp_min = highf_max -2
--high alpine
local high_alp_max = 31000
local high_alp_min = alp_max -2
--------------------------------------
--for forest/river edge spawn_by species
local edge_nodes = {"default:river_water_source", "default:river_water_flowing", "default:gravel", "aotearoa:gravel_with_algae","aotearoa:river_sand","aotearoa:mud",}
---------------------------------------------------------------
--REGISTER SCHEMATIC DECORATIONS
--Need to arrange in size order (biggest/critical first)
--so when it overlaps nodes, it is the smaller one that loses
aotearoa.schem_deco_list = {
--mudpools
{aotearoa.path .. "/schematics/mud_pool1.mts", {"default:dirt_with_rainforest_litter","aotearoa:volcanic_sand",},nil,{"geothermal_scrub","white_island",},lowf_max/3,dune_min +1,{offset = 0,scale = 0.005,spread = cl_spr, seed = 128774, octaves = cl_oct, persist = 0.8}},
{aotearoa.path .. "/schematics/mud_pool2.mts", {"default:dirt_with_rainforest_litter","aotearoa:volcanic_sand",},nil,{"geothermal_scrub","white_island",},lowf_max/3,dune_min +1,{offset = 0,scale = 0.005,spread = cl_spr, seed = 186674, octaves = cl_oct, persist = 0.8}},
---Emergents...
--dense kahikatea
{aotearoa.path .. "/schematics/kahikatea1.mts", {"aotearoa:forest_peat",},can_x_dense_fill,{"kahikatea_swamp",},lowf_max,coastf_min + 2,},
{aotearoa.path .. "/schematics/kahikatea2.mts", {"aotearoa:forest_peat",},can_x_dense_fill,{"kahikatea_swamp",},lowf_max,coastf_min + 2,},
--rare kahikatea
{aotearoa.path .. "/schematics/kahikatea1.mts", {"aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},can_rare_fill,{"fiordland_forest","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/kahikatea2.mts", {"aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},can_rare_fill,{"fiordland_forest","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,},
--rare miro
{aotearoa.path .. "/schematics/miro1.mts", {"aotearoa:dirt_with_moss","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},can_rare_fill,{"kamahi_forest","beech_forest","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/miro2.mts", {"aotearoa:dirt_with_moss","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},can_rare_fill,{"kamahi_forest","beech_forest","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,},
--rare rimu
{aotearoa.path .. "/schematics/rimu1.mts", {"aotearoa:dirt_with_moss","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},can_rare_fill,{"kamahi_forest","fiordland_forest","beech_forest","hinau_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/rimu2.mts", {"aotearoa:dirt_with_moss","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},can_rare_fill,{"kamahi_forest","fiordland_forest","beech_forest","hinau_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,},
--rare totara
{aotearoa.path .. "/schematics/totara1.mts", {"aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},can_rare_fill,{"fiordland_forest","beech_forest","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","kauri_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/totara2.mts", {"aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},can_rare_fill,{"fiordland_forest","beech_forest","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","kauri_forest",},lowf_max,lowf_min,},
-- dense totara
{aotearoa.path .. "/schematics/totara1.mts", {"aotearoa:dirt_with_dark_litter",},can_x_dense_fill,{"northern_podocarp_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/totara2.mts", {"aotearoa:dirt_with_dark_litter",},can_x_dense_fill,{"northern_podocarp_forest",},lowf_max,lowf_min,},
--dense rimu
{aotearoa.path .. "/schematics/rimu1.mts", {"aotearoa:dirt_with_dark_litter",},can_x_dense_fill,{"southern_podocarp_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/rimu2.mts", {"aotearoa:dirt_with_dark_litter",},can_x_dense_fill,{"southern_podocarp_forest",},lowf_max,lowf_min,},
--kauri
{aotearoa.path .. "/schematics/kauri1.mts", {"aotearoa:dirt_with_dry_litter",},can_fill,{"kauri_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/kauri2.mts", {"aotearoa:dirt_with_dry_litter",},can_fill,{"kauri_forest",},lowf_max,lowf_min,},
----Canopy Trees....
-- Tawa
{aotearoa.path .. "/schematics/tawa1.mts", {"aotearoa:dirt_with_dry_litter",},can_fill,{"kauri_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/tawa2.mts", {"aotearoa:dirt_with_dry_litter",},can_fill,{"kauri_forest",},lowf_max,lowf_min,},
-- dense Tawa
{aotearoa.path .. "/schematics/tawa1.mts", {"aotearoa:dirt_with_dark_litter",},can_dense_fill,{"tawa_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/tawa2.mts", {"aotearoa:dirt_with_dark_litter",},can_dense_fill,{"tawa_forest",},lowf_max,lowf_min,},
--dense black_maire
{aotearoa.path .. "/schematics/black_maire1.mts", {"aotearoa:dirt_with_dry_litter",},can_dense_fill,{"maire_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/black_maire2.mts", {"aotearoa:dirt_with_dry_litter",},can_dense_fill,{"maire_forest",},lowf_max,lowf_min,},
--dense hinau
{aotearoa.path .. "/schematics/hinau1.mts", {"aotearoa:dirt_with_dry_litter",},can_dense_fill,{"hinau_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/hinau2.mts", {"aotearoa:dirt_with_dry_litter",},can_dense_fill,{"hinau_forest",},lowf_max,lowf_min,},
--dense black_beech
{aotearoa.path .. "/schematics/black_beech1.mts", {"aotearoa:dirt_with_beech_litter",},can_dense_fill,{"beech_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/black_beech2.mts", {"aotearoa:dirt_with_beech_litter",},can_fill,{"beech_forest",},lowf_max,lowf_min,},
--dense silver_beech
{aotearoa.path .. "/schematics/silver_beech1.mts", {"aotearoa:dirt_with_beech_litter",},can_dense_fill,{"fiordland_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/silver_beech2.mts", {"aotearoa:dirt_with_beech_litter",},can_dense_fill,{"fiordland_forest",},lowf_max,lowf_min,},
--dense pahautea
{aotearoa.path .. "/schematics/pahautea1.mts", {"aotearoa:dirt_with_moss",},can_x_dense_fill,{"pahautea_forest",},highf_max,highf_min,},
{aotearoa.path .. "/schematics/pahautea2.mts", {"aotearoa:dirt_with_moss",},can_x_dense_fill,{"pahautea_forest",},highf_max,highf_min,},
--dense mountain_beech
{aotearoa.path .. "/schematics/mountain_beech1.mts", {"aotearoa:dirt_with_moss",},scan_dense_fill,{"mountain_beech_forest",},highf_max,highf_min,},
{aotearoa.path .. "/schematics/mountain_beech2.mts", {"aotearoa:dirt_with_moss",},scan_dense_fill,{"mountain_beech_forest",},highf_max,highf_min,},
-- rare Tawa
{aotearoa.path .. "/schematics/tawa1.mts", {"aotearoa:dirt_with_dry_litter",},can_rare_fill,{"maire_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/tawa2.mts", {"aotearoa:dirt_with_dry_litter",},can_rare_fill,{"maire_forest",},lowf_max,lowf_min,},
-- rare black_beech
{aotearoa.path .. "/schematics/black_beech1.mts", {"aotearoa:dirt_with_dry_litter",},can_rare_fill,{"hinau_forest","maire_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/black_beech2.mts", {"aotearoa:dirt_with_dry_litter",},can_rare_fill,{"hinau_forest","maire_forest",},lowf_max,lowf_min,},
--rare hinau
{aotearoa.path .. "/schematics/hinau1.mts", {"aotearoa:dirt_with_moss","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dry_litter",},can_rare_fill,{"kamahi_forest","beech_forest","maire_forest","kauri_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/hinau2.mts", {"aotearoa:dirt_with_moss","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dry_litter",},can_rare_fill,{"kamahi_forest","beech_forest","maire_forest","kauri_forest",},lowf_max,lowf_min,},
--rare black_maire
{aotearoa.path .. "/schematics/black_maire1.mts", {"aotearoa:dirt_with_moss","aotearoa:dirt_with_dry_litter","aotearoa:dirt_with_dark_litter",},can_rare_fill,{"kamahi_forest","hinau_forest","tawa_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/black_maire2.mts", {"aotearoa:dirt_with_moss","aotearoa:dirt_with_dry_litter","aotearoa:dirt_with_dark_litter",},can_rare_fill,{"kamahi_forest","hinau_forest","tawa_forest",},lowf_max,lowf_min,},
--rare silver_beech
{aotearoa.path .. "/schematics/silver_beech1.mts", {"aotearoa:dirt_with_moss",},can_rare_fill,{"mountain_beech_forest","kamahi_forest",},highf_max,lowf_min,},
{aotearoa.path .. "/schematics/silver_beech2.mts", {"aotearoa:dirt_with_moss",},can_rare_fill,{"mountain_beech_forest","kamahi_forest",},highf_max,lowf_min,},
--rare mountain_beech
{aotearoa.path .. "/schematics/mountain_beech1.mts", {"aotearoa:dirt_with_moss",},can_rare_fill,{"kamahi_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/mountain_beech2.mts", {"aotearoa:dirt_with_moss",},can_rare_fill,{"kamahi_forest",},lowf_max,lowf_min,},
---Smaller Trees...
--kowhai by streams etc
{aotearoa.path .. "/schematics/kowhai1.mts", {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter","default:dirt_with_grass",},can_dense_fill,{"broadleaf_scrub","geothermal_scrub","beech_forest","hinau_forest","maire_forest","tawa_forest","kauri_forest","coastal_scrub",},lowf_max,coastf_min+3,nil,edge_nodes,2},
{aotearoa.path .. "/schematics/kowhai2.mts", {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter","default:dirt_with_grass",},can_dense_fill,{"broadleaf_scrub","geothermal_scrub","beech_forest","hinau_forest","maire_forest","tawa_forest","kauri_forest","coastal_scrub",},lowf_max,coastf_min+3,nil,edge_nodes,2},
--rare karaka.
{aotearoa.path .. "/schematics/karaka1.mts", {"default:dirt_with_rainforest_litter",},can_rare_fill,{"pohutukawa_forest",},coastf_max,coastf_min+2,},
{aotearoa.path .. "/schematics/karaka2.mts", {"default:dirt_with_rainforest_litter",},can_rare_fill,{"pohutukawa_forest",},coastf_max,coastf_min+2,},
--karaka groves.
{aotearoa.path .. "/schematics/karaka1.mts", {"default:dirt_with_grass",},nil,{"coastal_scrub",},coastf_max,coastf_min+2,{offset = 0,scale = 0.004,spread = cl_spr, seed = 45254, octaves = cl_oct, persist = 0.8}},
{aotearoa.path .. "/schematics/karaka2.mts", {"default:dirt_with_grass",},nil,{"coastal_scrub",},coastf_max,coastf_min+2,{offset = 0,scale = 0.004,spread = cl_spr, seed = 108761, octaves = cl_oct, persist = 0.8}},
--rare kamahi.
{aotearoa.path .. "/schematics/kamahi1.mts", {"aotearoa:dirt_with_moss","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dry_litter","aotearoa:dirt_with_dark_litter","default:dirt_with_rainforest_litter",},can_rare_fill,{"mountain_beech_forest","pahautea_forest","fiordland_forest","beech_forest","hinau_forest","maire_forest","tawa_forest","muttonbird_scrub",},highf_max-2,dune_max+3,},
{aotearoa.path .. "/schematics/kamahi2.mts", {"aotearoa:dirt_with_moss","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dry_litter","aotearoa:dirt_with_dark_litter","default:dirt_with_rainforest_litter",},can_rare_fill,{"mountain_beech_forest","pahautea_forest","fiordland_forest","beech_forest","hinau_forest","maire_forest","tawa_forest","muttonbird_scrub",},highf_max-2,dune_max+3,},
--dense kamahi.
{aotearoa.path .. "/schematics/kamahi1.mts", {"aotearoa:dirt_with_moss",},can_x_dense_fill,{"kamahi_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/kamahi2.mts", {"aotearoa:dirt_with_moss",},can_x_dense_fill,{"kamahi_forest",},lowf_max,lowf_min,},
--Shrubs and Palms etc...
--tree common_tree_daisy clumps.
{aotearoa.path .. "/schematics/common_tree_daisy1.mts", {"default:dirt_with_rainforest_litter",},nil,{"muttonbird_scrub",},coastf_max,coastf_min,{offset = 0,scale = 0.07,spread = cl_spr, seed = 1641230, octaves = cl_oct, persist = 0.7}},
{aotearoa.path .. "/schematics/common_tree_daisy2.mts", {"default:dirt_with_rainforest_litter",},nil,{"muttonbird_scrub",},coastf_max,coastf_min,{offset = 0,scale = 0.07,spread = cl_spr, seed = 3022605, octaves = cl_oct, persist = 0.7}},
--nikau palm clump
{aotearoa.nikau_palm1, {"aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter","default:dirt_with_grass","default:dirt_with_rainforest_litter",},nil,{"maire_forest","tawa_forest","kauri_forest","coastal_scrub","pohutukawa_forest",},lowf_max,coastf_min +2,{offset = 0,scale = 0.005,spread = cl_spr, seed = 603507, octaves = cl_oct, persist = 0.7}},
{aotearoa.nikau_palm2, {"aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter","default:dirt_with_grass","default:dirt_with_rainforest_litter",},nil,{"maire_forest","tawa_forest","kauri_forest","coastal_scrub","pohutukawa_forest",},lowf_max,coastf_min +2,{offset = 0,scale = 0.005,spread = cl_spr, seed = 542122, octaves = cl_oct, persist = 0.7}},
--cabbage tree clump
{aotearoa.cabbage_tree1, {"aotearoa:forest_peat","default:dirt_with_grass","default:dirt_with_rainforest_litter","default:sand", "aotearoa:iron_sand",},nil,{"broadleaf_scrub","geothermal_scrub","kahikatea_swamp","coastal_scrub","pohutukawa_forest","pohutukawa_dunes","sand_dunes", "iron_sand_dunes",},lowf_max,beach_max,{offset = 0,scale = 0.005,spread = cl_spr, seed = 60715, octaves = cl_oct, persist = 0.7}},
{aotearoa.cabbage_tree2, {"aotearoa:forest_peat","default:dirt_with_grass","default:dirt_with_rainforest_litter","default:sand", "aotearoa:iron_sand",},nil,{"broadleaf_scrub", "geothermal_scrub","kahikatea_swamp","coastal_scrub","pohutukawa_forest","pohutukawa_dunes","sand_dunes", "iron_sand_dunes",},lowf_max,beach_max,{offset = 0,scale = 0.005,spread = cl_spr, seed = 238412, octaves = cl_oct, persist = 0.7}},
--rare nikau palm
{aotearoa.nikau_palm1, {"aotearoa:dirt_with_dry_litter","aotearoa:dirt_with_dark_litter","default:dirt_with_dry_grass",},can_rare_fill,{"hinau_forest","southern_podocarp_forest","northern_podocarp_forest","coastal_tussock",},lowf_max,coastf_min +2,},
{aotearoa.nikau_palm2, {"aotearoa:dirt_with_dry_litter","aotearoa:dirt_with_dark_litter","default:dirt_with_dry_grass",},can_rare_fill,{"hinau_forest","northern_podocarp_forest","southern_podocarp_forest","coastal_tussock",},lowf_max,coastf_min +2,},
--rare cabbage tree
{aotearoa.cabbage_tree1, {"aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter","default:dirt_with_dry_grass",},can_rare_fill,{"hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest","coastal_tussock",},lowf_max,coastf_min,},
{aotearoa.cabbage_tree2, {"aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter","default:dirt_with_dry_grass",},can_rare_fill,{"hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest","coastal_tussock",},lowf_max,coastf_min,},
--mamaku clump
{aotearoa.mamaku1, {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},nil,{"broadleaf_scrub","geothermal_scrub","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,{offset = 0,scale = 0.005,spread = cl_spr, seed = 4588017, octaves = cl_oct, persist = 0.7}},
{aotearoa.mamaku2, {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},nil,{"broadleaf_scrub","geothermal_scrub","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,{offset = 0,scale = 0.005,spread = cl_spr, seed = 8945192, octaves = cl_oct, persist = 0.7}},
--silver_fern clump
{aotearoa.silver_fern1, {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},nil,{"manuka_scrub","broadleaf_scrub","geothermal_scrub","beech_forest","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,{offset = 0,scale = 0.005,spread = cl_spr, seed = 456687, octaves = cl_oct, persist = 0.7}},
{aotearoa.silver_fern2, {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},nil,{"manuka_scrub","broadleaf_scrub","geothermal_scrub","beech_forest","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,{offset = 0,scale = 0.005,spread = cl_spr, seed = 8966892, octaves = cl_oct, persist = 0.7}},
--wheki clump
{aotearoa.wheki2, {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_moss","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},nil,{"manuka_scrub","broadleaf_scrub","geothermal_scrub","kamahi_forest","fiordland_forest","beech_forest","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,{offset = 0,scale = 0.005,spread = cl_spr, seed = 688807, octaves = cl_oct, persist = 0.7}},
{aotearoa.wheki1, {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_moss","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},nil,{"manuka_scrub","broadleaf_scrub","geothermal_scrub","kamahi_forest","fiordland_forest","beech_forest","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,{offset = 0,scale = 0.005,spread = cl_spr, seed = 564592, octaves = cl_oct, persist = 0.7}},
--dense wheki
{aotearoa.wheki2, {"default:dirt_with_rainforest_litter",},scan_x_dense_fill,{"broadleaf_scrub",},lowf_max,lowf_min,},
{aotearoa.wheki1, {"default:dirt_with_rainforest_litter",},scan_dense_fill,{"broadleaf_scrub",},lowf_max,lowf_min,},
--rare pohutukawa on dunes.
{aotearoa.path .. "/schematics/pohutukawa1.mts", {"default:sand",},can_rare_fill,{"pohutukawa_dunes",},dune_max,beach_max,},
{aotearoa.path .. "/schematics/pohutukawa2.mts", {"default:sand",},can_rare_fill,{"pohutukawa_dunes",},dune_max,beach_max,},
--pohutukawa forest
{aotearoa.path .. "/schematics/pohutukawa1.mts", {"default:dirt_with_rainforest_litter",},can_sparse_fill,{"pohutukawa_forest",},coastf_max,coastf_min,},
{aotearoa.path .. "/schematics/pohutukawa2.mts", {"default:dirt_with_rainforest_litter",},can_sparse_fill,{"pohutukawa_forest",},coastf_max,coastf_min,},
--mahoe
{aotearoa.path .. "/schematics/mahoe1.mts", {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},scan_fill,{"broadleaf_scrub","hinau_forest","maire_forest","tawa_forest","kauri_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/mahoe2.mts", {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},scan_fill,{"broadleaf_scrub","hinau_forest","maire_forest","tawa_forest","kauri_forest",},lowf_max,lowf_min,},
--rare mahoe
{aotearoa.path .. "/schematics/mahoe1.mts", {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_moss","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},scan_rare_fill,{"geothermal_scrub","kamahi_forest","beech_forest","southern_podocarp_forest","northern_podocarp_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/mahoe2.mts", {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_moss","aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},scan_rare_fill,{"geothermal_scrub","kamahi_forest","beech_forest","southern_podocarp_forest","northern_podocarp_forest",},lowf_max,lowf_min,},
--karo clumps.
{aotearoa.path .. "/schematics/karo1.mts", {"default:dirt_with_grass","default:sand","aotearoa:iron_sand","default:gravel"},nil,{"coastal_scrub","pohutukawa_forest","pohutukawa_dunes","sand_dunes", "iron_sand_dunes", "gravel_dunes"},coastf_max,beach_max,{offset = 0,scale = 0.01,spread = cl_spr, seed = 120140, octaves = cl_oct, persist = 0.7}},
{aotearoa.path .. "/schematics/karo2.mts", {"default:dirt_with_grass","default:sand","aotearoa:iron_sand","default:gravel"},nil,{"coastal_scrub","pohutukawa_forest","pohutukawa_dunes","sand_dunes", "iron_sand_dunes", "gravel_dunes"},coastf_max,beach_max,{offset = 0,scale = 0.01,spread = cl_spr, seed = 304525, octaves = cl_oct, persist = 0.7}},
--manuka clumps.
{aotearoa.path .. "/schematics/manuka1.mts", {"default:dirt_with_dry_grass", "default:dirt_with_grass",},nil,{"coastal_tussock","coastal_scrub",},lowf_max,coastf_min,{offset = 0,scale = 0.03,spread = cl_spr, seed = 1646630, octaves = cl_oct, persist = 0.8}},
{aotearoa.path .. "/schematics/manuka2.mts", {"default:dirt_with_dry_grass", "default:dirt_with_grass",},nil,{"coastal_tussock","coastal_scrub",},lowf_max,coastf_min,{offset = 0,scale = 0.03,spread = cl_spr, seed = 3121165, octaves = cl_oct, persist = 0.8}},
--rare manuka clump
{aotearoa.path .. "/schematics/manuka1.mts", {"default:dirt_with_rainforest_litter","aotearoa:gumland_soil","aotearoa:restiad_peat"},nil,{"geothermal_scrub","gumland","fen",},lowf_max,lowf_min,{offset = 0,scale = 0.01,spread = cl_spr2, seed = 1622230, octaves = cl_oct, persist = 0.95}},
{aotearoa.path .. "/schematics/manuka2.mts", {"default:dirt_with_rainforest_litter","aotearoa:gumland_soil","aotearoa:restiad_peat"},nil,{"geothermal_scrub","gumland","fen",},lowf_max,lowf_min,{offset = 0,scale = 0.01,spread = cl_spr2, seed = 1125565, octaves = cl_oct, persist = 0.95}},
--karo subcanopy.
{aotearoa.path .. "/schematics/karo1.mts", {"default:dirt_with_rainforest_litter",},scan_fill,{"pohutukawa_forest",},coastf_max,coastf_min,},
{aotearoa.path .. "/schematics/karo2.mts", {"default:dirt_with_rainforest_litter",},scan_fill,{"pohutukawa_forest",},coastf_max,coastf_min,},
--matagouri clumps.
{aotearoa.path .. "/schematics/matagouri1.mts", {"default:dirt_with_dry_grass",},nil,{"matagouri_scrub","coastal_tussock",},lowf_max,coastf_min,{offset = 0,scale = 0.01,spread = cl_spr, seed = 761090, octaves = cl_oct, persist = 0.9}},
{aotearoa.path .. "/schematics/matagouri2.mts", {"default:dirt_with_dry_grass",},nil,{"matagouri_scrub","coastal_tussock",},lowf_max,coastf_min,{offset = 0,scale = 0.01,spread = cl_spr, seed = 413475, octaves = cl_oct, persist = 0.9}},
--rare rangiora
{aotearoa.path .. "/schematics/rangiora1.mts", {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_moss","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},scan_rare_fill,{"geothermal_scrub","kamahi_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/rangiora2.mts", {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_moss","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},scan_rare_fill,{"geothermal_scrub","kamahi_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest",},lowf_max,lowf_min,},
--rangiora
{aotearoa.path .. "/schematics/rangiora1.mts", {"default:dirt_with_rainforest_litter",},scan_fill,{"broadleaf_scrub"},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/rangiora2.mts", {"default:dirt_with_rainforest_litter",},scan_fill,{"broadleaf_scrub"},lowf_max,lowf_min,},
--kawakawa
{aotearoa.path .. "/schematics/kawakawa1.mts", {"aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},scan_fill,{"maire_forest","tawa_forest","kauri_forest",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/kawakawa2.mts", {"aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter",},scan_fill,{"maire_forest","tawa_forest","kauri_forest",},lowf_max,lowf_min,},
--rare kawakawa
{aotearoa.path .. "/schematics/kawakawa1.mts", {"aotearoa:dirt_with_dark_litter","default:dirt_with_rainforest_litter",},scan_rare_fill,{"northern_podocarp_forest","pohutukawa_forest",},lowf_max,coastf_min+2,},
{aotearoa.path .. "/schematics/kawakawa2.mts", {"aotearoa:dirt_with_dark_litter","default:dirt_with_rainforest_litter",},scan_rare_fill,{"northern_podocarp_forest","pohutukawa_forest",},lowf_max,coastf_min+2,},
--mangrove
{aotearoa.path .. "/schematics/mangrove1.mts", {"aotearoa:mud_sinking", "aotearoa:mud"},nil,{"northern_estuary"},3,2,{offset = 0,scale = 0.078,spread = cl_spr, seed = 11712, octaves = cl_oct, persist = 0.35}},
{aotearoa.path .. "/schematics/mangrove2.mts", {"aotearoa:mud_sinking", "aotearoa:mud"}, nil, {"northern_estuary"},3,2,{offset = 0,scale = 0.078,spread = cl_spr,seed = 15874, octaves = cl_oct,persist = 0.35}},
--rare common_tree_daisy
{aotearoa.path .. "/schematics/common_tree_daisy1.mts", {"aotearoa:dirt_with_moss",},scan_rare_fill,{"pahautea_forest",},highf_max,highf_min,},
{aotearoa.path .. "/schematics/common_tree_daisy2.mts", {"aotearoa:dirt_with_moss",},scan_rare_fill,{"pahautea_forest",},highf_max,highf_min,},
--Woody bushes....
--dense leatherwood. muttonbird
{aotearoa.path .. "/schematics/leatherwood1.mts", {"default:dirt_with_rainforest_litter",},scan_x_dense_fill,{"muttonbird_scrub",},coastf_max,coastf_min,},
{aotearoa.path .. "/schematics/leatherwood2.mts", {"default:dirt_with_rainforest_litter",},scan_x_dense_fill,{"muttonbird_scrub",},coastf_max,coastf_min,},
-- leatherwood. montane
{aotearoa.path .. "/schematics/leatherwood1.mts", {"default:dirt_with_dry_grass","aotearoa:schist","aotearoa:dirt_with_moss",},scan_dense_fill,{"fellfield","mountain_tussock","pahautea_forest",},highf_max+2,highf_min +5,},
{aotearoa.path .. "/schematics/leatherwood2.mts", {"default:dirt_with_dry_grass","aotearoa:schist","aotearoa:dirt_with_moss",},scan_dense_fill,{"fellfield","mountain_tussock","pahautea_forest",},highf_max+2,highf_min +5,},
--sparse kokomuka
{aotearoa.path .. "/schematics/kokomuka1.mts", {"default:dirt_with_dry_grass",},scan_sparse_fill,{"coastal_tussock",},coastf_max,coastf_min,},
{aotearoa.path .. "/schematics/kokomuka2.mts", {"default:dirt_with_dry_grass",},scan_sparse_fill,{"coastal_tussock",},coastf_max,coastf_min,},
--raupo
{aotearoa.raupo1, {"aotearoa:mud_sinking",},0.7,{"raupo_swamp",},lowf_max/2,coastf_min+2,},
{aotearoa.raupo2, {"aotearoa:mud_sinking",},0.7,{"raupo_swamp",},lowf_max/2,coastf_min+2,},
--rotten stump
{aotearoa.stump1, {"aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter","aotearoa:restiad_peat","aotearoa:gumland_soil","aotearoa:forest_peat",},can_sparse_fill,{"fiordland_forest","beech_forest","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest","fen","gumland","kahikatea_swamp",},lowf_max,coastf_min+2,},
{aotearoa.stump2, {"aotearoa:dirt_with_beech_litter","aotearoa:dirt_with_dark_litter","aotearoa:dirt_with_dry_litter","aotearoa:restiad_peat","aotearoa:gumland_soil","aotearoa:forest_peat",},can_sparse_fill,{"fiordland_forest","beech_forest","hinau_forest","southern_podocarp_forest","maire_forest","tawa_forest","northern_podocarp_forest","kauri_forest","fen","gumland","kahikatea_swamp",},lowf_max,coastf_min+2,},
--dense rotten stump
{aotearoa.stump1, {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_moss",},can_fill,{"manuka_scrub","broadleaf_scrub","geothermal_scrub","mountain_beech_forest","pahautea_forest","kamahi_forest",},highf_max,lowf_min,},
{aotearoa.stump2, {"default:dirt_with_rainforest_litter","aotearoa:dirt_with_moss",},can_fill,{"manuka_scrub","broadleaf_scrub","geothermal_scrub","mountain_beech_forest","pahautea_forest","kamahi_forest",},highf_max,lowf_min,},
--dense manuka
{aotearoa.path .. "/schematics/manuka1.mts", {"default:dirt_with_rainforest_litter",},scan_x_dense_fill,{"manuka_scrub",},lowf_max,lowf_min,},
{aotearoa.path .. "/schematics/manuka2.mts", {"default:dirt_with_rainforest_litter",},scan_x_dense_fill,{"manuka_scrub",},lowf_max,lowf_min,},
}
for i in ipairs(aotearoa.schem_deco_list) do
local deco = aotearoa.schem_deco_list[i][1]
local substrate = aotearoa.schem_deco_list[i][2]
local density = aotearoa.schem_deco_list[i][3]
local habitat = aotearoa.schem_deco_list[i][4]
local max_alt = aotearoa.schem_deco_list[i][5]
local min_alt = aotearoa.schem_deco_list[i][6]
local noise = aotearoa.schem_deco_list[i][7]
local next_to = aotearoa.schem_deco_list[i][8]
local next_to_num = aotearoa.schem_deco_list[i][9]
--either uniformly spread, clumped, or spawned-by (not using noise.)
if density ~= nil then
if next_to then
minetest.register_decoration({
deco_type = "schematic",
place_on = substrate,
sidelen = 8,
fill_ratio = density,
biomes = habitat,
y_min = min_alt,
y_max = max_alt,
schematic = deco,
force_placement = false,
flags = "place_center_x, place_center_z",
rotation = "random",
spawn_by = next_to,
num_spawn_by = next_to_num,
})
else
minetest.register_decoration({
deco_type = "schematic",
place_on = substrate,
sidelen = 8,
fill_ratio = density,
biomes = habitat,
y_min = min_alt,
y_max = max_alt,
schematic = deco,
force_placement = false,
flags = "place_center_x, place_center_z",
rotation = "random",
})
end
else
minetest.register_decoration({
deco_type = "schematic",
place_on = substrate,
sidelen = 8,
noise_params = noise,
biomes = habitat,
y_min = min_alt,
y_max = max_alt,
schematic = deco,
force_placement = false,
flags = "place_center_x, place_center_z",
rotation = "random",
})
end
end
----------------------------------------------------