GS2-Deploy/CDK Reference of GS2-Experience

Entities

Namespace

Namespace

Namespace is a mechanism that allows multiple uses of the same service for different purposes within a single project. Basically, GS2 services have a layer called namespace, and different namespaces are treated as completely different data spaces, even for the same service.

Therefore, it is necessary to create a namespace before starting to use each service.

TypeRequireDefaultLimitationDescription
namestring~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSettingTransaction settings
rankCapScriptIdstring~ 1024 charsScript to dynamically determine rank caps
changeExperienceScriptScriptSettingScript to be executed when experience changes
changeRankScriptScriptSettingScript to be executed when rank changes
changeRankCapScriptScriptSettingScript to be executed when the rank cap changes
overflowExperienceScriptstring~ 1024 charsScript to run when experience overflows
logSettingLogSettingLog output settings

GetAttr

TypeDescription
ItemNamespaceNamespace created

Implementation Example

Type: GS2::Experience::Namespace
Properties:
  Name: namespace1
  Description: null
  TransactionSetting: null
  RankCapScriptId: null
  ChangeExperienceScript: null
  ChangeRankScript: null
  ChangeRankCapScript: null
  OverflowExperienceScript: null
  LogSetting: 
    LoggingNamespaceId: grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1
from gs2_cdk import Stack, core, experience

class SampleStack(Stack):

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

