Master Data Reference of GS2-Ranking

Reference of the format of master data and various models to be imported

Master Data Format

{
  "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 received 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?]Period during which scores can be registered GS2-Schedule Event GRN",
      "accessPeriodEventId": "[string?]Period during which ranking data can be accessed GS2-Schedule Event GRN"
    }
  ]
}
TypeConditionRequiredDefaultValue LimitsDescription
versionstring
2019-09-17Format version of master data
categoriesList<CategoryModel>~ 1000 itemsCategory 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.

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.

TypeConditionRequiredDefaultValue LimitsDescription
categoryModelIdstring
✓*
~ 1024 charsCategory GRN
* Automatically configured on the server
namestring
~ 128 charsCategory Name
metadatastring~ 1024 charsMetadata
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores received and compete for the total value
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
Sort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
scopeString Enum
enum {
  “global”,
  “scoped”
}
Type of Ranking
Enumerator String DefinitionDescription
“global”Global
“scoped”Scoped
globalRankingSettingGlobalRankingSetting{scope} == “global”
✓*
Global Ranking Setting
* Required if scope is “global”
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered GS2-Schedule Event GRN
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed GS2-Schedule Event GRN

Scope

Aggregation Scope

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

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 128 charsScope Name
targetDayslong
1 ~ 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.

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

FixedTiming

Fixed Timing

Specifies the fixed timing at which ranking calculations start.

TypeConditionRequiredDefaultValue LimitsDescription
hourint0 ~ 23Fixed time to start tallying scores (hour)
minuteint0 ~ 59Fixed time to start tallying scores (minutes)