Class ScoreManager

Score management singleton accessed via SCOREMAN

This is responsible for accessing score related data.

Methods

scoremanager:GetScoresByKey (chartKey) Get the list of HighScores set for a particular Steps.
scoremanager:SortSSRs (skillset) Sort the internal list of HighScores across all Games by the given Skillset.
scoremanager:SortSSRsForGame (skillset) Sort the internal list of HighScores for the currently enabled Game.
scoremanager:GetTopSSRHighScore (index, skillset) Get a HighScore from the internal list of scores that was sorted by SCOREMAN:SortSSRs.
scoremanager:GetTopSSRHighScoreForGame (index, skillset) Get a HighScore from the internal list of scores that was sorted by SCOREMAN:SortSSRsForGame.
scoremanager:SortRecentScores () Sort the internal list of HighScores across all Games by their set date.
scoremanager:SortRecentScoresForGame () Sort the internal list of HighScores for the currently enabled Game by their set date.
scoremanager:GetRecentScore (index) Get a HighScore from the internal list of scores that was sorted by SCOREMAN:SortRecentScores.
scoremanager:GetRecentScoreForGame (index) Get a HighScore from the internal list of scores that was sorted by SCOREMAN:SortRecentScoresForGame.
scoremanager:GetMostRecentScore () Get the most recent HighScore which is relevant for displaying.
scoremanager:GetTempReplayScore () Get the HighScore designated as the current HighScore being viewed in a replay or evaluation recreation.
scoremanager:GetTotalNumberOfScores () For the currently loaded Profile only, get the amount of scores that are saved.
scoremanager:GetTopPlayedSkillsets (profile) Get the order of Skillsets which the given Profile plays the most.
scoremanager:GetPlaycountPerSkillset (profile) Get the amount of plays for each Skillset for the given Profile.
scoremanager:GetScoresThisSession () Get all HighScores created during the current game session.
scoremanager:GetNumScoresThisSession () Get the number of HighScores created during the current game session.
scoremanager:GetPlayerRatingOverTime () Calculate the player rating over time for the currently loaded Profile.


Methods

scoremanager:GetScoresByKey (chartKey)
Get the list of HighScores set for a particular Steps.

Parameters:

  • chartKey string The chartkey of the Steps you want to find scores for

Returns:

    {string = ScoreAtRate, ...} a table of ScoresAtRate, keys of a rate string and values of ScoresAtRate

Usage:

    local scoresByKey = SCOREMAN:GetScoresByKey(song:GetChartKey())
scoremanager:SortSSRs (skillset)
Sort the internal list of HighScores across all Games by the given Skillset. This is used to optimize sorting the long list of HighScores for the purpose of displaying them in the Profile tab in the default Themes.

Parameters:

  • skillset string The Skillset enum value of choice

Returns:

    nil

See also:

Usage:

    SCOREMAN:SortSSRs("Overall")
scoremanager:SortSSRsForGame (skillset)
Sort the internal list of HighScores for the currently enabled Game. This is used to optimize sorting the long list of HighScores for the purpose of displaying them in the Profile tab in the default Themes. This internal list also only tracks the current Game which usually refers to the current keymode.

Parameters:

  • skillset string The Skillset enum value of choice

Returns:

    nil

See also:

Usage:

    SCOREMAN:SortSSRsForGame("Overall")
scoremanager:GetTopSSRHighScore (index, skillset)
Get a HighScore from the internal list of scores that was sorted by SCOREMAN:SortSSRs.

Parameters:

  • index number The score index starting at 1 where 1 is the "best"
  • skillset string A Skillset enum value. Any will work as long as it is valid. Returns nil otherwise.

Returns:

    HighScore The HighScore

See also:

Usage:

    local highScore = SCOREMAN:GetTopSSRHighScore(1, "Overall")
scoremanager:GetTopSSRHighScoreForGame (index, skillset)
Get a HighScore from the internal list of scores that was sorted by SCOREMAN:SortSSRsForGame.

Parameters:

  • index number The score index starting at 1 where 1 is the "best"
  • skillset string A Skillset enum value. Any will work as long as it is valid. Returns nil otherwise.

Returns:

    HighScore The HighScore

See also:

Usage:

    local highScore = SCOREMAN:GetTopSSRHighScoreForGame(1, "Overall")
