> For the complete documentation index, see [llms.txt](/llms.txt)

# 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<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| propertyId | string |  | ✓|  |  ~ 1024 chars | Property ID<br>An identifier that allows multiple independent skill tree instances per user.<br>Enables scenarios where a player has separate skill trees for different characters or contexts within the same Namespace.<br>Maximum 1024 characters. |
| nodeModelNames | List&lt;string&gt; |  | ✓|  | 1 ~ 1000 items | List of node model names |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "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"
    }
}
```

**YAML**
```yaml

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"
```

**GS2-Script**
```lua

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<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| propertyId | string |  | ✓|  |  ~ 1024 chars | Property ID<br>An identifier that allows multiple independent skill tree instances per user.<br>Enables scenarios where a player has separate skill trees for different characters or contexts within the same Namespace.<br>Maximum 1024 characters. |
| nodeModelNames | List&lt;string&gt; |  | ✓|  | 1 ~ 1000 items | List of Node Model names |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "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"
    }
}
```

**YAML**
```yaml

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"
```

**GS2-Script**
```lua

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",
})
```


---



