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
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Unique name within the Namespace. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID Specify #{userId} to substitute the currently logged-in user’s ID. | ||
| propertyId | string | ✓ | ~ 1024 chars | Property 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. | ||
| nodeModelNames | List<string> | ✓ | 1 ~ 1000 items | List of node model names | ||
| timeOffsetToken | string | ~ 1024 chars | 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"
}
}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
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Unique name within the Namespace. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID Specify #{userId} to substitute the currently logged-in user’s ID. | ||
| propertyId | string | ✓ | ~ 1024 chars | Property 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. | ||
| nodeModelNames | List<string> | ✓ | 1 ~ 1000 items | List of Node Model names | ||
| timeOffsetToken | string | ~ 1024 chars | 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"
}
}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",
})