GS2-Deploy/CDK Reference of GS2-Ranking2

The template format used when creating stacks with GS2-Deploy, and implementation examples of template output in various languages using CDK

Entity

Resources operated in Deploy process

Namespace

Namespace

A namespace is a mechanism that allows multiple uses of the same service for different purposes within a single project. Each GS2 service is managed on a per-namespace basis. Even when using the same service, if the namespace differs, the data is treated as a completely independent data space.

Therefore, you must create a namespace before you can start using each service.

TypeConditionRequiredDefaultValue LimitsDescription
namespaceIdstring
~ 1024 charsNamespace GRN
namestring
~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSetting
Transaction settings
logSettingLogSettingLog output settings
createdAtlong
NowDatetime of creation
Unix time, milliseconds
Automatically configured on the server
updatedAtlong
NowDatetime of last update
Unix time, milliseconds
Automatically configured on the server
revisionlong00 ~ 9223372036854775805Revision

GetAttr

Generation results of resources that can be obtained with the !GetAttr tag

TypeDescription
ItemNamespaceNamespace created

Implementation Example

Type: GS2::Ranking2::Namespace
Properties:
  Name: namespace-0001
  Description: null
  TransactionSetting: null
  LogSetting: 
    LoggingNamespaceId: grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001
import (
    "github.com/gs2io/gs2-golang-cdk/core"
    "github.com/gs2io/gs2-golang-cdk/ranking2"
)

SampleStack := core.NewStack()
ranking2.NewNamespace(
    &SampleStack,
    "namespace-0001",
    ranking2.NamespaceOptions{
        LogSetting: &core.LogSetting{
            LoggingNamespaceId: "grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
        },
    },
)

println(SampleStack.Yaml())  // Generate Template
class SampleStack extends \Gs2Cdk\Core\Model\Stack
{
    function __construct() {
        parent::__construct();
        new \Gs2Cdk\Ranking2\Model\Namespace_(
            stack: $this,
            name: "namespace-0001",
            options: new \Gs2Cdk\Ranking2\Model\Options\NamespaceOptions(
                logSetting: new \Gs2Cdk\Core\Model\LogSetting(
                    loggingNamespaceId: "grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"
                )
            )
        );
    }
}

print((new SampleStack())->yaml());  // Generate Template
class SampleStack extends io.gs2.cdk.core.model.Stack
{
    public SampleStack() {
        super();
        new io.gs2.cdk.ranking2.model.Namespace(
                this,
                "namespace-0001",
                new io.gs2.cdk.ranking2.model.options.NamespaceOptions()
                        .withLogSetting(new io.gs2.cdk.core.model.LogSetting(
                            "grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"
                        ))
        );
    }
}

System.out.println(new SampleStack().yaml());  // Generate Template
public class SampleStack : Gs2Cdk.Core.Model.Stack
{
    public SampleStack() {
        new Gs2Cdk.Gs2Ranking2.Model.Namespace(
            stack: this,
            name: "namespace-0001",
            options: new Gs2Cdk.Gs2Ranking2.Model.Options.NamespaceOptions
            {
                logSetting = new Gs2Cdk.Core.Model.LogSetting(
                    loggingNamespaceId: "grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"
                )
            }
        );
    }
}

Debug.Log(new SampleStack().Yaml());  // Generate Template
import core from "@/gs2cdk/core";
import ranking2 from "@/gs2cdk/ranking2";

class SampleStack extends core.Stack
{
    public constructor() {
        super();
        new ranking2.model.Namespace(
            this,
            "namespace-0001",
            {
                logSetting: new core.LogSetting(
                    "grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"
                )
            }
        );
    }
}

console.log(new SampleStack().yaml());  // Generate Template
from gs2_cdk import Stack, core, ranking2

class SampleStack(Stack):

    def __init__(self):
        super().__init__()
        ranking2.Namespace(
            stack=self,
            name='namespace-0001',
            options=ranking2.NamespaceOptions(
                log_setting=core.LogSetting(
                    logging_namespace_id='grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001',
                ),
            ),
        )

print(SampleStack().yaml())  # Generate Template

TransactionSetting

Transaction settings

