|
1 | 1 | # CS.Coder - Quest Indicator — notes for Claude (and any dev) |
2 | 2 |
|
3 | | -Read this first when working on the addon. Last updated 2026-11-10 (v1.2.3 published). |
| 3 | +Read this first when working on the addon. Last updated 2026-11-11 (v1.2.4 published). |
4 | 4 |
|
5 | 5 | ## Working with the user |
6 | 6 | - Chat in **Brazilian Portuguese**; code, comments, commits, docs and in-game text in **English**. |
@@ -30,7 +30,9 @@ a Classic base with modern APIs (C_NamePlate, C_TooltipInfo, C_QuestLog, Setting |
30 | 30 |
|
31 | 31 | Install: the source folder lives in `D:\Games\CS.Coder\WoW Addons\CSCoder_QuestIndicator\` and is a |
32 | 32 | **junction** inside `D:\Games\Battlenet\World of Warcraft\_forever_\Interface\AddOns\`, so edits are |
33 | | -live in game after `/reload`. |
| 33 | +live in game after `/reload`. Second dev PC (notebook, set up 2026-11-11): source in |
| 34 | +`G:\Games\CS.Coder\WoW\CSCoder_QuestIndicator\`, game in `G:\Games\Battlenet\World of Warcraft\_forever_\` |
| 35 | +(same junction). Git/gh/LuaJIT installed with winget; LuaJIT at the same path as below. |
34 | 36 |
|
35 | 37 | ## Code map (CSCoder_QuestIndicator.lua) |
36 | 38 | - **Settings:** `DEFAULTS` = per-profile settings. Saved layout: |
@@ -135,8 +137,47 @@ live in game after `/reload`. |
135 | 137 | - **Sound volume** (`soundVolume`, 0-100): below 100% `PlaySoundAt` plays on the Dialog channel and |
136 | 138 | sets `Sound_DialogVolume` for 3 s (original kept in `root.dialogVolume`, restored at login if the |
137 | 139 | 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. |
| 140 | +- **Instances: always off, not an option (since 2026-11-11, user's decision).** WoW Forever makes |
| 141 | + nameplates forbidden and unit/tooltip data *secret* inside instances; Questie switches its nameplate |
| 142 | + icons off there too (`Questie.IsForever and IsInInstance()`). `InstanceHidden()` = any instance. |
| 143 | + The old `hideInInstances` switch is gone; the Behavior section shows a note with an info icon whose |
| 144 | + tooltip (`HIDE_INSTANCES_TIP`) says it is the game's limit. `UsablePlate(unit)` never returns |
| 145 | + forbidden plates; plates are measured outside instances only. |
| 146 | +- **Secret values** (`Hidden.Value`, `Hidden.Table`, `Hidden.UNKNOWN`): Forever can hide values from |
| 147 | + addons (`issecretvalue`); in the open world a quest object's tooltip turns secret in combat. Secrets |
| 148 | + can't be compared/searched/used as keys, so detection tests them first and answers `Hidden.UNKNOWN`; |
| 149 | + `Refresh`/`RefreshSoftObject` then leave the icon as it was. |
| 150 | +- **Questie as a helper (2026-11-11, user: "auxiliar, não substituir"):** `questLog.FromQuestie(unit)` |
| 151 | + reads `QuestieTooltips.lookupByKey["m_"..npcId / "o_"..objectId]` (unfinished objectives of quests |
| 152 | + in our log, count from `Collected/Needed`). Asked only where the game leaves a gap: the game says |
| 153 | + related but the tooltip shows nothing open (after the quest-log name lookup), and the no-API / |
| 154 | + no-tooltip fallbacks. A "no" from the game is never overruled. Only when Questie is LOADED (the |
| 155 | + user has it installed but disabled on their main character). Everything pcall'd; mock covers |
| 156 | + disabled / loaded / game's no / broken Questie. |
| 157 | +- **Hide while fighting it** (`hideWhileFighting`, OFF by default, user's request 2026-11-11): in |
| 158 | + `Refresh`, a needed mob with `UnitThreatSituation("player", unit) ~= nil` loses its icon (plain |
| 159 | + `HideIcon`, no check mark). `UNIT_THREAT_LIST_UPDATE` and `PLAYER_REGEN_ENABLED` (now `RefreshAll`) |
| 160 | + bring it back at once when it survives. Behavior section (COL1, below Ready alert) and the setup |
| 161 | + guide's page 4 "Combat and warnings". Side effect: a mob killed while hidden shows no check mark. |
| 162 | +- **Level alert** (`highLevelRed`, ON by default, 2026-11-11; labels renamed by the user: "Alerta de |
| 163 | + nível", "Ocultar durante a luta", "Indisponível em instâncias", guide page "Extras"): a quest 2+ |
| 164 | + levels above the player tints the icon `KIND_TINT.high[gap]`, one clearly different shade per level |
| 165 | + (user's spec): +2 light red, +3 red, +4 or more full red; over any other tint. Levels come from |
| 166 | + the quest log (`quests.levelByTitle/levelByID`, filled in `RebuildQuestTitles`); detection returns |
| 167 | + a 4th value `level` (`questLog.FromTitle/FromName/FromQuestie`) -> `ShowIcon(..., level)` -> |
| 168 | + `f.questLevel`. `PLAYER_LEVEL_UP` restyles (`ApplyLook` after 1 s). Mobs marked without a known |
| 169 | + quest get no level. Behavior section (COL1, under Hide while fighting) and the setup guide's new |
| 170 | + page 4 "Combat and warnings" (`WIZ_EXTRA_*`, both options; "What to show" is back to 5 checks). |
| 171 | +- **Party rows:** in a group the tooltip lists each member's objectives under a `QuestPlayer` row; |
| 172 | + `QuestStateFromLines` skips rows whose guid isn't the player's. |
| 173 | +- **Performance (2026-11-11):** quest-log events are batched (`later.questLog`, 0.1 s, one rebuild |
| 174 | + per burst; `UNIT_QUEST_LOG_CHANGED` registered for "player" only), the quest-item check is one per |
| 175 | + frame (`QueueSoft`), sliders call `ApplyLook` (look only) instead of `ApplySettings`, `CVAR_UPDATE` |
| 176 | + ignores our own writes and stops after 20 re-applies in 10 s (`cvarGuard`), the bobber skips |
| 177 | + hidden/completing icons and doesn't re-anchor the label, the 1 s recheck idles when the addon is off, |
| 178 | + pooled icons `ClearAllPoints`. The main chunk is AT the 200-locals limit again: new main-chunk |
| 179 | + helpers must go into existing tables (`questLog.FromName`, `cvarGuard.gateOpened`, `Hidden`) or |
| 180 | + `do ... end` blocks. |
140 | 181 | - **Bug reports (v1.2.3, released 2026-11-10):** `/cqi debug` (`ShowDebug`: versions, client, language, main switches, |
141 | 182 | instance, plate cvars, other quest/nameplate addons, last errors) and a "Report a bug" button |
142 | 183 | (issues URL), both in the copy window (`OpenShareWindow("copy", title, hint, text)`). Errors that |
@@ -196,11 +237,28 @@ whether the mock is missing an API (e.g. it once returned nil for `GetHighlightT |
196 | 237 | and volume, hide in instanced content (default on), forbidden-plate safety. |
197 | 238 | - 1.2.3 (2026-11-10): two quests on one mob keep the mark, /cqi debug + Report a bug, error |
198 | 239 | capture, name lookups cached per quest log scan, CHANGELOG.md for CurseForge, release check job. |
| 240 | +- 1.2.4 (2026-11-11, first release from the second notebook): level alert (red shades), hide during |
| 241 | + the fight, Questie as a helper, instances always off (game's limit, info note), Extras guide page, |
| 242 | + party-objective and secret-value fixes, event batching and other performance work. |
| 243 | + |
| 244 | +## URGENT — next task (user, 2026-11-11) |
| 245 | +- New settings tab **"Gameplay"** (a third tab next to Settings and Profiles) with **automatic quest |
| 246 | + pickup**: when you talk to an NPC that has quests to give, accept all of them automatically. |
| 247 | + Alternative/extra the user mentioned: a small button in the corner of the NPC's quest window |
| 248 | + (gossip / quest greeting frame) that accepts all available quests with one click. |
| 249 | + Notes for building it: events GOSSIP_SHOW / QUEST_GREETING / QUEST_DETAIL; available quests via |
| 250 | + C_GossipInfo.GetAvailableQuests (or GetNumAvailableQuests / SelectAvailableQuest on greeting frames), |
| 251 | + AcceptQuest() on QUEST_DETAIL; skip when a modifier key is held; don't fight Questie's own |
| 252 | + auto-accept if it is on; mind repeatable/daily and quests that cost something. Ask the user for |
| 253 | + short option names first (see memory: short labels). |
199 | 254 |
|
200 | 255 | ## Ideas the user liked, not done yet |
| 256 | +- **From the Questie comparison (2026-11-11), not built yet:** icon by objective type (kill / loot / |
| 257 | + interact, from `C_QuestLog.GetQuestObjectives` `type`), skip non-Creature GUIDs before the tooltip. |
| 258 | + Also left for later: build the options window on first open instead of at load (`BuildPanel`). |
201 | 259 | - **Ideas noted 2026-11-10 (user: "anota mas não execute"):** special glow when a quest has one |
202 | | - objective left; reddish warning for quests well above your level; hide a mob's icon while you |
203 | | - fight it (back if you leave combat without killing it); ground glow around quest items; search |
| 260 | + objective left; ~~reddish warning for quests well above your level~~ (DONE 2026-11-11); ~~hide a mob's icon while you |
| 261 | + fight it~~ (DONE 2026-11-11); ground glow around quest items; search |
204 | 262 | box in the options; preview scenarios (daily, group, almost done, combat); undo the last change; |
205 | 263 | all counts on a mob shared by several quests ("2/8 · 1/5"); translation help link on CurseForge. |
206 | 264 | - **Ideas reviewed with the user on 2026-11-09 (after v1.2.2):** |
|
0 commit comments