GS2-LoginReward Master Data Reference

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

Master Data Format

{
  "version": "2023-07-11",
  "bonusModels": [
    {
      "name": "[string]Login Bonus Model name",
      "metadata": "[string?]Metadata",
      "mode": "[string enum]Mode",
      "periodEventId": "[string?]Period Event GRN",
      "resetHour": "[int]Reset Hour (UTC)",
      "repeat": "[string enum]Repeat",
      "rewards": [
        {
          "acquireActions": [
            {
              "action": "[string]Type of action to be executed in the Acquire Action",
              "request": "[string]JSON string of the request used when executing the action"
            }
          ]
        }
      ],
      "missedReceiveRelief": "[string enum]Missed Receive Relief",
      "missedReceiveReliefVerifyActions": [
        {
          "action": "[string]Type of action to be executed in the Verify Action",
          "request": "[string]JSON string of the request used when executing the action"
        }
      ],
      "missedReceiveReliefConsumeActions": [
        {
          "action": "[string]Type of action to be executed in the Consume Action",
          "request": "[string]JSON string of the request used when executing the action"
        }
      ]
    }
  ]
}
TypeConditionRequiredDefaultValue LimitsDescription
versionstring
2023-07-11Format version of master data
bonusModelsList<BonusModel>~ 100 itemsLogin Bonus Model
Login Bonus Model defines the distribution schedule for login bonuses.
There are two schedule types: 《Schedule Mode》 and 《Streaming Mode》.

In Schedule Mode, a GS2-Schedule event must be specified, and bonuses are distributed based on the number of days elapsed since the event’s start date.
If the user misses a day partway through, the bonus for that day will not be granted.

In Streaming Mode, the rewards configured for the bonus are distributed sequentially from the beginning each day.
Streaming Mode also supports repetition; when enabled, the distribution restarts from the first reward after reaching the end of the stream.

Both Schedule Mode and Streaming Mode provide a missed-bonus recovery feature.
By paying a certain cost, users can receive bonuses they previously missed.
However, if a GS2-Schedule event is associated, users cannot receive bonuses beyond the number of days elapsed since the event’s start date.
Additionally, the recovery feature cannot be used when using Streaming Mode with repetition enabled.

In both Schedule Mode and Streaming Mode, the maximum number of days that can be configured for bonuses is 100 days.

Model

BonusModel

Login Bonus Model

Login Bonus Model defines the distribution schedule for login bonuses. There are two schedule types: 《Schedule Mode》 and 《Streaming Mode》.

In Schedule Mode, a GS2-Schedule event must be specified, and bonuses are distributed based on the number of days elapsed since the event’s start date. If the user misses a day partway through, the bonus for that day will not be granted.

In Streaming Mode, the rewards configured for the bonus are distributed sequentially from the beginning each day. Streaming Mode also supports repetition; when enabled, the distribution restarts from the first reward after reaching the end of the stream.

Both Schedule Mode and Streaming Mode provide a missed-bonus recovery feature. By paying a certain cost, users can receive bonuses they previously missed. However, if a GS2-Schedule event is associated, users cannot receive bonuses beyond the number of days elapsed since the event’s start date. Additionally, the recovery feature cannot be used when using Streaming Mode with repetition enabled.

In both Schedule Mode and Streaming Mode, the maximum number of days that can be configured for bonuses is 100 days.