Transaction settings control how transactions are executed, their consistency, asynchronous processing, and conflict avoidance mechanisms. Combining features like AutoRun, AtomicCommit, Distributor, batch application of script results, and asynchronous acquisition actions via JobQueue enables robust transaction management tailored to game logic.

TypeConditionRequiredDefaultValue LimitsDescription
enableAutoRunbool
falseWhether to automatically execute issued transactions on the server side
enableAtomicCommitbool{enableAutoRun} == true
✓*
falseWhether to commit the execution of transactions atomically
* Required if enableAutoRun is true
transactionUseDistributorbool{enableAtomicCommit} == true
✓*
falseWhether to execute transactions asynchronously
* Required if enableAtomicCommit is true
commitScriptResultInUseDistributorbool{transactionUseDistributor} == true
✓*
falseWhether to execute the commit processing of the script result asynchronously
* Required if transactionUseDistributor is true
acquireActionUseJobQueuebool{enableAtomicCommit} == true
✓*
falseWhether to use GS2-JobQueue to execute the acquire action
* Required if enableAtomicCommit is true
distributorNamespaceIdstring
“grn:gs2:{region}:{ownerId}:distributor:default”~ 1024 charsGS2-Distributor namespace used for transaction execution
queueNamespaceIdstring
“grn:gs2:{region}:{ownerId}:queue:default”~ 1024 charsNamespace in GS2-JobQueue used to run the transaction

LogSetting

Log Export Settings

Manages log data export settings. This type holds the GS2-Log namespace identifier (Namespace ID) used to export log data. Specify the GS2-Log namespace where log data is collected and stored in the GRN format for the Log Namespace ID (loggingNamespaceId). Configuring this setting ensures that log data for API requests and responses occurring within the specified namespace is output to the target GS2-Log namespace. GS2-Log provides real-time logs that can be used for system monitoring, analysis, and debugging.

TypeConditionRequiredDefaultValue LimitsDescription
loggingNamespaceIdstring
~ 1024 charsGS2-Log namespace GRN to output logs

CurrentRankingMaster

Currently Available Master Data

GS2 uses JSON format files for managing master data. By uploading these files, the settings are applied to the server.

To create JSON files, GS2 provides a master data editor within the management console. Additionally, you can create tools better suited for operating your game and export JSON files in the appropriate format.

TypeConditionRequiredDefaultValue LimitsDescription
namespaceIdstring
~ 1024 charsNamespace GRN
settingsstring
~ 5242880 bytes (5MB)Master Data

GetAttr

Generation results of resources that can be obtained with the !GetAttr tag

TypeDescription
ItemCurrentRankingMasterUpdated and currently available ranking settings

Implementation Example

Type: GS2::Ranking2::CurrentRankingMaster
Properties:
  NamespaceName: namespace-0001
  Mode: direct
  Settings: {
    "version": "2024-05-30",
    "globalRankingModels": [
      {
        "name": "ranking-0001",
        "orderDirection": "asc"
      },
      {
        "name": "ranking-0002",
        "orderDirection": "desc"
      }
    ],
    "clusterRankingModels": [
      {
        "name": "ranking-0001",
        "clusterType": "Raw",
        "orderDirection": "asc"
      },
      {
        "name": "ranking-0002",
        "clusterType": "Gs2Guild::Guild",
        "orderDirection": "desc"
      }
    ],
    "subscribeRankingModels": [
      {
        "name": "ranking-0001",
        "orderDirection": "asc"
      },
      {
        "name": "ranking-0002",
        "orderDirection": "desc"
      }
    ]
  }
  UploadToken: null
import (
    "github.com/gs2io/gs2-golang-cdk/core"
    "github.com/gs2io/gs2-golang-cdk/ranking2"
)

