From cac6e8814530fa63feaa50f120087c46cd8d7a2c Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 2 Sep 2026 17:02:34 +0700 Subject: [PATCH] settings boot at 1.12's defaults, and a cold loot no longer errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - a setting's default is the reference's, enforced: eight player-facing options booted at something a stock client does not — `UnitNameNPC`, `UnitNameOwn`, `nameplateShowEnemies`, `ChatBubblesParty`, `cameraDistanceMaxFactor`, `QUEST_FADING_DISABLE`, `SHOW_BUFF_DURATIONS`, `SHOW_COMBAT_TEXT` — each a defensible "turn this on so I can see it while you build it" on its day and invisible as a set; the CVar table grows a mandatory `Reference` column (Same / Overridden / Deviates-with-reason) that a test checks in both directions, the FrameXML saved-variable store is compared against the reference's own `UIOptionsFrame.lua` off the chain (which found `SHOW_COMBAT_TEXT`, declared inside a table walked by a loop where a grep could not see it), and the wow-re census of all 214 `CVar::Register` sites folded in — `WorldDetail` back to `same`, since `GetWorldDetail` reads only `SmallCull` and the reference's own slider reads Medium at boot - looting on a cold item cache raised `LootFrame.lua:85: attempt to index local 'color'` out of the stock window: `GetLootSlotInfo` answered nil where the reference answers cache-miss SENTINELS — quality −1 (which is exactly why stock `UIParent.lua` builds `ITEM_QUALITY_COLORS` over `for i = -1, 6`), "" for a name in flight, `INV_Misc_QuestionMark` for a display-info miss — and four values on every leg (`mov eax,4` at `0x4c2d07` is unconditional); `GetLootRollItemInfo` takes its own miss tail (`nil, nil, 1.0, 1.0, nil`), `GetItemQualityColor(-1)` reads Common because the compare is unsigned, and the window now WAITS for every item template before opening as `0x4c1cb0` does — there is no repaint path in 1.12 to fall back on, so deferring IS the mechanism - the coin row is quality 0 (grey), not white — `0x4c23a0`'s coin leg falls to `xor eax,eax` before the item-cache read — and its icon walks the reference's six-step ladder (`0x6c6307`: one icon per decade of copper; two of the six were not in our set at all, and the pairs do not fall where "highest nonzero denomination" put them) Co-Authored-By: Claude Fable 5.1 --- crates/benilla-app/assets/ui/CombatText.xml | 16 +- crates/benilla-app/assets/ui/Fonts.xml | 7 +- .../benilla-app/assets/ui/GroupLootFrame.xml | 11 +- crates/benilla-app/assets/ui/OptionsFrame.xml | 19 +- crates/benilla-app/assets/ui/QuestFrame.xml | 39 +- crates/benilla-app/src/addon_harness/mod.rs | 2 +- crates/benilla-app/src/capture/fixtures.rs | 12 +- crates/benilla-app/src/chat_bubble.rs | 53 +- crates/benilla-app/src/cvars.rs | 624 ++++++++++++++---- crates/benilla-app/src/nameplates.rs | 29 +- crates/benilla-app/src/player/camera.rs | 37 +- crates/benilla-app/src/player/camera_view.rs | 4 +- crates/benilla-app/src/ui_loot.rs | 222 ++++++- .../benilla-app/src/ui_script/buff_tests.rs | 22 +- .../src/ui_script/combat_text_tests.rs | 33 +- .../src/ui_script/group_loot_tests.rs | 52 ++ .../benilla-app/src/ui_script/loot_tests.rs | 119 ++++ .../src/ui_script/options_tests.rs | 307 ++++++--- .../src/ui_script/pet_bar_tests.rs | 2 +- .../benilla-app/src/ui_script/quest_tests.rs | 21 +- .../benilla-app/src/ui_script/quiver_tests.rs | 2 +- .../benilla-app/src/ui_script/reference_ui.rs | 99 +++ .../src/ui_script/tooltip_anchor_tests.rs | 6 +- crates/benilla-app/src/vplates.rs | 61 +- crates/benilla-ui/src/script/item_stats.rs | 34 +- crates/benilla-ui/src/script/loot.rs | 153 +++-- crates/benilla-ui/src/script/loot_roll.rs | 59 +- 27 files changed, 1611 insertions(+), 434 deletions(-) diff --git a/crates/benilla-app/assets/ui/CombatText.xml b/crates/benilla-app/assets/ui/CombatText.xml index 384a1e09..d635b0a0 100644 --- a/crates/benilla-app/assets/ui/CombatText.xml +++ b/crates/benilla-app/assets/ui/CombatText.xml @@ -11,8 +11,10 @@ frame registers. Where our behaviour departs from the spec, it is named: - The ref is load-on-demand (`UIParentLoadAddOn` when SHOW_COMBAT_TEXT == "1"); we load always and let CombatText_UpdateDisplayedMessages gate registration, ref-identically. - - SHOW_COMBAT_TEXT defaults "1" here (ref "0") — the director's ask IS the enabled - experience; every sub-toggle keeps its ref default (UIOptionsFrame.lua l.69-84). + - SHOW_COMBAT_TEXT defaulted "1" here against the ref's "0" from 0578 (the director's ask + was the enabled experience) until 1804 put the whole option family back on the + reference's own values. All fourteen now sit at the spec's defaults + (UIOptionsFrame.lua l.69-84), and the Combat page's checkbox is where it turns on. - The ref's virtual FontString template (CombatTextTemplate) expands to 20 identical strings; region templates are outside the v1 loader's object model (BuffFrame.xml has the precedent note), so the 20 instances inherit the CombatTextFont Font object and @@ -76,9 +78,11 @@ COMBAT_TEXT_LOW_MANA_THRESHOLD = 0.2 -- The option family: every saved global this feature owns, next to the value it ships - -- with. All fourteen sit at the spec's defaults (UIOptionsFrame.lua l.69-84) except the - -- master SHOW_COMBAT_TEXT, which ships "1" against the spec's "0" — the director's ask IS - -- the enabled experience (see the header). + -- with. **All fourteen are the spec's own defaults** (UIOptionsFrame.lua l.69-84), the + -- master SHOW_COMBAT_TEXT included — it shipped "1" against the spec's "0" from 0578 to + -- 1804 (see the header). Held to that by + -- `reference_ui::tests::our_saved_ui_globals_default_to_the_references_own_values`, which + -- reads the reference's file off the player's chain rather than trusting this comment. -- -- Each name is assigned AT FILE SCOPE and registered for saving in the same pass, because -- the load order is what makes a saved value stick (decision 1128): defaults first, the @@ -88,7 +92,7 @@ -- saved chunk — so a default lives in exactly one place, this table, and the panel cannot -- drift from it. local combatTextOptions = { - {"SHOW_COMBAT_TEXT", "1"}, + {"SHOW_COMBAT_TEXT", "0"}, {"COMBAT_TEXT_SHOW_LOW_HEALTH_MANA", "1"}, {"COMBAT_TEXT_SHOW_AURAS", "1"}, {"COMBAT_TEXT_SHOW_AURA_FADE", "0"}, diff --git a/crates/benilla-app/assets/ui/Fonts.xml b/crates/benilla-app/assets/ui/Fonts.xml index 83894284..1996af64 100644 --- a/crates/benilla-app/assets/ui/Fonts.xml +++ b/crates/benilla-app/assets/ui/Fonts.xml @@ -78,8 +78,11 @@ -- engine binding over wow-5875-re RF-0055's byte-verified table, so the rounding and -- the second source both go. -- - -- The loop starts at -1 like the reference's: `UIParent.lua` reads one index before the - -- array there, and our binding answers Poor for it rather than reproducing that. + -- The loop starts at -1 like the reference's, and the -1 row is not a curiosity: it is the + -- colour a loot row wears while its item template is uncached, which is the value + -- `GetLootSlotInfo` answers there. `GetItemQualityColor`'s clamp is UNSIGNED, so -1 lands + -- on Common/white with 7-and-up (decision 1805, correcting 1199's "reads before the + -- array"). ITEM_QUALITY_COLORS = { } for i = -1, 6 do ITEM_QUALITY_COLORS[i] = { } diff --git a/crates/benilla-app/assets/ui/GroupLootFrame.xml b/crates/benilla-app/assets/ui/GroupLootFrame.xml index 14db6e93..cf3243bd 100644 --- a/crates/benilla-app/assets/ui/GroupLootFrame.xml +++ b/crates/benilla-app/assets/ui/GroupLootFrame.xml @@ -85,10 +85,13 @@ LootFrame.xml's own "not implemented yet" caveat was written) — `$parentName`'s `inherits="GameFontNormalSmall"` below resolves for real; no stale caveat needed here. - IN-FLIGHT ITEMS: `GetLootRollItemInfo`'s `name`/`texture`/`quality` are `nil` while the item - template query hasn't landed yet (`loot_roll.rs`). `GroupLootFrame_OnShow` falls back to - `BENILLA_FALLBACK_ICON` / an empty name / common (quality 1) — the same fallback shape - `LootFrame_Update` uses for an in-flight loot row. + IN-FLIGHT ITEMS: `GetLootRollItemInfo`'s `name` and `texture` are `nil` while the item + template query hasn't landed yet (`loot_roll.rs`); its `count` and `quality` are the + reference's own miss tail, `1` and `1` (decision 1805 — 0x4c31a3), never nil. So the + `or ITEM_QUALITY_COLORS[1]` below is dead weight rather than load-bearing, and the stock + `GroupLootFrame_OnShow` this file shadows survives the same state without it. The + `BENILLA_FALLBACK_ICON` / empty-name fallbacks are still doing work: the reference leaves + both of those nil. The Era API this drives (`benilla-ui/src/script/loot_roll.rs`, decision 0591): `GetLootRollItemInfo(rollID)` -> texture,name,count,quality,bindOnPickUp,itemID; diff --git a/crates/benilla-app/assets/ui/OptionsFrame.xml b/crates/benilla-app/assets/ui/OptionsFrame.xml index 49c8edb8..c8286026 100644 --- a/crates/benilla-app/assets/ui/OptionsFrame.xml +++ b/crates/benilla-app/assets/ui/OptionsFrame.xml @@ -198,16 +198,16 @@ -- moved it: it lived in our BuffFrame.xml, and the buff bar is the reference's own file -- now, which reads the global and declares nothing. -- - -- **`"1"` is a stated divergence, not the reference's default.** 0255 shipped the - -- durations-shown geometry on the director's call, and 1139 turned it into a setting - -- without changing what it ships as. This assignment is the ONLY statement of it: the - -- saved chunk executes over it at load (1128), and the Interface page's row captures it as - -- its Defaults value at OnLoad, which runs first — so Defaults honours the director's - -- choice rather than the reference's table. + -- **`"0"` — the reference's own, since 1804.** It shipped `"1"` from 0255, which put the + -- durations-shown geometry in on the director's call, through 1139, which turned it into a + -- setting without re-weighing what it ships as. This assignment is the ONLY statement of + -- the default: the saved chunk executes over it at load (1128), and the Interface page's + -- row captures it as its Defaults value at OnLoad, which runs first — so Defaults now + -- walks back to the reference's table because this line IS the reference's table. -- -- Read at CALL time by `BuffButton_Update` / `BuffButtons_UpdatePositions` / -- `BuffFrame_UpdateDuration`, so this file sitting far below the bar does not bind. - SHOW_BUFF_DURATIONS = "1" + SHOW_BUFF_DURATIONS = "0" RegisterForSave("SHOW_BUFF_DURATIONS") -- The static category tree (era Game tab, Classic tocs), in list order. Keys are the row @@ -2183,8 +2183,9 @@ base — the reference's own arrangement, and the reason the readout is raw yards here rather than a percent: "22" means the wheel stops at 22 yards, which is the - thing being chosen. Our default is the factor fully - raised (30 yd), where 1.12 ships 1.0. --> + thing being chosen. The slider rests at 1.0 (15 yd), + 1.12's own registered default — it sat at the top of + the range (30 yd) from 1140 until 1804. -->