GS2-Ranking2 Master Data Reference

Reference for the master data format and the models to be imported

Master Data Format

{
  "version": "2024-05-30",
  "globalRankingModels": [
    {
      "name": "[string]Global Ranking Model name",
      "metadata": "[string?]Metadata",
      "minimumValue": "[long?]Minimum Score",
      "maximumValue": "[long?]Maximum Score",
      "sum": "[bool]Sum Scores",
      "orderDirection": "[string enum]Order Direction",
      "entryPeriodEventId": "[string?]Entry Period Event GRN",
      "rankingRewards": [
        {
          "thresholdRank": "[int]Rank Threshold",
          "metadata": "[string?]Metadata",
          "acquireActions": [
            {
              "action": "[string]Type of action to be executed in the Acquire Action",
              "request": "[string]JSON string of the request used when executing the action"
            }
          ]
        }
      ],
      "accessPeriodEventId": "[string?]Access Period Event GRN",
      "rewardCalculationIndex": "[string enum]Reward Calculation Index"
    }
  ],
  "clusterRankingModels": [
    {
      "name": "[string]Cluster Ranking Model name",
      "metadata": "[string?]Metadata",
      "clusterType": "[string enum]Cluster Type",
      "minimumValue": "[long?]Minimum Score",
      "maximumValue": "[long?]Maximum Score",
      "sum": "[bool]Sum Scores",
      "orderDirection": "[string enum]Order Direction",
      "entryPeriodEventId": "[string?]Entry Period Event GRN",
      "rankingRewards": [
        {
          "thresholdRank": "[int]Rank Threshold",
          "metadata": "[string?]Metadata",
          "acquireActions": [
            {
              "action": "[string]Type of action to be executed in the Acquire Action",
              "request": "[string]JSON string of the request used when executing the action"
            }
          ]
        }
      ],
      "accessPeriodEventId": "[string?]Access Period Event GRN",
      "rewardCalculationIndex": "[string enum]Reward Calculation Index"
    }
  ],
  "subscribeRankingModels": [
    {
      "name": "[string]Subscribe Ranking Model name",
      "metadata": "[string?]Metadata",
      "minimumValue": "[long?]Minimum Score",
      "maximumValue": "[long?]Maximum Score",
      "sum": "[bool]Sum Scores",
      "orderDirection": "[string enum]Order Direction",
      "entryPeriodEventId": "[string?]Entry Period Event GRN",
      "accessPeriodEventId": "[string?]Access Period Event GRN"
    }
  ]
}
TypeConditionRequiredDefaultValue LimitsDescription
versionstring
2024-05-30Format version of master data
globalRankingModelsList<GlobalRankingModel>~ 10 itemsGlobal Ranking Model
The global ranking is a model that allows you to create a ranking that targets all players.
You can display the top 1000 rankings.

By associating it with the repeat event of GS2-Schedule, you can reset the ranking according to the number of repetitions.
clusterRankingModelsList<ClusterRankingModel>~ 10 itemsCluster Ranking Model
The cluster ranking model enables rankings for players within guilds or gatherings.
You can display the top 1000 rankings.

By associating it with the repeat event of GS2-Schedule, you can reset the ranking according to the number of repetitions.
subscribeRankingModelsList<SubscribeRankingModel>~ 10 itemsSubscribe Ranking Model
A model that aggregates scores of other players that the user has subscribed to and creates a ranking.

Model

GlobalRankingModel

Global Ranking Model

The global ranking is a model that allows you to create a ranking that targets all players. You can display the top 1000 rankings.

By associating it with the repeat event of GS2-Schedule, you can reset the ranking according to the number of repetitions.

