Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Handle stat breakdowns using StatLogic generated locales #193

Open
raethkcj opened this issue Dec 20, 2024 · 1 comment

Comments

@raethkcj
Copy link
Owner

raethkcj commented Dec 20, 2024

Similar to #175, using manually localized patterns to detect when and where to insert stat breakdowns is messy, inconsistent, and largely unmaintained other than in English. Since we have a mostly auto-generated mapping of text to stats in StatLogic, it might be better to use those to identify all the stats for breakdowns.

One caveat is that those patterns only identify which stat(s) each number in a given string represents, rather than identifying the position of the minimum text that uniquely identifies the stat. RatingBuster currently places the breakdown after the number or the text identifying the stat, whichever comes later.

e.g. the breakdowns are inserted after "Intellect" and "Haste Rating" in Reckless Ember Topaz:
+20 Intellect (0.34% Spell Crit) and +20 Haste Rating (0.72%)
But they are placed after the number for the ratings on Miniature Winter Veil Tree:
Improves haste rating by 116 (0.91%)

The aim in using StatLogic's locales would be to default to placing the breakdowns after numbers, and optionally use the stats identified by StatLogic check a manually-localized array of strings for each stat.

This has a lot of benefits:

  1. Breakdowns would always happen for all the same numbers in every locale, even if no manual localization has been done
  2. We would only need to iterate a short list of patterns for each stat, rather than the entire list of patterns
  3. There would be no need to rely on a specific ordering of stats in the locale files, e.g. currently Armor Penetration must come before Armor, which is easy to forget and can make debugging a pain.
  4. This would be an easy way to implement Add conversions for pure-text enchants like Surefooted #68
  5. This will help implement [Feature Request] Add "modified" options for Spell Damage and Healing #192, which is currently difficult due to strings being split on "and", which breaks up "spell damage and healing" stats in Vanilla.
  6. This might be a good way to add breakdowns to percentage-based stats, e.g. showing the halved dodge from SoD Rogue's Just a Flesh Wound, and showing the spell crit to dodge conversion from SoD Warlock's Dance of the Wicked. Currently, percentage stats are ignored for breakdowns because there's way too much overlap with shortened rating strings in TBC onwards.
@raethkcj
Copy link
Owner Author

raethkcj commented Dec 23, 2024

Another caveat is that StatLogic's currently ignores lines starting with Use:, Chance on hit:, etc., since they don't contribute to Stat Summaries, but we would want to include them for RatingBuster's stat breakdowns.

StatLogic does already include patterns that identify them to exclude them in debugging, so we would just need to change that from an exclusion to some kind of identifier, and let them be excluded in StatLogic:GetSum but included in RatingBuster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant