Master Data Reference of GS2-Exchange

{
  "version": "2019-08-19",
  "rateModels": [
    {
      "name": "[string]Exchange Rate Name",
      "metadata": "[string?]metadata",
      "consumeActions": [
        {
          "action": "[string]Types of actions to be performed in the stamp task",
          "request": "[string]JSON of the obtain request"
        }
      ],
      "timingType": "[string]Type of exchange",
      "lockTime": "[int]Waiting time (minutes) from the execution of the exchange until the reward is actually received",
      "enableSkip": "[bool]Can skip?",
      "skipConsumeActions": [
        {
          "action": "[string]Types of actions to be performed in the stamp task",
          "request": "[string]JSON of the obtain request"
        }
      ],
      "acquireActions": [
        {
          "action": "[string]Types of actions to be performed in the stamp sheet",
          "request": "[string]JSON of request"
        }
      ]
    }
  ],
  "incrementalRateModels": [
    {
      "name": "[string]Cost Increase Type Exchange Rate Name",
      "metadata": "[string?]metadata",
      "consumeAction": {
        "action": "[string]Types of actions to be performed in the stamp task",
        "request": "[string]JSON of the obtain request"
      },
      "calculateType": "[string]Calculation method for cost increase amount",
      "baseValue": "[long]Base Value",
      "coefficientValue": "[long]Coefficient Value”",
      "calculateScriptId": "[string]GRN of cost calculation script",
      "exchangeCountId": "[string]GRN of GS2-Limit model that manages the number of exchanges",
      "maximumExchangeCount": "[int]Maximum number of exchanges",
      "acquireActions": [
        {
          "action": "[string]Types of actions to be performed in the stamp sheet",
          "request": "[string]JSON of request"
        }
      ]
    }
  ]
}
TypeConditionRequireDefaultLimitationDescription
version2019-08-19Format version of master data
rateModelsList<RateModel>
incrementalRateModelsList<IncrementalRateModel>

RateModel

Exchange Rate Model

The exchange rate is an entity that defines the rate used to exchange resources for resources.

In addition to the rate at which a resource can be exchanged immediately, a rate can also be set at which a resource can be exchanged after a certain amount of time in real time has elapsed. Exchange rates that require an elapse of time in real time can further define the resources required to perform an immediate exchange.

TypeConditionRequireDefaultLimitationDescription
rateModelIdstring~ 1024 charsExchange rate model GRN
namestring~ 128 charsExchange Rate Name
metadatastring~ 2048 charsmetadata
consumeActionsList<ConsumeAction>[]~ 10 itemsList of Consumption Action
timingTypeenum [‘immediate’, ‘await’]“immediate”~ 128 charsType of exchange
lockTimeint{timingType} == “await”~ 525600Waiting time (minutes) from the execution of the exchange until the reward is actually received
enableSkipbool{timingType} == “await”falseCan skip?
skipConsumeActionsList<ConsumeAction>{skipConsumeActions}[]~ 10 itemsList of Short Consumption Action
acquireActionsList<AcquireAction>[]~ 100 itemsList of Acquire Action

IncrementalRateModel

Cost increase type exchange rate model

Normal exchange rates always provide exchanges at a constant rate. With incremental exchange rates, you can define a rate that increases in cost as the number of exchanges increases. For example, the first exchange can be exchanged at a rate of 1:1, but the second exchange can be exchanged at a rate of 2:1. By defining such a rate, you can increase the value of the resources obtained by the player as the game progresses.

The number of exchanges can be reset by the passage of real time. This is useful for resetting the number of exchanges on a daily or weekly basis.

TypeConditionRequireDefaultLimitationDescription
incrementalRateModelIdstring~ 1024 charsIncremental Exchange rate model GRN
namestring~ 128 charsCost Increase Type Exchange Rate Name
metadatastring~ 2048 charsmetadata
consumeActionConsumeActionConsumption Action (Quantity/Value is overwritten so no setting is required)
calculateTypeenum [’linear’, ‘power’, ‘gs2_script’]~ 128 charsCalculation method for cost increase amount
baseValuelong{calculateType} == “linear”~ 9223372036854775805Base Value
coefficientValuelong{calculateType} in [“linear”, “power”]~ 9223372036854775805Coefficient Value”
calculateScriptIdstring{calculateType} == “gs2_script”~ 1024 charsGRN of cost calculation script
exchangeCountIdstring~ 1024 charsGRN of GS2-Limit model that manages the number of exchanges
maximumExchangeCountint2147483646~ 2147483646Maximum number of exchanges
acquireActionsList<AcquireAction>[]~ 100 itemsList of Acquire Action

AcquireAction

TypeConditionRequireDefaultLimitationDescription
actionenum []~ 128 charsTypes of actions to be performed in the stamp sheet
requeststring~ 1048576 charsJSON of request

ConsumeAction

TypeConditionRequireDefaultLimitationDescription
actionenum []~ 128 charsTypes of actions to be performed in the stamp task
requeststring~ 1048576 charsJSON of the obtain request