Skip to content

Option: show room success rate colors in chapter graph#140

Open
NonbinaryCoder wants to merge 6 commits into
viddie:mainfrom
NonbinaryCoder:success_rate_in_graph
Open

Option: show room success rate colors in chapter graph#140
NonbinaryCoder wants to merge 6 commits into
viddie:mainfrom
NonbinaryCoder:success_rate_in_graph

Conversation

@NonbinaryCoder

Copy link
Copy Markdown

Colors the bars in the chapter graph to match the colors established by the "Success Rate Colors" section in "Live-Data Settings"
image
image

Enhancements:

  • Simplified Chinese translation

Questions:

  • Is the setting position and description good?
  • Currently, when the setting is enabled the minimum height of bars in the chapter graph is increased to 3 pixels to increase color readability. Is this necessary or does it decrease readability of choke rate too much?
  • Currently, success rates have to be recomputed each frame. This could theoretically cause problems on less powerful devices on maps with large numbers of rooms.
    • Adding caching to RoomStats.AverageSuccessOverN would be easy
    • Cache could be kept by GraphOverlay, however I am not familiar enough with the CCT codebase to implement such a feature

@Kongtiao552

Copy link
Copy Markdown
Contributor

Maybe I can do the Chinese translation for you

@NonbinaryCoder

Copy link
Copy Markdown
Author

That would be nice, thank you! I didn't want to just use an online translator since it would be likely to make mistakes.

@NonbinaryCoder

Copy link
Copy Markdown
Author

It looks to me like UpdateOverlay is called when any stat changes, so I'll work on caching success rates the same way choke rates are

@viddie

viddie commented Jul 5, 2026

Copy link
Copy Markdown
Owner

@NonbinaryCoder

  • name and description of the setting is good 👍
  • 3px min height to see the colors better seems fine i think
  • the success rates should definitely be cached. the way to go about that should be similar to how its done in the ChokeRateStat: Keep a dictionary in the SuccessRateStat, have a function to get the data you want to get, which returns the cached dictionary if not null, or computes, caches and returns the data if the cache was null. now a small improvement over my implementation in ChokeRateStat: dont make the cache dictionary public, but add a public function which resets the cache (just sets it to null)

overall a really cool feature tho!

@NonbinaryCoder

Copy link
Copy Markdown
Author

will do! probably over this weekend depending on how busy i end up

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.

3 participants