SampleStack := core.NewStack()
ranking2.NewNamespace(
    &SampleStack,
    "namespace-0001",
    ranking2.NamespaceOptions{},
).MasterData(
    []ranking2.GlobalRankingModel{
        ranking2.NewGlobalRankingModel(
            "ranking-0001",
            false,
            ranking2.GlobalRankingModelOrderDirectionAsc,
            ranking2.GlobalRankingModelRewardCalculationIndexRank,
            ranking2.GlobalRankingModelOptions{
            },
        ),
        ranking2.NewGlobalRankingModel(
            "ranking-0002",
            false,
            ranking2.GlobalRankingModelOrderDirectionDesc,
            ranking2.GlobalRankingModelRewardCalculationIndexRank,
            ranking2.GlobalRankingModelOptions{
            },
        ),
    },
    []ranking2.ClusterRankingModel{
        ranking2.NewClusterRankingModel(
            "ranking-0001",
            ranking2.ClusterRankingModelClusterTypeRaw,
            false,
            ranking2.ClusterRankingModelOrderDirectionAsc,
            ranking2.ClusterRankingModelRewardCalculationIndexRank,
            ranking2.ClusterRankingModelOptions{
            },
        ),
        ranking2.NewClusterRankingModel(
            "ranking-0002",
            ranking2.ClusterRankingModelClusterTypeGs2Guild_guild,
            false,
            ranking2.ClusterRankingModelOrderDirectionDesc,
            ranking2.ClusterRankingModelRewardCalculationIndexRank,
            ranking2.ClusterRankingModelOptions{
            },
        ),
    },
    []ranking2.SubscribeRankingModel{
        ranking2.NewSubscribeRankingModel(
            "ranking-0001",
            false,
            ranking2.SubscribeRankingModelOrderDirectionAsc,
            ranking2.SubscribeRankingModelOptions{
            },
        ),
        ranking2.NewSubscribeRankingModel(
            "ranking-0002",
            false,
            ranking2.SubscribeRankingModelOrderDirectionDesc,
            ranking2.SubscribeRankingModelOptions{
            },
        ),
    },
)

println(SampleStack.Yaml())  // Generate Template
class SampleStack extends \Gs2Cdk\Core\Model\Stack
{
    function __construct() {
        parent::__construct();
        (new \Gs2Cdk\Ranking2\Model\Namespace_(
            stack: $this,
            name: "namespace-0001"
        ))->masterData(
            [
                new \Gs2Cdk\Ranking2\Model\GlobalRankingModel(
                    name:"ranking-0001",
                    sum: false,
                    orderDirection: \Gs2Cdk\Ranking2\Model\Enums\GlobalRankingModelOrderDirection::ASC,
                    rewardCalculationIndex: \Gs2Cdk\Ranking2\Model\Enums\GlobalRankingModelRewardCalculationIndex::RANK
                ),
                new \Gs2Cdk\Ranking2\Model\GlobalRankingModel(
                    name:"ranking-0002",
                    sum: false,
                    orderDirection: \Gs2Cdk\Ranking2\Model\Enums\GlobalRankingModelOrderDirection::DESC,
                    rewardCalculationIndex: \Gs2Cdk\Ranking2\Model\Enums\GlobalRankingModelRewardCalculationIndex::RANK
                )
            ],
            [
                new \Gs2Cdk\Ranking2\Model\ClusterRankingModel(
                    name:"ranking-0001",
                    clusterType: \Gs2Cdk\Ranking2\Model\Enums\ClusterRankingModelClusterType::RAW,
                    sum: false,
                    orderDirection: \Gs2Cdk\Ranking2\Model\Enums\ClusterRankingModelOrderDirection::ASC,
                    rewardCalculationIndex: \Gs2Cdk\Ranking2\Model\Enums\ClusterRankingModelRewardCalculationIndex::RANK
                ),
                new \Gs2Cdk\Ranking2\Model\ClusterRankingModel(
                    name:"ranking-0002",
                    clusterType: \Gs2Cdk\Ranking2\Model\Enums\ClusterRankingModelClusterType::GS2_GUILD__GUILD,
                    sum: false,
                    orderDirection: \Gs2Cdk\Ranking2\Model\Enums\ClusterRankingModelOrderDirection::DESC,
                    rewardCalculationIndex: \Gs2Cdk\Ranking2\Model\Enums\ClusterRankingModelRewardCalculationIndex::RANK
                )
            ],
            [
                new \Gs2Cdk\Ranking2\Model\SubscribeRankingModel(
                    name:"ranking-0001",
                    sum: false,
                    orderDirection: \Gs2Cdk\Ranking2\Model\Enums\SubscribeRankingModelOrderDirection::ASC
                ),
                new \Gs2Cdk\Ranking2\Model\SubscribeRankingModel(
                    name:"ranking-0002",
                    sum: false,
                    orderDirection: \Gs2Cdk\Ranking2\Model\Enums\SubscribeRankingModelOrderDirection::DESC
                )
            ]
        );
    }
}

