GS2-Mission SDK for Game Engine API Reference

Specifications of models and API references for GS2-Mission SDK for Game Engine

Models

EzComplete

Mission Completion Status

Tracks a user’s mission completion and reward receipt status for a specific mission group. Maintains separate lists for accomplished task names and reward-received task names, distinguishing between tasks that have been completed and those whose rewards have actually been claimed.

Type Condition Required Default Value Limits Description
missionGroupName string
~ 128 chars Mission Group Name
The name of the mission group that this completion record belongs to. One Complete record exists per user per mission group.
completedMissionTaskNames List<string> [] 0 ~ 1000 items List of Completed Task Names
The names of mission tasks that the user has accomplished (completion conditions met). A task appears in this list when its counter reaches the target value or verify actions pass, regardless of whether the reward has been claimed.
receivedMissionTaskNames List<string> [] 0 ~ 1000 items List of Reward received Task Names
The names of mission tasks for which the user has already claimed the completion reward. A task must be in the completed list before its reward can be received.

EzCounter

Counter

A counter is an entity that keeps track of mission progress for each game player. Counter values are aggregated by the duration of the associated task.

Therefore, one counter can have multiple values. For example, for a quest clear count counter, the number of times the quest was completed this month, this week, and today. For example, a quest clear count counter could have the following values.

Type Condition Required Default Value Limits Description
name string
~ 128 chars Counter Model name
The name of the Counter Model that this counter instance is based on. Links to the counter model definition that specifies the scopes and reset timings.
values List<EzScopedValue> [] 0 ~ 32 items Values
The list of scoped values for this counter. Each entry holds the counter value for a specific scope (reset timing or verify action condition), along with the next reset time. A single counter holds multiple values for different scopes simultaneously.

EzCounterScopeModel

Counter Reset Timing Model

Defines a scope for a counter, which determines how and when the counter value is reset. A scope can be either a reset timing (daily, weekly, monthly, fixed-day interval, or never) or a verify action condition. Each counter can have multiple scopes to track values across different periods.

Type Condition Required Default Value Limits Description
scopeType string (enum)
enum {
  “resetTiming”,
  “verifyAction”
}
“resetTiming” Scope type
Determines how the counter scope is defined. “resetTiming” uses a periodic reset schedule, while “verifyAction” uses a verify action to determine whether the counter value applies.
DefinitionDescription
“resetTiming”Reset timing
“verifyAction”Verify Action
resetType string (enum)
enum {
  “notReset”,
  “daily”,
  “weekly”,
  “monthly”,
  “days”
}
“notReset” Reset timing
Determines when the counter value for this scope is reset. Choose from: not reset (permanent cumulative), daily, weekly, monthly, or every fixed number of days. Only used when scopeType is “resetTiming”.
DefinitionDescription
“notReset”Not Reset
“daily”Daily
“weekly”Weekly
“monthly”Monthly
“days”Every fixed number of days
resetDayOfMonth int {resetType} == “monthly”
✓*
1 ~ 31 Date to reset
The day of the month on which the counter value resets. If the specified value exceeds the number of days in the month, it is treated as the last day of that month. Only used when resetType is “monthly”.

* Required if resetType is “monthly”
resetDayOfWeek string (enum)
enum {
  “sunday”,
  “monday”,
  “tuesday”,
  “wednesday”,
  “thursday”,
  “friday”,
  “saturday”
}
{resetType} == “weekly”
✓*
Day of the week to reset
The day of the week on which the counter value resets. Only used when resetType is “weekly”.
DefinitionDescription
“sunday”Sunday
“monday”Monday
“tuesday”Tuesday
“wednesday”Wednesday
“thursday”Thursday
“friday”Friday
“saturday”Saturday

* Required if resetType is “weekly”
resetHour int {resetType} in [“monthly”, “weekly”, “daily”]
✓*
0 ~ 23 Hour of Reset
The hour (0-23) at which the counter value resets. Used in combination with daily, weekly, or monthly reset types.

* Required if resetType is “monthly”,“weekly”,“daily”
conditionName string {scopeType} == “verifyAction”
✓*
~ 128 chars Condition Name
A unique name that identifies this verify action condition scope. Used to look up the corresponding scoped value in the counter. Only used when scopeType is “verifyAction”.

* Required if scopeType is “verifyAction”
condition EzVerifyAction {scopeType} == “verifyAction”
✓*
Condition
The verify action that determines whether the counter value for this scope is applicable. Only used when scopeType is “verifyAction”.

* Required if scopeType is “verifyAction”
anchorTimestamp long {resetType} == “days”
✓*
Base date and time for counting elapsed days
Unix time, milliseconds

* Required if resetType is “days”
days int {resetType} == “days”
✓*
1 ~ 2147483646 Number of days to reset
The interval in days between counter value resets, counting from the anchor timestamp. Only used when resetType is “days”.

* Required if resetType is “days”

EzCounterModel

Counter Model

