Skip to content

Commit 8db4a23

Browse files
cscoder69claude
andcommitted
v1.2.2: sound volume, translations, docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent dfbaa6f commit 8db4a23

5 files changed

Lines changed: 86 additions & 15 deletions

File tree

‎CLAUDE.md‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CS.Coder - Quest Indicator — notes for Claude (and any dev)
22

3-
Read this first when working on the addon. Last updated 2026-11-09 (v1.2.1 published).
3+
Read this first when working on the addon. Last updated 2026-11-09 (v1.2.2 published).
44

55
## Working with the user
66
- Chat in **Brazilian Portuguese**; code, comments, commits, docs and in-game text in **English**.
@@ -111,15 +111,15 @@ live in game after `/reload`.
111111
every release.**
112112
- **Profile sharing** (Profiles tab, `OpenShareWindow`): "CQI1:key=bTRUE/nNUM/sTEXT;..." with
113113
%XX escapes; import only takes known keys of the right type into the current profile.
114-
- **v1.2.2 (branch `feature/v1.2.2`, NOT released, waiting for the user's in-game test):**
114+
- **v1.2.2 (released 2026-11-09):**
115115
check mark when done (`doneCheck`, `HideOrComplete`: an icon that stops being needed within
116116
3 s of an objective finishing turns into ReadyCheck-Ready and fades; `questLog.completedAt`),
117117
animated count (`progressPulse`: `f.textPop` when the number goes up, gold with one left),
118118
ready-to-turn-in chat line (`readyAlert`), minimap tooltip summary (`minimapSummary`,
119119
`questLog.summary`), quick themes (Icon section, `THEMES` inside `BuildIconTab`), play button
120120
per row in the sound menu (`AddDropdown(..., preview)`). NEWS_TEXT already says 1.2.2.
121121
The arrow to the nearest quest mob goes in a separate branch later (user: test it apart).
122-
- **UI v2 (branch `feature/ui-v2`, on top of v1.2.2, NOT released; the user tests both together):**
122+
- **UI v2 (released in v1.2.2):**
123123
OneForAll-inspired look (study of OneForAll v6.2.2 on 2026-11-09: flat dark warm panels, thin gold
124124
ring, gold text, switches, gold-filled sliders, browser-style tabs, hover on the HIGHLIGHT layer).
125125
- `Skin` kit (one table): `Panel`, `Window(f, bandHeight)`, `Button`, `Close`, `Switch(check)`,
@@ -132,6 +132,11 @@ live in game after `/reload`.
132132
- The whole options/guide/news section is one `do ... end` block exporting `BuildPanel`,
133133
`ShowWizard`, `ShowNews`; the gate conditions are one table `On` (`On.MobsOn()` ...). About 48
134134
main-chunk locals free after this. A block does not lower the peak inside it: only tables do.
135+
- **Sound volume** (`soundVolume`, 0-100): below 100% `PlaySoundAt` plays on the Dialog channel and
136+
sets `Sound_DialogVolume` for 3 s (original kept in `root.dialogVolume`, restored at login if the
137+
game closed meanwhile). At 100% it plays on Master.
138+
- **Hide in instanced content** (`hideInInstances`, on by default; the user's tester got errors in
139+
dungeons). `UsablePlate(unit)` never returns forbidden plates; plates are measured outside instances only.
135140
- **Badge experiment** (2026-11-09): built, tried in game, user found it ugly and dropped it; the
136141
commits were reverted. Do not bring it back unless asked (maybe with real artwork).
137142
- `/cqi` opens the options, `/cqi toggle` toggles the addon, `/cqi setup` the guide, `/cqi news` what's new, `/cqi plate` measures the target plate.
@@ -171,6 +176,9 @@ whether the mock is missing an API (e.g. it once returned nil for `GetHighlightT
171176
- 1.2.1 (2026-11-09): setup guide, icon anchor, items' own look and count, re-cut icons, new sound
172177
list (picked by ear), hover help, what's new window, profile export/import, welcome line,
173178
restricted-plate fixes. Version numbers: third digit only for now.
179+
- 1.2.2 (2026-11-09): own options window in a OneForAll-like look (Settings keeps a landing page),
180+
check mark when done, animated count, ready alert, minimap summary, quick themes, sound preview
181+
and volume, hide in instanced content (default on), forbidden-plate safety.
174182

175183
## Ideas the user liked, not done yet
176184
- ~~Separate look for mobs vs items~~ DONE in v1.2.1 (`objectOwnLook`).

‎CSCoder_QuestIndicator.lua‎

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ local DEFAULTS = {
5656
readyAlert = true, -- chat line when every objective of a quest is done
5757
minimapSummary = true, -- the minimap button's tooltip lists the open objectives
5858
soundChoice = "coins", -- key in QUEST_SOUNDS
59+
soundVolume = 100, -- its volume in percent
5960
}
6061
-- Saved layout: CSCoderQuestIndicatorDB = { version, language, profiles = { name = settings },
6162
-- chars = { "Name - Realm" = profile name }, savedCVars }.
@@ -714,9 +715,38 @@ local objectiveStates = {} -- questID -> { [objective index] = finished }, to he
714715
local QUEST_SOUNDS = { coins = 120, auction = 5274, auctionclose = 1204, worldquest = 44295, bell = 6674, questlog = 875, quest = 878 }
715716
local QUEST_SOUND_ORDER = { "coins", "auction", "auctionclose", "worldquest", "bell", "questlog", "quest" }
716717

718+
-- Plays a sound at the chosen volume. The game has no volume per sound, only per channel: at
719+
-- 100% it plays on Master as before; below, it plays on the Dialog channel, whose volume is set
720+
-- for a moment and put back 3 s after the last sound (also at the next login, if the game was
721+
-- closed meanwhile: root.dialogVolume).
722+
local PlaySoundAt
723+
do
724+
local pending -- the latest sound waiting to restore the volume
725+
function PlaySoundAt(id)
726+
if not (PlaySound and id) then return end
727+
local volume = (tonumber(db.soundVolume) or 100) / 100
728+
local canSet = C_CVar and C_CVar.GetCVar and C_CVar.SetCVar
729+
local dialogOn = canSet and tostring(C_CVar.GetCVar("Sound_EnableDialog")) ~= "0"
730+
if volume >= 0.995 or not dialogOn then
731+
pcall(PlaySound, id, "Master")
732+
return
733+
end
734+
if volume <= 0 then return end
735+
if root.dialogVolume == nil then root.dialogVolume = C_CVar.GetCVar("Sound_DialogVolume") end
736+
pcall(C_CVar.SetCVar, "Sound_DialogVolume", volume)
737+
pcall(PlaySound, id, "Dialog")
738+
local token = {}
739+
pending = token
740+
C_Timer.After(3, function()
741+
if pending ~= token or root.dialogVolume == nil then return end
742+
pcall(C_CVar.SetCVar, "Sound_DialogVolume", root.dialogVolume)
743+
root.dialogVolume = nil
744+
end)
745+
end
746+
end
747+
717748
local function PlayQuestSound()
718-
local id = QUEST_SOUNDS[db.soundChoice] or QUEST_SOUNDS[DEFAULTS.soundChoice]
719-
if PlaySound then pcall(PlaySound, id, "Master") end
749+
PlaySoundAt(QUEST_SOUNDS[db.soundChoice] or QUEST_SOUNDS[DEFAULTS.soundChoice])
720750
end
721751

722752
local RebuildObjectiveTexts
@@ -1913,7 +1943,7 @@ local ICON_KEYS = { "style", "bounce", "bounceHeight", "bounceSpeed", "glow", "g
19131943
local PROGRESS_KEYS = { "progress", "objectProgress", "progressPulse", "progressAttach", "progressFloat", "progressSize", "progressFont",
19141944
"progressOutline", "progressColor", "progressFormat", "progressShadow", "progressX", "progressY" }
19151945
local BEHAVIOR_KEYS = { "colorByType", "combat", "minimap", "minimapAngle", "sound", "soundChoice",
1916-
"hideInInstances", "doneCheck", "readyAlert", "minimapSummary" }
1946+
"soundVolume", "hideInInstances", "doneCheck", "readyAlert", "minimapSummary" }
19171947

19181948
local function ResetKeys(keys)
19191949
for _, key in ipairs(keys) do db[key] = DEFAULTS[key] end
@@ -2101,19 +2131,20 @@ local function BuildBehaviorTab(tab)
21012131
function() return db.soundChoice end,
21022132
function(value) db.soundChoice = value; PlayQuestSound() end,
21032133
COL2 + 4, TOP - 104, 140, nil,
2104-
function(value) if PlaySound then pcall(PlaySound, QUEST_SOUNDS[value], "Master") end end))
2134+
function(value) PlaySoundAt(QUEST_SOUNDS[value]) end))
21052135
local test = Skin.Button(tab)
21062136
test:SetSize(70, 22)
21072137
test:SetPoint("TOPLEFT", COL2 + 152, TOP - 123)
21082138
Loc(test, "SOUND_TEST")
21092139
test:SetScript("OnClick", PlayQuestSound)
21102140
Gate(SoundOn, test)
2141+
Gate(SoundOn, AddSlider(tab, "SOUND_VOLUME", "soundVolume", 0, 100, 5, COL2 + 4, TOP - 160, "%d"))
21112142

21122143
GateCheck(On.AnyIconOn, AddCheck(tab, "DONE_CHECK", "DONE_CHECK_TIP", "doneCheck", COL1, TOP - 160))
21132144
GateCheck(On.AddonOn, AddCheck(tab, "READY_ALERT", "READY_ALERT_TIP", "readyAlert", COL1, TOP - 208))
21142145
GateCheck(function() return db.minimap end,
2115-
AddCheck(tab, "MINIMAP_SUMMARY", "MINIMAP_SUMMARY_TIP", "minimapSummary", COL2, TOP - 160))
2116-
GateCheck(On.AnyIconOn, AddCheck(tab, "HIDE_INSTANCES", "HIDE_INSTANCES_TIP", "hideInInstances", COL2, TOP - 208))
2146+
AddCheck(tab, "MINIMAP_SUMMARY", "MINIMAP_SUMMARY_TIP", "minimapSummary", COL2, TOP - 210))
2147+
GateCheck(On.AnyIconOn, AddCheck(tab, "HIDE_INSTANCES", "HIDE_INSTANCES_TIP", "hideInInstances", COL2, TOP - 258))
21172148
end
21182149

21192150
-- Profiles tab in the Ace3 layout players know from RareScanner and many others: intro, reset,
@@ -2335,7 +2366,7 @@ local SETTINGS_SECTIONS = {
23352366
{ key = "TAB_DISPLAY", build = BuildDisplayTab, height = 258 },
23362367
{ key = "TAB_ICON", build = BuildIconTab, height = 312 },
23372368
{ key = "TAB_PROGRESS", build = BuildProgressTab, height = 340 },
2338-
{ key = "TAB_BEHAVIOR", build = BuildBehaviorTab, height = 262 },
2369+
{ key = "TAB_BEHAVIOR", build = BuildBehaviorTab, height = 316 },
23392370
}
23402371
local SECTION_GAP = 18
23412372
local CONTENT_WIDTH = 600 -- until the scroll frame reports its real width
@@ -2989,6 +3020,10 @@ events:SetScript("OnEvent", function(_, event, arg1)
29893020
RefreshSoftObject()
29903021
elseif event == "PLAYER_LOGIN" then
29913022
ResolveCharacter() -- the character name is certain by now
3023+
if root.dialogVolume ~= nil and C_CVar and C_CVar.SetCVar then
3024+
pcall(C_CVar.SetCVar, "Sound_DialogVolume", root.dialogVolume)
3025+
root.dialogVolume = nil
3026+
end
29923027
print(string.format(L.WELCOME, "|cffffd200" .. TITLE .. "|r", AddonVersion(), "|cff00ff00/cqi|r"))
29933028
-- First time on this character: the setup guide, once the loading screen is gone.
29943029
-- After an update: what's new, once (not in a dev copy, whose version is "dev").

‎Locales.lua‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,3 +1202,18 @@ local news122b = {
12021202
itIT = "|cffffd200•|r Nuovo aspetto: le opzioni si aprono in una finestra tutta loro, con interruttori, pulsanti e cursori dorati.\n|cffffd200•|r Una spunta verde quando un nemico non serve più.\n|cffffd200•|r Il contatore pulsa quando sale e diventa dorato quando ne manca uno.\n|cffffd200•|r Una riga in chat quando una missione è pronta da consegnare.\n|cffffd200•|r Passa il mouse sul pulsante della minimappa per vedere cosa manca in ogni missione.\n|cffffd200•|r Temi rapidi: Classico, Discreto e Vistoso.\n|cffffd200•|r Un pulsante per ascoltare ogni suono nel menu.\n|cffffd200•|r Le icone si nascondono in spedizioni e incursioni.\n\nOgnuno si può disattivare nelle opzioni.",
12031203
}
12041204
for code, text in pairs(news122b) do locales[code].NEWS_TEXT = text end
1205+
1206+
-- Sound volume, and its line in what's new.
1207+
local volume = {
1208+
enUS = { "Volume", "How loud the objective sound plays. Below 100% it plays on the game's Dialog channel.", "A volume slider for the objective sound." },
1209+
ptBR = { "Volume", "O volume do som do objetivo. Abaixo de 100% ele toca no canal de Diálogo do jogo.", "Uma barra de volume para o som do objetivo." },
1210+
esES = { "Volumen", "Lo fuerte que suena el sonido del objetivo. Por debajo del 100% suena en el canal de Diálogo del juego.", "Una barra de volumen para el sonido del objetivo." },
1211+
deDE = { "Lautstärke", "Wie laut der Zielton spielt. Unter 100% spielt er im Dialogkanal des Spiels.", "Ein Lautstärkeregler für den Zielton." },
1212+
frFR = { "Volume", "Le volume du son d'objectif. En dessous de 100 %, il joue sur le canal Dialogue du jeu.", "Un curseur de volume pour le son d'objectif." },
1213+
itIT = { "Volume", "Quanto è forte il suono dell'obiettivo. Sotto il 100% suona sul canale Dialoghi del gioco.", "Un cursore del volume per il suono dell'obiettivo." },
1214+
}
1215+
for code, texts in pairs(volume) do
1216+
local l = locales[code]
1217+
l.SOUND_VOLUME, l.TIP_SOUND_VOLUME = texts[1], texts[2]
1218+
if l.NEWS_TEXT then l.NEWS_TEXT = l.NEWS_TEXT:gsub("\n\n", "\n|cffffd200•|r " .. texts[3] .. "\n\n", 1) end
1219+
end

‎README.md‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,27 @@ A floating, animated **"!"** over the mobs and items you still need for your que
66

77
## Features
88

9+
- **Its own options window**, in a clean dark-and-gold look: switches, sliders with typed values, menus and a live preview. Open it with /cqi or the minimap button.
910
- **Setup guide:** new characters get a short guide: start with the defaults, or pick your icon, size, position and what to show, with a live preview.
1011
- **Quest mobs:** a "!" floats above the nameplate of every mob you still need for an active quest. It disappears once the objective is done.
1112
- **Quest items:** herbs, crates, sprouts and other quest items on the ground get a "!" too, on the nearest one in front of you.
1213
- **37 icons in 3 categories:** Standard (quests), Themed and States / Priority, picked from a window that shows each category.
1314

1415
![Icon styles](media/icon_styles.png)
15-
- **Quest progress:** the objective count ("8/12") next to each quest mob, glued to the icon or placed on its own, with its own size, font, outline and color. It can show on quest items too.
16-
- **Sound when an objective completes**, with a choice of sounds.
16+
- **Quest progress:** the objective count ("8/12") next to each quest mob, glued to the icon or placed on its own, with its own size, font, outline and color. It can show on quest items too, pulses when it goes up and turns gold when one is left.
17+
- **Check mark when done:** mobs you no longer need show a green check mark before their icon goes.
18+
- **Ready to turn in:** a chat line when every objective of a quest is done.
19+
- **Sound when an objective completes**, with a choice of sounds (hear each one in the menu) and its own volume.
1720
- **Color by quest type:** daily and repeatable quests in blue, group and elite quests in red.
1821
- **Float and glow:** adjustable float height and duration, optional glow with adjustable intensity.
1922
- **Size and position:** size, anchor (top, bottom, left or right of the nameplate) and X/Y for mobs and items; type exact values or use the sliders.
2023
- **Own look for quest items:** their own icon, float and glow, if you like.
21-
- **In combat:** keep, fade or hide the icons.
24+
- **In combat:** keep, fade or hide the icons. **Hidden in instanced content** (dungeons and raids) by default.
25+
- **Quick themes:** Classic, Subtle or Flashy in one click.
2226
- **Live preview** in its own small window, sized like your real nameplates.
2327
- **Profiles:** create, copy, reset and delete; each character remembers its profile. Export a profile as text and import it on another PC or from a friend.
2428
- **Help on hover** for the options, and a short "what's new" after each update.
25-
- **Minimap button:** left-click opens the options, right-click turns the addon on or off, drag to move.
29+
- **Minimap button:** hover for a summary of what is left of each quest; left-click opens the options, right-click turns the addon on or off, drag to move.
2630
- **Languages:** English, Português (Brasil), Español, Deutsch, Français, Italiano. Other game languages use English.
2731

2832
## How to use

‎tools/wowmock.lua‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,21 @@ do
160160
env.print = function(text) printed[#printed + 1] = tostring(text) end
161161
env.PlaySound = function() sounds = sounds + 1 end
162162
try("quest scan 1", eventFrame._scripts.OnEvent, eventFrame, "QUEST_LOG_UPDATE")
163-
local summary = 0
163+
-- At 50% the sound plays on the Dialog channel, whose volume is set and then put back.
164+
profile.soundVolume = 50
165+
local cvars, channel = { Sound_EnableDialog = "1", Sound_DialogVolume = "0.8" }, nil
166+
local getCVar, setCVar = env.C_CVar.GetCVar, env.C_CVar.SetCVar
167+
env.C_CVar.GetCVar = function(name) return cvars[name] or "0" end
168+
env.C_CVar.SetCVar = function(name, value) cvars[name] = tostring(value) end
169+
env.PlaySound = function(_, ch) sounds = sounds + 1; channel = ch end
164170
finished = true
165171
try("quest scan 2", eventFrame._scripts.OnEvent, eventFrame, "QUEST_LOG_UPDATE")
166172
local ready = false
167173
for _, line in ipairs(printed) do if line:find("The Kobold Threat", 1, true) then ready = true end end
168174
print("quest: sound played", sounds > 0, "| ready announced", ready)
175+
print("quest: volume 50% on", channel, "| dialog volume back to", cvars.Sound_DialogVolume, "| pending", saved.dialogVolume)
176+
env.C_CVar.GetCVar, env.C_CVar.SetCVar = getCVar, setCVar
177+
profile.soundVolume = 100
169178

170179
-- A quest mob on a nameplate: needed (icon), then not needed right after the objective
171180
-- finished -> its icon turns into the check mark instead of vanishing.

0 commit comments

Comments
 (0)