print((new SampleStack())->yaml());  // Generate Template
class SampleStack extends io.gs2.cdk.core.model.Stack
{
    public SampleStack() {
        super();
        new io.gs2.cdk.ranking2.model.Namespace(
            this,
            "namespace-0001"
        ).masterData(
            Arrays.asList(
                new io.gs2.cdk.ranking2.model.GlobalRankingModel(
                    "ranking-0001",
                    false,
                    io.gs2.cdk.ranking2.model.enums.GlobalRankingModelOrderDirection.ASC,
                    io.gs2.cdk.ranking2.model.enums.GlobalRankingModelRewardCalculationIndex.RANK
                ),
                new io.gs2.cdk.ranking2.model.GlobalRankingModel(
                    "ranking-0002",
                    false,
                    io.gs2.cdk.ranking2.model.enums.GlobalRankingModelOrderDirection.DESC,
                    io.gs2.cdk.ranking2.model.enums.GlobalRankingModelRewardCalculationIndex.RANK
                )
            ),
            Arrays.asList(
                new io.gs2.cdk.ranking2.model.ClusterRankingModel(
                    "ranking-0001",
                    io.gs2.cdk.ranking2.model.enums.ClusterRankingModelClusterType.RAW,
                    false,
                    io.gs2.cdk.ranking2.model.enums.ClusterRankingModelOrderDirection.ASC,
                    io.gs2.cdk.ranking2.model.enums.ClusterRankingModelRewardCalculationIndex.RANK
                ),
                new io.gs2.cdk.ranking2.model.ClusterRankingModel(
                    "ranking-0002",
                    io.gs2.cdk.ranking2.model.enums.ClusterRankingModelClusterType.GS2_GUILD__GUILD,
                    false,
                    io.gs2.cdk.ranking2.model.enums.ClusterRankingModelOrderDirection.DESC,
                    io.gs2.cdk.ranking2.model.enums.ClusterRankingModelRewardCalculationIndex.RANK
                )
            ),
            Arrays.asList(
                new io.gs2.cdk.ranking2.model.SubscribeRankingModel(
                    "ranking-0001",
                    false,
                    io.gs2.cdk.ranking2.model.enums.SubscribeRankingModelOrderDirection.ASC
                ),
                new io.gs2.cdk.ranking2.model.SubscribeRankingModel(
                    "ranking-0002",
                    false,
                    io.gs2.cdk.ranking2.model.enums.SubscribeRankingModelOrderDirection.DESC
                )
            )
        );
    }
}

