-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy paththex_weather_eocs.json
470 lines (470 loc) · 17.8 KB
/
thex_weather_eocs.json
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
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
[
{
"id": "thex_weather_and_event_check_eoc",
"type": "effect_on_condition",
"recurrence": [ "6 h", "24 h" ],
"global": true,
"condition": {
"and": [
{ "math": [ "cause_early_portal_storm", "==", "0" ] },
{ "math": [ "cause_portal_storm", "==", "0" ] }
]
},
"effect": [
{
"run_eocs": [
{
"id": "thex_weather_story_check_eoc",
"effect": [
{
"run_eocs": [
{
"id": "thex_weather_purifying_check_eoc",
"condition": {
"and": [
{ "math": [ "u_val('time_since_cataclysm: days')", ">=", "86" ] },
{ "math": [ "weather_purifying_queued", "==", "0" ] },
{ "math": [ "weather_purifying_active", "==", "0" ] },
{ "math": [ "weather_purifying_ended", "==", "0" ] }
]
},
"effect": [
{ "math": [ "weather_purifying_queued", "=", "1" ] },
{
"queue_eocs": [
{
"id": "thex_weather_purifying_success_eoc",
"effect": [
{ "math": [ "weather_purifying_queued", "=", "0" ] },
{ "math": [ "weather_purifying_active", "=", "1" ] },
{
"queue_eocs": [
{
"id": "thex_weather_purifying_disable_eoc",
"effect": [
{ "math": [ "weather_purifying_active", "=", "0" ] },
{ "math": [ "weather_purifying_ended", "=", "1" ] }
]
}
],
"time_in_future": "2 d 23 h 1 s"
}
]
}
],
"time_in_future": { "math": [ "rand(86399)" ] }
}
],
"//": "Purifying rain should only run once per world (unique), starting at ~3 days before the 90 day mark. This is for lore purposes, linked to the second wave of LDC faction",
"//2": "This EOC first checks if it's day 86, and queues the activation of the var_ACTIVE (condition for rain_purifying ) in rand(24 h) seconds",
"//3": "Once that is successfully run, it sets var_ACTIVE as 1 (condition for rain_purifying ), and queues the deactivation in <3 days, also adding the var_ENDED used to prevent this from running again"
}
]
}
],
"//story": "All extremely important weather/events go here. These have priority over every other weather/event"
}
]
},
{
"run_eocs": [
{
"id": "thex_weather_special_check_eoc",
"condition": {
"and": [
{ "math": [ "weather_purifying_active", "==", "0" ] },
{ "math": [ "weather_night_parade_active", "==", "0" ] },
{ "math": [ "weather_silence_hour_active", "==", "0" ] }
]
},
"effect": [
{
"run_eocs": [
{
"id": "thex_weather_carnian_check_eoc",
"condition": {
"and": [
{ "x_in_y_chance": { "x": 1, "y": 10 } },
{ "math": [ "weather_carnian_active", "==", "0" ] },
{ "math": [ "weather_carnian_cd", "==", "0" ] },
{ "math": [ "u_val('time_since_cataclysm: days')", ">=", "30" ] }
]
},
"effect": [
{ "math": [ "weather_carnian_active", "=", "1" ] },
{
"queue_eocs": [
{
"id": "thex_weather_carnian_disable_eoc",
"effect": [
{ "math": [ "weather_carnian_active", "=", "0" ] },
{ "math": [ "weather_carnian_cd", "=", "1" ] },
{
"queue_eocs": [
{
"id": "thex_weather_carnian_restore_eoc",
"effect": [ { "math": [ "weather_carnian_cd", "=", "0" ] } ]
}
],
"time_in_future": "7 d"
}
]
}
],
"time_in_future": [ "7 d", "14 d" ]
}
],
"//": "When Carnian weather is procced, it runs for 7 - 14 days and deactivates, adding a cd. The cd is removed after 7 days of that deactivation",
"//2": "Maybe reconsider removing the cd *triassic laughter* "
}
]
}
],
"//special": "All 'special' weather go here, due their particular characteristics. These have priority over 'generic' and base weather"
}
]
},
{
"run_eocs": [
{
"id": "thex_weather_generic_check_eoc",
"condition": {
"and": [
{ "math": [ "weather_carnian_active", "==", "0" ] },
{ "math": [ "weather_purifying_active", "==", "0" ] },
{ "math": [ "weather_night_parade_active", "==", "0" ] },
{ "math": [ "weather_silence_hour_active", "==", "0" ] }
]
},
"effect": [
{
"run_eocs": [
{
"id": "thex_weather_scarlet_check_eoc",
"condition": { "x_in_y_chance": { "x": 1, "y": 5 } },
"effect": [ { "math": [ "weather_scarlet_active", "=", "1" ] } ],
"false_effect": [ { "math": [ "weather_scarlet_active", "=", "0" ] } ]
},
{
"id": "thex_weather_blood_check_eoc",
"condition": { "x_in_y_chance": { "x": 1, "y": 5 } },
"effect": [ { "math": [ "weather_blood_active", "=", "1" ] } ],
"false_effect": [ { "math": [ "weather_blood_active", "=", "0" ] } ]
}
]
}
],
"//generic": "All otherwise generic weather go here. These only have priority over base weather counterparts"
}
]
}
],
"//": "This rolls the chance for each custom weather every 6 - 24 h, to make it somewhat fluid (originally it was every day at 00:00)",
"//2": "Some weather/events start past X days, for either lore reasons or because idk lol",
"//3": "The condition for this recurring EOC prevents weather and weather-events from happening if there are portal storms going on. I'm almost sure",
"//4": "Events are directly handled by daily_randomization_eoc ",
"//note": "Ideally, the chance should roll for every weather change, instead of being a recurring EOC"
},
{
"id": "thex_event_night_parade_queue_eoc",
"type": "effect_on_condition",
"effect": [
{ "queue_eocs": [ "thex_event_night_parade_check_eoc" ], "time_in_future": "20 h" }
],
"//": "If the daily chance for the event was true, this queues the EOC at ~the intended time of the day (night), and then checks the actual event's conditions"
},
{
"id": "thex_event_night_parade_check_eoc",
"type": "effect_on_condition",
"condition": {
"and": [
{
"or": [
{ "is_weather": "sunny" },
{ "is_weather": "clear" },
{ "is_weather": "cloudy" },
{ "is_weather": "cloudy_scarlet" },
{ "is_weather": "mist" },
{ "is_weather": "mist_scarlet" },
{ "is_weather": "fog" },
{ "is_weather": "fog_scarlet" }
]
},
{
"or": [
{ "not": { "is_weather": "early_portal_storm" } },
{ "not": { "is_weather": "distant_portal_storm" } },
{ "not": { "is_weather": "close_portal_storm" } },
{ "not": { "is_weather": "portal_storm" } }
]
},
{ "not": { "is_weather": "night_parade" } },
{ "math": [ "weather_night_parade_active", "==", "0" ] },
{ "math": [ "weather_night_parade_cd", "==", "0" ] },
{ "math": [ "u_val('pos_z')", ">=", "0" ] }
]
},
"effect": [
{ "math": [ "weather_night_parade_active", "=", "1" ] },
{ "run_eocs": "thex_event_night_parade_start_message_eoc" },
{
"queue_eocs": [
{
"id": "thex_event_night_parade_disable_eoc",
"effect": [
{ "math": [ "weather_night_parade_active", "=", "0" ] },
{ "math": [ "weather_night_parade_cd", "=", "1" ] },
"next_weather",
{
"queue_eocs": [
{
"id": "thex_event_night_parade_restore_eoc",
"effect": [ { "math": [ "weather_night_parade_cd", "=", "0" ] } ]
}
],
"time_in_future": "24 h"
}
]
}
],
"time_in_future": "8 h"
}
],
"//": "Night parade runs if: it's night_time AND it's not raining AND there's no portal storm AND the event isn't already running/queued AND the player is not underground",
"//2": "(The night condition is implicit by running this EOC at night_time by thex_event_night_parade_queue_eoc )",
"//3": "Portal storms have priority as I'm not confident enough to block/revert them without breaking the game",
"//4": "Because weather is automatically set as 'Underground' if z < 0, it causes the EOC to detect no event and thus keep running, thus the z >= 0 is required"
},
{
"id": "thex_event_night_parade_waves_eoc",
"type": "effect_on_condition",
"recurrence": [ "1 m", "5 m" ],
"global": true,
"condition": {
"and": [
{ "is_weather": "night_parade" },
{ "math": [ "u_monsters_nearby('radius': 48 )", "<", "35" ] },
{ "math": [ "u_val('pos_z')", ">=", "0" ] }
]
},
"deactivate_condition": { "not": { "is_weather": "night_parade" } },
"effect": [
{
"weighted_list_eocs": [
[ "night_parade_spawn_1_eoc", 11 ],
[ "night_parade_spawn_2_eoc", 11 ],
[ "night_parade_spawn_3_eoc", 11 ],
[ "night_parade_spawn_4_eoc", 1 ]
]
}
]
},
{
"id": "night_parade_spawn_1_eoc",
"type": "effect_on_condition",
"effect": [
{
"u_spawn_monster": "GROUP_YOUKAI_ONI_NONHUMANOID",
"group": true,
"real_count": 1,
"outdoor_only": true,
"min_radius": 20,
"max_radius": 36,
"//temporary_drop_items": true,
"lifespan": [ "12 h", "16 h" ]
}
]
},
{
"id": "night_parade_spawn_2_eoc",
"type": "effect_on_condition",
"effect": [
{
"u_spawn_monster": "GROUP_YOUKAI_TSUKUMOGAMI_COMMON",
"group": true,
"real_count": 1,
"outdoor_only": true,
"min_radius": 20,
"max_radius": 36,
"//temporary_drop_items": true,
"lifespan": [ "12 h", "16 h" ]
}
]
},
{
"id": "night_parade_spawn_3_eoc",
"type": "effect_on_condition",
"effect": [
{
"u_spawn_monster": "GROUP_GHOSTS_CITY",
"group": true,
"real_count": 1,
"outdoor_only": true,
"min_radius": 20,
"max_radius": 36,
"//temporary_drop_items": true,
"lifespan": [ "12 h", "16 h" ]
}
]
},
{
"id": "night_parade_spawn_4_eoc",
"type": "effect_on_condition",
"effect": [
{
"u_spawn_monster": "GROUP_YOUKAI_DANGER",
"group": true,
"real_count": 1,
"outdoor_only": true,
"min_radius": 20,
"max_radius": 36,
"//temporary_drop_items": true,
"lifespan": [ "12 h", "16 h" ]
}
],
"//0.H": ""
},
{
"id": "thex_event_night_parade_start_message_eoc",
"type": "effect_on_condition",
"effect": [
{
"run_eocs": [
{
"id": "night_parade_message_human_eoc",
"condition": {
"and": [
{ "math": [ "u_night_parade_snippet", "<=", "0" ] },
{ "u_has_trait": "HUMAN_SPECIES" }
]
},
"effect": [
{ "u_message": "night_parade_human_snippet", "snippet": true, "type": "bad" },
{ "math": [ "u_night_parade_snippet", "+=", "1" ] }
]
},
{
"id": "night_parade_message_youkai_eoc",
"condition": {
"and": [
{ "math": [ "u_night_parade_snippet", "<=", "0" ] },
{
"or": [
{ "u_has_trait": "YOUKAI_SPECIES" },
{ "u_has_trait": "PROF_KASEN" },
{ "u_has_trait": "MENREIKI_SPECIES" },
{ "u_has_trait": "VAMPIRE_SPECIES" }
]
}
]
},
"effect": [
{ "u_message": "night_parade_youkai_snippet", "snippet": true, "type": "mixed" },
{ "math": [ "u_night_parade_snippet", "+=", "1" ] }
]
},
{
"id": "night_parade_message_heaven_eoc",
"condition": {
"and": [
{ "math": [ "u_night_parade_snippet", "<=", "0" ] },
{
"or": [
{ "u_has_trait": "OARFISH_SPECIES" },
{ "u_has_trait": "CELESTIAL_SPECIES" },
{ "u_has_trait": "HERMIT_SPECIES" },
{ "u_has_trait": "WICKED_HERMIT" }
]
}
]
},
"effect": [
{ "u_message": "night_parade_heaven_snippet", "snippet": true, "type": "warning" },
{ "math": [ "u_night_parade_snippet", "+=", "1" ] }
]
},
{
"id": "night_parade_message_gyokuto_eoc",
"condition": {
"and": [
{ "math": [ "u_night_parade_snippet", "<=", "0" ] },
{ "u_has_trait": "GYOKUTO_SPECIES" }
]
},
"effect": [
{ "u_message": "night_parade_gyokuto_snippet", "snippet": true, "type": "warning" },
{ "math": [ "u_night_parade_snippet", "+=", "1" ] }
]
},
{
"id": "night_parade_message_default_eoc",
"effect": [
{ "u_message": "night_parade_default_snippet", "snippet": true, "type": "mixed" },
{ "math": [ "u_night_parade_snippet", "+=", "1" ] }
]
}
]
},
{ "math": [ "u_night_parade_snippet", "=", "0" ] }
]
},
{
"id": "thex_event_silence_hour_queue_eoc",
"type": "effect_on_condition",
"effect": [
{ "queue_eocs": [ "thex_event_silence_hour_check_eoc" ], "time_in_future": { "math": [ "rand(86399)" ] } }
],
"//": "If the daily chance for the event was true, this queues the EOC at the intended time of the day (random), and then checks the actual event's conditions"
},
{
"id": "thex_event_silence_hour_check_eoc",
"type": "effect_on_condition",
"condition": {
"and": [
{
"or": [
{ "is_weather": "sunny" },
{ "is_weather": "clear" },
{ "is_weather": "cloudy" },
{ "is_weather": "cloudy_scarlet" },
{ "is_weather": "mist" },
{ "is_weather": "mist_scarlet" },
{ "is_weather": "fog" },
{ "is_weather": "fog_scarlet" }
]
},
{
"or": [
{ "not": { "is_weather": "early_portal_storm" } },
{ "not": { "is_weather": "distant_portal_storm" } },
{ "not": { "is_weather": "close_portal_storm" } },
{ "not": { "is_weather": "portal_storm" } }
]
},
{ "not": { "is_weather": "silence_hour" } },
{ "math": [ "weather_silence_hour_active", "==", "0" ] },
{ "math": [ "u_val('pos_z')", ">=", "0" ] }
]
},
"effect": [
{ "math": [ "weather_silence_hour_active", "=", "1" ] },
{ "u_message": "silence_hour_snippet", "snippet": true, "type": "warning" },
{
"queue_eocs": [
{
"id": "thex_event_silence_hour_disable_eoc",
"effect": [
{ "math": [ "weather_silence_hour_active", "=", "0" ] },
"next_weather"
]
}
],
"time_in_future": "1 h"
}
],
"//": "Silence hour runs if: (random time of the day) AND it's not raining AND there's no portal storm AND the event isn't already running/queued AND the player is not underground",
"//2": "(The random time is set by thex_event_silence_hour_queue_eoc )",
"//3": "Portal storms have priority as I'm not confident enough to block/revert them without breaking the game",
"//4": "Because weather is automatically set as 'Underground' if z < 0, it causes the EOC to detect no event and thus keep running, thus the z >= 0 is required"
}
]