This repository has been archived by the owner on Apr 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathambience.lua
284 lines (246 loc) · 7.57 KB
/
ambience.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
-------------------------------------
--For use with Tenplus1's Ambience api
--Mostly plays NZ birds songs
-----------------------------
--clear unsuitable sets
--have used desert stone differently... don't want coyotes.
ambience.del_set("desert")
--get rid of Euro/American fauna (e.g. wolves, crows)
ambience.del_set("night")
ambience.del_set("day")
--disable (and reorder) high up winds so it doesn't override alpine birds
ambience.del_set("high_up")
------------------
--boiling mud, geothermal
ambience.add_set("mud_pool", {
frequency = 1000,
nodes = {
"aotearoa:boiling_mud_source",
"aotearoa:boiling_mud_flowing",
},
sounds = {
{name = "boiling_mud", length = 6}
},
sound_check = function(def)
local n = (def.totals["aotearoa:boiling_mud_source"] or 0) +
(def.totals["aotearoa:boiling_mud_flowing"] or 0)
if n >= 1 then
return "mud_pool"
end
end,
})
---------------------
-- tussock day
ambience.add_set("aotearoa_tussock_day", {
frequency = 25,
nodes = {
"aotearoa:matagouri_leaves",
"aotearoa:red_tussock"},
sounds = {
{name = "kea", length = 53},
{name = "takahe", length = 28},
},
sound_check = function(def)
local n = (
(def.totals["aotearoa:matagouri_leaves"] or 0)
+ (def.totals["aotearoa:red_tussock"] or 0)
)
if (def.tod > 0.2 and def.tod < 0.8)
and n > 6
and def.pos.y > 40
and def.pos.y < 500
then
return "aotearoa_tussock_day"
end
end,
})
------------------------
-- muttonbird day
ambience.add_set("aotearoa_muttonbird_day", {
frequency = 30,
nodes = {
"aotearoa:common_tree_daisy_leaves",
"aotearoa:common_tree_daisy_tree",
},
sounds = {
{name = "shearwater", length = 25},
{name = "yellow_eyed_penguin", length = 68},
},
sound_check = function(def)
local n = (
(def.totals["aotearoa:common_tree_daisy_leaves"] or 0)
+ (def.totals["aotearoa:common_tree_daisy_tree"] or 0)
+ (def.totals["aotearoa:leatherwood"] or 0)
)
if (def.tod > 0.2 and def.tod < 0.8)
and n > 10
and def.pos.y > -1
and def.pos.y < 20
then
return "aotearoa_muttonbird_day"
end
end,
})
-----------------------------
--NIGHT TIME
--Night in the forest
ambience.add_set("aotearoa_forest_night", {
frequency = 40,
nodes = {
"default:dirt_with_grass",
"default:dirt_with_rainforest_litter",
"aotearoa:forest_peat",
"aotearoa:gumland_soil",
"aotearoa:restiad_peat",
"aotearoa:dirt_with_dark_litter",
"aotearoa:dirt_with_dry_litter",
"aotearoa:dirt_with_moss",
"aotearoa:dirt_with_beech_litter",
},
sounds = {
{name = "morepork", length = 14, gain = 0.5},
{name = "morepork", length = 14},
{name = "male_kiwi", length = 19, gain = 0.5},
{name = "female_kiwi", length = 18, gain = 0.5},
{name = "kakapo", length = 135},
},
sound_check = function(def)
local n = (
(def.totals["default:dirt_with_grass"] or 0)
+ (def.totals["default:dirt_with_rainforest_litter"] or 0)
+ (def.totals["aotearoa:forest_peat"] or 0)
+ (def.totals["aotearoa:restiad_peat"] or 0)
+ (def.totals["aotearoa:dirt_with_dark_litter"] or 0)
+ (def.totals["aotearoa:dirt_with_dry_litter"] or 0)
+ (def.totals["aotearoa:gumland_soil"] or 0)
+ (def.totals["aotearoa:dirt_with_beech_litter"] or 0)
+ (def.totals["aotearoa:dirt_with_moss"] or 0)
)
if (def.tod < 0.2 or def.tod > 0.8)
and n > 10
then
return "aotearoa_forest_night"
end
end,
})
-----------------------------
--DAY TIME
--Bird Trees.
-- trees that attract fuit/nectar bird.
ambience.add_set("aotearoa_birdtrees_day", {
frequency = 80,
nodes = {
"aotearoa:pohutukawa_leaves",
"aotearoa:karaka_fruit",
"aotearoa:rimu_leaves",
"aotearoa:totara_leaves",
"aotearoa:miro_fruit",
"aotearoa:kahikatea_leaves",
"aotearoa:tawa_fruit",
"aotearoa:kowhai_leaves",
"aotearoa:kawakawa_fruit",
"aotearoa:mahoe_leaves",
"aotearoa:flax",
"aotearoa:cabbage_tree_crown",
"aotearoa:nikau_palm_crown",
"aotearoa:black_maire_leaves",
"aotearoa:hinau_fruit",
},
sounds = {
{name = "bellbirds", length = 181, gain = 1.1},
{name = "tuis", length = 165, gain = 1},
{name = "kokako", length = 59, gain = 1.1},
{name = "parakeet", length = 14, gain = 1},
{name = "si_kaka", length = 30, gain = 0.8},
{name = "stichbird", length = 204, gain = 1},
{name = "tuis2", length = 141, gain = 1},
{name = "tuis3", length = 19, gain = 1},
{name = "tuis4", length = 9, gain = 1},
},
sound_check = function(def)
local n = (
(def.totals["aotearoa:pohutukawa_leaves"] or 0)
+ (def.totals["aotearoa:karaka_fruit"] or 0)
+ (def.totals["aotearoa:rimu_leaves"] or 0)
+ (def.totals["aotearoa:totara_leaves"] or 0)
+ (def.totals["aotearoa:miro_fruit"] or 0)
+ (def.totals["aotearoa:kahikatea_leaves"] or 0)
+ (def.totals["aotearoa:tawa_fruit"] or 0)
+ (def.totals["aotearoa:kowhai_leaves"] or 0)
+ (def.totals["aotearoa:kawakawa_fruit"] or 0)
+ (def.totals["aotearoa:mahoe_leaves"] or 0)
+ (def.totals["aotearoa:flax"] or 0)
+ (def.totals["aotearoa:cabbage_tree_crown"] or 0)
+ (def.totals["aotearoa:nikau_palm_crown"] or 0)
+ (def.totals["aotearoa:black_maire_leaves"] or 0)
+ (def.totals["aotearoa:hinau_fruit"] or 0)
)
if (def.tod > 0.2 and def.tod < 0.8)
and n > 10
then
return "aotearoa_birdtrees_day"
end
end,
})
-- Insect birds
-- ground level birds. near soil,
ambience.add_set("aotearoa_insect_birds_day", {
frequency = 70,
nodes = {
"default:dirt_with_grass",
"default:dirt_with_dry_grass",
"default:dirt_with_rainforest_litter",
"aotearoa:forest_peat",
"aotearoa:restiad_peat",
"aotearoa:gumland_soil",
"aotearoa:dirt_with_dark_litter",
"aotearoa:dirt_with_dry_litter",
"aotearoa:dirt_with_moss",
"aotearoa:dirt_with_beech_litter",
},
sounds = {
{name = "silvereye", length = 165},
{name = "fantail1", length = 11},
{name = "grey_warbler", length = 6},
{name = "ni_robin", length = 12},
{name = "si_robin", length = 75},
{name = "cicada_kereru", length = 46, gain = 1.2},
{name = "whitehead", length = 36, gain = 1},
},
sound_check = function(def)
local n = (
(def.totals["default:dirt_with_grass"] or 0)
+ (def.totals["default:dirt_with_dry_grass"] or 0)
+ (def.totals["default:dirt_with_rainforest_litter"] or 0)
+ (def.totals["aotearoa:forest_peat"] or 0)
+ (def.totals["aotearoa:restiad_peat"] or 0)
+ (def.totals["aotearoa:dirt_with_dark_litter"] or 0)
+ (def.totals["aotearoa:dirt_with_dry_litter"] or 0)
+ (def.totals["aotearoa:gumland_soil"] or 0)
+ (def.totals["aotearoa:dirt_with_beech_litter"] or 0)
+ (def.totals["aotearoa:dirt_with_moss"] or 0)
)
if (def.tod > 0.2 and def.tod < 0.8)
and n > 10
then
return "aotearoa_insect_birds_day"
end
end,
})
---------------------------
--Wind
ambience.add_set("aotearoa_high_up", {
frequency = 40,
nodes = {"default:snowblock"},
sounds = {
{name = "desertwind", length = 8},
{name = "wind", length = 9},
},
sound_check = function(def)
local c = (def.totals["default:snowblock"] or 0)
if def.pos.y > 60
or c > 150 then
return "aotearoa_high_up"
end
end,
})