GS2-Enchant SDK for Game Engine API Reference

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

Model

EzBalanceParameterStatus

Balance Parameter Status

Represents the actual parameter values drawn for a specific resource owned by a user. Each status is associated with a Balance Parameter Model and contains the concrete values assigned to each parameter slot after the drawing process.

TypeConditionRequiredDefaultValue LimitsDescription
parameterNamestring
~ 128 charsBalance Parameter Model name
The name of the Balance Parameter Model that defines the drawing conditions for this status. References the model that specifies the total value, allocation strategy, and available parameter slots.
propertyIdstring
~ 1024 charsProperty ID of the resource that owns the parameter
Identifies the specific game resource (e.g., a weapon or equipment item) to which these balance parameters are attached. Typically references a GS2-Inventory item or similar resource via its property ID.
parameterValuesList<EzBalanceParameterValue>
1 ~ 10 itemsList of balance parameter values
The concrete values assigned to each parameter slot after the drawing process. Each entry corresponds to a parameter slot defined in the model and contains the actual numeric value allocated. The sum of all values equals the total value specified in the model.

EzRarityParameterStatus

Rarity Parameter Status

Represents the actual parameter values drawn for a specific resource owned by a user. Each status is associated with a Rarity Parameter Model and contains the concrete values selected through weighted lottery for each granted parameter slot.

TypeConditionRequiredDefaultValue LimitsDescription
parameterNamestring
~ 128 charsRarity Parameter Model name
The name of the Rarity Parameter Model that defines the drawing conditions for this status. References the model that specifies the maximum parameter count, count lottery weights, and value lottery pool.
propertyIdstring
~ 1024 charsProperty ID of the resource that owns the parameter
Identifies the specific game resource (e.g., a weapon or equipment item) to which these rarity parameters are attached. Typically references a GS2-Inventory item or similar resource via its property ID.
parameterValuesList<EzRarityParameterValue>0 ~ 10 itemsList of rarity parameter values
The concrete parameter values selected through weighted lottery for each granted slot. The number of entries is determined by the parameter count draw, and each entry’s value is selected from the value model pool. May contain fewer entries than the maximum parameter count.

EzBalanceParameterModel

Balance Parameter Model

Defines the drawing conditions for balance parameters. Balance parameters distribute a fixed total value across multiple parameter slots. For example, a weapon with a total power of 100 might have ATK=60, DEF=30, SPD=10. The initial value strategy determines how values are assigned: average distributes evenly, while lottery randomly allocates the total across parameters.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 128 charsBalance Parameter Model name
Balance Parameter Model-specific name. Specified using alphanumeric characters, hyphen (-), underscore (_), and period (.).
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.
totalValuelong
0 ~ 9223372036854775805Total value
The fixed total that is distributed across all parameter slots. When parameters are drawn, the individual values will always sum to this total regardless of the allocation strategy used.
initialValueStrategyString Enum
enum {
  “average”,
  “lottery”
}
“average”Initial value setting policy
Determines how the total value is distributed across parameter slots when first assigned. average divides the total evenly among all parameters, while lottery randomly distributes the total to create varied parameter combinations.
DefinitionDescription
“average”Average
“lottery”Lottery
parametersList<EzBalanceParameterValueModel>
1 ~ 10 itemsBalance parameter value model list
Defines the parameter slots available for this balance parameter. Each entry specifies a named parameter slot (e.g., ATK, DEF, SPD) with optional metadata. The total value is distributed across these slots.

EzBalanceParameterValueModel

Balance Parameter Value Model

Defines a single parameter slot available within a balance parameter. Each entry specifies a named slot (e.g., ATK, DEF, SPD) that receives a portion of the total value during the drawing process.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 64 charsName
The identifier for this parameter slot (e.g., ATK, DEF, SPD). Must be unique within the balance parameter model. Used as the key when storing and retrieving drawn parameter values.
metadatastring~ 512 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.

EzRarityParameterModel

Rarity Parameter Model