Counter Model is an entity that can be set as a condition for accomplishing mission tasks. Since counter values can be referenced by multiple mission groups, a single counter can be set as an accomplishment condition for multiple mission groups, such as weekly and daily missions.

Type Condition Required Default Value Limits Description
name string
~ 128 chars Counter Model name
Counter Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadata string ~ 1024 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.
scopes List<EzCounterScopeModel> [] 1 ~ 20 items List of Counter reset timing
Defines the scopes (reset timings or verify action conditions) for this counter. A single counter can have multiple scopes, allowing one counter to track values across different periods (e.g., daily, weekly, and cumulative totals simultaneously).
challengePeriodEventId string ~ 1024 chars GS2-Schedule event GRN that sets the period during which the counter can be operated
Specifies the GS2-Schedule event that defines the time window during which this counter can be incremented or decremented. If not set, the counter can be operated at any time.

EzMissionGroupModel

Mission Group Model

A mission group is an entity that groups tasks by counter reset timing. For example, one group for daily missions. One group for Weekly Mission.

Type Condition Required Default Value Limits Description
name string
~ 128 chars Mission Group Model name
Mission Group Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadata string ~ 1024 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.
tasks List<EzMissionTaskModel> [] 0 ~ 1000 items List of Mission Task
The mission tasks belonging to this group. Each task defines a completion condition (counter threshold or verify actions) and the rewards granted upon accomplishment.
resetType string (enum)
enum {
  “notReset”,
  “daily”,
  “weekly”,
  “monthly”,
  “days”
}
“notReset” Reset timing
Determines when the mission group’s completion status is reset. Choose from: not reset (permanent), daily, weekly, monthly, or every fixed number of days from an anchor timestamp.
DefinitionDescription
“notReset”Not Reset
“daily”Daily
“weekly”Weekly
“monthly”Monthly
“days”Every fixed number of days
resetDayOfMonth int {resetType} == “monthly”
✓*
1 ~ 31 Date to reset
The day of the month on which the mission group resets. If the specified value exceeds the number of days in the month, it is treated as the last day of that month. Only used when resetType is “monthly”.

* Required if resetType is “monthly”
resetDayOfWeek string (enum)
enum {
  “sunday”,
  “monday”,
  “tuesday”,
  “wednesday”,
  “thursday”,
  “friday”,
  “saturday”
}
{resetType} == “weekly”
✓*
Day of the week to reset
The day of the week on which the mission group resets. Only used when resetType is “weekly”.
DefinitionDescription
“sunday”Sunday
“monday”Monday
“tuesday”Tuesday
“wednesday”Wednesday
“thursday”Thursday
“friday”Friday
“saturday”Saturday

* Required if resetType is “weekly”
resetHour int {resetType} in [“monthly”, “weekly”, “daily”]
✓*
0 ~ 23 Hour of Reset
The hour (0-23) at which the mission group resets. Used in combination with daily, weekly, or monthly reset types.

* Required if resetType is “monthly”,“weekly”,“daily”
completeNotificationNamespaceId string ~ 1024 chars Push notifications when mission tasks are accomplished
The GS2-Gateway namespace GRN used to deliver push notifications when a mission task in this group is accomplished. Allows the game client to be notified in real-time.

EzMissionTaskModel

Mission Task Model

A mission task is an entity that defines the conditions under which a reward will be given if the value of the associated counter exceeds a certain level.

Type Condition Required Default Value Limits Description
name string
~ 128 chars Mission Task Model name
Mission Task Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadata string ~ 1024 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.
verifyCompleteType string (enum)
enum {
  “counter”,
  “verifyActions”
}
“counter” Completion condition type
Specifies how mission task completion is determined. “counter” checks if the associated counter’s scoped value reaches the target threshold. “verifyActions” uses verify actions to check completion conditions.
DefinitionDescription
“counter”Counter
“verifyActions”Verify Actions
targetCounter EzTargetCounterModel {verifyCompleteType} == “counter”
✓*
Target Counter
Defines the counter, scope, and target value used to determine mission task completion. When the counter’s scoped value reaches or exceeds the specified target value, the task is considered accomplished.

* Required if verifyCompleteType is “counter”
verifyCompleteConsumeActions List<EzVerifyAction> {verifyCompleteType} == “verifyActions”
*
[] 0 ~ 10 items Verify Actions when task is accomplished
A list of verify actions used to determine if the mission task is completed. All verify actions must pass for the task to be considered accomplished. Only used when verifyCompleteType is “verifyActions”.

* Enabled only if verifyCompleteType is “verifyActions”
completeAcquireActions List<EzAcquireAction> [] 0 ~ 100 items Rewards for mission accomplishment
The list of acquire actions executed as rewards when the player receives the mission completion reward.
challengePeriodEventId string ~ 1024 chars GS2-Schedule event GRN with a set period of time during which rewards can be received
Specifies the GS2-Schedule event that defines the time window during which the mission task rewards can be claimed. If not set, rewards can be received at any time after accomplishment.
premiseMissionTaskName string ~ 128 chars Name of the task that must be accomplished to attempt this task
Specifies a prerequisite mission task within the same group that must be completed before the player can receive the reward for this task. Used to create sequential mission chains.

