GS2-LoginReward Master Data Reference
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"
}
]
}
]
}| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| version | string | ✓ | 2023-07-11 | Format version of master data | ||
| bonusModels | List<BonusModel> | ~ 100 items | 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. |
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.
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bonusModelId | string | * | ~ 1024 chars | Login Bonus Model GRN * Set automatically by the server | ||||||||
| name | string | ✓ | ~ 128 chars | Login Bonus Model name Login Bonus Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||||||||
| metadata | string | ~ 2048 chars | Metadata 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. | |||||||||
| mode | String 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.
| |||||||||
| periodEventId | string | ~ 1024 chars | Period 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. | |||||||||
| resetHour | int | {periodEventId} == "" | ✓* | 0 ~ 23 | Reset 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 “" | |||||||
| repeat | String 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.
* Required if mode is “streaming” | ||||||||
| rewards | List<Reward> | 0 ~ 100 items | Rewards 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. | |||||||||
| missedReceiveRelief | String 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”.
| |||||||||
| missedReceiveReliefVerifyActions | List<VerifyAction> | {missedReceiveRelief} == “enabled” | [] | 0 ~ 10 items | Missed 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” | |||||||
| missedReceiveReliefConsumeActions | List<ConsumeAction> | {missedReceiveRelief} == “enabled” | [] | 0 ~ 10 items | Missed 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.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| acquireActions | List<AcquireAction> | ✓ | 1 ~ 10 items | Acquire 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.
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.
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.