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"
}
]
}
]
}
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
version | ✓ | 2019-08-19 | Format version of master data | |||
rateModels | List<RateModel> | |||||
incrementalRateModels | List<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.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
rateModelId | string | ✓ | ~ 1024 chars | Exchange rate model GRN | ||
name | string | ✓ | ~ 128 chars | Exchange Rate Name | ||
metadata | string | ~ 2048 chars | metadata | |||
consumeActions | List<ConsumeAction> | [] | ~ 10 items | List of Consumption Action | ||
timingType | enum [‘immediate’, ‘await’] | ✓ | “immediate” | ~ 128 chars | Type of exchange | |
lockTime | int | {timingType} == “await” | ✓ | ~ 525600 | Waiting time (minutes) from the execution of the exchange until the reward is actually received | |
enableSkip | bool | {timingType} == “await” | ✓ | false | Can skip? | |
skipConsumeActions | List<ConsumeAction> | {skipConsumeActions} | [] | ~ 10 items | List of Short Consumption Action | |
acquireActions | List<AcquireAction> | [] | ~ 100 items | List 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.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
incrementalRateModelId | string | ✓ | ~ 1024 chars | Incremental Exchange rate model GRN | ||
name | string | ✓ | ~ 128 chars | Cost Increase Type Exchange Rate Name | ||
metadata | string | ~ 2048 chars | metadata | |||
consumeAction | ConsumeAction | ✓ | Consumption Action (Quantity/Value is overwritten so no setting is required) | |||
calculateType | enum [’linear’, ‘power’, ‘gs2_script’] | ✓ | ~ 128 chars | Calculation method for cost increase amount | ||
baseValue | long | {calculateType} == “linear” | ✓ | ~ 9223372036854775805 | Base Value | |
coefficientValue | long | {calculateType} in [“linear”, “power”] | ✓ | ~ 9223372036854775805 | Coefficient Value” | |
calculateScriptId | string | {calculateType} == “gs2_script” | ✓ | ~ 1024 chars | GRN of cost calculation script | |
exchangeCountId | string | ✓ | ~ 1024 chars | GRN of GS2-Limit model that manages the number of exchanges | ||
maximumExchangeCount | int | ✓ | 2147483646 | ~ 2147483646 | Maximum number of exchanges | |
acquireActions | List<AcquireAction> | [] | ~ 100 items | List of Acquire Action |
AcquireAction
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
action | enum [] | ✓ | ~ 128 chars | Types of actions to be performed in the stamp sheet | ||
request | string | ✓ | ~ 1048576 chars | JSON of request |
ConsumeAction
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
action | enum [] | ✓ | ~ 128 chars | Types of actions to be performed in the stamp task | ||
request | string | ✓ | ~ 1048576 chars | JSON of the obtain request |