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"
}
]
}
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
version | ✓ | 2019-09-17 | Format version of master data | |||
categories | List<CategoryModel> | ~ 1000 items | Category 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 | 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 | |||
sum | bool | ✓ | false | Add up the scores of put and compete for the total value. | ||
orderDirection | enum { “asc”, “desc” } | ✓ | ~ 128 chars | Sort direction of scores | ||
scope | enum { “global”, “scoped” } | ✓ | ~ 128 chars | Type of Ranking | ||
globalRankingSetting | GlobalRankingSetting | {scope} == “global” | ✓ | Global Ranking Setting | ||
entryPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | |||
accessPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN |
Enumeration type definition to specify as orderDirection
Enumerator String Definition | Description |
---|---|
asc | ascending-order |
desc | descending-order |
Enumeration type definition to specify as scope
Enumerator String Definition | Description |
---|---|
global | Global |
scoped | Scoped |
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.
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 | ✓ | Created At (Unix time unit:milliseconds) |
Scope
Aggregate Scope
Available in Global Ranking mode. Normally, the global ranking is calculated for all registered scores.
Type | Condition | Require | Default | Limitation | 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 | Require | Default | Limitation | 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> | ~ 10 items | List of Scope | |||
ignoreUserIds | List<string> | ~ 10000 items | List of User IDs that are not reflected in the ranking | |||
generation | string | ~ 256 chars | Ranking Generation |
FixedTiming
Fixed Timing
This is a setting to fix the timing of the global ranking.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
hour | int | ~ 23 | Fixed time to start tallying scores (hour) | |||
minute | int | ~ 59 | Fixed time to start tallying scores (minutes) |
CalculatedAt
Last count date and time
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
categoryName | string | ✓ | ~ 128 chars | Category Name | ||
calculatedAt | long | ✓ | Date and time of calculating (Unix time unit:milliseconds) |