Defines the drawing conditions for rarity parameters. Rarity parameters use a weighted lottery system to determine both the number of parameters granted and the specific values assigned. First, the number of parameter slots to fill is determined by a weighted draw from the parameter count model list. Then, each slot’s value is selected by a weighted draw from the parameter value model list, providing randomized equipment attributes with controlled probability distributions.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 128 charsRarity Parameter Model name
Rarity Parameter Model-specific name. Specified using alphanumeric characters, hyphen (-), underscore (_), and period (.).
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.
maximumParameterCountint
1 ~ 10Maximum number of parameters to be given
The upper limit on the number of parameter slots that can be granted to a resource. The actual number granted is determined by a weighted draw from the parameter count model list, but will never exceed this value.
parameterCountsList<EzRarityParameterCountModel>
1 ~ 10 itemsRarity parameter count model list
Defines the weighted lottery entries for determining how many parameter slots are granted. Each entry specifies a count and a draw weight. Higher weights increase the probability of that count being selected.
parametersList<EzRarityParameterValueModel>
1 ~ 1000 itemsRarity parameter value model list
Defines the pool of possible parameter values that can be drawn. Each entry specifies a parameter name, resource details, and a draw weight. When filling parameter slots, values are selected from this pool via weighted lottery without replacement.

EzRarityParameterCountModel

Rarity Parameter Count Model

Defines a single entry in the weighted lottery for determining how many parameter slots are granted to a resource. Each entry pairs a parameter count with a draw weight, allowing fine-grained control over the probability distribution of parameter quantities.

TypeConditionRequiredDefaultValue LimitsDescription
countint
0 ~ 10Count
The number of parameter slots to grant when this entry is drawn. For example, a count of 3 means the resource will receive 3 parameter values selected from the value model pool.
weightint
1 ~ 2147483646Draw Weight
The relative weight used in the weighted lottery when determining the parameter count. Higher values increase the probability of this count being selected. The actual probability is this weight divided by the sum of all weights in the count model list.

EzRarityParameterValueModel

Rarity Parameter Value Model

Defines a single entry in the weighted lottery pool for rarity parameter values. Each entry specifies a parameter name, game-defined resource details, and a draw weight that determines its selection probability relative to other entries in the pool.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 64 charsName
The identifier for this lottery entry. Must be unique within the rarity parameter model’s value pool. When drawn, this name is stored in the resulting Rarity Parameter Value.
metadatastring~ 512 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.
resourceNamestring
~ 64 charsParameter Resource Name for Game (Not used for GS2)
A game-defined resource type name associated with this parameter value (e.g., “fire_attack”, “ice_resist”). GS2 does not use this value for its own operations; it is passed through to the drawn result for use in game logic.
resourceValuelong
0 ~ 9223372036854775805Parameter Resource Value for Game (Not used for GS2)
A game-defined numeric value for this parameter (e.g., 50 for +50 attack power). GS2 does not use this value for its own operations; it is passed through to the drawn result for use in game logic.
weightint
1 ~ 2147483646Draw Weight
The relative weight used in the weighted lottery when selecting parameter values. Higher values increase the probability of this entry being selected. The actual probability is this weight divided by the sum of all weights in the pool.

EzBalanceParameterValue

Balance Parameter Value

Represents the actual value assigned to a single parameter slot within a balance parameter status. Contains the slot name and its concrete numeric value after the drawing process.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 64 charsName
The name of the parameter slot (e.g., ATK, DEF, SPD). Corresponds to a parameter slot defined in the Balance Parameter Value Model.
valuelong
0 ~ 9223372036854775805Value
The numeric value assigned to this parameter slot. Determined by the initial value strategy (average or lottery) when the balance parameter is first drawn. The sum of all slot values equals the total value defined in the model.

EzRarityParameterValue

Rarity Parameter Value

Represents the actual value assigned to a single parameter slot within a rarity parameter status. Contains the slot name and the resource details (name and value) selected through weighted lottery from the value model pool.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 64 charsName
The name of the parameter value selected from the value model pool. Corresponds to the name defined in the Rarity Parameter Value Model entry that was drawn.
resourceNamestring
~ 64 charsResource Name
The game-defined resource type name associated with this parameter value (e.g., “fire_attack”, “ice_resist”). Copied from the drawn Rarity Parameter Value Model entry for use in game logic.
resourceValuelong
0 ~ 9223372036854775805Resource Value
The numeric value of the resource associated with this parameter. Copied from the drawn Rarity Parameter Value Model entry. Used by game logic to apply the parameter’s effect (e.g., +50 attack power).

