Better Statistics Screen

Better Statistics Screen

21M Downloads

[Suggestion] Introduce support for `StatFormatter`s.

TheCSDev opened this issue ยท 1 comments

commented

What is this suggestion for?

Mod Itself

Suggestion

Each Stat has its own StatFormatter that is assigned to it.
This concept of StatFormatters is primarily used for "general stats", but is actually applied to every StatType out there.

Better Statistics Screen, for every stat other than "general stats", makes an assumption that a given stat uses StatFormatter#DEFAULT, hence rendering the literal raw value of said stat. This works for pretty much every vanilla item and mob StatType out there so far, but some StatTypes, esespecially modded ones, may use a different StatFormatter, causing BSS to misrepresent its actual value.

One example of stats being misrepresented because of this, is the "More Stats" mod. Some of its stats likely use the StatFormatter#DIVIDE_BY_TEN formatter, causing BSS to misrepresent their values. This issue was countered by simply applying a "(x10)" label to the translation files, which isn't the ideal solution.

Likely related issues:

Code of Conduct

  • I agree that I will be available later for any follow-up questions to help with implementing the suggested thing.
commented

Hello past me, future me here.
Thanks for the suggestion! I have gone ahead and implemented this. Although, this patch doesn't apply to pinned HUD stats yet. Will have to tweak that as well.

Edit:
Not future me here. That was actually my present me, now past me, but more recent past me. Anyway, current present me out.