print(SampleStack().yaml())  # Generate Template
class SampleStack extends \Gs2Cdk\Core\Model\Stack
{
    function __construct() {
        parent::__construct();
        new \Gs2Cdk\Experience\Model\Namespace_(
            stack: $this,
            name: "namespace-0001",
            options: new \Gs2Cdk\Experience\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.experience.model.Namespace(
            this,
            "namespace-0001",
            new io.gs2.cdk.experience.model.options.NamespaceOptions() {
                {
                    logSetting = new io.gs2.cdk.core.model.LogSetting(
                        loggingNamespaceId = "grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"
                    );
                }
            }
        );
    }
}

System.out.println(new SampleStack().yaml());  // Generate Template
import core from "@/gs2cdk/core";
import experience from "@/gs2cdk/experience";

class SampleStack extends core.Stack
{
    public constructor() {
        super();
        new experience.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
public class SampleStack : Gs2Cdk.Core.Model.Stack
{
    public SampleStack() {
        new Gs2Cdk.Gs2Experience.Model.Namespace(
            this,
            "namespace-0001",
            new Gs2Cdk.Gs2Experience.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

CurrentExperienceMaster

Currently available master data

GS2 uses JSON format files for master data management. By uploading the file, you can actually reflect the settings on the server.

We provide a master data editor on the management console as a way to create JSON files, but you can also create JSON files using the The service can also be used by creating a tool more appropriate for game management and exporting a JSON file in the appropriate format.

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
settingsstring~ 5242880 charsMaster data

GetAttr

TypeDescription
ItemCurrentExperienceMasterUpdated and currently available experience settings

Implementation Example

Type: GS2::Experience::CurrentExperienceMaster
Properties:
  NamespaceName: namespace1
  Settings: {
    "version": "2019-01-11",
    "experienceModels": [
      {
        "name": "character_ssr",
        "defaultRankCap": 50,
        "maxRankCap": 80,
        "rankThreshold":
          {
            "metadata": "CHARACTER",
            "values": [
              100,
              200,
              300,
              400,
              500,
              600,
              700,
              800,
              900,
              1000,
              1100,
              1200,
              1300,
              1400,
              1500,
              1600,
              1700,
              1800,
              1900,
              2000,
              2100,
              2200,
              2300,
              2400,
              2500,
              2600,
              2700,
              2800,
              2900,
              3000,
              3100,
              3200,
              3300,
              3400,
              3500,
              3600,
              3700,
              3800,
              3900,
              4000,
              4100,
              4200,
              4300,
              4400,
              4500,
              4600,
              4700,
              4800,
              4900,
              5000,
              5100,
              5200,
              5300,
              5400,
              5500,
              5600,
              5700,
              5800,
              5900,
              6000,
              6100,
              6200,
              6300,
              6400,
              6500,
              6600,
              6700,
              6800,
              6900,
              7000,
              7100,
              7200,
              7300,
              7400,
              7500,
              7600,
              7700,
              7800,
              7900
            ]
          },
        "metadata": "SSR"
      },
      {
        "name": "character_sr",
        "defaultRankCap": 40,
        "maxRankCap": 70,
        "rankThreshold":
          {
            "metadata": "CHARACTER",
            "values": [
              100,
              200,
              300,
              400,
              500,
              600,
              700,
              800,
              900,
              1000,
              1100,
              1200,
              1300,
              1400,
              1500,
              1600,
              1700,
              1800,
              1900,
              2000,
              2100,
              2200,
              2300,
              2400,
              2500,
              2600,
              2700,
              2800,
              2900,
              3000,
              3100,
              3200,
              3300,
              3400,
              3500,
              3600,
              3700,
              3800,
              3900,
              4000,
              4100,
              4200,
              4300,
              4400,
              4500,
              4600,
              4700,
              4800,
              4900,
              5000,
              5100,
              5200,
              5300,
              5400,
              5500,
              5600,
              5700,
              5800,
              5900,
              6000,
              6100,
              6200,
              6300,
              6400,
              6500,
              6600,
              6700,
              6800,
              6900,
              7000,
              7100,
              7200,
              7300,
              7400,
              7500,
              7600,
              7700,
              7800,
              7900
            ]
          },
        "metadata": "SR"
      },
      {
        "name": "character_r",
        "defaultRankCap": 30,
        "maxRankCap": 60,
        "rankThreshold":
          {
            "metadata": "CHARACTER",
            "values": [
              100,
              200,
              300,
              400,
              500,
              600,
              700,
              800,
              900,
              1000,
              1100,
              1200,
              1300,
              1400,
              1500,
              1600,
              1700,
              1800,
              1900,
              2000,
              2100,
              2200,
              2300,
              2400,
              2500,
              2600,
              2700,
              2800,
              2900,
              3000,
              3100,
              3200,
              3300,
              3400,
              3500,
              3600,
              3700,
              3800,
              3900,
              4000,
              4100,
              4200,
              4300,
              4400,
              4500,
              4600,
              4700,
              4800,
              4900,
              5000,
              5100,
              5200,
              5300,
              5400,
              5500,
              5600,
              5700,
              5800,
              5900,
              6000,
              6100,
              6200,
              6300,
              6400,
              6500,
              6600,
              6700,
              6800,
              6900,
              7000,
              7100,
              7200,
              7300,
              7400,
              7500,
              7600,
              7700,
              7800,
              7900
            ]
          },
        "metadata": "R"
      },
      {
        "name": "equipment",
        "defaultRankCap": 30,
        "maxRankCap": 50,
        "rankThreshold":
          {
            "metadata": "EQUIPMENT",
            "values": [
              200,
              400,
              600,
              800,
              1000,
              1200,
              1400,
              1600,
              1800,
              2000,
              2200,
              2400,
              2600,
              2800,
              3000,
              3200,
              3400,
              3600,
              3800,
              4000,
              4200,
              4400,
              4600,
              4800,
              5000,
              5200,
              5400,
              5600,
              5800,
              6000,
              6200,
              6400,
              6600,
              6800,
              7000,
              7200,
              7400,
              7600,
              7800,
              8000,
              8200,
              8400,
              8600,
              8800,
              9000,
              9200,
              9400,
              9600,
              9800
            ]
          },
        "metadata": "EQUIPMENT",
        "acquireActionRates": [
          {
            "name": "rate-0001",
            "mode": "big",
            "bigRates": [
              "1",
              "10",
              "100",
              "1000",
              "10000",
              "100000",
              "1000000",
              "10000000",
              "100000000",
              "1000000000",
              "10000000000",
              "100000000000",
              "1000000000000",
              "10000000000000",
              "100000000000000",
              "1000000000000000",
              "10000000000000000",
              "100000000000000000",
              "1000000000000000000",
              "10000000000000000000",
              "100000000000000000000",
              "1000000000000000000000",
              "10000000000000000000000",
              "100000000000000000000000",
              "1000000000000000000000000",
              "10000000000000000000000000",
              "100000000000000000000000000"
            ]
          }
        ]
      },
      {
        "name": "skill",
        "defaultRankCap": 10,
        "maxRankCap": 20,
        "rankThreshold":
          {
            "metadata": "SKILL",
            "values": [
              300,
              600,
              900,
              1200,
              1500,
              1800,
              2100,
              2400,
              2700,
              3000,
              3300,
              3600,
              3900,
              4200,
              4500,
              4800,
              5100,
              5400,
              5700
            ]
          },
        "metadata": "SKILL"
      }
    ]
  }
from gs2_cdk import Stack, core, experience

class SampleStack(Stack):

    def __init__(self):
        super().__init__()
        experience.Namespace(
            stack=self,
            # omission
        ).master_data(
            experience_models=[
                experience.ExperienceModel(
                    name='character_ssr',
                    default_rank_cap=50,
                    max_rank_cap=80,
                    rank_threshold=experience.Threshold(
                            metadata='CHARACTER',
                            values=[
                                100,
                                200,
                                300,
                                400,
                                500,
                                600,
                                700,
                                800,
                                900,
                                1000,
                                1100,
                                1200,
                                1300,
                                1400,
                                1500,
                                1600,
                                1700,
                                1800,
                                1900,
                                2000,
                                2100,
                                2200,
                                2300,
                                2400,
                                2500,
                                2600,
                                2700,
                                2800,
                                2900,
                                3000,
                                3100,
                                3200,
                                3300,
                                3400,
                                3500,
                                3600,
                                3700,
                                3800,
                                3900,
                                4000,
                                4100,
                                4200,
                                4300,
                                4400,
                                4500,
                                4600,
                                4700,
                                4800,
                                4900,
                                5000,
                                5100,
                                5200,
                                5300,
                                5400,
                                5500,
                                5600,
                                5700,
                                5800,
                                5900,
                                6000,
                                6100,
                                6200,
                                6300,
                                6400,
                                6500,
                                6600,
                                6700,
                                6800,
                                6900,
                                7000,
                                7100,
                                7200,
                                7300,
                                7400,
                                7500,
                                7600,
                                7700,
                                7800,
                                7900
                            ]
                        ),
                    options=experience.ExperienceModelOptions(
                        metadata='SSR',
                    ),
                ),
                experience.ExperienceModel(
                    name='character_sr',
                    default_rank_cap=40,
                    max_rank_cap=70,
                    rank_threshold=experience.Threshold(
                            metadata='CHARACTER',
                            values=[
                                100,
                                200,
                                300,
                                400,
                                500,
                                600,
                                700,
                                800,
                                900,
                                1000,
                                1100,
                                1200,
                                1300,
                                1400,
                                1500,
                                1600,
                                1700,
                                1800,
                                1900,
                                2000,
                                2100,
                                2200,
                                2300,
                                2400,
                                2500,
                                2600,
                                2700,
                                2800,
                                2900,
                                3000,
                                3100,
                                3200,
                                3300,
                                3400,
                                3500,
                                3600,
                                3700,
                                3800,
                                3900,
                                4000,
                                4100,
                                4200,
                                4300,
                                4400,
                                4500,
                                4600,
                                4700,
                                4800,
                                4900,
                                5000,
                                5100,
                                5200,
                                5300,
                                5400,
                                5500,
                                5600,
                                5700,
                                5800,
                                5900,
                                6000,
                                6100,
                                6200,
                                6300,
                                6400,
                                6500,
                                6600,
                                6700,
                                6800,
                                6900,
                                7000,
                                7100,
                                7200,
                                7300,
                                7400,
                                7500,
                                7600,
                                7700,
                                7800,
                                7900
                            ]
                        ),
                    options=experience.ExperienceModelOptions(
                        metadata='SR',
                    ),
                ),
                experience.ExperienceModel(
                    name='character_r',
                    default_rank_cap=30,
                    max_rank_cap=60,
                    rank_threshold=experience.Threshold(
                            metadata='CHARACTER',
                            values=[
                                100,
                                200,
                                300,
                                400,
                                500,
                                600,
                                700,
                                800,
                                900,
                                1000,
                                1100,
                                1200,
                                1300,
                                1400,
                                1500,
                                1600,
                                1700,
                                1800,
                                1900,
                                2000,
                                2100,
                                2200,
                                2300,
                                2400,
                                2500,
                                2600,
                                2700,
                                2800,
                                2900,
                                3000,
                                3100,
                                3200,
                                3300,
                                3400,
                                3500,
                                3600,
                                3700,
                                3800,
                                3900,
                                4000,
                                4100,
                                4200,
                                4300,
                                4400,
                                4500,
                                4600,
                                4700,
                                4800,
                                4900,
                                5000,
                                5100,
                                5200,
                                5300,
                                5400,
                                5500,
                                5600,
                                5700,
                                5800,
                                5900,
                                6000,
                                6100,
                                6200,
                                6300,
                                6400,
                                6500,
                                6600,
                                6700,
                                6800,
                                6900,
                                7000,
                                7100,
                                7200,
                                7300,
                                7400,
                                7500,
                                7600,
                                7700,
                                7800,
                                7900
                            ]
                        ),
                    options=experience.ExperienceModelOptions(
                        metadata='R',
                    ),
                ),
                experience.ExperienceModel(
                    name='equipment',
                    default_rank_cap=30,
                    max_rank_cap=50,
                    rank_threshold=experience.Threshold(
                            metadata='EQUIPMENT',
                            values=[
                                200,
                                400,
                                600,
                                800,
                                1000,
                                1200,
                                1400,
                                1600,
                                1800,
                                2000,
                                2200,
                                2400,
                                2600,
                                2800,
                                3000,
                                3200,
                                3400,
                                3600,
                                3800,
                                4000,
                                4200,
                                4400,
                                4600,
                                4800,
                                5000,
                                5200,
                                5400,
                                5600,
                                5800,
                                6000,
                                6200,
                                6400,
                                6600,
                                6800,
                                7000,
                                7200,
                                7400,
                                7600,
                                7800,
                                8000,
                                8200,
                                8400,
                                8600,
                                8800,
                                9000,
                                9200,
                                9400,
                                9600,
                                9800
                            ]
                        ),
                    options=experience.ExperienceModelOptions(
                        metadata='EQUIPMENT',
                        acquire_action_rates=[
                            experience.AcquireActionRate(
                                name='rate-0001',
                                mode='big',
                                big_rates=[
                                    '1',
                                    '10',
                                    '100',
                                    '1000',
                                    '10000',
                                    '100000',
                                    '1000000',
                                    '10000000',
                                    '100000000',
                                    '1000000000',
                                    '10000000000',
                                    '100000000000',
                                    '1000000000000',
                                    '10000000000000',
                                    '100000000000000',
                                    '1000000000000000',
                                    '10000000000000000',
                                    '100000000000000000',
                                    '1000000000000000000',
                                    '10000000000000000000',
                                    '100000000000000000000',
                                    '1000000000000000000000',
                                    '10000000000000000000000',
                                    '100000000000000000000000',
                                    '1000000000000000000000000',
                                    '10000000000000000000000000',
                                    '100000000000000000000000000'
                                ]
                            ),
                        ],
                    ),
                ),
                experience.ExperienceModel(
                    name='skill',
                    default_rank_cap=10,
                    max_rank_cap=20,
                    rank_threshold=experience.Threshold(
                            metadata='SKILL',
                            values=[
                                300,
                                600,
                                900,
                                1200,
                                1500,
                                1800,
                                2100,
                                2400,
                                2700,
                                3000,
                                3300,
                                3600,
                                3900,
                                4200,
                                4500,
                                4800,
                                5100,
                                5400,
                                5700
                            ]
                        ),
                    options=experience.ExperienceModelOptions(
                        metadata='SKILL',
                    ),
                ),
            ],
        )

print(SampleStack().yaml())  # Generate Template
class SampleStack extends \Gs2Cdk\Core\Model\Stack
{
    function __construct() {
        parent::__construct();
        (new \Gs2Cdk\Experience\Model\Namespace_(
            stack: $this,
            // omission
        ))->masterData(
            [
                new \Gs2Cdk\Experience\Model\ExperienceModel(
                    name:"character_ssr",
                    defaultRankCap:50,
                    maxRankCap:80,
                    rankThreshold:new \Gs2Cdk\Experience\Model\Threshold(
                        metadata: "CHARACTER",
                        values: [
                            100,
                            200,
                            300,
                            400,
                            500,
                            600,
                            700,
                            800,
                            900,
                            1000,
                            1100,
                            1200,
                            1300,
                            1400,
                            1500,
                            1600,
                            1700,
                            1800,
                            1900,
                            2000,
                            2100,
                            2200,
                            2300,
                            2400,
                            2500,
                            2600,
                            2700,
                            2800,
                            2900,
                            3000,
                            3100,
                            3200,
                            3300,
                            3400,
                            3500,
                            3600,
                            3700,
                            3800,
                            3900,
                            4000,
                            4100,
                            4200,
                            4300,
                            4400,
                            4500,
                            4600,
                            4700,
                            4800,
                            4900,
                            5000,
                            5100,
                            5200,
                            5300,
                            5400,
                            5500,
                            5600,
                            5700,
                            5800,
                            5900,
                            6000,
                            6100,
                            6200,
                            6300,
                            6400,
                            6500,
                            6600,
                            6700,
                            6800,
                            6900,
                            7000,
                            7100,
                            7200,
                            7300,
                            7400,
                            7500,
                            7600,
                            7700,
                            7800,
                            7900
                        ]
                    ),
                    options: new \Gs2Cdk\Experience\Model\Options\ExperienceModelOptions(
                        metadata:"SSR"
                    )
                ),
                new \Gs2Cdk\Experience\Model\ExperienceModel(
                    name:"character_sr",
                    defaultRankCap:40,
                    maxRankCap:70,
                    rankThreshold:new \Gs2Cdk\Experience\Model\Threshold(
                        metadata: "CHARACTER",
                        values: [
                            100,
                            200,
                            300,
                            400,
                            500,
                            600,
                            700,
                            800,
                            900,
                            1000,
                            1100,
                            1200,
                            1300,
                            1400,
                            1500,
                            1600,
                            1700,
                            1800,
                            1900,
                            2000,
                            2100,
                            2200,
                            2300,
                            2400,
                            2500,
                            2600,
                            2700,
                            2800,
                            2900,
                            3000,
                            3100,
                            3200,
                            3300,
                            3400,
                            3500,
                            3600,
                            3700,
                            3800,
                            3900,
                            4000,
                            4100,
                            4200,
                            4300,
                            4400,
                            4500,
                            4600,
                            4700,
                            4800,
                            4900,
                            5000,
                            5100,
                            5200,
                            5300,
                            5400,
                            5500,
                            5600,
                            5700,
                            5800,
                            5900,
                            6000,
                            6100,
                            6200,
                            6300,
                            6400,
                            6500,
                            6600,
                            6700,
                            6800,
                            6900,
                            7000,
                            7100,
                            7200,
                            7300,
                            7400,
                            7500,
                            7600,
                            7700,
                            7800,
                            7900
                        ]
                    ),
                    options: new \Gs2Cdk\Experience\Model\Options\ExperienceModelOptions(
                        metadata:"SR"
                    )
                ),
                new \Gs2Cdk\Experience\Model\ExperienceModel(
                    name:"character_r",
                    defaultRankCap:30,
                    maxRankCap:60,
                    rankThreshold:new \Gs2Cdk\Experience\Model\Threshold(
                        metadata: "CHARACTER",
                        values: [
                            100,
                            200,
                            300,
                            400,
                            500,
                            600,
                            700,
                            800,
                            900,
                            1000,
                            1100,
                            1200,
                            1300,
                            1400,
                            1500,
                            1600,
                            1700,
                            1800,
                            1900,
                            2000,
                            2100,
                            2200,
                            2300,
                            2400,
                            2500,
                            2600,
                            2700,
                            2800,
                            2900,
                            3000,
                            3100,
                            3200,
                            3300,
                            3400,
                            3500,
                            3600,
                            3700,
                            3800,
                            3900,
                            4000,
                            4100,
                            4200,
                            4300,
                            4400,
                            4500,
                            4600,
                            4700,
                            4800,
                            4900,
                            5000,
                            5100,
                            5200,
                            5300,
                            5400,
                            5500,
                            5600,
                            5700,
                            5800,
                            5900,
                            6000,
                            6100,
                            6200,
                            6300,
                            6400,
                            6500,
                            6600,
                            6700,
                            6800,
                            6900,
                            7000,
                            7100,
                            7200,
                            7300,
                            7400,
                            7500,
                            7600,
                            7700,
                            7800,
                            7900
                        ]
                    ),
                    options: new \Gs2Cdk\Experience\Model\Options\ExperienceModelOptions(
                        metadata:"R"
                    )
                ),
                new \Gs2Cdk\Experience\Model\ExperienceModel(
                    name:"equipment",
                    defaultRankCap:30,
                    maxRankCap:50,
                    rankThreshold:new \Gs2Cdk\Experience\Model\Threshold(
                        metadata: "EQUIPMENT",
                        values: [
                            200,
                            400,
                            600,
                            800,
                            1000,
                            1200,
                            1400,
                            1600,
                            1800,
                            2000,
                            2200,
                            2400,
                            2600,
                            2800,
                            3000,
                            3200,
                            3400,
                            3600,
                            3800,
                            4000,
                            4200,
                            4400,
                            4600,
                            4800,
                            5000,
                            5200,
                            5400,
                            5600,
                            5800,
                            6000,
                            6200,
                            6400,
                            6600,
                            6800,
                            7000,
                            7200,
                            7400,
                            7600,
                            7800,
                            8000,
                            8200,
                            8400,
                            8600,
                            8800,
                            9000,
                            9200,
                            9400,
                            9600,
                            9800
                        ]
                    ),
                    options: new \Gs2Cdk\Experience\Model\Options\ExperienceModelOptions(
                        metadata:"EQUIPMENT",
                        acquireActionRates:[
                            new \Gs2Cdk\Experience\Model\AcquireActionRate(
                                name: "rate-0001",
                                mode: "big",
                                bigRates: [
                                    "1",
                                    "10",
                                    "100",
                                    "1000",
                                    "10000",
                                    "100000",
                                    "1000000",
                                    "10000000",
                                    "100000000",
                                    "1000000000",
                                    "10000000000",
                                    "100000000000",
                                    "1000000000000",
                                    "10000000000000",
                                    "100000000000000",
                                    "1000000000000000",
                                    "10000000000000000",
                                    "100000000000000000",
                                    "1000000000000000000",
                                    "10000000000000000000",
                                    "100000000000000000000",
                                    "1000000000000000000000",
                                    "10000000000000000000000",
                                    "100000000000000000000000",
                                    "1000000000000000000000000",
                                    "10000000000000000000000000",
                                    "100000000000000000000000000"
                                ]
                            ),
                        ]
                    )
                ),
                new \Gs2Cdk\Experience\Model\ExperienceModel(
                    name:"skill",
                    defaultRankCap:10,
                    maxRankCap:20,
                    rankThreshold:new \Gs2Cdk\Experience\Model\Threshold(
                        metadata: "SKILL",
                        values: [
                            300,
                            600,
                            900,
                            1200,
                            1500,
                            1800,
                            2100,
                            2400,
                            2700,
                            3000,
                            3300,
                            3600,
                            3900,
                            4200,
                            4500,
                            4800,
                            5100,
                            5400,
                            5700
                        ]
                    ),
                    options: new \Gs2Cdk\Experience\Model\Options\ExperienceModelOptions(
                        metadata:"SKILL"
                    )
                )
            ]
        );
    }
}

print((new SampleStack())->yaml());  // Generate Template
class SampleStack extends io.gs2.cdk.core.model.Stack
{
    public SampleStack() {
        super();
        new io.gs2.cdk.experience.model.Namespace(
            this,
            // omission
        ).masterData(
            Arrays.asList(
                new io.gs2.cdk.experience.model.ExperienceModel(
                    "character_ssr",
                    50L,
                    80L,
                    new io.gs2.cdk.experience.model.Threshold(
                        "CHARACTER",
                        Arrays.asList(
                            100L,
                            200L,
                            300L,
                            400L,
                            500L,
                            600L,
                            700L,
                            800L,
                            900L,
                            1000L,
                            1100L,
                            1200L,
                            1300L,
                            1400L,
                            1500L,
                            1600L,
                            1700L,
                            1800L,
                            1900L,
                            2000L,
                            2100L,
                            2200L,
                            2300L,
                            2400L,
                            2500L,
                            2600L,
                            2700L,
                            2800L,
                            2900L,
                            3000L,
                            3100L,
                            3200L,
                            3300L,
                            3400L,
                            3500L,
                            3600L,
                            3700L,
                            3800L,
                            3900L,
                            4000L,
                            4100L,
                            4200L,
                            4300L,
                            4400L,
                            4500L,
                            4600L,
                            4700L,
                            4800L,
                            4900L,
                            5000L,
                            5100L,
                            5200L,
                            5300L,
                            5400L,
                            5500L,
                            5600L,
                            5700L,
                            5800L,
                            5900L,
                            6000L,
                            6100L,
                            6200L,
                            6300L,
                            6400L,
                            6500L,
                            6600L,
                            6700L,
                            6800L,
                            6900L,
                            7000L,
                            7100L,
                            7200L,
                            7300L,
                            7400L,
                            7500L,
                            7600L,
                            7700L,
                            7800L,
                            7900L
                        )
                    ),
                    new io.gs2.cdk.experience.model.options.ExperienceModelOptions() {
                        {
                            metadata: "SSR";
                        }
                    }
                ),
                new io.gs2.cdk.experience.model.ExperienceModel(
                    "character_sr",
                    40L,
                    70L,
                    new io.gs2.cdk.experience.model.Threshold(
                        "CHARACTER",
                        Arrays.asList(
                            100L,
                            200L,
                            300L,
                            400L,
                            500L,
                            600L,
                            700L,
                            800L,
                            900L,
                            1000L,
                            1100L,
                            1200L,
                            1300L,
                            1400L,
                            1500L,
                            1600L,
                            1700L,
                            1800L,
                            1900L,
                            2000L,
                            2100L,
                            2200L,
                            2300L,
                            2400L,
                            2500L,
                            2600L,
                            2700L,
                            2800L,
                            2900L,
                            3000L,
                            3100L,
                            3200L,
                            3300L,
                            3400L,
                            3500L,
                            3600L,
                            3700L,
                            3800L,
                            3900L,
                            4000L,
                            4100L,
                            4200L,
                            4300L,
                            4400L,
                            4500L,
                            4600L,
                            4700L,
                            4800L,
                            4900L,
                            5000L,
                            5100L,
                            5200L,
                            5300L,
                            5400L,
                            5500L,
                            5600L,
                            5700L,
                            5800L,
                            5900L,
                            6000L,
                            6100L,
                            6200L,
                            6300L,
                            6400L,
                            6500L,
                            6600L,
                            6700L,
                            6800L,
                            6900L,
                            7000L,
                            7100L,
                            7200L,
                            7300L,
                            7400L,
                            7500L,
                            7600L,
                            7700L,
                            7800L,
                            7900L
                        )
                    ),
                    new io.gs2.cdk.experience.model.options.ExperienceModelOptions() {
                        {
                            metadata: "SR";
                        }
                    }
                ),
                new io.gs2.cdk.experience.model.ExperienceModel(
                    "character_r",
                    30L,
                    60L,
                    new io.gs2.cdk.experience.model.Threshold(
                        "CHARACTER",
                        Arrays.asList(
                            100L,
                            200L,
                            300L,
                            400L,
                            500L,
                            600L,
                            700L,
                            800L,
                            900L,
                            1000L,
                            1100L,
                            1200L,
                            1300L,
                            1400L,
                            1500L,
                            1600L,
                            1700L,
                            1800L,
                            1900L,
                            2000L,
                            2100L,
                            2200L,
                            2300L,
                            2400L,
                            2500L,
                            2600L,
                            2700L,
                            2800L,
                            2900L,
                            3000L,
                            3100L,
                            3200L,
                            3300L,
                            3400L,
                            3500L,
                            3600L,
                            3700L,
                            3800L,
                            3900L,
                            4000L,
                            4100L,
                            4200L,
                            4300L,
                            4400L,
                            4500L,
                            4600L,
                            4700L,
                            4800L,
                            4900L,
                            5000L,
                            5100L,
                            5200L,
                            5300L,
                            5400L,
                            5500L,
                            5600L,
                            5700L,
                            5800L,
                            5900L,
                            6000L,
                            6100L,
                            6200L,
                            6300L,
                            6400L,
                            6500L,
                            6600L,
                            6700L,
                            6800L,
                            6900L,
                            7000L,
                            7100L,
                            7200L,
                            7300L,
                            7400L,
                            7500L,
                            7600L,
                            7700L,
                            7800L,
                            7900L
                        )
                    ),
                    new io.gs2.cdk.experience.model.options.ExperienceModelOptions() {
                        {
                            metadata: "R";
                        }
                    }
                ),
                new io.gs2.cdk.experience.model.ExperienceModel(
                    "equipment",
                    30L,
                    50L,
                    new io.gs2.cdk.experience.model.Threshold(
                        "EQUIPMENT",
                        Arrays.asList(
                            200L,
                            400L,
                            600L,
                            800L,
                            1000L,
                            1200L,
                            1400L,
                            1600L,
                            1800L,
                            2000L,
                            2200L,
                            2400L,
                            2600L,
                            2800L,
                            3000L,
                            3200L,
                            3400L,
                            3600L,
                            3800L,
                            4000L,
                            4200L,
                            4400L,
                            4600L,
                            4800L,
                            5000L,
                            5200L,
                            5400L,
                            5600L,
                            5800L,
                            6000L,
                            6200L,
                            6400L,
                            6600L,
                            6800L,
                            7000L,
                            7200L,
                            7400L,
                            7600L,
                            7800L,
                            8000L,
                            8200L,
                            8400L,
                            8600L,
                            8800L,
                            9000L,
                            9200L,
                            9400L,
                            9600L,
                            9800L
                        )
                    ),
                    new io.gs2.cdk.experience.model.options.ExperienceModelOptions() {
                        {
                            metadata: "EQUIPMENT";
                            acquireActionRates: Arrays.asList(
                                new io.gs2.cdk.experience.model.AcquireActionRate(
                                    "rate-0001",
                                    "big",
                                    Arrays.asList(
                                        "1",
                                        "10",
                                        "100",
                                        "1000",
                                        "10000",
                                        "100000",
                                        "1000000",
                                        "10000000",
                                        "100000000",
                                        "1000000000",
                                        "10000000000",
                                        "100000000000",
                                        "1000000000000",
                                        "10000000000000",
                                        "100000000000000",
                                        "1000000000000000",
                                        "10000000000000000",
                                        "100000000000000000",
                                        "1000000000000000000",
                                        "10000000000000000000",
                                        "100000000000000000000",
                                        "1000000000000000000000",
                                        "10000000000000000000000",
                                        "100000000000000000000000",
                                        "1000000000000000000000000",
                                        "10000000000000000000000000",
                                        "100000000000000000000000000"
                                    )
                                )
                            );
                        }
                    }
                ),
                new io.gs2.cdk.experience.model.ExperienceModel(
                    "skill",
                    10L,
                    20L,
                    new io.gs2.cdk.experience.model.Threshold(
                        "SKILL",
                        Arrays.asList(
                            300L,
                            600L,
                            900L,
                            1200L,
                            1500L,
                            1800L,
                            2100L,
                            2400L,
                            2700L,
                            3000L,
                            3300L,
                            3600L,
                            3900L,
                            4200L,
                            4500L,
                            4800L,
                            5100L,
                            5400L,
                            5700L
                        )
                    ),
                    new io.gs2.cdk.experience.model.options.ExperienceModelOptions() {
                        {
                            metadata: "SKILL";
                        }
                    }
                )
            )
        );
    }
}

System.out.println(new SampleStack().yaml());  // Generate Template
import core from "@/gs2cdk/core";
import experience from "@/gs2cdk/experience";

class SampleStack extends core.Stack
{
    public constructor() {
        super();
        new experience.model.Namespace(
            this,
            // omission
        ).masterData(
            [
                new experience.model.ExperienceModel(
                    "character_ssr",
                    50,
                    80,
                    new experience.model.Threshold(
                        "CHARACTER",
                        new number[
                            100,
                            200,
                            300,
                            400,
                            500,
                            600,
                            700,
                            800,
                            900,
                            1000,
                            1100,
                            1200,
                            1300,
                            1400,
                            1500,
                            1600,
                            1700,
                            1800,
                            1900,
                            2000,
                            2100,
                            2200,
                            2300,
                            2400,
                            2500,
                            2600,
                            2700,
                            2800,
                            2900,
                            3000,
                            3100,
                            3200,
                            3300,
                            3400,
                            3500,
                            3600,
                            3700,
                            3800,
                            3900,
                            4000,
                            4100,
                            4200,
                            4300,
                            4400,
                            4500,
                            4600,
                            4700,
                            4800,
                            4900,
                            5000,
                            5100,
                            5200,
                            5300,
                            5400,
                            5500,
                            5600,
                            5700,
                            5800,
                            5900,
                            6000,
                            6100,
                            6200,
                            6300,
                            6400,
                            6500,
                            6600,
                            6700,
                            6800,
                            6900,
                            7000,
                            7100,
                            7200,
                            7300,
                            7400,
                            7500,
                            7600,
                            7700,
                            7800,
                            7900
                        ]
                    ),
                    {
                        metadata: "SSR"
                    }
                ),
                new experience.model.ExperienceModel(
                    "character_sr",
                    40,
                    70,
                    new experience.model.Threshold(
                        "CHARACTER",
                        new number[
                            100,
                            200,
                            300,
                            400,
                            500,
                            600,
                            700,
                            800,
                            900,
                            1000,
                            1100,
                            1200,
                            1300,
                            1400,
                            1500,
                            1600,
                            1700,
                            1800,
                            1900,
                            2000,
                            2100,
                            2200,
                            2300,
                            2400,
                            2500,
                            2600,
                            2700,
                            2800,
                            2900,
                            3000,
                            3100,
                            3200,
                            3300,
                            3400,
                            3500,
                            3600,
                            3700,
                            3800,
                            3900,
                            4000,
                            4100,
                            4200,
                            4300,
                            4400,
                            4500,
                            4600,
                            4700,
                            4800,
                            4900,
                            5000,
                            5100,
                            5200,
                            5300,
                            5400,
                            5500,
                            5600,
                            5700,
                            5800,
                            5900,
                            6000,
                            6100,
                            6200,
                            6300,
                            6400,
                            6500,
                            6600,
                            6700,
                            6800,
                            6900,
                            7000,
                            7100,
                            7200,
                            7300,
                            7400,
                            7500,
                            7600,
                            7700,
                            7800,
                            7900
                        ]
                    ),
                    {
                        metadata: "SR"
                    }
                ),
                new experience.model.ExperienceModel(
                    "character_r",
                    30,
                    60,
                    new experience.model.Threshold(
                        "CHARACTER",
                        new number[
                            100,
                            200,
                            300,
                            400,
                            500,
                            600,
                            700,
                            800,
                            900,
                            1000,
                            1100,
                            1200,
                            1300,
                            1400,
                            1500,
                            1600,
                            1700,
                            1800,
                            1900,
                            2000,
                            2100,
                            2200,
                            2300,
                            2400,
                            2500,
                            2600,
                            2700,
                            2800,
                            2900,
                            3000,
                            3100,
                            3200,
                            3300,
                            3400,
                            3500,
                            3600,
                            3700,
                            3800,
                            3900,
                            4000,
                            4100,
                            4200,
                            4300,
                            4400,
                            4500,
                            4600,
                            4700,
                            4800,
                            4900,
                            5000,
                            5100,
                            5200,
                            5300,
                            5400,
                            5500,
                            5600,
                            5700,
                            5800,
                            5900,
                            6000,
                            6100,
                            6200,
                            6300,
                            6400,
                            6500,
                            6600,
                            6700,
                            6800,
                            6900,
                            7000,
                            7100,
                            7200,
                            7300,
                            7400,
                            7500,
                            7600,
                            7700,
                            7800,
                            7900
                        ]
                    ),
                    {
                        metadata: "R"
                    }
                ),
                new experience.model.ExperienceModel(
                    "equipment",
                    30,
                    50,
                    new experience.model.Threshold(
                        "EQUIPMENT",
                        new number[
                            200,
                            400,
                            600,
                            800,
                            1000,
                            1200,
                            1400,
                            1600,
                            1800,
                            2000,
                            2200,
                            2400,
                            2600,
                            2800,
                            3000,
                            3200,
                            3400,
                            3600,
                            3800,
                            4000,
                            4200,
                            4400,
                            4600,
                            4800,
                            5000,
                            5200,
                            5400,
                            5600,
                            5800,
                            6000,
                            6200,
                            6400,
                            6600,
                            6800,
                            7000,
                            7200,
                            7400,
                            7600,
                            7800,
                            8000,
                            8200,
                            8400,
                            8600,
                            8800,
                            9000,
                            9200,
                            9400,
                            9600,
                            9800
                        ]
                    ),
                    {
                        metadata: "EQUIPMENT",
                        acquireActionRates: [
                            new experience.model.AcquireActionRate(
                                "rate-0001",
                                "big",
                                new string[
                                    "1",
                                    "10",
                                    "100",
                                    "1000",
                                    "10000",
                                    "100000",
                                    "1000000",
                                    "10000000",
                                    "100000000",
                                    "1000000000",
                                    "10000000000",
                                    "100000000000",
                                    "1000000000000",
                                    "10000000000000",
                                    "100000000000000",
                                    "1000000000000000",
                                    "10000000000000000",
                                    "100000000000000000",
                                    "1000000000000000000",
                                    "10000000000000000000",
                                    "100000000000000000000",
                                    "1000000000000000000000",
                                    "10000000000000000000000",
                                    "100000000000000000000000",
                                    "1000000000000000000000000",
                                    "10000000000000000000000000",
                                    "100000000000000000000000000"
                                ]
                            ),
                        ]
                    }
                ),
                new experience.model.ExperienceModel(
                    "skill",
                    10,
                    20,
                    new experience.model.Threshold(
                        "SKILL",
                        new number[
                            300,
                            600,
                            900,
                            1200,
                            1500,
                            1800,
                            2100,
                            2400,
                            2700,
                            3000,
                            3300,
                            3600,
                            3900,
                            4200,
                            4500,
                            4800,
                            5100,
                            5400,
                            5700
                        ]
                    ),
                    {
                        metadata: "SKILL"
                    }
                )
            ]
        );
    }
}

console.log(new SampleStack().yaml());  // Generate Template
public class SampleStack : Gs2Cdk.Core.Model.Stack
{
    public SampleStack() {
        new Gs2Cdk.Gs2Experience.Model.Namespace(
            this,
            // omission
        ).MasterData(
            new [] {
                new Gs2Cdk.Gs2Experience.Model.ExperienceModel(
                    "character_ssr",
                    50L,
                    80L,
                    new Gs2Cdk.Gs2Experience.Model.Threshold(
                        metadata: "CHARACTER",
                        values: new long[] {
                            100L,
                            200L,
                            300L,
                            400L,
                            500L,
                            600L,
                            700L,
                            800L,
                            900L,
                            1000L,
                            1100L,
                            1200L,
                            1300L,
                            1400L,
                            1500L,
                            1600L,
                            1700L,
                            1800L,
                            1900L,
                            2000L,
                            2100L,
                            2200L,
                            2300L,
                            2400L,
                            2500L,
                            2600L,
                            2700L,
                            2800L,
                            2900L,
                            3000L,
                            3100L,
                            3200L,
                            3300L,
                            3400L,
                            3500L,
                            3600L,
                            3700L,
                            3800L,
                            3900L,
                            4000L,
                            4100L,
                            4200L,
                            4300L,
                            4400L,
                            4500L,
                            4600L,
                            4700L,
                            4800L,
                            4900L,
                            5000L,
                            5100L,
                            5200L,
                            5300L,
                            5400L,
                            5500L,
                            5600L,
                            5700L,
                            5800L,
                            5900L,
                            6000L,
                            6100L,
                            6200L,
                            6300L,
                            6400L,
                            6500L,
                            6600L,
                            6700L,
                            6800L,
                            6900L,
                            7000L,
                            7100L,
                            7200L,
                            7300L,
                            7400L,
                            7500L,
                            7600L,
                            7700L,
                            7800L,
                            7900L
                        }
                    ),
                    new Gs2Cdk.Gs2Experience.Model.Options.ExperienceModelOptions {
                        metadata = "SSR"
                    }
                ),
                new Gs2Cdk.Gs2Experience.Model.ExperienceModel(
                    "character_sr",
                    40L,
                    70L,
                    new Gs2Cdk.Gs2Experience.Model.Threshold(
                        metadata: "CHARACTER",
                        values: new long[] {
                            100L,
                            200L,
                            300L,
                            400L,
                            500L,
                            600L,
                            700L,
                            800L,
                            900L,
                            1000L,
                            1100L,
                            1200L,
                            1300L,
                            1400L,
                            1500L,
                            1600L,
                            1700L,
                            1800L,
                            1900L,
                            2000L,
                            2100L,
                            2200L,
                            2300L,
                            2400L,
                            2500L,
                            2600L,
                            2700L,
                            2800L,
                            2900L,
                            3000L,
                            3100L,
                            3200L,
                            3300L,
                            3400L,
                            3500L,
                            3600L,
                            3700L,
                            3800L,
                            3900L,
                            4000L,
                            4100L,
                            4200L,
                            4300L,
                            4400L,
                            4500L,
                            4600L,
                            4700L,
                            4800L,
                            4900L,
                            5000L,
                            5100L,
                            5200L,
                            5300L,
                            5400L,
                            5500L,
                            5600L,
                            5700L,
                            5800L,
                            5900L,
                            6000L,
                            6100L,
                            6200L,
                            6300L,
                            6400L,
                            6500L,
                            6600L,
                            6700L,
                            6800L,
                            6900L,
                            7000L,
                            7100L,
                            7200L,
                            7300L,
                            7400L,
                            7500L,
                            7600L,
                            7700L,
                            7800L,
                            7900L
                        }
                    ),
                    new Gs2Cdk.Gs2Experience.Model.Options.ExperienceModelOptions {
                        metadata = "SR"
                    }
                ),
                new Gs2Cdk.Gs2Experience.Model.ExperienceModel(
                    "character_r",
                    30L,
                    60L,
                    new Gs2Cdk.Gs2Experience.Model.Threshold(
                        metadata: "CHARACTER",
                        values: new long[] {
                            100L,
                            200L,
                            300L,
                            400L,
                            500L,
                            600L,
                            700L,
                            800L,
                            900L,
                            1000L,
                            1100L,
                            1200L,
                            1300L,
                            1400L,
                            1500L,
                            1600L,
                            1700L,
                            1800L,
                            1900L,
                            2000L,
                            2100L,
                            2200L,
                            2300L,
                            2400L,
                            2500L,
                            2600L,
                            2700L,
                            2800L,
                            2900L,
                            3000L,
                            3100L,
                            3200L,
                            3300L,
                            3400L,
                            3500L,
                            3600L,
                            3700L,
                            3800L,
                            3900L,
                            4000L,
                            4100L,
                            4200L,
                            4300L,
                            4400L,
                            4500L,
                            4600L,
                            4700L,
                            4800L,
                            4900L,
                            5000L,
                            5100L,
                            5200L,
                            5300L,
                            5400L,
                            5500L,
                            5600L,
                            5700L,
                            5800L,
                            5900L,
                            6000L,
                            6100L,
                            6200L,
                            6300L,
                            6400L,
                            6500L,
                            6600L,
                            6700L,
                            6800L,
                            6900L,
                            7000L,
                            7100L,
                            7200L,
                            7300L,
                            7400L,
                            7500L,
                            7600L,
                            7700L,
                            7800L,
                            7900L
                        }
                    ),
                    new Gs2Cdk.Gs2Experience.Model.Options.ExperienceModelOptions {
                        metadata = "R"
                    }
                ),
                new Gs2Cdk.Gs2Experience.Model.ExperienceModel(
                    "equipment",
                    30L,
                    50L,
                    new Gs2Cdk.Gs2Experience.Model.Threshold(
                        metadata: "EQUIPMENT",
                        values: new long[] {
                            200L,
                            400L,
                            600L,
                            800L,
                            1000L,
                            1200L,
                            1400L,
                            1600L,
                            1800L,
                            2000L,
                            2200L,
                            2400L,
                            2600L,
                            2800L,
                            3000L,
                            3200L,
                            3400L,
                            3600L,
                            3800L,
                            4000L,
                            4200L,
                            4400L,
                            4600L,
                            4800L,
                            5000L,
                            5200L,
                            5400L,
                            5600L,
                            5800L,
                            6000L,
                            6200L,
                            6400L,
                            6600L,
                            6800L,
                            7000L,
                            7200L,
                            7400L,
                            7600L,
                            7800L,
                            8000L,
                            8200L,
                            8400L,
                            8600L,
                            8800L,
                            9000L,
                            9200L,
                            9400L,
                            9600L,
                            9800L
                        }
                    ),
                    new Gs2Cdk.Gs2Experience.Model.Options.ExperienceModelOptions {
                        metadata = "EQUIPMENT",
                        acquireActionRates = new Gs2Cdk.Gs2Experience.Model.AcquireActionRate[] {
                            new Gs2Cdk.Gs2Experience.Model.AcquireActionRate(
                                name: "rate-0001",
                                mode: "big",
                                bigRates: new string[] {
                                    "1",
                                    "10",
                                    "100",
                                    "1000",
                                    "10000",
                                    "100000",
                                    "1000000",
                                    "10000000",
                                    "100000000",
                                    "1000000000",
                                    "10000000000",
                                    "100000000000",
                                    "1000000000000",
                                    "10000000000000",
                                    "100000000000000",
                                    "1000000000000000",
                                    "10000000000000000",
                                    "100000000000000000",
                                    "1000000000000000000",
                                    "10000000000000000000",
                                    "100000000000000000000",
                                    "1000000000000000000000",
                                    "10000000000000000000000",
                                    "100000000000000000000000",
                                    "1000000000000000000000000",
                                    "10000000000000000000000000",
                                    "100000000000000000000000000"
                                }
                            ),
                        }
                    }
                ),
                new Gs2Cdk.Gs2Experience.Model.ExperienceModel(
                    "skill",
                    10L,
                    20L,
                    new Gs2Cdk.Gs2Experience.Model.Threshold(
                        metadata: "SKILL",
                        values: new long[] {
                            300L,
                            600L,
                            900L,
                            1200L,
                            1500L,
                            1800L,
                            2100L,
                            2400L,
                            2700L,
                            3000L,
                            3300L,
                            3600L,
                            3900L,
                            4200L,
                            4500L,
                            4800L,
                            5100L,
                            5400L,
                            5700L
                        }
                    ),
                    new Gs2Cdk.Gs2Experience.Model.Options.ExperienceModelOptions {
                        metadata = "SKILL"
                    }
                )
            }
        );
    }
}

Debug.Log(new SampleStack().Yaml());  // Generate Template

AcquireActionRate

Remuneration addition table master

You can adjust the amount of rewards according to the rank.

TypeRequireDefaultLimitationDescription
namestring~ 128 charsRemuneration addition table name
modeenum {
    “double”,
    “big”
}
“double”~ 128 charsRemuneration addition table type
ratesList<double>{mode} == “double”1 ~ 10000 itemsAmount added per rank (multiplier)
bigRatesList<string>{mode} == “big”1 ~ 10000 itemsAmount added per rank (multiplier)

Enumeration type definition to specify as mode

Enumerator String DefinitionDescription
doubleFloating point number less than 2^48
bigFloating point number less than 1024 digits

VerifyActionResult

Verify action execution result

TypeRequireDefaultLimitationDescription
actionenum {
}
~ 128 charsTypes of actions to be performed in the verify task
verifyRequeststring~ 1048576 charsJSON of request
statusCodeint~ 999Status code
verifyResultstring~ 1048576 charsResult payload

Enumeration type definition to specify as action

Enumerator String DefinitionDescription

ConsumeActionResult

Consume action execution result

TypeRequireDefaultLimitationDescription
actionenum {
}
~ 128 charsTypes of actions to be performed in the consume action
consumeRequeststring~ 1048576 charsJSON of request
statusCodeint~ 999Status code
consumeResultstring~ 1048576 charsResult payload

Enumeration type definition to specify as action

Enumerator String DefinitionDescription

AcquireActionResult

Acquire action execution result

TypeRequireDefaultLimitationDescription
actionenum {
}
~ 128 charsTypes of actions to be performed in the acquire action
acquireRequeststring~ 1048576 charsJSON of request
statusCodeint~ 999Status code
acquireResultstring~ 1048576 charsResult payload

Enumeration type definition to specify as action

Enumerator String DefinitionDescription

TransactionResult

Transaction execution results

Transaction execution results executed using server-side transaction auto-execution functionality

TypeRequireDefaultLimitationDescription
transactionIdstring36 ~ 36 charsTransaction ID
verifyResultsList<VerifyActionResult>~ 10 itemsList of verify action execution results
consumeResultsList<ConsumeActionResult>~ 10 itemsList of consume action execution results
acquireResultsList<AcquireActionResult>~ 100 itemsList of acquire action execution results

AcquireAction

Acquire Action

TypeRequireDefaultLimitationDescription
actionenum {
"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",
"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~ 1048576 charsJSON of request

GitHubCheckoutSetting

Setup to check out master data from GitHub

TypeRequireDefaultLimitationDescription
apiKeyIdstring~ 1024 charsGitHub API key GRN
repositoryNamestring~ 1024 charsRepository Name
sourcePathstring~ 1024 charsSource code file path
referenceTypeenum {
    “commit_hash”,
    “branch”,
    “tag”
}
~ 128 charsSource of code
commitHashstring{referenceType} == “commit_hash”~ 1024 charsCommit hash
branchNamestring{referenceType} == “branch”~ 1024 charsBranch Name
tagNamestring{referenceType} == “tag”~ 1024 charsTag Name

Enumeration type definition to specify as referenceType

Enumerator String DefinitionDescription
commit_hashCommit hash
branchBranch
tagTag

ScriptSetting

Script settings

In GS2, you can associate custom scripts with microservice events and execute them. This model holds the settings for triggering script execution.

There are two main ways to execute a script: synchronous execution and asynchronous execution. Synchronous execution blocks processing until the script has finished executing. Instead, you can use the script execution result to stop the execution of the API or to tamper with the result of the API.

On the other hand, asynchronous execution does not block processing until the script has finished executing. Instead, you can use the script execution result to stop the execution of the API or to tamper with the result of the API. However, asynchronous execution does not block processing until the script has finished executing, so it is generally recommended to use asynchronous execution.

There are two types of asynchronous execution methods: GS2-Script and Amazon EventBridge. By using Amazon EventBridge, you can write processing in languages other than Lua.

TypeRequireDefaultLimitationDescription
triggerScriptIdstring~ 1024 charsScript GRN
doneTriggerTargetTypeenum {
    “none”,
    “gs2_script”,
    “aws”
}
“none”~ 128 charsNotification of Completion
doneTriggerScriptIdstring{doneTriggerTargetType} == “gs2_script”~ 1024 charsScript GRN
doneTriggerQueueNamespaceIdstring{doneTriggerTargetType} == “gs2_script”~ 1024 charsNamespace GRN

Enumeration type definition to specify as doneTriggerTargetType

Enumerator String DefinitionDescription
noneNone
gs2_scriptGS2-Script
awsAmazon EventBridge

LogSetting

Log setting

This type manages log output settings. This type holds the identifier of the log namespace used to output log data. The log namespace ID specifies the GS2-Log namespace to aggregate and store the log data. Through this setting, API request and response log data under this namespace will be output to the target GS2-Log. GS2-Log provides logs in real time, which can be used for system monitoring, analysis, debugging, etc.

TypeRequireDefaultLimitationDescription
loggingNamespaceIdstring~ 1024 charsNamespace GRN

TransactionSetting

Transaction settings

TypeRequireDefaultLimitationDescription
enableAutoRunboolfalseWhether to automatically execute issued transactions on the server side
enableAtomicCommitbool{enableAutoRun} == truefalseWhether to commit the execution of transactions atomically
transactionUseDistributorbool{enableAtomicCommit} == truefalseWhether to execute transactions asynchronously
acquireActionUseJobQueuebool{enableAtomicCommit} == truefalseWhether to use GS2-JobQueue to execute the acquire action
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