Show Adjusted Stats: diminishing-returns detail on character sheet stat tooltips#356
Open
nulltyto wants to merge 1 commit into
Open
Show Adjusted Stats: diminishing-returns detail on character sheet stat tooltips#356nulltyto wants to merge 1 commit into
nulltyto wants to merge 1 commit into
Conversation
Adds an opt-in "Show Adjusted Stats" toggle (Blizz UI Enhanced -> Character Sheet -> Stat Display, next to Show PvP). When enabled, the Secondary (Crit/Haste/Mastery/Versatility) and Tertiary (Leech/ Avoidance/Speed) stat tooltips gain a diminishing-returns breakdown: - Adjusted Rating: effective rating kept after DR penalties - Wasted Rating: rating lost to the penalties - Penalty Percentage: current marginal penalty bracket - Next N% Penalty At: raw rating where the next bracket begins DR is computed on gross rating-percent (rating / conversion factor) so the in-game effect display (e.g. Mastery) does not skew the brackets. Bracket/penalty data are Blizzard game constants; the per-level rating->percent conversion factors (levels 1-90) are stored as data and selected live via UnitLevel, so the math is correct at the current cap. New module EllesmereUIBlizzardSkin_DiminishingReturns.lua exposes EllesmereUI.GetStatDR(); the calculation is our own implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in Show Adjusted Stats toggle under Blizz UI Enhanced → Character Sheet → Stat Display (to the right of Show PvP, off by default). When enabled, the Secondary (Crit/Haste/Mastery/Versatility) and Tertiary (Leech/Avoidance/Speed) stat tooltips gain a diminishing-returns breakdown:
The breakdown is hidden for stats you have 0 rating in (e.g. an unused tertiary), since every value would be zero.
Example tooltip
How it works
rating / conversionFactor), so the displayed in-game effect (e.g. Mastery's coefficient) doesn't skew the bracket math.UnitLevel, so the numbers are correct at the current level cap (90).EllesmereUIBlizzardSkin_DiminishingReturns.luaexposesEllesmereUI.GetStatDR(); the calculation is an original implementation.Files
EllesmereUIBlizzardSkin/EllesmereUIBlizzardSkin_DiminishingReturns.lua— DR data + calculationEllesmereUIBlizzardSkin/EllesmereUIBlizzardSkin.toc— load new module before CharacterSheetEllesmereUIBlizzardSkin/EllesmereUIBlizzardSkin_CharacterSheet.lua— tooltip lines (guarded by toggle +issecretvalue), default keyEllesmereUIBlizzardSkin/EUI_BlizzardSkin_Options.lua— the Show Adjusted Stats toggleTesting
Lua syntax verified for all changed files;
GetStatDRexercised standalone at level 90 with sane results. In-client/reload+ hover smoke test recommended before merge.Note
The conversion table tops out at level 90; on a future level-cap increase it falls back to the level-90 value (no error) until the table is extended.