TypeConditionRequiredDefaultValue LimitsDescription
bonusModelIdstring
*
~ 1024 charsLogin Bonus Model GRN
* Set automatically by the server
namestring
~ 128 charsLogin Bonus Model name
Login Bonus Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 2048 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
modeString Enum
enum {
  “schedule”,
  “streaming”
}
Mode
Specifies the distribution schedule type for the login bonus.
In “schedule” mode, rewards are tied to elapsed days since a GS2-Schedule event start date.
In “streaming” mode, rewards are distributed sequentially from the beginning each day regardless of calendar date.
DefinitionDescription
“schedule”Schedule Mode
“streaming”Streaming Mode
periodEventIdstring~ 1024 charsPeriod Event GRN
GS2-Schedule Event GRN that represents the period during which to enable login bonuses.
In Schedule Mode, this field is required and determines the start date from which elapsed days are counted for reward distribution.
In Streaming Mode, this field is optional; when specified, users cannot receive bonuses beyond the elapsed days since the event start.
resetHourint{periodEventId} == ""
✓*
0 ~ 23Reset Hour (UTC)
The hour of day (0-23, UTC) at which the daily receive flag resets.
This determines when a new day begins for login bonus purposes.
Only required when periodEventId is not specified; when an event is set, the reset timing follows the event’s schedule.
* Required if periodEventId is “"
repeatString Enum
enum {
  “enabled”,
  “disabled”
}
{mode} == “streaming”
✓*
Repeat
Whether to restart distribution from the beginning after all rewards have been distributed.
Only applicable in Streaming Mode. When enabled, the reward list loops back to the first entry after the last one is distributed.
Note: the missed-bonus recovery feature cannot be used when repeat is enabled.
DefinitionDescription
“enabled”Enabled
“disabled”Disabled
* Required if mode is “streaming”
rewardsList<Reward>0 ~ 100 itemsRewards
The ordered list of daily rewards. Each entry corresponds to one day’s login bonus, distributed sequentially from index 0.
In Schedule Mode, the index maps to the number of elapsed days since the event start date.
In Streaming Mode, the index maps to the number of login days. Up to 100 entries can be configured.
missedReceiveReliefString Enum
enum {
  “enabled”,
  “disabled”
}
“disabled”Missed Receive Relief
Whether to enable the missed-bonus recovery feature. When enabled, users can retroactively receive bonuses they missed by paying a specified cost (consume actions).
Optionally, verify actions can be configured to check conditions before allowing recovery.
This feature cannot be used when Streaming Mode with repeat enabled is active. Defaults to “disabled”.
DefinitionDescription
“enabled”Enabled
“disabled”Disabled
missedReceiveReliefVerifyActionsList<VerifyAction>{missedReceiveRelief} == “enabled”[]0 ~ 10 itemsMissed Receive Relief Verify Actions
List of verify actions to execute before allowing missed-bonus recovery.
These actions check preconditions (e.g., user eligibility) before the recovery is processed. Up to 10 actions can be configured.
Only applicable when missedReceiveRelief is enabled.
* Applicable only if missedReceiveRelief is “enabled”
missedReceiveReliefConsumeActionsList<ConsumeAction>{missedReceiveRelief} == “enabled”[]0 ~ 10 itemsMissed Receive Relief Consume Actions
List of consume actions that define the cost a user must pay to recover a missed bonus.
For example, this can be configured to consume in-game currency or items as the recovery cost. Up to 10 actions can be configured.
Only applicable when missedReceiveRelief is enabled.
* Applicable only if missedReceiveRelief is “enabled”

Reward

Reward

Represents a single day’s reward configuration for a login bonus. Each Reward contains a list of acquire actions that define what the user receives (e.g., items, currency, experience). The rewards array in BonusModel holds one Reward per day, distributed in order. Reward values can be modified at runtime through the buff system (BonusModelBuff) to apply rate multipliers to acquire actions.

TypeConditionRequiredDefaultValue LimitsDescription
acquireActionsList<AcquireAction>
1 ~ 10 itemsAcquire Actions
List of acquire actions that define the resources granted to the user for this day’s reward.
Each action specifies a acquire action (e.g., add items, grant currency) and its request parameters.
At least 1 and up to 10 actions can be configured per reward.

ConsumeAction

Consume Action

Defines an action for consuming resources from a user via the transaction mechanism. Used in missed-bonus recovery to specify the cost users must pay (e.g., deducting currency, consuming items). The action field specifies the type of consume action, and the request field contains the corresponding request parameters.