System.out.println(new SampleStack().yaml());  // Generate Template
public class SampleStack : Gs2Cdk.Core.Model.Stack
{
    public SampleStack() {
        new Gs2Cdk.Gs2Ranking2.Model.Namespace(
            stack: this,
            name: "namespace-0001"
        ).MasterData(
            new Gs2Cdk.Gs2Ranking2.Model.GlobalRankingModel[] {
                new Gs2Cdk.Gs2Ranking2.Model.GlobalRankingModel(
                    name: "ranking-0001",
                    sum: false,
                    orderDirection: Gs2Cdk.Gs2Ranking2.Model.Enums.GlobalRankingModelOrderDirection.Asc,
                    rewardCalculationIndex: Gs2Cdk.Gs2Ranking2.Model.Enums.GlobalRankingModelRewardCalculationIndex.Rank
                ),
                new Gs2Cdk.Gs2Ranking2.Model.GlobalRankingModel(
                    name: "ranking-0002",
                    sum: false,
                    orderDirection: Gs2Cdk.Gs2Ranking2.Model.Enums.GlobalRankingModelOrderDirection.Desc,
                    rewardCalculationIndex: Gs2Cdk.Gs2Ranking2.Model.Enums.GlobalRankingModelRewardCalculationIndex.Rank
                )
            },
            new Gs2Cdk.Gs2Ranking2.Model.ClusterRankingModel[] {
                new Gs2Cdk.Gs2Ranking2.Model.ClusterRankingModel(
                    name: "ranking-0001",
                    clusterType: Gs2Cdk.Gs2Ranking2.Model.Enums.ClusterRankingModelClusterType.Raw,
                    sum: false,
                    orderDirection: Gs2Cdk.Gs2Ranking2.Model.Enums.ClusterRankingModelOrderDirection.Asc,
                    rewardCalculationIndex: Gs2Cdk.Gs2Ranking2.Model.Enums.ClusterRankingModelRewardCalculationIndex.Rank
                ),
                new Gs2Cdk.Gs2Ranking2.Model.ClusterRankingModel(
                    name: "ranking-0002",
                    clusterType: Gs2Cdk.Gs2Ranking2.Model.Enums.ClusterRankingModelClusterType.Gs2Guild_guild,
                    sum: false,
                    orderDirection: Gs2Cdk.Gs2Ranking2.Model.Enums.ClusterRankingModelOrderDirection.Desc,
                    rewardCalculationIndex: Gs2Cdk.Gs2Ranking2.Model.Enums.ClusterRankingModelRewardCalculationIndex.Rank
                )
            },
            new Gs2Cdk.Gs2Ranking2.Model.SubscribeRankingModel[] {
                new Gs2Cdk.Gs2Ranking2.Model.SubscribeRankingModel(
                    name: "ranking-0001",
                    sum: false,
                    orderDirection: Gs2Cdk.Gs2Ranking2.Model.Enums.SubscribeRankingModelOrderDirection.Asc
                ),
                new Gs2Cdk.Gs2Ranking2.Model.SubscribeRankingModel(
                    name: "ranking-0002",
                    sum: false,
                    orderDirection: Gs2Cdk.Gs2Ranking2.Model.Enums.SubscribeRankingModelOrderDirection.Desc
                )
            }
        );
    }
}

Debug.Log(new SampleStack().Yaml());  // Generate Template
import core from "@/gs2cdk/core";
import ranking2 from "@/gs2cdk/ranking2";

class SampleStack extends core.Stack
{
    public constructor() {
        super();
        new ranking2.model.Namespace(
            this,
            "namespace-0001",
        ).masterData(
            [
                new ranking2.model.GlobalRankingModel(
                    "ranking-0001",
                    false,
                    ranking2.model.GlobalRankingModelOrderDirection.ASC,
                    ranking2.model.GlobalRankingModelRewardCalculationIndex.RANK
                ),
                new ranking2.model.GlobalRankingModel(
                    "ranking-0002",
                    false,
                    ranking2.model.GlobalRankingModelOrderDirection.DESC,
                    ranking2.model.GlobalRankingModelRewardCalculationIndex.RANK
                )
            ],
            [
                new ranking2.model.ClusterRankingModel(
                    "ranking-0001",
                    ranking2.model.ClusterRankingModelClusterType.RAW,
                    false,
                    ranking2.model.ClusterRankingModelOrderDirection.ASC,
                    ranking2.model.ClusterRankingModelRewardCalculationIndex.RANK
                ),
                new ranking2.model.ClusterRankingModel(
                    "ranking-0002",
                    ranking2.model.ClusterRankingModelClusterType.GS2_GUILD__GUILD,
                    false,
                    ranking2.model.ClusterRankingModelOrderDirection.DESC,
                    ranking2.model.ClusterRankingModelRewardCalculationIndex.RANK
                )
            ],
            [
                new ranking2.model.SubscribeRankingModel(
                    "ranking-0001",
                    false,
                    ranking2.model.SubscribeRankingModelOrderDirection.ASC
                ),
                new ranking2.model.SubscribeRankingModel(
                    "ranking-0002",
                    false,
                    ranking2.model.SubscribeRankingModelOrderDirection.DESC
                )
            ]
        );
    }
}

console.log(new SampleStack().yaml());  // Generate Template
from gs2_cdk import Stack, core, ranking2

