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

[Suggestion] Introduce support for StatFormatters. #137

Open
1 task done
TheCSDev opened this issue Aug 11, 2024 · 1 comment
Open
1 task done

[Suggestion] Introduce support for StatFormatters. #137

TheCSDev opened this issue Aug 11, 2024 · 1 comment
Labels
Suggestion A feature request or some other suggestion.

Comments

@TheCSDev
Copy link
Member

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.
@TheCSDev TheCSDev added the Suggestion A feature request or some other suggestion. label Aug 11, 2024
@TheCSDev TheCSDev changed the title [Suggestion] Introduce support for StatFormats. [Suggestion] Introduce support for StatFormatters. Aug 11, 2024
@TheCSDev
Copy link
Member Author

TheCSDev commented Aug 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Suggestion A feature request or some other suggestion.
Projects
None yet
Development

No branches or pull requests

1 participant