EzVerifyActionResult

Verify Action execution result

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
verifyRequeststring
~ 524288 charsJSON string of the request used when executing the action
statusCodeint0 ~ 999Status code
verifyResultstring~ 1048576 charsResult payload

EzConsumeActionResult

Consume Action execution result

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
consumeRequeststring
~ 524288 charsJSON string of the request used when executing the action
statusCodeint0 ~ 999Status code
consumeResultstring~ 1048576 charsResult payload

EzAcquireActionResult

Acquire Action execution result

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
acquireRequeststring
~ 524288 charsJSON string of the request used when executing the action
statusCodeint0 ~ 999Status code
acquireResultstring~ 1048576 charsResult payload

EzTransactionResult

Transaction execution results

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

TypeConditionRequiredDefaultValue LimitsDescription
transactionIdstring
36 ~ 36 charsTransaction ID
verifyResultsList<EzVerifyActionResult>0 ~ 10 itemsList of verify action execution results
consumeResultsList<EzConsumeActionResult>[]0 ~ 10 itemsList of Consume Action execution results
acquireResultsList<EzAcquireActionResult>[]0 ~ 100 itemsList of Acquire Action execution results

Methods

getBalanceParameterModel

Get a balance parameter definition by name

Retrieves a single balance parameter model by specifying its name. The returned information includes the total value to distribute, the list of parameter slots (e.g., ATK, DEF, SPD), and how the initial values are determined.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
parameterNamestring
~ 128 charsBalance Parameter Model name
Balance Parameter Model-specific name. Specified using alphanumeric characters, hyphen (-), underscore (_), and period (.).

Result

TypeDescription
itemEzBalanceParameterModelBalance Parameter Model

