Skip to content

PB Gap Counter#9

Merged
Metalit merged 6 commits intoMetalit:mainfrom
Thinkgraser:main
Aug 25, 2025
Merged

PB Gap Counter#9
Metalit merged 6 commits intoMetalit:mainfrom
Thinkgraser:main

Conversation

@Thinkgraser
Copy link
Contributor

@Thinkgraser Thinkgraser commented Aug 22, 2025

  • Added PB Gap counter – shows how far ahead or behind your current run is compared to your personal best.
    • Percentage – toggle to display the difference as a percentage instead of a raw score
    • Decimals – set how many decimal places are shown when percentage mode is on
    • Sign – toggle to display + / - in front of the PB Gap
    • Separator – choose the thousands separator style (none, gap, comma, period)
  • Added separator option to Score and Personal Best counters.

@Thinkgraser Thinkgraser reopened this Aug 22, 2025
@Metalit
Copy link
Owner

Metalit commented Aug 22, 2025

Considering the amount of overlap, I think this would be better off as an option in the existing personal best counter, instead of a separate source, unless there's a particular reason you didn't do it that way. I definitely like the addition of the separator option.

There are a few other things I'd like you to do before I merge this:

  • remove the changed files that are nothing but removing the newline at the end
  • run clang-format on all your additions
  • revert the version back to 1.1.0, since I already incremented it when starting the 1.40 update, which hasn't been released yet
  • move the FormatNumber function to utils.hpp and utils.cpp, instead of giving it a dedicated file
  • if you really don't want to merge it with the existing personal best source, make it work in preview mode correctly using Playtest::GetOverridePBRatio()

If you don't want to make those changes yourself, I can add the feature myself in a version or two, instead of merging this PR. Either way, thanks for the contribution!

Also FYI there will be an API released with the mod for you to add new counters, sources, etc in a separate mod, all documented in the README. You can also use it before the release with qpm install. These changes are obviously correct to have in the mod itself though, so no worries there.

Thinkgraser and others added 3 commits August 25, 2025 02:56
…en don't apply

-Merged PBGap and Personal Best Together
-Added GetScoreRatio and GetBestScoreRatio functions into Utils
-Added disabling settings that aren't applicable and graying them out (Only in PersonalBest and Score)
@Thinkgraser
Copy link
Contributor Author

Thinkgraser commented Aug 25, 2025

  • Merged PB Gap into Personal Best with dropdown with options (Best Score, PB Gap)
  • Moved FormatNumber Function into Utils
  • Changed version back to 1.1.0
  • Only changed files included this time =)

I noticed a lot of the counters where calculating the ratios so I added functions and applied them to Calculate the best score ratio and score ratio into utils. The score ratio takes in whether to include modifiers and which saber/s to get the score for (default is true and both).

I also went and made it so when a setting isn't applicable it makes it so you can't change it and grays it out. I only added it to score and personal best and can be removed easily if need be.

@Metalit
Copy link
Owner

Metalit commented Aug 25, 2025

Looks good to me. The only thing I notice is that the GetBestScoreRatio function is a little wrong (not applying modifiers and not taking the playtesting stuff into account) but I'll fix that myself to make sure these changes get into the 1.40.8 release. Thanks again!

@Metalit Metalit merged commit 089667b into Metalit:main Aug 25, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants