Master Data Reference of GS2-Ranking

{
  "version": "2019-09-17",
  "categories": [
    {
      "name": "[string]Category Name",
      "metadata": "[string?]metadata",
      "minimumValue": "[long?]Minimum Score",
      "maximumValue": "[long?]Maximum Score",
      "sum": "[bool]Add up the scores of put and compete for the total value.",
      "orderDirection": "[string]Sort direction of scores",
      "scope": "[string]Type of Ranking",
      "globalRankingSetting": {
        "uniqueByUserId": "[bool]Only one score is registered per user ID",
        "calculateIntervalMinutes": "[int]Interval between score totals (minutes)",
        "calculateFixedTiming": {
          "hour": "[int?]Fixed time to start tallying scores (hour)",
          "minute": "[int?]Fixed time to start tallying scores (minutes)"
        },
        "additionalScopes": [
          {
            "name": "[string]Scope Name",
            "targetDays": "[long]Number of days to aggregate"
          }
        ],
        "ignoreUserIds": [
          "[string]User ID that are not reflected in the ranking"
        ],
        "generation": "[string?]Ranking Generation"
      },
      "entryPeriodEventId": "[string?]GS2-Schedule Event GRN",
      "accessPeriodEventId": "[string?]GS2-Schedule Event GRN"
    }
  ]
}
TypeConditionRequireDefaultLimitationDescription
version2019-09-17Format version of master data
categoriesList<CategoryModel>~ 1000 itemsCategory Model

CategoryModel

Category Model

Different rankings can be created for different categories.

Categories can have a minimum and maximum score that can be registered, and scores outside of that range are discarded. When calculating rankings, it is possible to set whether the scores are to be ranked in ascending or descending order, with the smallest scores being ranked higher (ascending order) or the largest scores being ranked lower (descending order).

You can select global or scope as the type of ranking. Global is a ranking where all players see the same results, and Scope is a ranking where each game player has a different result, such as a ranking among friends or a ranking in a guild.

For global ranking, you can set the ranking interval from 15 minutes to 24 hours for each category. Scope rankings reflect the calculate results in real time.

The ranking data has a setting called “generation,” and the registered scores can be reset by changing the generation.

TypeConditionRequireDefaultLimitationDescription
categoryModelIdstring~ 1024 charsCategory GRN
namestring~ 128 charsCategory Name
metadatastring~ 1024 charsmetadata
minimumValuelong~ 9223372036854775805Minimum Score
maximumValuelong~ 9223372036854775805Maximum Score
sumboolfalseAdd up the scores of put and compete for the total value.
orderDirectionenum {
    “asc”,
    “desc”
}
~ 128 charsSort direction of scores
scopeenum {
    “global”,
    “scoped”
}
~ 128 charsType of Ranking
globalRankingSettingGlobalRankingSetting{scope} == “global”Global Ranking Setting
entryPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
accessPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN

Enumeration type definition to specify as orderDirection

Enumerator String DefinitionDescription
ascascending-order
descdescending-order

Enumeration type definition to specify as scope

Enumerator String DefinitionDescription
globalGlobal
scopedScoped

Ranking

Ranking

There are two types of ranking: global ranking, in which all participants compete on the same board, and scope ranking, in which players compete against the scores of subscribed players.

TypeConditionRequireDefaultLimitationDescription
ranklong1 ~ 9223372036854775805Rank
indexlong~ 9223372036854775805Index from 1st place
categoryNamestring~ 128 charsCategory Name
userIdstring~ 128 charsUser Id
scorelong~ 9223372036854775805Score
metadatastring~ 512 charsmetadata
createdAtlongCreated At (Unix time unit:milliseconds)

Scope

Aggregate Scope

Available in Global Ranking mode. Normally, the global ranking is calculated for all registered scores.

TypeConditionRequireDefaultLimitationDescription
namestring~ 128 charsScope Name
targetDayslong1 ~ 365Number of days to aggregate

GlobalRankingSetting

Global Ranking Setting

Global is a ranking where all players see the same results. The ranking interval can be set from 15 minutes to 24 hours.

The ranking data has a setting called “generation,” and the registered scores can be reset by changing the generation.

TypeConditionRequireDefaultLimitationDescription
uniqueByUserIdbooltrueOnly one score is registered per user ID
calculateIntervalMinutesint15 ~ 1440Interval between score totals (minutes)
calculateFixedTimingFixedTimingFixed time to start tallying scores
additionalScopesList<Scope>~ 10 itemsList of Scope
ignoreUserIdsList<string>~ 10000 itemsList of User IDs that are not reflected in the ranking
generationstring~ 256 charsRanking Generation

FixedTiming

Fixed Timing

This is a setting to fix the timing of the global ranking.

TypeConditionRequireDefaultLimitationDescription
hourint~ 23Fixed time to start tallying scores (hour)
minuteint~ 59Fixed time to start tallying scores (minutes)

CalculatedAt

Last count date and time

TypeConditionRequireDefaultLimitationDescription
categoryNamestring~ 128 charsCategory Name
calculatedAtlongDate and time of calculating (Unix time unit:milliseconds)