TypeConditionRequiredDefaultValue LimitsDescription
globalRankingModelIdstring
*
~ 1024 charsGlobal Ranking GRN
* Set automatically by the server
namestring
~ 128 charsGlobal Ranking Model name
Global Ranking Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 1024 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
minimumValuelong0 ~ 9223372036854775805Minimum Score
The minimum allowed score value. Scores below this value will be rejected when submitted. Used to filter out invalid or unintended score values.
maximumValuelong0 ~ 9223372036854775805Maximum Score
The maximum allowed score value. Scores above this value will be rejected when submitted. Used to prevent abnormally high scores from being registered.
sumboolfalseSum Scores
When enabled, all submitted scores are accumulated and the ranking is determined by the total value. When disabled, only the best score (highest or lowest depending on sort direction) is used for ranking.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
Order Direction
The sort direction for ranking scores. Use “asc” for rankings where lower scores are better (e.g., time trials), or “desc” for rankings where higher scores are better (e.g., high scores).
DefinitionDescription
“asc”ascending-order
“desc”descending-order
entryPeriodEventIdstring~ 1024 charsEntry Period Event GRN
GS2-Schedule event GRN that defines the period during which scores can be submitted. When linked to a repeating event, the ranking resets with each repeat cycle, enabling seasonal rankings.
rankingRewardsList<RankingReward>{entryPeriodEventId} != null[]0 ~ 100 itemsRanking Rewards
List of rewards granted based on ranking position at the end of each season. Only available when an entry period event is configured. Each reward defines a rank threshold and the acquire actions to execute.
accessPeriodEventIdstring~ 1024 charsAccess Period Event GRN
GS2-Schedule event GRN that defines the period during which ranking results can be viewed and rewards can be claimed. Typically set to the interval between score entry periods.
rewardCalculationIndexString Enum
enum {
  “rank”,
  “index”
}
“rank”Reward Calculation Index
Determines how rewards are matched to players. “rank” uses the 1-based ranking position (players with tied scores share the same rank), while “index” uses the 0-based unique sorted position (no ties). Choose “rank” for most typical use cases.
DefinitionDescription
“rank”Determine rewards based on rank
“index”Determine rewards based on index

RankingReward

Ranking Reward

Set the rewards that can be received during the reference period when the score registration period is set in the ranking. If the repeat setting is enabled, the most recently ended period ranking will be the target for receiving rewards.

TypeConditionRequiredDefaultValue LimitsDescription
thresholdRankint
1 ~ 1001Rank Threshold
The rank threshold for this reward tier. Players whose rank (or index, depending on rewardCalculationIndex setting) is at or above this threshold receive this reward. Set to 1001 to define rewards for unranked players (those outside the top 1000).
metadatastring~ 1024 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
acquireActionsList<AcquireAction>[]0 ~ 100 itemsAcquire Actions
List of acquire actions executed when the player claims this ranking reward. These define the actual items, currency, or other resources granted as the reward for achieving this rank threshold.

AcquireAction

Acquire Action

TypeConditionRequiredDefaultValue LimitsDescription
actionString Enum
enum {
"Gs2AdReward:AcquirePointByUserId",
"Gs2Dictionary:AddEntriesByUserId",
"Gs2Enchant:ReDrawBalanceParameterStatusByUserId",
"Gs2Enchant:SetBalanceParameterStatusByUserId",
"Gs2Enchant:ReDrawRarityParameterStatusByUserId",
"Gs2Enchant:AddRarityParameterStatusByUserId",
"Gs2Enchant:SetRarityParameterStatusByUserId",
"Gs2Enhance:DirectEnhanceByUserId",
"Gs2Enhance:UnleashByUserId",
"Gs2Enhance:CreateProgressByUserId",
"Gs2Exchange:ExchangeByUserId",
"Gs2Exchange:IncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:AcquireForceByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Friend:UpdateProfileByUserId",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Guild:IncreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Guild:SetMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"Gs2Idle:ReceiveByUserId",
"Gs2Inbox:SendMessageByUserId",
"Gs2Inventory:AddCapacityByUserId",
"Gs2Inventory:SetCapacityByUserId",
"Gs2Inventory:AcquireItemSetByUserId",
"Gs2Inventory:AcquireItemSetWithGradeByUserId",
"Gs2Inventory:AddReferenceOfByUserId",
"Gs2Inventory:DeleteReferenceOfByUserId",
"Gs2Inventory:AcquireSimpleItemsByUserId",
"Gs2Inventory:SetSimpleItemsByUserId",
"Gs2Inventory:AcquireBigItemByUserId",
"Gs2Inventory:SetBigItemByUserId",
"Gs2JobQueue:PushByUserId",
"Gs2Limit:CountDownByUserId",
"Gs2Limit:DeleteCounterByUserId",
"Gs2LoginReward:DeleteReceiveStatusByUserId",
"Gs2LoginReward:UnmarkReceivedByUserId",
"Gs2Lottery:DrawByUserId",
"Gs2Lottery:ResetBoxByUserId",
"Gs2Mission:RevertReceiveByUserId",
"Gs2Mission:IncreaseCounterByUserId",
"Gs2Mission:SetCounterByUserId",
"Gs2Money:DepositByUserId",
"Gs2Money:RevertRecordReceipt",
"Gs2Money2:DepositByUserId",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2Schedule:ExtendTriggerByUserId",
"Gs2Script:InvokeScript",
"Gs2SerialKey:RevertUseByUserId",
"Gs2SerialKey:IssueOnce",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
}
Type of action to be executed in the Acquire Action
requeststring
~ 524288 charsJSON string of the request used when executing the action