Implementation Example

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).BalanceParameterModel(
        parameterName: "balance-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).BalanceParameterModel(
        parameterName: "balance-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->BalanceParameterModel(
        "balance-0001" // parameterName
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).BalanceParameterModel(
        parameterName: "balance-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.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).BalanceParameterModel(
        parameterName: "balance-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->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->BalanceParameterModel(
        "balance-0001" // parameterName
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Enchant::Model::FBalanceParameterModel> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

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

listBalanceParameterModels

Get a list of balance parameter definitions

Retrieves all balance parameter models registered in this namespace. A balance parameter distributes a fixed total value across multiple stats — for example, splitting 100 points among ATK, DEF, and SPD so the total always equals 100. Use this to display available parameter types or to check the configuration of parameter models on a weapon/equipment detail screen.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
itemsList<EzBalanceParameterModel>List of Balance Parameter Model

Implementation Example

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    var items = await domain.BalanceParameterModelsAsync(
    ).ToListAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.BalanceParameterModels(
    );
    List<EzBalanceParameterModel> items = new List<EzBalanceParameterModel>();
    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->Enchant->Namespace(
        "namespace-0001" // namespaceName
    );
    const auto It = Domain->BalanceParameterModels(
    );
    TArray<Gs2::UE5::Enchant::Model::FEzBalanceParameterModelPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
Value change event handling
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    
    // Start event handling
    var callbackId = domain.SubscribeBalanceParameterModels(
        () => {
            // Called when an element of the list changes.
        }
    );

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

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

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

getBalanceParameterStatus

Get the balance parameter values of a specific item

Retrieves the current balance parameter values for a specific item (property) owned by the player. The values were randomly determined when the item was created (or last re-rolled), and the sum of all values always equals the model’s total value. Use this to display the individual stat breakdown (e.g., ATK: 40, DEF: 35, SPD: 25) on an item detail screen.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
parameterNamestring
~ 128 charsBalance Parameter Model name
The name of the Balance Parameter Model that defines the drawing conditions for this status. References the model that specifies the total value, allocation strategy, and available parameter slots.
gameSessionGameSession
GameSession
propertyIdstring
~ 1024 charsProperty ID of the resource that owns the parameter
Identifies the specific game resource (e.g., a weapon or equipment item) to which these balance parameters are attached. Typically references a GS2-Inventory item or similar resource via its property ID.

Result

TypeDescription
itemEzBalanceParameterStatusBalance Parameter Status

Implementation Example

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).BalanceParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).BalanceParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->BalanceParameterStatus(
        "balance-0001", // parameterName
        "property-0001" // propertyId
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).BalanceParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-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.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).BalanceParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-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->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->BalanceParameterStatus(
        "balance-0001", // parameterName
        "property-0001" // propertyId
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Enchant::Model::FBalanceParameterStatus> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

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

listBalanceParameterStatuses

Get a list of the player’s balance parameter values

Retrieves the current balance parameter values assigned to the player’s items. You can filter by parameter name to see values for a specific parameter type only. For example, this returns the ATK/DEF/SPD distribution for each weapon the player owns.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
parameterNamestring~ 128 charsBalance Parameter Model name
The name of the Balance Parameter Model that defines the drawing conditions for this status. References the model that specifies the total value, allocation strategy, and available parameter slots.
gameSessionGameSession
GameSession
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve

Result

TypeDescription
itemsList<EzBalanceParameterStatus>List of Balance Parameter Statuses
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var items = await domain.BalanceParameterStatusesAsync(
        parameterName: "balance-0001"
    ).ToListAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.BalanceParameterStatuses(
        parameterName: "balance-0001"
    );
    List<EzBalanceParameterStatus> items = new List<EzBalanceParameterStatus>();
    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->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    const auto It = Domain->BalanceParameterStatuses(
        "balance-0001" // parameterName
    );
    TArray<Gs2::UE5::Enchant::Model::FEzBalanceParameterStatusPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
Value change event handling
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    
    // Start event handling
    var callbackId = domain.SubscribeBalanceParameterStatuses(
        () => {
            // Called when an element of the list changes.
        }
    );

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

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

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

getRarityParameterModel

Get a rarity parameter definition by name

Retrieves a single rarity parameter model by specifying its name. The returned information includes the maximum number of parameter slots, how the slot count is determined, and the list of possible values with their rarity weights (drop rates).

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
parameterNamestring
~ 128 charsRarity Parameter Model name
Rarity Parameter Model-specific name. Specified using alphanumeric characters, hyphen (-), underscore (_), and period (.).

Result

TypeDescription
itemEzRarityParameterModelRarity Parameter Model

Implementation Example

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).RarityParameterModel(
        parameterName: "rarity-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).RarityParameterModel(
        parameterName: "rarity-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->RarityParameterModel(
        "rarity-0001" // parameterName
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).RarityParameterModel(
        parameterName: "rarity-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.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).RarityParameterModel(
        parameterName: "rarity-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->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->RarityParameterModel(
        "rarity-0001" // parameterName
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Enchant::Model::FRarityParameterModel> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

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

listRarityParameterModels

Get a list of rarity parameter definitions

Retrieves all rarity parameter models registered in this namespace. A rarity parameter randomly assigns values to parameter slots based on rarity-weighted probabilities — for example, a weapon might get skill slots filled with Common, Rare, or Legendary abilities. Use this to display available parameter types or to check the rarity configuration on an equipment screen.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
itemsList<EzRarityParameterModel>List of Rarity Parameter Models

Implementation Example

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    var items = await domain.RarityParameterModelsAsync(
    ).ToListAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.RarityParameterModels(
    );
    List<EzRarityParameterModel> items = new List<EzRarityParameterModel>();
    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->Enchant->Namespace(
        "namespace-0001" // namespaceName
    );
    const auto It = Domain->RarityParameterModels(
    );
    TArray<Gs2::UE5::Enchant::Model::FEzRarityParameterModelPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
Value change event handling
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    
    // Start event handling
    var callbackId = domain.SubscribeRarityParameterModels(
        () => {
            // Called when an element of the list changes.
        }
    );

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

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

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

getRarityParameterStatus

Get the rarity parameter values of a specific item

Retrieves the current rarity parameter values for a specific item (property) owned by the player. The values were randomly drawn based on the rarity weights defined in the model when the item was created (or last re-rolled). Use this to display the skills or abilities attached to a weapon or equipment on a detail screen.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
parameterNamestring
~ 128 charsRarity Parameter Model name
The name of the Rarity Parameter Model that defines the drawing conditions for this status. References the model that specifies the maximum parameter count, count lottery weights, and value lottery pool.
gameSessionGameSession
GameSession
propertyIdstring
~ 1024 charsProperty ID of the resource that owns the parameter
Identifies the specific game resource (e.g., a weapon or equipment item) to which these rarity parameters are attached. Typically references a GS2-Inventory item or similar resource via its property ID.

Result

TypeDescription
itemEzRarityParameterStatusRarity Parameter Status

Implementation Example

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RarityParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RarityParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->RarityParameterStatus(
        "balance-0001", // parameterName
        "property-0001" // propertyId
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RarityParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-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.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RarityParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-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->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->RarityParameterStatus(
        "balance-0001", // parameterName
        "property-0001" // propertyId
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Enchant::Model::FRarityParameterStatus> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

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

listRarityParameterStatuses

Get a list of the player’s rarity parameter values

Retrieves the current rarity parameter values assigned to the player’s items. You can filter by parameter name to see values for a specific parameter type only. For example, this returns which skill slots (Common, Rare, Legendary) each of the player’s weapons has.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
parameterNamestring~ 128 charsRarity Parameter Model name
The name of the Rarity Parameter Model that defines the drawing conditions for this status. References the model that specifies the maximum parameter count, count lottery weights, and value lottery pool.
gameSessionGameSession
GameSession
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve

Result

TypeDescription
itemsList<EzRarityParameterStatus>List of Rarity Parameter Models
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var items = await domain.RarityParameterStatusesAsync(
        parameterName: "rarity-0001"
    ).ToListAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.RarityParameterStatuses(
        parameterName: "rarity-0001"
    );
    List<EzRarityParameterStatus> items = new List<EzRarityParameterStatus>();
    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->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    const auto It = Domain->RarityParameterStatuses(
        "rarity-0001" // parameterName
    );
    TArray<Gs2::UE5::Enchant::Model::FEzRarityParameterStatusPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
Value change event handling
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    
    // Start event handling
    var callbackId = domain.SubscribeRarityParameterStatuses(
        () => {
            // Called when an element of the list changes.
        }
    );

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

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

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

verifyRarityParameterStatus

Verify the rarity parameters of a specific item

Checks whether a specific item’s rarity parameters meet a given condition. Three check types are available:

  • have: the item has a specific parameter value (e.g., has the “Fire Slash” skill)
  • havent: the item does not have a specific parameter value
  • count: the item has a specific number of parameter slots filled

Use this as a precondition — for example, requiring a weapon to have a certain skill before allowing an upgrade.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
parameterNamestring
~ 128 charsRarity Parameter Model name
The name of the Rarity Parameter Model that defines the drawing conditions for this status. References the model that specifies the maximum parameter count, count lottery weights, and value lottery pool.
gameSessionGameSession
GameSession
propertyIdstring
~ 1024 charsProperty ID of the resource that owns the parameter
Identifies the specific game resource (e.g., a weapon or equipment item) to which these rarity parameters are attached. Typically references a GS2-Inventory item or similar resource via its property ID.
verifyType
Type of verification
DefinitionDescription
“havent”The specified parameter must not be held
“have”The specified parameter must be held
“count”The number of parameters held must be the specified number
parameterValueNamestring{verifyType} in [“havent”, “have”]
✓*
~ 64 charsName
The identifier for this lottery entry. Must be unique within the rarity parameter model’s value pool. When drawn, this name is stored in the resulting Rarity Parameter Value.
parameterCountint{verifyType} in [“count”]
✓*
0 ~ 10Number of parameters to verify

Result

TypeDescription
itemEzRarityParameterStatusRarity Parameter Status

Implementation Example

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RarityParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var result = await domain.VerifyRarityParameterStatusAsync(
        verifyType: "have",
        parameterValueName: "parameter-0001",
        parameterCount: 0
    );
    var item = await result.ModelAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RarityParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var future = domain.VerifyRarityParameterStatusFuture(
        verifyType: "have",
        parameterValueName: "parameter-0001",
        parameterCount: 0
    );
    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->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->RarityParameterStatus(
        "balance-0001", // parameterName
        "property-0001" // propertyId
    );
    const auto Future = Domain->VerifyRarityParameterStatus(
        "have", // verifyType
        "parameter-0001", // parameterValueName
        0 // parameterCount
    );
    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();