scoremanager:SortRecentScores ()
Sort the internal list of HighScores across all Games by their set date. This is used to optimize sorting the long list of HighScores for the purpose of displaying them in order of creation.

Returns:

    nil

See also:

Usage:

    SCOREMAN:SortRecentScores()
scoremanager:SortRecentScoresForGame ()
Sort the internal list of HighScores for the currently enabled Game by their set date. This is used to optimize sorting the long list of HighScores for the purpose of displaying them in order of creation.

Returns:

    nil

See also:

Usage:

    SCOREMAN:SortRecentScoresForGame()
scoremanager:GetRecentScore (index)
Get a HighScore from the internal list of scores that was sorted by SCOREMAN:SortRecentScores.

Parameters:

  • index number The score index starting at 1 where 1 is the "most recent"

Returns:

    HighScore The HighScore

See also:

Usage:

    local recentScore = SCOREMAN:GetRecentScore(1)
scoremanager:GetRecentScoreForGame (index)
Get a HighScore from the internal list of scores that was sorted by SCOREMAN:SortRecentScoresForGame.

Parameters:

  • index number The score index starting at 1 where 1 is the "most recent"

Returns:

    HighScore The HighScore

See also:

Usage:

    local recentScore = SCOREMAN:GetRecentScoreForGame(1)
scoremanager:GetMostRecentScore ()
Get the most recent HighScore which is relevant for displaying. Usually used in ScreenEvaluation. If a replay is currently being viewed or the evaluation screen is being recreated for a replay, this will return the HighScore that the replay is attached to. If no scores exist and no replay is being played, this returns nil.

Returns:

    HighScore The HighScore

See also:

Usage:

    local recentScore = SCOREMAN:GetMostRecentScore()
scoremanager:GetTempReplayScore ()
Get the HighScore designated as the current HighScore being viewed in a replay or evaluation recreation. Otherwise, this will return nothing.

Returns:

    HighScore The HighScore

Usage:

    local replayScore = SCOREMAN:GetTempReplayScore()
scoremanager:GetTotalNumberOfScores ()
For the currently loaded Profile only, get the amount of scores that are saved.

Returns:

    number The total number of scores

Usage:

    local totalScores = SCOREMAN:GetTotalNumberOfScores()
scoremanager:GetTopPlayedSkillsets (profile)
Get the order of Skillsets which the given Profile plays the most.
The Skillset each HighScore counts for is only the highest SSR value. The first Skillset in the returned table is the most played. Does not include the Overall Skillset.

Parameters:

  • profile Profile The Profile to scan for most frequent plays

Returns:

    {string,...} Skillset enum values in order of most frequently played to least

See also:

Usage:

    local bestSkillsets = SCOREMAN:GetTopPlayedSkillsets(GetPlayerOrMachineProfile(PLAYER_1))
scoremanager:GetPlaycountPerSkillset (profile)
Get the amount of plays for each Skillset for the given Profile. The Skillset each HighScore counts for is only the highest SSR value. Index 1 in the result table is the Stream Skillset. Overall is not in the list.

Parameters:

  • profile Profile The Profile to scan for play counts

Returns:

    {number,...} Play counts for each Skillset starting with Stream

See also:

Usage:

    local playCountBySkillset = SCOREMAN:GetPlaycountPerSkillset(GetPlayerOrMachineProfile(PLAYER_1))
scoremanager:GetScoresThisSession ()
Get all HighScores created during the current game session. This includes scores set across Profiles.

Returns:

    {HighScore,...} HighScores in order of occurrence throughout the current game session

See also:

Usage:

    local scoresToday = SCOREMAN:GetScoresThisSession()
scoremanager:GetNumScoresThisSession ()
Get the number of HighScores created during the current game session. This includes scores set across Profiles.

Returns:

    number The number of HighScores set in the current game session

See also:

Usage:

    local numScoresFromToday = SCOREMAN:GetNumScoresThisSession()
scoremanager:GetPlayerRatingOverTime ()
Calculate the player rating over time for the currently loaded Profile. Includes values for each Skillset. May take a while to calculate based on the number of unique dates for each HighScore. Utilizes multithreading to try to speed up the process.

Returns:

    A table of tables. Each entry in the table is a date key paired with 1-indexed table of SSR values.

Usage:

    local ratingOverTime = SCOREMAN:GetPlayerRatingOverTime()
generated by LDoc 1.5.0 Last updated 2024-10-02 05:06:53