TypeConditionRequiredDefaultValue LimitsDescription
actionString Enum
enum {
"Gs2AdReward:ConsumePointByUserId",
"Gs2Dictionary:DeleteEntriesByUserId",
"Gs2Enhance:DeleteProgressByUserId",
"Gs2Exchange:DeleteAwaitByUserId",
"Gs2Experience:SubExperienceByUserId",
"Gs2Experience:SubRankCapByUserId",
"Gs2Formation:SubMoldCapacityByUserId",
"Gs2Grade:SubGradeByUserId",
"Gs2Guild:DecreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:DecreaseMaximumIdleMinutesByUserId",
"Gs2Inbox:OpenMessageByUserId",
"Gs2Inbox:DeleteMessageByUserId",
"Gs2Inventory:ConsumeItemSetByUserId",
"Gs2Inventory:ConsumeSimpleItemsByUserId",
"Gs2Inventory:ConsumeBigItemByUserId",
"Gs2JobQueue:DeleteJobByUserId",
"Gs2Limit:CountUpByUserId",
"Gs2LoginReward:MarkReceivedByUserId",
"Gs2Mission:ReceiveByUserId",
"Gs2Mission:BatchReceiveByUserId",
"Gs2Mission:DecreaseCounterByUserId",
"Gs2Mission:ResetCounterByUserId",
"Gs2Money:WithdrawByUserId",
"Gs2Money:RecordReceipt",
"Gs2Money2:WithdrawByUserId",
"Gs2Money2:VerifyReceiptByUserId",
"Gs2Quest:DeleteProgressByUserId",
"Gs2Ranking2:CreateGlobalRankingReceivedRewardByUserId",
"Gs2Ranking2:CreateClusterRankingReceivedRewardByUserId",
"Gs2Schedule:DeleteTriggerByUserId",
"Gs2SerialKey:UseByUserId",
"Gs2Showcase:IncrementPurchaseCountByUserId",
"Gs2SkillTree:MarkRestrainByUserId",
"Gs2Stamina:DecreaseMaxValueByUserId",
"Gs2Stamina:ConsumeStaminaByUserId",
}
Type of action to be executed in the Consume Action
requeststring
~ 524288 charsJSON string of the request used when executing the action

VerifyAction

Verify Action

Defines an action for verifying conditions before proceeding with an operation. Used in missed-bonus recovery to check preconditions (e.g., user eligibility, resource availability) before allowing the recovery. The action field specifies the type of verify action, and the request field contains the corresponding request parameters.

TypeConditionRequiredDefaultValue LimitsDescription
actionString Enum
enum {
"Gs2Dictionary:VerifyEntryByUserId",
"Gs2Distributor:IfExpressionByUserId",
"Gs2Distributor:AndExpressionByUserId",
"Gs2Distributor:OrExpressionByUserId",
"Gs2Enchant:VerifyRarityParameterStatusByUserId",
"Gs2Experience:VerifyRankByUserId",
"Gs2Experience:VerifyRankCapByUserId",
"Gs2Grade:VerifyGradeByUserId",
"Gs2Grade:VerifyGradeUpMaterialByUserId",
"Gs2Guild:VerifyCurrentMaximumMemberCountByGuildName",
"Gs2Guild:VerifyIncludeMemberByUserId",
"Gs2Inventory:VerifyInventoryCurrentMaxCapacityByUserId",
"Gs2Inventory:VerifyItemSetByUserId",
"Gs2Inventory:VerifyReferenceOfByUserId",
"Gs2Inventory:VerifySimpleItemByUserId",
"Gs2Inventory:VerifyBigItemByUserId",
"Gs2Limit:VerifyCounterByUserId",
"Gs2Matchmaking:VerifyIncludeParticipantByUserId",
"Gs2Mission:VerifyCompleteByUserId",
"Gs2Mission:VerifyCounterValueByUserId",
"Gs2Ranking2:VerifyGlobalRankingScoreByUserId",
"Gs2Ranking2:VerifyClusterRankingScoreByUserId",
"Gs2Ranking2:VerifySubscribeRankingScoreByUserId",
"Gs2Schedule:VerifyTriggerByUserId",
"Gs2Schedule:VerifyEventByUserId",
"Gs2SerialKey:VerifyCodeByUserId",
"Gs2Stamina:VerifyStaminaValueByUserId",
"Gs2Stamina:VerifyStaminaMaxValueByUserId",
"Gs2Stamina:VerifyStaminaRecoverIntervalMinutesByUserId",
"Gs2Stamina:VerifyStaminaRecoverValueByUserId",
"Gs2Stamina:VerifyStaminaOverflowValueByUserId",
}
Type of action to be executed in the Verify Action
requeststring
~ 524288 charsJSON string of the request used when executing the action

AcquireAction

Acquire Action

Defines an action for granting resources to a user via the transaction mechanism. Used within rewards to specify what the user receives (e.g., adding items to inventory, granting currency, awarding experience points). The action field specifies the type of acquire action, and the request field contains the corresponding request parameters.

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