EzTargetCounterModel

Target Counter

Information about the counter that serves as the achievement goal for the mission

Type Condition Required Default Value Limits Description
counterName string
~ 128 chars Counter Model name
Counter Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
scopeType string (enum)
enum {
  “resetTiming”,
  “verifyAction”
}
“resetTiming” Scope type
Specifies which type of counter scope to use for the mission completion check. “resetTiming” evaluates the counter value for a specific reset period, while “verifyAction” evaluates the value for a named condition.
DefinitionDescription
“resetTiming”Reset timing
“verifyAction”Verify Action
resetType string (enum)
enum {
  “notReset”,
  “daily”,
  “weekly”,
  “monthly”,
  “days”
}
{scopeType} == “resetTiming”
*
Target Reset timing
Specifies which reset timing scope of the counter to check against the target value. For example, selecting “daily” means the task checks the daily counter value. If omitted, the mission group’s reset timing is used.
DefinitionDescription
“notReset”Not Reset
“daily”Daily
“weekly”Weekly
“monthly”Monthly
“days”Every fixed number of days

* Enabled only if scopeType is “resetTiming”
conditionName string {scopeType} == “verifyAction”
✓*
~ 128 chars Condition Name
The name of the verify action condition scope to check against the target value. Must match a conditionName defined in the counter model’s scopes. Only used when scopeType is “verifyAction”.

* Required if scopeType is “verifyAction”
value long
0 ~ 9223372036854775805 Target value
The threshold value that the counter’s scoped value must reach or exceed for the mission task to be considered accomplished.

EzConfig

Configuration

Configuration values applied to transaction variables

Type Condition Required Default Value Limits Description
key string
~ 64 chars Name
value string ~ 51200 chars Value

EzAcquireAction

Acquire Action

