-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.lua
More file actions
532 lines (479 loc) · 18.1 KB
/
Config.lua
File metadata and controls
532 lines (479 loc) · 18.1 KB
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
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
-- ============================================================
-- BElfRestore - Config.lua
-- User-editable policy layer
--
-- This file is loaded before `BElfRestore.lua`.
-- The goal is simple:
-- - keep raw sound/music datasets in `SoundData.lua`
-- - keep runtime logic in `BElfRestore.lua`
-- - keep safe tuning knobs, routing, exclusions, and heuristics here
--
-- Editing rules:
-- - Change one section at a time, then test in-game.
-- - Keep text keys lowercase when matching zone/subzone/name text.
-- - Do not rename top-level tables unless the runtime code was also
-- updated to read the new names.
-- - When unsure, comment out one line instead of deleting a whole block.
--
-- Region keys currently used by the music system:
-- - `silvermoon`
-- - `silvermoon_interior`
-- - `eversong`
-- - `sunstrider`
-- - `eversong_south`
-- - `deatholme`
-- - `amani`
--
-- Voice role values currently supported:
-- - `military`
-- - `noble`
-- - `standard`
-- ============================================================
BElfVR_Config = {
voice = {
-- ========================================================
-- Voice Behavior
-- Safe runtime timing/probability knobs for injected VO.
-- ========================================================
behavior = {
-- How many rapid repeated clicks on the same target are
-- required before the addon switches to a "pissed" line.
pissedClickThreshold = 3,
-- Seconds allowed between repeated clicks before the pissed
-- counter resets.
pissedClickWindowSeconds = 4,
-- Maximum age of the last greet for normal bye playback.
byeGracePeriodSeconds = 60,
-- Minimum hold time before target-loss bye is allowed.
-- This prevents greet + instant target-clear overlap.
targetLossByeDelaySeconds = 1.6,
-- Maximum age for target-loss bye after the original greet.
-- Keep this fairly short: target-loss bye is meant to feel
-- like a quick disengage, not a voice line from an NPC you
-- flew away from several seconds ago.
targetLossByeMaxAgeSeconds = 4.0,
-- Minimum gap between injected TBC voice lines.
minPlaybackGapSeconds = 1.25,
-- Time window for temporary native dialog suppression.
dialogSuppressionWindowSeconds = 0.4,
-- Fake distance falloff probabilities for left-click greet.
-- These are behavior-only probabilities, not real 3D volume.
rangeTierNearChance = 0.65,
rangeTierFarChance = 0.25,
-- Prevents double-firing target-select greet on very fast
-- duplicate target-change bursts.
targetSelectDedupeWindowSeconds = 0.35,
},
-- ========================================================
-- Voice Scope
-- Keeps TBC voice replacement inside supported Quel'Thalas
-- areas instead of letting it bleed into unrelated regions.
-- ========================================================
scope = {
-- Exact lowercase zone or subzone text accepted for TBC
-- voice replacement.
fallbackZones = {
"silvermoon city",
"eversong woods",
"sunstrider isle",
"ghostlands",
"sanctum of light",
"the bazaar",
},
-- Normalized map/area tokens accepted for TBC voice
-- replacement. These use alphanumeric-only normalized text
-- from area names.
scopeTokens = {
"silvermooncity",
"eversongwoods",
"ghostlands",
"sunstriderisle",
"sanctumoflight",
},
-- Areas that must always keep Blizzard's native voices even
-- if a parent zone or map token would otherwise qualify.
nativeOnlyTokens = {
"harandar",
},
},
-- ========================================================
-- Voice Classification
-- Tokens used by tooltip/name heuristics.
-- ========================================================
classification = {
-- If any tooltip line contains one of these tokens, the NPC
-- is treated as explicitly Blood Elf.
tooltipBloodElfRaceTokens = {
"blood elf",
"sin'dorei",
},
-- If any tooltip line contains one of these tokens, the NPC
-- is treated as a child and should keep native audio.
tooltipChildTokens = {
"child",
},
-- Name tokens that should keep native child audio even when
-- Blizzard hides tooltip race metadata.
childNameTokens = {
"child",
"orphan",
},
-- Hidden-race fallback on plain target selection is limited
-- to names that strongly suggest a Blood Elf NPC. These are
-- normalized to lowercase alphanumeric tokens at runtime.
hiddenRaceNameTokens = {
"silvermoon",
"sindorei",
"farstrider",
"magister",
"spellbreaker",
"blood knight",
},
-- If tooltip race text explicitly contains one of these,
-- humanoid fallback must not pretend the NPC is Blood Elf.
knownNonBloodElfRaceTokens = {
"human",
"orc",
"dwarf",
"night elf",
"gnome",
"troll",
"tauren",
"undead",
"forsaken",
"draenei",
"worgen",
"goblin",
"pandaren",
"tortollan",
"grummle",
"zandalari troll",
"kul tiran",
"dark iron dwarf",
"mag'har orc",
"void elf",
"lightforged draenei",
"nightborne",
"highmountain tauren",
"vulpera",
"mechagnome",
"dracthyr",
"earthen",
},
},
-- ========================================================
-- Voice Role Heuristics
-- Name fragments used when no exact override/profile exists.
-- ========================================================
roleHeuristics = {
militaryNameTokens = {
"guard",
"ranger",
"captain",
"blood knight",
"champion",
},
nobleNameTokens = {
"lord",
"lady",
"noble",
},
},
-- ========================================================
-- Built-In Overrides
-- Exact NPC-ID metadata fixes. Keys may be string or number.
-- ========================================================
overrides = {
genderByNPCID = {
-- ["123456"] = "female",
},
roleByNPCID = {
-- ["123456"] = "military",
},
},
-- ========================================================
-- Built-In Name Profiles
-- Used for repeated names that hide useful metadata.
--
-- Supported fields:
-- - `role = "military" | "noble" | "standard"`
-- - `vendor = true`
-- - `exclude = true`
--
-- Example:
-- ["example vendor"] = {
-- role = "standard",
-- vendor = true,
-- }
-- ========================================================
profiles = {
byName = {
["lyrendal"] = {
role = "standard",
vendor = true,
},
["mahra treebender"] = {
exclude = true,
},
["silvermoon resident"] = {
role = "standard",
},
["doomsayer"] = {
role = "standard",
},
["household attendant"] = {
role = "standard",
},
-- Silvermoon innkeepers whose tooltip race is hidden by
-- Midnight but who are clearly Blood Elf NPCs.
["innkeeper jovia"] = {
role = "standard",
vendor = true,
},
["innkeeper velandra"] = {
role = "standard",
vendor = true,
},
-- Player mount service vendors should never inherit the
-- Blood Elf fallback classifier.
["cousin slowhands"] = {
exclude = true,
},
["mystic birdhat"] = {
exclude = true,
},
["collector unta"] = {
exclude = true,
},
["merchant maku"] = {
exclude = true,
},
["killia"] = {
exclude = true,
},
["melanie morten"] = {
exclude = true,
},
-- Children currently keep native Midnight child audio
-- because the addon does not ship a dedicated TBC child
-- voice pool.
["sin'dorei child"] = {
exclude = true,
},
["sin'dorei children"] = {
exclude = true,
},
["sindorei child"] = {
exclude = true,
},
["blood elf child"] = {
exclude = true,
},
["silvermoon child"] = {
exclude = true,
},
["sin'dorei orphan"] = {
exclude = true,
},
},
},
},
music = {
-- ========================================================
-- Music Timing
-- Safe runtime timing knobs for injected music playback.
-- ========================================================
timing = {
updateIntervalSeconds = 1.0,
trackRotateSeconds = 85,
repeatCooldownSeconds = 180,
transitionFadeMS = 900,
endGraceSeconds = 0.5,
},
-- ========================================================
-- Music Playback
-- Lower-level playback control knobs.
-- ========================================================
playback = {
forceStopNativeBeforeReplacement = true,
nativeGuardIntervalSeconds = 0.25,
-- WoW sound channel used for injected TBC music.
-- `Master` keeps injected replacement music audible while
-- the addon hard-suppresses Blizzard's native music channel.
playbackChannel = "Master",
-- Keep this enabled while replacement music uses a non-Music
-- channel so native Midnight music cannot bleed underneath.
suppressNativeWithVolume = true,
nativeSuppressVolume = 0,
-- Regions where ambient-channel suppression is allowed as a
-- last-resort overlap guard.
regionsWithAmbienceSuppression = {
"deatholme",
},
-- Startup purge delay used to flush lingering pre-reload
-- injected music before the new Lua instance resumes.
startupPurgeDelaySeconds = 0.35,
},
-- ========================================================
-- Music Day/Night Split
-- ========================================================
dayNightHours = {
dayStartHour = 6,
nightStartHour = 18,
},
-- ========================================================
-- Music Scope
-- Determines where the addon is even allowed to own music.
-- ========================================================
scope = {
supportedZones = {
"silvermoon city",
"eversong woods",
"sanctum of light",
},
supportedSubZones = {
"the bazaar",
"wayfarer's rest",
},
-- Areas that must always stay native even if the parent zone
-- looks supported.
nativeOnlyTokens = {
"harandar",
},
-- Normalized map/area tokens that mark Midnight Quel'Thalas.
scopeTokens = {
"quelthalas",
"silvermooncity",
"eversongwoods",
"ghostlands",
"sunstriderisle",
"sanctumoflight",
},
},
-- ========================================================
-- Music Routing
-- Maps specific subzones into broader TBC region families.
-- ========================================================
routing = {
-- Broad zone text -> region key.
byZone = {
["silvermoon city"] = "silvermoon",
["sanctum of light"] = "silvermoon",
["eversong woods"] = "eversong",
},
-- Exact lowercase subzone text -> region key.
bySubZone = {
["amani pass"] = "amani",
["daggerspine landing"] = "eversong_south",
["daggerspine point"] = "eversong_south",
["farstrider enclave"] = "eversong_south",
["goldenmist village"] = "eversong_south",
["ruins of deatholme"] = "deatholme",
["tranquillien"] = "eversong_south",
["sanctum of the moon"] = "eversong_south",
["sunstrider isle"] = "sunstrider",
["suncrown village"] = "eversong_south",
["thalassian pass"] = "eversong_south",
["thalassian range"] = "eversong_south",
["windrunner spire"] = "eversong_south",
["windrunner village"] = "eversong_south",
["wayfarer's rest"] = "silvermoon_interior",
["zeb'nowa"] = "amani",
["zeb'tela ruins"] = "amani",
},
-- Narrow token fallback when exact subzone names drift.
bySubZoneToken = {
["deatholme"] = "deatholme",
},
-- Normalized subzone tokens -> region key.
-- These are matched after punctuation/spacing normalization.
byNormalizedSubZoneToken = {
["amani"] = "amani",
["zeb"] = "amani",
},
-- If a supported subzone is known-good but does not define an
-- explicit region, it falls back here.
defaultSupportedSubZoneRegion = "silvermoon",
},
-- ========================================================
-- Intro Cooldown Rules
--
-- Matching rules:
-- - `defaultSeconds` always applies
-- - more specific buckets layer on top
-- - if ANY matching bucket is still on cooldown, the intro is
-- skipped and the addon falls back to normal day/night music
--
-- Most precise user-facing location key currently available:
-- - `zone||subzone`
--
-- Example keys:
-- - `byRegion.silvermoon = 1800`
-- - `byZone["silvermoon city"] = 1800`
-- - `bySubZone["the bazaar"] = 2400`
-- - `byArea["silvermoon city||the bazaar"] = 2400`
-- - `byPool["silvermoon:intro"] = 1800`
-- - `byTrackID[53473] = 1800`
-- ========================================================
introCooldowns = {
defaultSeconds = 600,
byRegion = {
-- ["eversong"] = 1200,
},
byZone = {
-- ["silvermoon city"] = 1800,
},
bySubZone = {
-- ["the bazaar"] = 2400,
},
byArea = {
-- ["silvermoon city||the bazaar"] = 2400,
},
-- Runtime pool key format: `region:pool`
byPool = {
["silvermoon:intro"] = 1800,
},
byTrackID = {
-- [53515] = 900,
},
},
-- ========================================================
-- Music Debug / Trace
-- ========================================================
debug = {
traceMaxEntries = 1200,
},
},
ui = {
-- ========================================================
-- UI Art
-- ========================================================
art = {
texturePath = "Interface\\AddOns\\bloodElfRestore\\assets\\tbc_art",
fallbackTexturePath = "Interface\\AddOns\\bloodElfRestore\\assets\\tbc_art.jpg",
aspectRatio = 16 / 10,
alpha = 0.10,
-- 0.0 = contain, 1.0 = cover
fitBlend = 1.0,
scaleX = 1.0,
scaleY = 1.0,
margins = {
left = 12,
right = 12,
top = 50,
bottom = 12,
},
},
-- ========================================================
-- UI Layout
-- ========================================================
layout = {
windowWidth = 550,
windowHeight = 750,
contentWidth = 446,
tabButtonWidth = 92,
tabButtonHeight = 22,
tabButtonGap = 6,
},
},
}