Master Data Reference of GS2-Ranking
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"
}
]
}| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| version | string | ✓ | 2019-09-17 | Format version of master data | ||
| categories | List<CategoryModel> | ~ 1000 items | 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. |
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.
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| categoryModelId | string | ✓* | ~ 1024 chars | Category GRN * Automatically configured on the server | ||||||||
| name | string | ✓ | ~ 128 chars | Category Name | ||||||||
| metadata | string | ~ 1024 chars | Metadata | |||||||||
| minimumValue | long | 0 ~ 9223372036854775805 | Minimum Score | |||||||||
| maximumValue | long | 0 ~ 9223372036854775805 | Maximum Score | |||||||||
| sum | bool | ✓ | false | Add up the scores received and compete for the total value | ||||||||
| orderDirection | String Enum enum { “asc”, “desc” } | ✓ | Sort direction of scores
| |||||||||
| scope | String Enum enum { “global”, “scoped” } | ✓ | Type of Ranking
| |||||||||
| globalRankingSetting | GlobalRankingSetting | {scope} == “global” | ✓* | Global Ranking Setting * Required if scope is “global” | ||||||||
| entryPeriodEventId | string | ~ 1024 chars | Period during which scores can be registered GS2-Schedule Event GRN | |||||||||
| accessPeriodEventId | string | ~ 1024 chars | Period 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.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Scope Name | ||
| targetDays | long | ✓ | 1 ~ 365 | Number 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.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| uniqueByUserId | bool | ✓ | true | Only one score is registered per user ID | ||
| calculateIntervalMinutes | int | ✓ | 15 ~ 1440 | Interval between score totals (minutes) | ||
| calculateFixedTiming | FixedTiming | Fixed time to start tallying scores | ||||
| additionalScopes | List<Scope> | 0 ~ 10 items | List of Scope | |||
| ignoreUserIds | List<string> | 0 ~ 10000 items | List of User IDs that are not reflected in the ranking | |||
| generation | string | ~ 256 chars | Ranking Generation |
FixedTiming
Fixed Timing
Specifies the fixed timing at which ranking calculations start.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| hour | int | 0 ~ 23 | Fixed time to start tallying scores (hour) | |||
| minute | int | 0 ~ 59 | Fixed time to start tallying scores (minutes) |