GS2-SkillTree Transaction Actions

Specification of verify/consume/acquire transaction actions

Consume Action

Gs2SkillTree:MarkRestrainByUserId

Revert a node to unreleased state by User ID

Validates that the specified nodes can be restrained (no dependent nodes must be in released state), then marks them as unreleased.

Quantity specification supported: NO

Reversible action: YES

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Unique name within the Namespace. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
Specify #{userId} to substitute the currently logged-in user’s ID.
propertyIdstring
~ 1024 charsProperty ID
An identifier that allows multiple independent skill tree instances per user.
Enables scenarios where a player has separate skill trees for different characters or contexts within the same Namespace.
Maximum 1024 characters.
nodeModelNamesList<string>
1 ~ 1000 itemsList of node model names
timeOffsetTokenstring~ 1024 charsTime offset token
{
    "action": "Gs2SkillTree:MarkRestrainByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "propertyId": "[string]Property ID",
        "nodeModelNames": [
            "[string]Node Model name"
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2SkillTree:MarkRestrainByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  propertyId: "[string]Property ID"
  nodeModelNames: 
    - "[string]Node Model name"
  timeOffsetToken: "[string]Time offset token"
transaction.service("skillTree").consume.mark_restrain_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    propertyId="[string]Property ID",
    nodeModelNames={
        "[string]Node Model name"
    },
    timeOffsetToken="[string]Time offset token",
})

Acquire Action

Gs2SkillTree:MarkReleaseByUserId

Mark a node as released by User ID

Validates that the specified nodes can be released (prerequisite nodes must already be released), then marks them as released.

Quantity specification supported: NO

Reversible action: YES

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Unique name within the Namespace. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
Specify #{userId} to substitute the currently logged-in user’s ID.
propertyIdstring
~ 1024 charsProperty ID
An identifier that allows multiple independent skill tree instances per user.
Enables scenarios where a player has separate skill trees for different characters or contexts within the same Namespace.
Maximum 1024 characters.
nodeModelNamesList<string>
1 ~ 1000 itemsList of Node Model names
timeOffsetTokenstring~ 1024 charsTime offset token
{
    "action": "Gs2SkillTree:MarkReleaseByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "propertyId": "[string]Property ID",
        "nodeModelNames": [
            "[string]Node Model name"
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2SkillTree:MarkReleaseByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  propertyId: "[string]Property ID"
  nodeModelNames: 
    - "[string]Node Model name"
  timeOffsetToken: "[string]Time offset token"
transaction.service("skillTree").acquire.mark_release_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    propertyId="[string]Property ID",
    nodeModelNames={
        "[string]Node Model name"
    },
    timeOffsetToken="[string]Time offset token",
})