ClusterRankingModel

Cluster Ranking Model

The cluster ranking model enables rankings for players within guilds or gatherings. You can display the top 1000 rankings.

By associating it with the repeat event of GS2-Schedule, you can reset the ranking according to the number of repetitions.

TypeConditionRequiredDefaultValue LimitsDescription
clusterRankingModelIdstring
*
~ 1024 charsCluster Ranking GRN
* Set automatically by the server
namestring
~ 128 charsCluster Ranking Model name
Cluster Ranking Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 1024 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
clusterTypeString Enum
enum {
  “Raw”,
  “Gs2Guild::Guild”,
  “Gs2Matchmaking::SeasonGathering”
}
Cluster Type
Defines the type of group (cluster) used for ranking segmentation. “Raw” allows arbitrary cluster names without membership verification, “Gs2Guild::Guild” verifies the user belongs to a GS2-Guild guild, and “Gs2Matchmaking::SeasonGathering” verifies membership in a GS2-Matchmaking season gathering.
DefinitionDescription
“Raw”No verification
“Gs2Guild::Guild”GS2-Guild Guild
“Gs2Matchmaking::SeasonGathering”GS2-Matchmaking Season Gathering
minimumValuelong0 ~ 9223372036854775805Minimum Score
The minimum allowed score value. Scores below this value will be rejected when submitted.
maximumValuelong0 ~ 9223372036854775805Maximum Score
The maximum allowed score value. Scores above this value will be rejected when submitted.
sumboolfalseSum Scores
When enabled, all submitted scores are accumulated and the ranking is determined by the total value. When disabled, only the best score is used for ranking.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
Order Direction
The sort direction for ranking scores. Use “asc” for lower-is-better rankings, or “desc” for higher-is-better rankings.
DefinitionDescription
“asc”ascending-order
“desc”descending-order
entryPeriodEventIdstring~ 1024 charsEntry Period Event GRN
GS2-Schedule event GRN that defines the period during which scores can be submitted. When linked to a repeating event, the ranking resets with each repeat cycle, enabling seasonal rankings.
rankingRewardsList<RankingReward>{entryPeriodEventId} != null[]0 ~ 100 itemsRanking Rewards
List of rewards granted based on ranking position at the end of each season. Only available when an entry period event is configured.
accessPeriodEventIdstring~ 1024 charsAccess Period Event GRN
GS2-Schedule event GRN that defines the period during which ranking results can be viewed and rewards can be claimed.
rewardCalculationIndexString Enum
enum {
  “rank”,
  “index”
}
“rank”Reward Calculation Index
Determines how rewards are matched to players. “rank” uses the 1-based ranking position (tied scores share same rank), “index” uses the 0-based unique sorted position (no ties).
DefinitionDescription
“rank”Determine rewards based on rank
“index”Determine rewards based on index

SubscribeRankingModel

Subscribe Ranking Model

A model that aggregates scores of other players that the user has subscribed to and creates a ranking.

TypeConditionRequiredDefaultValue LimitsDescription
subscribeRankingModelIdstring
*
~ 1024 charsSubscribe Ranking GRN
* Set automatically by the server
namestring
~ 128 charsSubscribe Ranking Model name
Subscribe Ranking Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 1024 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
minimumValuelong0 ~ 9223372036854775805Minimum Score
The minimum allowed score value. Scores below this value will be rejected when submitted.
maximumValuelong0 ~ 9223372036854775805Maximum Score
The maximum allowed score value. Scores above this value will be rejected when submitted.
sumboolfalseSum Scores
When enabled, all submitted scores are accumulated and the ranking is determined by the total value. When disabled, only the best score is used for ranking.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
Order Direction
The sort direction for ranking scores. Use “asc” for lower-is-better rankings, or “desc” for higher-is-better rankings.
DefinitionDescription
“asc”ascending-order
“desc”descending-order
entryPeriodEventIdstring~ 1024 charsEntry Period Event GRN
GS2-Schedule event GRN that defines the period during which scores can be submitted. When linked to a repeating event, the ranking resets with each repeat cycle, enabling seasonal rankings.
accessPeriodEventIdstring~ 1024 charsAccess Period Event GRN
GS2-Schedule event GRN that defines the period during which ranking results can be viewed.