Type Condition Required Default Value Limits Description
action string (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 Acquire Action
request string
~ 524288 chars JSON string of the request used when executing the action

EzConsumeAction

Consume Action

Type Condition Required Default Value Limits Description
action string (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 Consume Action
request string
~ 524288 chars JSON string of the request used when executing the action

EzVerifyAction

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.

Type Condition Required Default Value Limits Description
action string (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 Verify Action
request string
~ 524288 chars JSON string of the request used when executing the action

EzScopedValue

Scoped Value

Represents a counter value within a specific scope. Each scoped value holds the accumulated count for a particular reset timing (e.g., daily, weekly, monthly) or verify action condition. When the reset timing arrives, the value is reset to zero. The counter value has an upper bound and will not exceed the maximum value even when incremented.

Type Condition Required Default Value Limits Description
scopeType string (enum)
enum {
  “resetTiming”,
  “verifyAction”
}
“resetTiming” Scope type
Indicates whether this scoped value is based on a reset timing schedule or a verify action condition.
DefinitionDescription
“resetTiming”Reset timing
“verifyAction”Verify Action
resetType string (enum)
enum {
  “notReset”,
  “daily”,
  “weekly”,
  “monthly”,
  “days”
}
{scopeType} == “resetTiming”
✓*
Reset timing
The reset timing for this scoped value. Determines the period over which the counter value is accumulated before being reset. Only applicable when scopeType is “resetTiming”.
DefinitionDescription
“notReset”Not Reset
“daily”Daily
“weekly”Weekly
“monthly”Monthly
“days”Every fixed number of days

* Required if scopeType is “resetTiming”
conditionName string {scopeType} == “verifyAction”
✓*
~ 128 chars Condition Name
The name of the verify action condition that this scoped value corresponds to. Used to identify which condition scope this value belongs to. Only applicable when scopeType is “verifyAction”.

* Required if scopeType is “verifyAction”
value long 0 0 ~ 9223372036854775805 Count value
The accumulated counter value for this scope. Increases when the counter is incremented and decreases when decremented. The value is capped at the maximum and will not go below zero.

EzVerifyActionResult

Verify Action execution result

Type Condition Required Default Value Limits Description
action string (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 Verify Action
verifyRequest string
~ 524288 chars JSON string of the request used when executing the action
statusCode int 0 ~ 999 Status code
verifyResult string ~ 1048576 chars Result content

EzConsumeActionResult

Consume Action execution result

Type Condition Required Default Value Limits Description
action string (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 Consume Action
consumeRequest string
~ 524288 chars JSON string of the request used when executing the action
statusCode int 0 ~ 999 Status code
consumeResult string ~ 1048576 chars Result content

EzAcquireActionResult

Acquire Action execution result

Type Condition Required Default Value Limits Description
action string (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 Acquire Action
acquireRequest string
~ 524288 chars JSON string of the request used when executing the action
statusCode int 0 ~ 999 Status code
acquireResult string ~ 1048576 chars Result content

EzTransactionResult

Transaction execution result

Result of a transaction executed using the server-side automatic execution feature

Type Condition Required Default Value Limits Description
transactionId string
36 ~ 36 chars Transaction ID
verifyResults List<EzVerifyActionResult> 0 ~ 10 items List of verify action execution results
consumeResults List<EzConsumeActionResult> [] 0 ~ 10 items List of Consume Action execution results
acquireResults List<EzAcquireActionResult> [] 0 ~ 100 items List of Acquire Action execution results

Methods

batchReceiveRewards

Claim rewards for multiple completed missions at once

Claims the rewards for multiple mission tasks within the same group in a single call. This is the “Claim All” button in your mission UI — instead of the player tapping “Claim” on each mission one by one, they can claim everything at once.

All specified tasks must be completed and not yet received. The rewards for all tasks are combined into a single transaction.

For example, if the player has completed “Win 3 battles” (reward: 50 Gems) and “Collect 500 gold” (reward: 1 Gacha Ticket), calling this with both task names gives the player 50 Gems + 1 Gacha Ticket in one operation.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
missionGroupName string
~ 128 chars Mission Group Name
The name of the mission group that this completion record belongs to. One Complete record exists per user per mission group.
missionTaskNames List<string>
1 ~ 100 items Task name list
gameSession GameSession
GameSession
config List<EzConfig> [] 0 ~ 32 items Configuration values applied to transaction variables

Result

Type Description
transactionId string Issued transaction ID
stampSheet string Stamp sheet to receive rewards for mission accomplishment
stampSheetEncryptionKeyId string Cryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheet bool Whether automatic transaction execution is enabled
atomicCommit bool Whether to commit the transaction atomically
transaction string Issued transaction
transactionResult EzTransactionResult Transaction execution result

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Complete(
        missionGroupName: "mission-group-0001"
    );
    var result = await domain.BatchReceiveRewardsAsync(
        missionTaskNames: new List<string> {
            "mission-task-0001",
            "mission-task-0002",
        },
        config: null
    );
    // In New Experience, stamp sheets are automatically executed at the SDK level.
    // If an error occurs, a TransactionException is thrown.
    // You can retry with TransactionException::Retry().
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Complete(
        missionGroupName: "mission-group-0001"
    );
    var future = domain.BatchReceiveRewardsFuture(
        missionTaskNames: new List<string> {
            "mission-task-0001",
            "mission-task-0002",
        },
        config: null
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    // In New Experience, stamp sheets are automatically executed at the SDK level.
    // If an error occurs, a TransactionException is thrown.
    // You can retry with TransactionException::Retry().
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Complete(
        "mission-group-0001" // missionGroupName
    );
    const auto Future = Domain->BatchReceiveRewards(
        []
        {
            auto v = TOptional<TArray<FString>>();
            v->Add("mission-task-0001");
            v->Add("mission-task-0002");
            return v;
        }() // missionTaskNames
        // config
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

evaluateComplete

Re-evaluate mission completion status

Re-checks all counter values against mission task conditions within the specified group and updates the completion status.

Normally, mission completion is checked automatically every time a counter is increased. However, if you add new mission tasks to an existing group after counters have already been incremented, those new tasks won’t be automatically evaluated.

Call this API in that situation to retroactively check if the player’s existing counter values already meet the new tasks’ conditions.

For example: You add a new daily mission “Win 1 battle” to a group. Players who already won battles today already have the counter value to complete it, but the system doesn’t know yet. Calling EvaluateComplete will check and mark it as completed.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
missionGroupName string
~ 128 chars Mission Group Name
The name of the mission group that this completion record belongs to. One Complete record exists per user per mission group.
gameSession GameSession
GameSession

Result

Type Description
item EzComplete Completion Status updated

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Complete(
        missionGroupName: "mission-group-0001"
    );
    var result = await domain.EvaluateCompleteAsync(
    );
    var item = await result.ModelAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Complete(
        missionGroupName: "mission-group-0001"
    );
    var future = domain.EvaluateCompleteFuture(
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    var future2 = future.Result.ModelFuture();
    yield return future2;
    if (future2.Error != null)
    {
        onError.Invoke(future2.Error, null);
        yield break;
    }
    var result = future2.Result;
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Complete(
        "mission-group-0001" // missionGroupName
    );
    const auto Future = Domain->EvaluateComplete(
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

    // obtain changed values / result values
    const auto Future2 = Future->GetTask().Result()->Model();
    Future2->StartSynchronousTask();
    if (Future2->GetTask().IsError())
    {
        return Future2->GetTask().Error();
    }
    const auto Result = Future2->GetTask().Result();

getComplete

Get the player’s completion status for a specific mission group

Retrieves which mission tasks the player has completed and which rewards have been claimed within the specified mission group.

Use this to display the mission list screen for a specific group — for example, showing each daily mission with its status:

  • “Win 3 battles” — Completed, reward claimed (checkmark)
  • “Collect 500 gold” — Completed, reward available! (claim button)
  • “Use 10 items” — In progress: 7/10 (progress bar)

Combine with ListMissionTaskModels or GetMissionGroupModel to get the task definitions (objectives, thresholds, rewards), and with GetCounter to get the current counter values for showing progress bars.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
missionGroupName string
~ 128 chars Mission Group Name
The name of the mission group that this completion record belongs to. One Complete record exists per user per mission group.
gameSession GameSession
GameSession

Result

Type Description
item EzComplete Completion Statuses

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Complete(
        missionGroupName: "mission-group-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Complete(
        missionGroupName: "mission-group-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Complete(
        "mission-group-0001" // missionGroupName
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Complete(
        missionGroupName: "mission-group-0001"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Complete(
        missionGroupName: "mission-group-0001"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Complete(
        "mission-group-0001" // missionGroupName
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Mission::Model::FComplete> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

listCompletes

Get the player’s mission completion status across all groups

Retrieves the completion and reward claim status for all mission groups. Each entry shows which mission tasks the player has completed (met the counter threshold) and which rewards have already been claimed.

Use this to build an overview mission screen — for example, showing badges or notification dots on groups that have unclaimed rewards: “Daily Missions (2 rewards available!)”, “Weekly Missions (complete)”, “Achievements (1 new!)”

A mission task has two states:

  • Completed: The counter met the threshold (e.g., “Win 5 battles” and the player has won 5 or more)
  • Received: The player has claimed the reward for the completed task

A task that is “completed but not received” means the player has earned the reward but hasn’t claimed it yet — this is what you should highlight in the UI.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSession GameSession
GameSession
pageToken string ~ 1024 chars Token specifying the position from which to start acquiring data
limit int 30 1 ~ 1000 Number of data items to retrieve

Result

Type Description
items List<EzComplete> List of Completion Statuses
nextPageToken string Page token to retrieve the rest of the listing

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var items = await domain.CompletesAsync(
    ).ToListAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.Completes(
    );
    List<EzComplete> items = new List<EzComplete>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    const auto It = Domain->Completes(
    );
    TArray<Gs2::UE5::Mission::Model::FEzCompletePtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
Value change event handling
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    
    // Start event handling
    var callbackId = domain.SubscribeCompletes(
        () => {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    domain.UnsubscribeCompletes(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    
    // Start event handling
    var callbackId = domain.SubscribeCompletes(
        () => {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    domain.UnsubscribeCompletes(callbackId);
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    
    // Start event handling
    const auto CallbackId = Domain->SubscribeCompletes(
        []() {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    Domain->UnsubscribeCompletes(CallbackId);

receiveRewards

Claim the reward for a completed mission

Claims the reward for a specific mission task that the player has completed. The task must be completed (counter threshold met) and not yet received.

When called, the configured reward is given to the player — for example, 100 Gems, a Gacha Ticket, or 500 Gold.

This is the “Claim” or “Receive” button in your mission UI. The typical flow is:

  1. The player sees a completed mission with an available reward
  2. The player taps the “Claim” button
  3. Your game calls ReceiveRewards
  4. The reward is given and the task is marked as “received”

If the task is not yet completed or the reward has already been claimed, an error is returned.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
missionGroupName string
~ 128 chars Mission Group Name
The name of the mission group that this completion record belongs to. One Complete record exists per user per mission group.
missionTaskName string
~ 128 chars Task Name
Task-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSession GameSession
GameSession
config List<EzConfig> [] 0 ~ 32 items Configuration values applied to transaction variables

Result

Type Description
transactionId string Issued transaction ID
stampSheet string Stamp sheet to receive rewards for mission accomplishment
stampSheetEncryptionKeyId string Cryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheet bool Whether automatic transaction execution is enabled
atomicCommit bool Whether to commit the transaction atomically
transaction string Issued transaction
transactionResult EzTransactionResult Transaction execution result

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Complete(
        missionGroupName: "mission-group-0001"
    );
    var result = await domain.ReceiveRewardsAsync(
        missionTaskName: "mission-task-0001",
        config: null
    );
    // In New Experience, stamp sheets are automatically executed at the SDK level.
    // If an error occurs, a TransactionException is thrown.
    // You can retry with TransactionException::Retry().
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Complete(
        missionGroupName: "mission-group-0001"
    );
    var future = domain.ReceiveRewardsFuture(
        missionTaskName: "mission-task-0001",
        config: null
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    // In New Experience, stamp sheets are automatically executed at the SDK level.
    // If an error occurs, a TransactionException is thrown.
    // You can retry with TransactionException::Retry().
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Complete(
        "mission-group-0001" // missionGroupName
    );
    const auto Future = Domain->ReceiveRewards(
        "mission-task-0001" // missionTaskName
        // config
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

deleteCounter

Delete a counter completely

Deletes the specified counter and all its scope values for the player. Unlike ResetCounter (which resets only specific scopes), this removes the entire counter as if the player had never had any progress.

Use this when you want to completely clear a player’s progress for a specific counter — for example, when implementing a full mission reset feature.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSession GameSession
GameSession
counterName string
~ 128 chars Counter Model name
The name of the Counter Model that this counter instance is based on. Links to the counter model definition that specifies the scopes and reset timings.

Result

Type Description
item EzCounter Counter deleted

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Counter(
        counterName: "counter-0001"
    );
    var result = await domain.DeleteCounterAsync(
    );
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Counter(
        counterName: "counter-0001"
    );
    var future = domain.DeleteCounterFuture(
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Counter(
        "counter-0001" // counterName
    );
    const auto Future = Domain->DeleteCounter(
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
    const auto Result = Future->GetTask().Result();

getCounter

Get the player’s value for a specific counter

Retrieves the current value of a specific counter for the player, including all scope values. For example, if the counter is “battle_wins”, the response might include: daily=3, weekly=12, total=87.

Use this to show mission progress for a specific objective — for example, displaying a progress bar “3/5 battles won today” next to a daily mission.

Each scope value represents the counter tracked over a different time period, allowing you to show both short-term and long-term progress.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSession GameSession
GameSession
counterName string
~ 128 chars Counter Model name
The name of the Counter Model that this counter instance is based on. Links to the counter model definition that specifies the scopes and reset timings.

Result

Type Description
item EzCounter Counter

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Counter(
        counterName: "quest_complete"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Counter(
        counterName: "quest_complete"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Counter(
        "quest_complete" // counterName
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Counter(
        counterName: "quest_complete"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Counter(
        counterName: "quest_complete"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Counter(
        "quest_complete" // counterName
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Mission::Model::FCounter> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

listCounters

Get the player’s current counter values

Retrieves all counter values for the player. Each counter tracks a specific player action (like battle wins, items collected, or gold earned) and contains values for each scope (daily, weekly, monthly, all-time).

Use this to build an overview of the player’s mission progress — for example, showing “Battles won today: 3” or “Total quests completed: 42” on a stats or mission screen.

Counter values are automatically increased when the player performs actions in the game (via reward actions from other services), and are automatically checked against mission task thresholds.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSession GameSession
GameSession
pageToken string ~ 1024 chars Token specifying the position from which to start acquiring data
limit int 30 1 ~ 1000 Number of data items to retrieve

Result

Type Description
items List<EzCounter> List of Counter
nextPageToken string Page token to retrieve the rest of the listing

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var items = await domain.CountersAsync(
    ).ToListAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.Counters(
    );
    List<EzCounter> items = new List<EzCounter>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    const auto It = Domain->Counters(
    );
    TArray<Gs2::UE5::Mission::Model::FEzCounterPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
Value change event handling
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    
    // Start event handling
    var callbackId = domain.SubscribeCounters(
        () => {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    domain.UnsubscribeCounters(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    
    // Start event handling
    var callbackId = domain.SubscribeCounters(
        () => {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    domain.UnsubscribeCounters(callbackId);
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    
    // Start event handling
    const auto CallbackId = Domain->SubscribeCounters(
        []() {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    Domain->UnsubscribeCounters(CallbackId);

resetCounter

Reset specific scopes of a counter

Resets the counter values for the specified scopes only. For example, you can reset just the daily scope of a counter without affecting the weekly or all-time values.

This is useful when you want to manually reset a specific period’s progress — for instance, resetting a “daily challenge” counter when the player uses a special item to retry daily missions.

Only the scoped values matching the specified scope types are reset; all other scoped values remain unchanged.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSession GameSession
GameSession
counterName string
~ 128 chars Counter Model name
The name of the Counter Model that this counter instance is based on. Links to the counter model definition that specifies the scopes and reset timings.
scopes List<EzScopedValue>
1 ~ 20 items List of scopes

Result

Type Description
item EzCounter Counter deleted

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Counter(
        counterName: "counter-0001"
    );
    var result = await domain.ResetCounterAsync(
        scopes: new List<Gs2.Unity.Gs2Mission.Model.EzScopedValue> {
            new Gs2.Unity.Gs2Mission.Model.EzScopedValue() {
                ResetType = "daily",
            },
            new Gs2.Unity.Gs2Mission.Model.EzScopedValue() {
                ResetType = "weekly",
            },
        }
    );
    var item = await result.ModelAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Counter(
        counterName: "counter-0001"
    );
    var future = domain.ResetCounterFuture(
        scopes: new List<Gs2.Unity.Gs2Mission.Model.EzScopedValue> {
            new Gs2.Unity.Gs2Mission.Model.EzScopedValue() {
                ResetType = "daily",
            },
            new Gs2.Unity.Gs2Mission.Model.EzScopedValue() {
                ResetType = "weekly",
            },
        }
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    var future2 = future.Result.ModelFuture();
    yield return future2;
    if (future2.Error != null)
    {
        onError.Invoke(future2.Error, null);
        yield break;
    }
    var result = future2.Result;
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Counter(
        "counter-0001" // counterName
    );
    const auto Future = Domain->ResetCounter(
        []
        {
            auto v = MakeShared<TArray<TSharedPtr<Gs2::UE5::Mission::Model::FEzScopedValue>>>();
            v->Add(
                MakeShared<Gs2::UE5::Mission::Model::FEzScopedValue>()
                ->WithResetType(TOptional<FString>("daily"))
            );
            v->Add(
                MakeShared<Gs2::UE5::Mission::Model::FEzScopedValue>()
                ->WithResetType(TOptional<FString>("weekly"))
            );
            return v;
        }() // scopes
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

    // obtain changed values / result values
    const auto Future2 = Future->GetTask().Result()->Model();
    Future2->StartSynchronousTask();
    if (Future2->GetTask().IsError())
    {
        return Future2->GetTask().Error();
    }
    const auto Result = Future2->GetTask().Result();

getCounterModel

Get the details of a specific counter definition

Retrieves a single counter model by name, including its scopes and reset conditions. Use this to understand what a counter tracks and how its values are managed — for example, to show the player what actions contribute to a mission’s progress.

The response includes the list of scopes defined for this counter, each with its reset type (daily, weekly, monthly, or none) and reset timing.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
counterName string
~ 128 chars Counter Model name
Counter Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

Type Description
item EzCounterModel Counter Model

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).CounterModel(
        counterName: "counter-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).CounterModel(
        counterName: "counter-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->CounterModel(
        "counter-0001" // counterName
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).CounterModel(
        counterName: "counter-0001"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).CounterModel(
        counterName: "counter-0001"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->CounterModel(
        "counter-0001" // counterName
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Mission::Model::FCounterModel> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

listCounterModels

Get a list of all counter definitions

Retrieves all counter models defined in the namespace. Counters are the values that track player actions and drive mission completion. For example, a “battle_wins” counter tracks how many battles the player has won, and a “gold_collected” counter tracks total gold earned.

Each counter model defines one or more “scopes” — these determine how the counter value is tracked across different time periods:

  • A counter can simultaneously track daily, weekly, monthly, and all-time values
  • For example, a “battle_wins” counter might have: today’s wins (daily scope), this week’s wins (weekly scope), and total wins (all-time scope)
  • Different mission tasks can reference different scopes of the same counter (e.g., “Win 3 battles today” uses the daily scope, while “Win 100 battles total” uses the all-time scope)

Counter values are typically increased automatically as a reward action from other GS2 services (e.g., when completing a quest or purchasing an item), but can also be increased manually from your game server.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

Type Description
items List<EzCounterModel> List of Counter Model

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    var items = await domain.CounterModelsAsync(
    ).ToListAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.CounterModels(
    );
    List<EzCounterModel> items = new List<EzCounterModel>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    );
    const auto It = Domain->CounterModels(
    );
    TArray<Gs2::UE5::Mission::Model::FEzCounterModelPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
Value change event handling
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    
    // Start event handling
    var callbackId = domain.SubscribeCounterModels(
        () => {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    domain.UnsubscribeCounterModels(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    
    // Start event handling
    var callbackId = domain.SubscribeCounterModels(
        () => {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    domain.UnsubscribeCounterModels(callbackId);
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    );
    
    // Start event handling
    const auto CallbackId = Domain->SubscribeCounterModels(
        []() {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    Domain->UnsubscribeCounterModels(CallbackId);

getMissionGroupModel

Get the details of a specific mission group

Retrieves a single mission group by name, including its reset type, reset timing settings, and the list of mission tasks it contains.

Use this to display the mission list within a specific group — for example, when the player taps on the “Daily Missions” tab, call this to get all the daily mission tasks and their details.

The response includes the mission tasks defined in the group, each with their target counter condition and reward configuration. Combine this with GetComplete to show the player’s progress and completion status for each task.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
missionGroupName string
~ 128 chars Mission Group Model name
Mission Group Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

Type Description
item EzMissionGroupModel Mission Group Model

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->MissionGroupModel(
        "mission-group-0001" // missionGroupName
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->MissionGroupModel(
        "mission-group-0001" // missionGroupName
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Mission::Model::FMissionGroupModel> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

listMissionGroupModels

Get a list of all mission groups

Retrieves all mission groups defined in the namespace. Mission groups are categories that organize individual missions together — for example, “Daily Missions”, “Weekly Missions”, “Story Missions”, or “Achievement Missions”.

Each group has a reset type that determines when the missions in the group reset:

  • notReset: Missions never reset (permanent achievements like “Clear Stage 10” or “Collect 100 characters”)
  • daily: Missions reset every day (e.g., “Win 3 battles today”)
  • weekly: Missions reset every week (e.g., “Log in 5 days this week”)
  • monthly: Missions reset every month (e.g., “Spend 10,000 gold this month”)

Use this to build the main mission list screen — for example, showing tabs for “Daily”, “Weekly”, and “Achievement” categories.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

Type Description
items List<EzMissionGroupModel> List of Mission Group Model

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    var items = await domain.MissionGroupModelsAsync(
    ).ToListAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.MissionGroupModels(
    );
    List<EzMissionGroupModel> items = new List<EzMissionGroupModel>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    );
    const auto It = Domain->MissionGroupModels(
    );
    TArray<Gs2::UE5::Mission::Model::FEzMissionGroupModelPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
Value change event handling
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    
    // Start event handling
    var callbackId = domain.SubscribeMissionGroupModels(
        () => {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    domain.UnsubscribeMissionGroupModels(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    
    // Start event handling
    var callbackId = domain.SubscribeMissionGroupModels(
        () => {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    domain.UnsubscribeMissionGroupModels(callbackId);
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    );
    
    // Start event handling
    const auto CallbackId = Domain->SubscribeMissionGroupModels(
        []() {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    Domain->UnsubscribeMissionGroupModels(CallbackId);

getMissionTaskModel

Get the details of a specific mission task

Retrieves a single mission task by name within the specified mission group. Use this to display the detail screen for a specific mission — showing the objective, current progress, reward, and whether it’s completed.

The response includes:

  • The target counter name and threshold (what the player needs to achieve)
  • The reward actions (what the player receives upon claiming)
  • Any prerequisite task (a task that must be completed first)
  • The verification type for completion checking

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
missionGroupName string
~ 128 chars Mission Group Model name
Mission Group Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
missionTaskName string
~ 128 chars Mission Task Model name
Mission Task Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

Type Description
item EzMissionTaskModel Mission Task Model

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    ).MissionTaskModel(
        missionTaskName: "mission-task-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    ).MissionTaskModel(
        missionTaskName: "mission-task-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->MissionGroupModel(
        "mission-group-0001" // missionGroupName
    )->MissionTaskModel(
        "mission-task-0001" // missionTaskName
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    ).MissionTaskModel(
        missionTaskName: "mission-task-0001"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    ).MissionTaskModel(
        missionTaskName: "mission-task-0001"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->MissionGroupModel(
        "mission-group-0001" // missionGroupName
    )->MissionTaskModel(
        "mission-task-0001" // missionTaskName
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Mission::Model::FMissionTaskModel> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

listMissionTaskModels

Get a list of all mission tasks in a group

Retrieves all individual mission tasks within the specified mission group. Each mission task represents a single mission objective — for example, “Win 5 battles”, “Collect 1,000 gold”, or “Clear Stage 3”.

Each task defines:

  • A target counter and a threshold value (e.g., counter “battle_wins” >= 5)
  • Rewards given when the player claims the completed mission (e.g., 100 Gems)
  • Optional prerequisite tasks (e.g., “Win 10 battles” only appears after “Win 5 battles” is completed)

The mission system works automatically:

  1. When the player does something in the game (wins a battle, collects gold, etc.), the corresponding counter is increased
  2. The system checks if the counter value meets any task’s threshold
  3. If it does, the task is marked as “completed”
  4. The player can then claim the reward using ReceiveRewards

Use this to display the mission list with objectives and rewards for each task in a group.

Request

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
missionGroupName string
~ 128 chars Mission Group Model name
Mission Group Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

Type Description
items List<EzMissionTaskModel> List of Mission Task Model

Implementation Example

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    );
    var items = await domain.MissionTaskModelsAsync(
    ).ToListAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    );
    var it = domain.MissionTaskModels(
    );
    List<EzMissionTaskModel> items = new List<EzMissionTaskModel>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->MissionGroupModel(
        "mission-group-0001" // missionGroupName
    );
    const auto It = Domain->MissionTaskModels(
    );
    TArray<Gs2::UE5::Mission::Model::FEzMissionTaskModelPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
Value change event handling
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    );
    
    // Start event handling
    var callbackId = domain.SubscribeMissionTaskModels(
        () => {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    domain.UnsubscribeMissionTaskModels(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    );
    
    // Start event handling
    var callbackId = domain.SubscribeMissionTaskModels(
        () => {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    domain.UnsubscribeMissionTaskModels(callbackId);
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->MissionGroupModel(
        "mission-group-0001" // missionGroupName
    );
    
    // Start event handling
    const auto CallbackId = Domain->SubscribeMissionTaskModels(
        []() {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    Domain->UnsubscribeMissionTaskModels(CallbackId);

Event Handlers

OnCompleteNotification

Push notification used when mission tasks are accomplished

Name Type Description
namespaceName string Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
groupName string Mission Group Name
The name of the mission group that this completion record belongs to. One Complete record exists per user per mission group.
userId string User ID
taskName string Mission Task Name

Implementation Example

    gs2.Mission.OnCompleteNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var groupName = notification.GroupName;
        var userId = notification.UserId;
        var taskName = notification.TaskName;
    };
    gs2.Mission.OnCompleteNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var groupName = notification.GroupName;
        var userId = notification.UserId;
        var taskName = notification.TaskName;
    };
    Gs2->Mission->OnCompleteNotification().AddLambda([](const auto Notification)
    {
        const auto NamespaceName = Notification->NamespaceNameValue;
        const auto GroupName = Notification->GroupNameValue;
        const auto UserId = Notification->UserIdValue;
        const auto TaskName = Notification->TaskNameValue;
    });