Master Data Reference of GS2-Ranking
{
"version": "2019-09-17",
"categoryModels": [
{
"name": "[string]Category Name",
"metadata": "[string?]metadata",
"minimumValue": "[long?]Minimum Score",
"maximumValue": "[long?]Maximum Score",
"orderDirection": "[string]Sort direction of scores",
"scope": "[string]Type of Ranking",
"uniqueByUserId": "[bool]Only one score is registered per user ID",
"sum": "[bool]Add up the scores of put and compete for the total value.",
"calculateFixedTimingHour": "[int?]Fixed time to start tallying scores (hour)",
"calculateFixedTimingMinute": "[int?]Fixed time to start tallying scores (minutes)",
"calculateIntervalMinutes": "[int]Interval between score totals (minutes)",
"additionalScopes": [
{
"name": "[string]Scope Name",
"targetDays": "[long]Number of days to aggregate"
}
],
"entryPeriodEventId": "[string?]Event GRN",
"accessPeriodEventId": "[string?]Event GRN",
"ignoreUserIds": [
"[string]User ID that are not reflected in the ranking"
],
"generation": "[string?]Ranking Generation"
}
]
}
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
version | ✓ | 2019-09-17 | Format version of master data | |||
categoryModels | List<CategoryModel> |
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 | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
categoryModelId | string | ✓ | ~ 1024 chars | Category GRN | ||
name | string | ✓ | ~ 128 chars | Category Name | ||
metadata | string | ~ 1024 chars | metadata | |||
minimumValue | long | ~ 9223372036854775805 | Minimum Score | |||
maximumValue | long | ~ 9223372036854775805 | Maximum Score | |||
orderDirection | enum [‘asc’, ‘desc’] | ✓ | ~ 128 chars | Sort direction of scores | ||
scope | enum [‘global’, ‘scoped’] | ✓ | ~ 128 chars | Type of Ranking | ||
uniqueByUserId | bool | ✓ | Only one score is registered per user ID | |||
sum | bool | {uniqueByUserId} == true | ✓ | false | Add up the scores of put and compete for the total value. | |
calculateFixedTimingHour | int | -1 | ~ 23 | Fixed time to start tallying scores (hour) | ||
calculateFixedTimingMinute | int | 0 | ~ 59 | Fixed time to start tallying scores (minutes) | ||
calculateIntervalMinutes | int | {scope} == “global” | ✓ | 15 ~ 1440 | Interval between score totals (minutes) | |
additionalScopes | List<Scope> | {scope} == “global” | ~ 10 items | List of Scope | ||
entryPeriodEventId | string | ~ 1024 chars | Event GRN | |||
accessPeriodEventId | string | ~ 1024 chars | Event GRN | |||
ignoreUserIds | List<string> | ~ 10000 items | List of User IDs that are not reflected in the ranking | |||
generation | string | ~ 256 chars | Ranking Generation |
Ranking
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
rank | long | ✓ | 1 ~ 9223372036854775805 | Rank | ||
index | long | ✓ | ~ 9223372036854775805 | Index from 1st place | ||
categoryName | string | ✓ | ~ 128 chars | Category Name | ||
userId | string | ✓ | ~ 128 chars | User Id | ||
score | long | ✓ | ~ 9223372036854775805 | Score | ||
metadata | string | ~ 512 chars | metadata | |||
createdAt | long | ✓ | Datetime of creation |
Scope
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
name | string | ✓ | ~ 128 chars | Scope Name | ||
targetDays | long | ✓ | 1 ~ 365 | Number of days to aggregate |
CalculatedAt
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
categoryName | string | ✓ | ~ 128 chars | Category Name | ||
calculatedAt | long | ✓ | Date and time of calculating |