Repository navigation
Expand file tree
/
Copy pathArcUI_DB.lua
More file actions
2074 lines (1898 loc) · 84.6 KB
/
Copy pathArcUI_DB.lua
File metadata and controls
2074 lines (1898 loc) · 84.6 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
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- ===================================================================
-- ArcUI_DB.lua
-- Database structure with support for multiple bar slots, resource bars,
-- and cooldown bars (charge-based ability tracking)
-- v2.8.0: Added ColorCurve threshold support for duration bars
-- ===================================================================
local ADDON, ns = ...
ns.API = ns.API or {} -- Initialize API table
-- 12.1-forward compat: the global SetDesaturation(region, bool) helper was REMOVED in
-- 12.1 (the texture methods SetDesaturated/SetDesaturation still exist). AceGUI's
-- CheckBox (and other libs) call the global -> "attempt to call a nil value" when the
-- options panel opens. Polyfill it once. Inert on 12.0.7 where the global still exists.
if not SetDesaturation then
function SetDesaturation(region, desaturation)
if region and region.SetDesaturated then
region:SetDesaturated(desaturation)
end
end
end
-- The texture picker shows a texture on one bar without saving it: while
-- ns.TexPreview names that bar's owner (its display table, or a castbar key),
-- the bar draws the previewed name instead of the saved one.
function ns.API.BarTextureName(owner, saved)
local p = ns.TexPreview
if p and owner ~= nil and p.owner == owner then return p.key end
return saved
end
-- ===================================================================
-- DEFAULT THRESHOLD PRESETS
-- ===================================================================
local DEFAULT_THRESHOLDS = {
simple = {
{ enabled = true, minValue = 0, maxValue = 100, color = {r=0, g=0.8, b=1, a=1} }
},
threshold = {
{ enabled = true, minValue = 0, maxValue = 100, color = {r=1, g=0, b=0, a=1} },
{ enabled = true, minValue = 50, maxValue = 100, color = {r=1, g=1, b=0, a=1} },
{ enabled = true, minValue = 80, maxValue = 100, color = {r=0, g=1, b=0, a=1} },
{ enabled = false, minValue = 50, color = {r=1, g=0.5, b=0, a=1} },
{ enabled = false, minValue = 70, color = {r=0.5, g=0, b=1, a=1} },
{ enabled = false, minValue = 90, color = {r=1, g=0, b=1, a=1} }
}
}
ns.DB_DEFAULTS = {
global = {
profileSnapshots = {},
migrationWarningSeen = false,
minimap = {
hide = false,
minimapPos = 220,
radius = 80
},
menuBackgroundAlpha = 1.0,
-- Options panel saved position/size
optionsPanelPos = nil, -- { point, x, y }
optionsPanelSize = nil, -- { width, height }
-- CDM Master Kill Switch - stored in global so it's checked before CDM modules init
cdmStylingEnabled = true,
-- Pending CDM profiles from master import (for classes not yet logged)
masterCDMPending = nil,
-- Skin preset library (shared across all characters)
skinLibrary = {},
-- Global Font & Texture (Settings tab): last font/texture pushed via
-- ns.API.ApplyGlobalFontTexture. Not a live override -- per-bar settings
-- stay independently editable after the push.
globalFont = "Friz Quadrata TT",
globalBarTexture = "Blizzard",
},
-- Profile storage (shared across characters using same profile)
profile = {
-- CDM Enhancement settings (per-profile for cross-character use)
cdmEnhance = {
enabled = true,
enableAuraCustomization = true,
enableCooldownCustomization = true,
unlocked = false,
textDragMode = false,
iconSettings = {}, -- [cooldownID] = { per-icon settings }
globalAuraSettings = {}, -- Default settings for all aura icons
globalCooldownSettings = {}, -- Default settings for all cooldown icons
globalApplyScale = false,
globalApplyHideShadow = false,
groupSettings = { -- Group-level settings per viewer type
aura = { padding = nil, scale = nil },
cooldown = { padding = nil, scale = nil },
utility = { padding = nil, scale = nil },
},
},
-- CDM Groups settings (per-profile for cross-character use)
cdmGroups = {
specData = {}, -- [specIndex] = { groups = {}, savedPositions = {}, freeIcons = {} }
specInheritedFrom = {},
lastActiveSpec = nil,
},
},
char = {
-- NOTE: cdmGroups is NOT in defaults anymore!
-- We manage cdmGroups storage directly in ArcUIDB.char[charKey].cdmGroups
-- to bypass AceDB's removeDefaults which strips our nested specData.
-- See ArcUI_CDM_Shared.lua GetCDMGroupsDB() for the storage implementation.
selectedBar = 1,
selectedResourceBar = 1,
selectedCooldownBar = 1,
selectedTexture = 1,
-- Array of buff/debuff bar configurations (up to 30 bars)
bars = {
[1] = {
tracking = {
enabled = false,
trackType = "buff",
spellID = 0,
buffName = "",
iconTextureID = 0,
cooldownID = 0,
alternateCooldownIDs = {}, -- Additional cooldownIDs for cross-spec support
excludedCooldownIDs = {}, -- CooldownIDs manually removed; never auto-discovered
slotNumber = 0,
maxStacks = 10,
auraInstanceID = 0,
useBaseSpell = false, -- Ignore CDM override spell, use base spell for icon
sourceType = "icon",
useDurationBar = false,
dynamicMaxDuration = false,
maxDuration = 30,
},
display = {
enabled = true,
displayMode = "single",
width = 200,
height = 20,
barScale = 1.0,
opacity = 1.0,
displayType = "bar",
iconSize = 48,
iconShowTexture = true,
iconShowStacks = true,
iconStackAnchor = "TOPRIGHT",
iconStackPosition = nil,
iconStackFont = "2002 Bold",
iconStackFontSize = 16,
iconStackColor = {r=1, g=1, b=1, a=1},
iconStackOutline = "THICKOUTLINE",
iconStackShadow = false,
iconShowDuration = true,
iconDurationFont = "2002 Bold",
iconDurationFontSize = 14,
iconDurationColor = {r=1, g=1, b=1, a=1},
iconDurationOutline = "THICKOUTLINE",
iconDurationShadow = false,
iconShowBorder = true,
iconBorderColor = {r=0, g=0, b=0, a=1},
iconMultiMode = false,
iconMultiFreeMode = false,
iconMultiLockPositions = false,
iconMultiShowDesatBg = true,
iconMultiSpacing = 4,
iconMultiDirection = "RIGHT",
iconMultiPositions = {},
iconMultiShowDurationOn = 1,
iconMultiDurationAnchor = "BOTTOM",
-- ═══════════════════════════════════════════════════════════════
-- COOLDOWN DISPLAY OPTIONS
-- ═══════════════════════════════════════════════════════════════
-- Cooldown Swipe (COOLDOWNS ONLY)
iconShowCooldownSwipe = true,
iconCooldownReverse = false,
iconCooldownDrawEdge = true,
iconCooldownDrawBling = true,
-- Desaturation options
iconDesaturateOnCooldown = true,
iconDesaturateWhenInactive = false,
-- Icon Zoom (crop edges)
iconZoom = 0,
texture = "Blizzard",
rotateTexture = false,
fillTextureScale = 1.0,
barOrientation = "horizontal", -- "horizontal" or "vertical"
barReverseFill = false, -- Reverse fill direction (right-to-left / top-to-bottom)
useGradient = false,
gradientSecondColor = {r=0, g=0, b=0, a=0.5}, -- Second color for gradient (darker by default)
gradientDirection = "VERTICAL", -- "VERTICAL" or "HORIZONTAL"
gradientIntensity = 0.5, -- How much the second color affects the gradient (0-1)
barColor = {r=0, g=0.5, b=1, a=1},
thresholdMode = "simple",
fragmentedSpacing = 2,
fragmentedColors = {},
fragmentedChargingColor = {r=0.4, g=0.4, b=0.4, a=1},
fragmentedShowSegmentText = false,
fragmentedTextSize = 10,
-- Icons mode settings (for secondary resources like Runes/Essence)
iconsMode = "row", -- "row" or "freeform"
iconsSize = 32,
iconsSpacing = 4,
iconsShape = "square", -- "square" or "circle"
iconsPositions = {}, -- saved positions for freeform mode
iconsShowCooldownText = true,
iconsCooldownTextSize = 12,
enableMaxColor = false,
maxColor = {r=0, g=1, b=0, a=1},
foldedColor1 = {r=0, g=0.5, b=1, a=1},
foldedColor2 = {r=0, g=1, b=0, a=1},
enableSmoothing = false,
showBackground = true,
backgroundColor = {r=0.2, g=0.2, b=0.2, a=0.8},
showBorder = true,
borderStyle = "Drawn",
drawnBorderThickness = 2,
borderColor = {r=0, g=0, b=0, a=1},
-- Per-side fill inset (aura bars only): insets the fill texture from each background
-- edge so custom fill textures need no baked-in transparent margins. 0 = original look.
barPaddingL = 0, barPaddingR = 0, barPaddingT = 0, barPaddingB = 0,
showTickMarks = true,
tickMode = "all",
tickThickness = 1,
tickHeightPercent = 100,
tickHeightAnchor = "center",
tickThicknessAnchor = "center",
tickColor = {r=0, g=0, b=0, a=1},
showText = true,
font = "2002 Bold",
fontSize = 24,
textColor = {r=1, g=1, b=1, a=1},
textOutline = "THICKOUTLINE",
textShadow = false,
textAnchor = "OUTERTOP",
textAnchorOffsetX = 0,
textAnchorOffsetY = 0,
showDuration = false,
durationFont = "2002 Bold",
durationFontSize = 18,
durationColor = {r=1, g=1, b=1, a=1},
durationOutline = "THICKOUTLINE",
durationShadow = false,
durationAnchor = "CENTER",
durationAnchorOffsetX = 0,
durationAnchorOffsetY = 0,
durationDecimals = 1,
durationShowWhenReady = false,
-- ═══════════════════════════════════════════════════════════════
-- DURATION BAR COLORCURVE THRESHOLD SETTINGS (v2.8.0)
-- Uses WoW 12.0 ColorCurve API for secret-safe color transitions
-- ═══════════════════════════════════════════════════════════════
durationColorCurveEnabled = false, -- Enable ColorCurve thresholds
durationColorCurveMode = "step", -- "step" (threshold) or "gradient"
durationColorCurveThreshold = 0.30, -- Percentage (0-1) for threshold
durationColorCurveLowColor = {r=1, g=0, b=0, a=1}, -- Color below threshold (red)
durationColorCurveHighColor = {r=0, g=1, b=0, a=1}, -- Color at/above threshold (green)
durationColorCurveMidColor = {r=1, g=1, b=0, a=1}, -- Mid color for gradient mode (yellow)
durationBarFillMode = "drain", -- "drain" (shrinks as time passes) or "fill" (grows as time passes)
-- Multi-threshold duration bar settings (v2 migration adds these)
-- Must be in defaults so compaction can strip them when unchanged
durationThreshold2Enabled = false,
durationThreshold2Value = 75,
durationThreshold2Color = {r=0.8, g=0.8, b=0, a=1},
durationThreshold3Enabled = false,
durationThreshold3Value = 50,
durationThreshold3Color = {r=1, g=0.5, b=0, a=1},
durationThreshold4Enabled = false,
durationThreshold4Value = 25,
durationThreshold4Color = {r=1, g=0.3, b=0, a=1},
durationThreshold5Enabled = false,
durationThreshold5Value = 10,
durationThreshold5Color = {r=1, g=0, b=0, a=1},
durationThresholdAsSeconds = false,
durationThresholdMaxDuration = 30,
showName = false,
nameFont = "2002 Bold",
nameFontSize = 14,
nameColor = {r=1, g=1, b=1, a=1},
nameOutline = "THICKOUTLINE",
nameShadow = false,
nameAnchor = "CENTER",
nameAnchorOffsetX = 0,
nameAnchorOffsetY = 0,
showBarIcon = false,
barIconSize = 32,
iconOverride = nil, -- Spell ID or texture ID to override the bar icon
barIconAnchor = "LEFT",
barIconAnchorOffsetX = 0,
barIconAnchorOffsetY = 0,
barIconShowBorder = true,
barIconBorderColor = {r=0, g=0, b=0, a=1},
barMovable = true,
textMovable = true,
textLocked = true,
barPosition = {
point = "CENTER",
relPoint = "CENTER",
x = 0,
y = 200
},
textPosition = {
point = "CENTER",
relPoint = "CENTER",
x = 0,
y = 230
},
-- Frame strata settings
barFrameStrata = "MEDIUM",
barFrameLevel = 10,
},
behavior = {
hideBuffIcon = false,
hideWhenZeroStacks = false,
hideWhenInactive = false,
hideOutOfCombat = false,
showOnSpec = 0,
showOnSpecs = {}
},
thresholds = {
[1] = { enabled = true, minValue = 0, maxValue = 10, color = {r=0, g=0.5, b=1, a=1} },
[2] = { enabled = false, minValue = 5, maxValue = 10, color = {r=1, g=1, b=0, a=1} },
[3] = { enabled = false, minValue = 8, maxValue = 10, color = {r=0, g=1, b=0, a=1} }
},
stackColors = {},
colorRanges = {
[1] = { from = 1, to = 4, color = {r=0, g=0.5, b=1, a=1} },
[2] = { enabled = false, from = 5, to = 8, color = {r=1, g=1, b=0, a=1} },
[3] = { enabled = false, from = 9, to = 12, color = {r=0, g=1, b=0, a=1} }
},
-- ═══════════════════════════════════════════════════════════════
-- CONDITIONAL EVENTS
-- ═══════════════════════════════════════════════════════════════
events = {},
},
},
-- ===============================================================
-- AURA TEXTURES
-- Freely-placeable images that flip between active and inactive
-- styling based on a tracked buff/debuff. Mirrors the buff/debuff
-- bar trigger model (tracking block is intentionally shaped the same
-- so it can reuse the CDM aura resolution); rendering is its own
-- texture-display engine (ns.Textures).
-- ===============================================================
textures = {
[1] = {
tracking = {
enabled = false,
trackType = "buff", -- "buff" or "debuff"
spellID = 0,
buffName = "",
iconTextureID = 0,
cooldownID = 0,
alternateCooldownIDs = {}, -- Additional cooldownIDs for cross-spec support
excludedCooldownIDs = {}, -- CooldownIDs manually removed; never auto-discovered
slotNumber = 0,
auraInstanceID = 0,
useBaseSpell = false,
},
display = {
enabled = true,
-- SOURCE
textureSource = "library", -- "library" (FileDataID / atlas) or "custom" (file path)
textureID = 0, -- FileDataID number OR atlas string when source = "library"
customTexturePath = "", -- file path when source = "custom"
-- SIZE / POSITION
width = 64,
height = 64,
position = {
point = "CENTER",
relPoint = "CENTER",
x = 0,
y = 0,
},
frameStrata = "MEDIUM",
frameLevel = 10,
movable = true,
-- RENDER (shared by both states)
blendMode = "BLEND", -- "BLEND" (opaque) or "ADD" (glow)
rotateEnabled = false,
rotation = 0, -- degrees (-180..180)
mirrorH = false,
mirrorV = false,
zoomEnabled = false,
zoomPct = 0, -- 0..50
cropEnabled = false,
cropL = 0, -- per-side crop percent (0..100)
cropR = 0,
cropT = 0,
cropB = 0,
-- ACTIVE STATE STYLE (aura present)
activeColor = {r=1, g=1, b=1, a=1},
activeAlpha = 1,
activeDesaturate = false,
activeDesaturatePct = 100,
-- INACTIVE STATE STYLE (aura absent)
showWhenInactive = false, -- false = hide when inactive; true = show with inactive style
inactiveColor = {r=1, g=1, b=1, a=1},
inactiveAlpha = 0.5,
inactiveDesaturate = true,
inactiveDesaturatePct = 100,
-- DURATION FADE-OUT (active state; secret-safe via ColorCurve alpha)
fadeOutEnabled = false,
fadeStartPct = 50, -- begin fading once remaining drops below this %
-- RESIZE
lockAspect = false, -- on-screen resize keeps the width/height ratio
-- LOOPING PULSE (size) + GLOW (active state)
pulseEnabled = false,
pulseScale = 1.15, -- target scale for the size pulse
pulseSpeed = 0.5, -- seconds per pulse half-cycle
glowEnabled = false,
glowType = "pixel", -- pixel / autocast / button / proc
-- DURATION DRAIN (active state): the texture depletes directionally
-- like a bar, driven secret-safely by StatusBar:SetTimerDuration.
progressEnabled = false,
progressDir = "TOP_TO_BOTTOM", -- TOP_TO_BOTTOM / BOTTOM_TO_TOP / LEFT_TO_RIGHT / RIGHT_TO_LEFT
progressHideGhost = false, -- the dim full-texture "ghost" shows by default (WeakAuras look); true hides it
-- DRAIN REGION: inset fractions (0..0.49) from each edge defining the
-- sub-rectangle that drains. All 0 = whole texture (default). When any
-- inset > 0, only that band depletes and the rest of the texture stays solid.
drainInsetL = 0,
drainInsetR = 0,
drainInsetT = 0,
drainInsetB = 0,
-- DURATION TEXT (countdown) -- mirrors the Aura Bars' duration-text options.
showDuration = false,
durationFont = "2002 Bold",
durationFontSize = 18,
durationColor = { r = 1, g = 1, b = 1, a = 1 },
durationOutline = "THICKOUTLINE",
durationShadow = false,
durationDecimals = 1,
durationAnchor = "CENTER",
durationAnchorOffsetX = 0,
durationAnchorOffsetY = 0,
durationTextStrata = "HIGH",
durationTextLevel = 13,
},
behavior = {
hideWhen = {}, -- shared "Hide When..." conditions (same evaluator as the Aura Bars)
hideLogic = "any", -- "any" = hide if ANY condition met; "all" = only if ALL met
hideWhenAlpha = 0, -- opacity when a hide condition is active (0 = fully hidden)
showOnSpec = 0, -- spec restriction lives in the catalog row now; runtime gate stays
showOnSpecs = {},
},
},
},
-- ===============================================================
-- RESOURCE BARS (Primary AND Secondary resources with threshold color layers)
-- v2.6.0: Added resourceCategory, secondaryType for secondary resource support
-- ===============================================================
resourceBars = {
[1] = {
tracking = {
enabled = false,
resourceCategory = "primary", -- "primary" or "secondary"
powerType = 0, -- For primary resources (Enum.PowerType)
secondaryType = nil, -- "comboPoints", "holyPower", "chi", "runes", "soulShards", "essence", "arcaneCharges", "stagger", "soulFragments", "soulFragmentsDevourer", "maelstromWeapon", "mana"
powerName = "",
maxValue = 100,
overrideMax = false,
-- Rune-specific settings
showRuneTimer = false, -- Show time until next rune ready
},
thresholds = {
{ enabled = true, minValue = 0, maxValue = 100, color = {r=0, g=0.8, b=1, a=1} },
{ enabled = false, minValue = 50, maxValue = 100, color = {r=1, g=1, b=0, a=1} },
{ enabled = false, minValue = 80, maxValue = 100, color = {r=0, g=1, b=0, a=1} }
},
abilityThresholds = {},
display = {
enabled = true,
thresholdMode = "simple",
enableMaxColor = false,
maxColor = {r=0, g=1, b=0, a=1},
foldedColor1 = {r=0, g=0.5, b=1, a=1},
foldedColor2 = {r=0, g=1, b=0, a=1},
enableSmoothing = false,
width = 250,
height = 25,
barScale = 1.0,
opacity = 1.0,
texture = "Blizzard",
rotateTexture = false,
fillTextureScale = 1.0,
barOrientation = "horizontal", -- "horizontal" or "vertical"
barReverseFill = false, -- Reverse fill direction
showBackground = true,
backgroundColor = {r=0.1, g=0.1, b=0.1, a=0.9},
showBorder = true,
drawnBorderThickness = 2,
borderColor = {r=0, g=0, b=0, a=1},
showTickMarks = false,
tickMode = "all",
tickThickness = 2,
tickHeightPercent = 100,
tickHeightAnchor = "center",
tickThicknessAnchor = "center",
tickColor = {r=1, g=1, b=1, a=0.8},
showText = true,
textFormat = "value", -- "value" or "percent"
font = "Friz Quadrata TT",
fontSize = 20,
textColor = {r=1, g=1, b=1, a=1},
textAnchor = "OUTERTOP",
textAnchorOffsetX = 0,
textAnchorOffsetY = 0,
barMovable = true,
textMovable = true,
textLocked = true,
barPosition = {
point = "CENTER",
relPoint = "CENTER",
x = 0,
y = -100
},
textPosition = {
point = "CENTER",
relPoint = "CENTER",
x = 0,
y = -70
},
-- Frame strata settings
barFrameStrata = "MEDIUM",
barFrameLevel = 10,
-- Text color thresholds (resource bars only; all off by default)
textColorThresholdEnabled = false,
textColorThresholdFill = false,
textColorThresholdBaseColor = {r=1, g=1, b=1, a=1},
textColorThresholdT1Enabled = false,
textColorThresholdT1Value = 15,
textColorThresholdT1Color = {r=1, g=0.6, b=0.8, a=1},
textColorThresholdT2Enabled = false,
textColorThresholdT2Value = 30,
textColorThresholdT2Color = {r=0.5, g=1, b=0.5, a=1},
textColorThresholdT3Enabled = false,
textColorThresholdT3Value = 90,
textColorThresholdT3Color = {r=1, g=0.3, b=0.3, a=1},
textColorThresholdT4Enabled = false,
textColorThresholdT4Value = 100,
textColorThresholdT4Color = {r=1, g=1, b=0.3, a=1},
},
behavior = {
hideOutOfCombat = false,
hideWhenFull = false,
hideWhenEmpty = false,
hideBlizzardFrame = false, -- Hide corresponding Blizzard resource frame
showOnSpec = 0,
showOnSpecs = {},
talentConditions = nil,
talentMatchMode = nil,
},
prediction = {
spells = {},
},
}
},
-- ===============================================================
-- COOLDOWN BARS (Charge-based ability tracking)
-- Structure mirrors buff bars for Appearance panel compatibility
-- ===============================================================
cooldownBars = {
[1] = {
tracking = {
enabled = false,
cooldownID = 0,
spellID = 0,
spellName = "",
buffName = "", -- Alias for spellName (display compatibility)
iconTextureID = 0,
maxStacks = 3, -- Max charges
trackType = "charge",
},
display = {
enabled = true,
displayType = "bar", -- "bar" or "icon"
-- Size
width = 200,
height = 20,
barScale = 1.0,
opacity = 1.0,
-- Icon Mode Settings
iconSize = 48,
iconShowTexture = true,
iconShowStacks = true,
iconStackAnchor = "TOPRIGHT",
iconStackPosition = nil,
iconStackFont = "2002 Bold",
iconStackFontSize = 16,
iconStackColor = {r=1, g=1, b=1, a=1},
iconStackOutline = "THICKOUTLINE",
iconStackShadow = false,
iconShowBorder = true,
iconBorderColor = {r=0, g=0, b=0, a=1},
-- Texture and fill
texture = "Blizzard",
rotateTexture = false,
fillTextureScale = 1.0,
barOrientation = "horizontal", -- "horizontal" or "vertical"
barReverseFill = false, -- Reverse fill direction
-- Colors
useGradient = false,
barColor = {r=0.2, g=0.8, b=1, a=1},
thresholdMode = "simple",
enableMaxColor = false,
maxColor = {r=0, g=1, b=0, a=1},
-- Background
showBackground = true,
backgroundColor = {r=0.2, g=0.2, b=0.2, a=0.8},
-- Border
showBorder = true,
borderStyle = "Drawn",
drawnBorderThickness = 2,
borderColor = {r=0, g=0, b=0, a=1},
-- Tick marks
showTickMarks = true,
tickMode = "all",
tickThickness = 1,
tickHeightPercent = 100,
tickHeightAnchor = "center",
tickThicknessAnchor = "center",
tickColor = {r=0, g=0, b=0, a=1},
-- Stack/Charge Text
showText = true,
font = "2002 Bold",
fontSize = 18,
textColor = {r=1, g=1, b=1, a=1},
textOutline = "THICKOUTLINE",
textShadow = false,
textAnchor = "CENTER",
textAnchorOffsetX = 0,
textAnchorOffsetY = 0,
-- Bar Icon
showBarIcon = true,
barIconSize = 20,
barIconAnchor = "LEFT",
barIconAnchorOffsetX = 0,
barIconAnchorOffsetY = 0,
barIconShowBorder = true,
barIconBorderColor = {r=0, g=0, b=0, a=1},
-- Position
barMovable = true,
textMovable = true,
textLocked = true,
barPosition = {
point = "CENTER",
relPoint = "CENTER",
x = 0,
y = -200
},
textPosition = {
point = "CENTER",
relPoint = "CENTER",
x = 0,
y = -170
},
iconPosition = {
point = "CENTER",
relPoint = "CENTER",
x = 0,
y = -200
},
-- Frame strata settings
barFrameStrata = "MEDIUM",
barFrameLevel = 10,
},
behavior = {
hideOutOfCombat = false,
hideWhenFull = false,
hideWhenZero = false,
showOnSpec = 0,
showOnSpecs = {},
talentConditions = nil,
talentMatchMode = nil,
},
thresholds = {
[1] = { enabled = true, minValue = 0, maxValue = 3, color = {r=0.2, g=0.8, b=1, a=1} },
[2] = { enabled = false, minValue = 2, maxValue = 3, color = {r=1, g=1, b=0, a=1} },
[3] = { enabled = false, minValue = 3, maxValue = 3, color = {r=0, g=1, b=0, a=1} }
},
stackColors = {},
colorRanges = {
[1] = { from = 1, to = 1, color = {r=0.2, g=0.8, b=1, a=1} },
[2] = { enabled = false, from = 2, to = 2, color = {r=1, g=1, b=0, a=1} },
[3] = { enabled = false, from = 3, to = 3, color = {r=0, g=1, b=0, a=1} }
}
}
},
-- ===============================================================
-- CASTBAR
-- Multi-instance player castbars (resource-bar style). ["*"] gives every index full
-- defaults; instance 1 is the default bar. castType filters which casts an instance shows.
-- ===============================================================
castbars = {
["*"] = {
enabled = false,
castType = "all", -- "all" | "hardcast" | "channel" | "empower"
width = 250,
height = 20,
barColor = {r=0.2, g=0.8, b=1, a=1}, -- base/fallback; per-type colors live in profiles
-- Conditional (threshold) coloring: bar color changes as the cast nears completion,
-- based on how much is REMAINING (percent by default, or seconds when AsSec).
conditionalColorEnabled = false,
conditionalColorAsSec = false,
colorThresholds = {}, -- array of { enabled, percent (= remaining value), color }
texture = "Blizzard",
opacity = 1.0,
showBackground = true,
backgroundColor = {r=0.1, g=0.1, b=0.1, a=0.9},
showBorder = true,
borderColor = {r=0, g=0, b=0, a=1},
drawnBorderThickness = 2,
showIcon = true,
iconSize = 20,
showText = true,
showTimer = true,
timerFormat = "remaining", -- "remaining" | "elapsed" | "both" (elapsed/total)
font = "2002 Bold",
fontSize = 14,
textColor = {r=1, g=1, b=1, a=1},
textOutline = "THICKOUTLINE",
barMovable = true,
barPosition = {point="CENTER", relPoint="CENTER", x=0, y=0},
barFrameStrata = "MEDIUM",
barFrameLevel = 10,
hideOutOfCombat = false,
hideChannels = false,
empowerSegmentColorsEnabled = false,
empowerStageDividers = true, -- dividers at each empowered stage boundary
empowerDividerPerColor = false, -- color each stage divider with its stage's segment color
empowerMaxStages = 4,
empowerSegmentColors = {
[1] = {r=0.6, g=0.2, b=1.0, a=1},
[2] = {r=0.9, g=0.1, b=0.6, a=1},
[3] = {r=1.0, g=0.3, b=0.1, a=1},
[4] = {r=1.0, g=0.7, b=0.1, a=1},
[5] = {r=0.1, g=0.9, b=0.3, a=1},
[6] = {r=0.1, g=0.7, b=1.0, a=1},
[7] = {r=1.0, g=1.0, b=0.2, a=1},
[8] = {r=0.8, g=0.8, b=0.8, a=1},
},
-- Uninterruptible cast styling
uninterruptibleEnabled = false,
uninterruptibleColor = {r=0.5, g=0.5, b=0.5, a=1},
uninterruptibleBorderColor = {r=0.3, g=0.3, b=0.5, a=1},
-- Channel tick marks (aura-bar style: Per % interval or Custom positions)
tickMarksEnabled = false,
tickShowOn = "channels", -- "channels" | "all" (empowered always uses stage segments)
tickMode = "percent", -- "percent" | "custom"
tickPercent = 10, -- Per % mode: a divider every N%
tickCustom = "", -- Custom mode: comma-separated %s, e.g. "20, 40, 55"
tickMarksColor = {r=1, g=1, b=1, a=0.6},
tickMarksThickness = 2,
tickMarksHeightFraction = 1.0,
tickHeightAnchor = "center", -- center | top | bottom
tickThicknessAnchor = "center", -- center | start | end
-- Per-spell appearance overrides: array of {spellID, barColorEnabled, barColor, textureOverrideEnabled, texture, tickCount}
spellOverrides = {},
-- Anchor to CDM group
anchorToGroup = false,
anchorGroupName = "",
anchorPoint = "BOTTOM",
anchorOffsetX = 0,
anchorOffsetY = -2,
matchGroupWidth = false,
matchSlotsOnly = false,
matchWidthAdjust = 0,
-- Reverse fill direction: channels fill instead of drain; casts drain instead of fill
reverseFill = false,
-- Latency "safe zone" overlay at the finishing edge (auto = world latency, or manual ms)
latencyEnabled = false,
latencyManual = false,
latencyManualMs = 100,
latencyColor = {r=1, g=0, b=0, a=0.4},
-- Interrupt / cancel feedback: flash the bar red with a label, then fade out
interruptFeedbackEnabled = false,
interruptColor = {r=1, g=0.15, b=0.15, a=1},
interruptFadeDuration = 1.0,
-- Hide the default Blizzard castbar (PlayerCastingBarFrame)
hideCastBar = false,
-- Spell name shortening (display only; off by default)
spellShortenEnabled = false,
spellShortenLength = 20,
-- Movable spell icon (off = default left-of-bar position)
iconMovable = false,
iconPosition = nil,
-- Cast-type appearance profiles + Auto Share. Checked category = shared across all
-- cast types; unchecked = customised per type. All categories default OFF (per-type),
-- so each cast type has its own colors/border/text/etc. out of the box.
autoShareCategories = {},
profiles = {
hardcast = { barColor = {r=0.2, g=0.8, b=1, a=1} },
channel = { barColor = {r=0.2, g=1, b=0.4, a=1} },
empower = { barColor = {r=0.6, g=0.2, b=1, a=1} },
},
presets = {},
}, -- end ["*"] per-instance template
},
-- LEGACY: CDM Enhancement settings were moved to profile storage
-- This stub exists only for migration purposes (CDMEnhance.lua migrates to profile)
-- DO NOT add new fields here - use profile.cdmEnhance instead
cdmEnhance = nil,
-- ═══════════════════════════════════════════════════════════════════════════
-- COOLDOWN BAR SETUP (ArcUI_CooldownBars.lua active bar tracking)
-- Stores which spells have bars created (spellID lists/maps)
-- ═══════════════════════════════════════════════════════════════════════════
cooldownBarSetup = {
activeCooldowns = {}, -- {spellID, spellID, ...} - Duration bars
activeCharges = {}, -- {spellID, spellID, ...} - Charge bars
activeResources = {}, -- {[spellID] = true, ...} - Resource bars
manualSpells = {}, -- {spellID, ...} - Manually added spells
hiddenSpells = {}, -- {[spellID] = true, ...} - Hidden from catalog
},
configVersion = 1
}
}
-- Store presets for easy access
ns.ThresholdPresets = DEFAULT_THRESHOLDS
-- ===================================================================
-- ACCOUNT-WIDE SHARED CASTBAR (opt-in, default OFF)
-- When ns.db.global.castbarShared is true, the castbar accessors (ns.API.GetCastbarStore)
-- return global.castbars instead of the per-character char.castbars, so ONE castbar config
-- applies to every character. global.castbars is its OWN deep copy of the per-instance
-- template, so it never aliases the per-character store and the two stay independent.
-- ===================================================================
ns.DB_DEFAULTS.global.castbarShared = false
ns.DB_DEFAULTS.global.castbarShareLocation = false -- when sharing, keep the bar POSITION per-character unless opted in
ns.DB_DEFAULTS.global.castbarSharedInit = false
ns.DB_DEFAULTS.global.castbars = { ["*"] = CopyTable(ns.DB_DEFAULTS.char.castbars["*"]) }
-- ═══════════════════════════════════════════════════════════════════════════
-- ADVANCED DEBUFFS / EXTERNALS (standalone draggable icon trackers, default off)
-- Per-character (ns.db.char). Ported from contributor PR; UI placement: Debuffs
-- under the Buffs/Debuffs section, Externals top-level for now.
-- ═══════════════════════════════════════════════════════════════════════════
ns.DB_DEFAULTS.char.advancedDebuffs = {
enabled = false,
iconSize = 40,
iconSpacing = 4,
iconsPerRow = 8,
maxRows = 2,
showSwipe = true,
reverseSwipe = true,
showTooltips = true,
growHorizontal = "RIGHT",
growVertical = "DOWN",
borderColorMode = "dispel",
borderColor = { r = 0.8, g = 0.8, b = 0.8, a = 1 },
borderWidth = 2,
borderGlow = false,
glowWidth = 2,
strata = "MEDIUM",
position = { point = "CENTER", relativePoint = "CENTER", x = 0, y = -200, relativeFrame = "UIParent" },
filters = {
PLAYER = false,
RAID = false,
CROWD_CONTROL = false,
RAID_IN_COMBAT = false,
RAID_PLAYER_DISPELLABLE = false,
IMPORTANT = false,
},
hideDebuffs = { bloodlust = false, timeWarp = false, drums = false, timeTrial = false },
}
ns.DB_DEFAULTS.char.advancedExternals = {
enabled = false,
iconSize = 40,
iconSpacing = 4,
iconsPerRow = 8,
maxRows = 1,
showSwipe = true,
reverseSwipe = true,
showTooltips = true,
growHorizontal = "RIGHT",
growVertical = "DOWN",
borderColor = { r = 0.2, g = 0.8, b = 0.2, a = 1 },
borderWidth = 2,
borderGlow = false,
glowWidth = 2,
strata = "MEDIUM",
position = { point = "CENTER", relativePoint = "CENTER", x = 0, y = -260, relativeFrame = "UIParent" },
showBigDefensives = false,
}
-- ===================================================================
-- FOCUS CASTBAR (tracks the focus target's casts)
-- ===================================================================
ns.DB_DEFAULTS.char.focusCastbar = {
enabled = false,
width = 220,
height = 18,
barPosition = { point = "CENTER", relPoint = "CENTER", x = 0, y = -120 },
barAnchorPoint = "CENTER",
anchorToFrame = false,
anchorFrameName = "",
anchorPoint = "CENTER",
anchorRelativePoint = "CENTER",
anchorOffsetX = 0,
anchorOffsetY = 0,
barFrameStrata = "MEDIUM",
barColor = { r = 1, g = 0.65, b = 0, a = 1 },
showBackground = true,
backgroundColor = { r = 0.1, g = 0.1, b = 0.1, a = 0.9 },
showBorder = true,
borderColor = { r = 0, g = 0, b = 0, a = 1 },
drawnBorderThickness = 2,
-- Glow outline defaults ON for a fresh focus castbar (matches the dev's intent);
-- the castbar itself is still opt-in via focusCastbar.enabled = false.
showGlow = true,
glowType = "pixel",
glowColor = { r = 1, g = 0.65, b = 0, a = 1 },
glowWidth = 2,
glowLines = 8,
glowFrequency = 0.25,
showSpellName = true,
spellNameMaxWidth = 0,
showTimer = true,
showCasterName = true,
casterNameColor = { r = 1, g = 0.82, b = 0, a = 1 },
casterNameOffsetX = 0,
casterNameOffsetY = 0,
casterNameAnchor = "RIGHT",
showFocusTarget = false,
focusTargetColor = { r = 0.6, g = 0.8, b = 1, a = 1 },
focusTargetOffsetX = 0,
focusTargetOffsetY = 0,
focusTargetAnchor = "RIGHT",
showRaidMarker = true,
raidMarkerSize = 32,
raidMarkerAnchor = "LEFT",
raidMarkerOffsetX = -36,
raidMarkerOffsetY = 0,
font = "Friz Quadrata TT",
fontSize = 11,
textOutline = "THICKOUTLINE",
textColor = { r = 1, g = 1, b = 1, a = 1 },
texture = "Blizzard",
uninterruptibleEnabled = false,
uninterruptibleColor = { r = 0.5, g = 0.5, b = 0.5, a = 1 },
raidMarkerDefault = 8, -- index shown in preview (moon=8); 0 = off
hideNotInterruptible = false,
hideNotImportant = false, -- opt-in: only show focus casts Blizzard marks important
importantGlowEnabled = false,
importantGlowType = "pixel",
importantGlowColor = { r = 1, g = 0.2, b = 0.2, a = 1 },
importantGlowLines = 8,
importantGlowFrequency = 0.25,
importantGlowThickness = 2,
kickEnabled = false,
kickNotReadyColor = { r = 0.55, g = 0.55, b = 0.55, a = 1 },
kickTickColor = { r = 1, g = 1, b = 1, a = 1 },
holdEnabled = false,
holdDuration = 0.8,
holdSuccessColor = { r = 0.2, g = 1.0, b = 0.2, a = 1 },
holdFailColor = { r = 1.0, g = 0.5, b = 0.0, a = 1 },
holdInterruptedColor = { r = 0.2, g = 0.4, b = 1.0, a = 1 },
}
-- ===================================================================
-- TARGET CASTBAR (tracks the current target's casts; clone of the focus bar)