class SampleStack(Stack):

    def __init__(self):
        super().__init__()
        ranking2.Namespace(
            stack=self,
            name="namespace-0001",
        ).master_data(
            global_ranking_models=[
                ranking2.GlobalRankingModel(
                    name='ranking-0001',
                    sum=False,
                    order_direction=ranking2.GlobalRankingModelOrderDirection.ASC,
                    reward_calculation_index=ranking2.GlobalRankingModelRewardCalculationIndex.RANK
                ),
                ranking2.GlobalRankingModel(
                    name='ranking-0002',
                    sum=False,
                    order_direction=ranking2.GlobalRankingModelOrderDirection.DESC,
                    reward_calculation_index=ranking2.GlobalRankingModelRewardCalculationIndex.RANK
                ),
            ],
            cluster_ranking_models=[
                ranking2.ClusterRankingModel(
                    name='ranking-0001',
                    cluster_type=ranking2.ClusterRankingModelClusterType.RAW,
                    sum=False,
                    order_direction=ranking2.ClusterRankingModelOrderDirection.ASC,
                    reward_calculation_index=ranking2.ClusterRankingModelRewardCalculationIndex.RANK
                ),
                ranking2.ClusterRankingModel(
                    name='ranking-0002',
                    cluster_type=ranking2.ClusterRankingModelClusterType.GS2_GUILD__GUILD,
                    sum=False,
                    order_direction=ranking2.ClusterRankingModelOrderDirection.DESC,
                    reward_calculation_index=ranking2.ClusterRankingModelRewardCalculationIndex.RANK
                ),
            ],
            subscribe_ranking_models=[
                ranking2.SubscribeRankingModel(
                    name='ranking-0001',
                    sum=False,
                    order_direction=ranking2.SubscribeRankingModelOrderDirection.ASC
                ),
                ranking2.SubscribeRankingModel(
                    name='ranking-0002',
                    sum=False,
                    order_direction=ranking2.SubscribeRankingModelOrderDirection.DESC
                ),
            ],
        )

print(SampleStack().yaml())  # Generate Template

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
namestring
~ 128 charsRanking Name
metadatastring~ 1024 charsMetadata
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered GS2-Schedule Event GRN
rankingRewardsList<RankingReward>{entryPeriodEventId} != null[]0 ~ 100 itemsList of ranking rewards
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed GS2-Schedule Event GRN
rewardCalculationIndexString Enum
enum {
  “rank”,
  “index”
}
“rank”~ 128 charsReward calculation index
Enumerator String DefinitionDescription
“rank”Determine rewards based on rank
“index”Determine rewards based on index

RankingReward

Ranking Reward Model

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
metadatastring~ 1024 charsMetadata
acquireActionsList<AcquireAction>[]0 ~ 100 itemsList of actions to be performed when rewards are received

ClusterRankingModel

Cluster Ranking Model

The cluster ranking mode is a model for realizing rankings targeting players in 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
namestring
~ 128 charsRanking Name
metadatastring~ 1024 charsMetadata
clusterTypeString Enum
enum {
  “Raw”,
  “Gs2Guild::Guild”,
  “Gs2Matchmaking::SeasonGathering”
}
~ 128 charsCluster Type
Enumerator String DefinitionDescription
“Raw”No verification
“Gs2Guild::Guild”GS2-Guild Guild
“Gs2Matchmaking::SeasonGathering”GS2-Matchmaking Season Gathering
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered GS2-Schedule Event GRN
rankingRewardsList<RankingReward>{entryPeriodEventId} != null[]0 ~ 100 itemsList of ranking rewards
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed GS2-Schedule Event GRN
rewardCalculationIndexString Enum
enum {
  “rank”,
  “index”
}
“rank”~ 128 charsReward calculation index
Enumerator String DefinitionDescription
“rank”Determine rewards based on rank
“index”Determine rewards based on index

SubscribeRankingModel

Subscribe Ranking Model

A model that aggregates the scores of other players who have subscribed and creates a ranking.

TypeConditionRequiredDefaultValue LimitsDescription
subscribeRankingModelIdstring
~ 1024 charsSubscribe Ranking GRN
namestring
~ 128 charsRanking Name
metadatastring~ 1024 charsMetadata
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
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

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",
}
~ 128 charsTypes of actions to be performed in the acquire action
requeststring
~ 524288 charsJSON string of the request used when executing the action