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

# GS2-Stamina Transaction Actions

Specification of verify/consume/acquire transaction actions




## Verify Action



### Gs2Stamina:VerifyStaminaValueByUserId

Verify the value of the current Stamina by User ID

Validates that the current stamina value for the specified user meets the specified condition against the given threshold without modifying any state.

**Quantity specification supported: 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. |
| staminaName | string |  | ✓|  |  ~ 128 chars | Stamina Model Name<br>The name of the StaminaModel that defines the recovery parameters, capacity, and table references for this stamina instance.<br>This links the per-user stamina state to its corresponding model definition. |
| verifyType | string (enum)<br>enum {<br>&nbsp;&nbsp;"less",<br>&nbsp;&nbsp;"lessEqual",<br>&nbsp;&nbsp;"greater",<br>&nbsp;&nbsp;"greaterEqual",<br>&nbsp;&nbsp;"equal",<br>&nbsp;&nbsp;"notEqual"<br>}<br> |  | ✓|  |  | Type of verification"less": Value is less than the specified value / "lessEqual": Value is less than or equal to the specified value / "greater": Value is greater than the specified value / "greaterEqual": Value is greater than or equal to the specified value / "equal": Possession quantity is equal to the specified value / "notEqual": Possession quantity is not equal to the specified value /  |
| value | int |  | ✓|  | 0 ~ 2147483646 | Value to be verified |
| multiplyValueSpecifyingQuantity | bool |  | | true |  | Whether to multiply the value used for verification when specifying the quantity |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Stamina:VerifyStaminaValueByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "staminaName": "[string]Stamina Model Name",
        "verifyType": "[string]Type of verification",
        "value": "[int]Value to be verified",
        "multiplyValueSpecifyingQuantity": "[bool]Whether to multiply the value used for verification when specifying the quantity",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Stamina:VerifyStaminaValueByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  staminaName: "[string]Stamina Model Name"
  verifyType: "[string]Type of verification"
  value: "[int]Value to be verified"
  multiplyValueSpecifyingQuantity: "[bool]Whether to multiply the value used for verification when specifying the quantity"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("stamina").verify.verify_stamina_value_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    staminaName="[string]Stamina Model Name",
    verifyType="[string]Type of verification",
    value="[int]Value to be verified",
    multiplyValueSpecifyingQuantity="[bool]Whether to multiply the value used for verification when specifying the quantity",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Stamina:VerifyStaminaMaxValueByUserId

Verify the value of the max stamina by User ID

Validates that the maximum stamina capacity (including buff modifications) for the specified user meets the specified condition against the given threshold without modifying any state.

**Quantity specification supported: 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. |
| staminaName | string |  | ✓|  |  ~ 128 chars | Stamina Model Name<br>The name of the StaminaModel that defines the recovery parameters, capacity, and table references for this stamina instance.<br>This links the per-user stamina state to its corresponding model definition. |
| verifyType | string (enum)<br>enum {<br>&nbsp;&nbsp;"less",<br>&nbsp;&nbsp;"lessEqual",<br>&nbsp;&nbsp;"greater",<br>&nbsp;&nbsp;"greaterEqual",<br>&nbsp;&nbsp;"equal",<br>&nbsp;&nbsp;"notEqual"<br>}<br> |  | ✓|  |  | Type of verification"less": Value is less than the specified value / "lessEqual": Value is less than or equal to the specified value / "greater": Value is greater than the specified value / "greaterEqual": Value is greater than or equal to the specified value / "equal": Possession quantity is equal to the specified value / "notEqual": Possession quantity is not equal to the specified value /  |
| value | int |  | ✓|  | 0 ~ 2147483646 | Value to be verified |
| multiplyValueSpecifyingQuantity | bool |  | | true |  | Whether to multiply the value used for verification when specifying the quantity |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Stamina:VerifyStaminaMaxValueByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "staminaName": "[string]Stamina Model Name",
        "verifyType": "[string]Type of verification",
        "value": "[int]Value to be verified",
        "multiplyValueSpecifyingQuantity": "[bool]Whether to multiply the value used for verification when specifying the quantity",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Stamina:VerifyStaminaMaxValueByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  staminaName: "[string]Stamina Model Name"
  verifyType: "[string]Type of verification"
  value: "[int]Value to be verified"
  multiplyValueSpecifyingQuantity: "[bool]Whether to multiply the value used for verification when specifying the quantity"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("stamina").verify.verify_stamina_max_value_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    staminaName="[string]Stamina Model Name",
    verifyType="[string]Type of verification",
    value="[int]Value to be verified",
    multiplyValueSpecifyingQuantity="[bool]Whether to multiply the value used for verification when specifying the quantity",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Stamina:VerifyStaminaRecoverIntervalMinutesByUserId

Verify the value of the recovery interval minutes by User ID

Validates that the stamina recovery interval (minutes) for the specified user meets the specified condition against the given threshold without modifying any state.

**Quantity specification supported: 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. |
| staminaName | string |  | ✓|  |  ~ 128 chars | Stamina Model Name<br>The name of the StaminaModel that defines the recovery parameters, capacity, and table references for this stamina instance.<br>This links the per-user stamina state to its corresponding model definition. |
| verifyType | string (enum)<br>enum {<br>&nbsp;&nbsp;"less",<br>&nbsp;&nbsp;"lessEqual",<br>&nbsp;&nbsp;"greater",<br>&nbsp;&nbsp;"greaterEqual",<br>&nbsp;&nbsp;"equal",<br>&nbsp;&nbsp;"notEqual"<br>}<br> |  | ✓|  |  | Type of verification"less": Value is less than the specified value / "lessEqual": Value is less than or equal to the specified value / "greater": Value is greater than the specified value / "greaterEqual": Value is greater than or equal to the specified value / "equal": Possession quantity is equal to the specified value / "notEqual": Possession quantity is not equal to the specified value /  |
| value | int |  | ✓|  | 0 ~ 2147483646 | Value to be verified |
| multiplyValueSpecifyingQuantity | bool |  | | true |  | Whether to multiply the value used for verification when specifying the quantity |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Stamina:VerifyStaminaRecoverIntervalMinutesByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "staminaName": "[string]Stamina Model Name",
        "verifyType": "[string]Type of verification",
        "value": "[int]Value to be verified",
        "multiplyValueSpecifyingQuantity": "[bool]Whether to multiply the value used for verification when specifying the quantity",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Stamina:VerifyStaminaRecoverIntervalMinutesByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  staminaName: "[string]Stamina Model Name"
  verifyType: "[string]Type of verification"
  value: "[int]Value to be verified"
  multiplyValueSpecifyingQuantity: "[bool]Whether to multiply the value used for verification when specifying the quantity"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("stamina").verify.verify_stamina_recover_interval_minutes_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    staminaName="[string]Stamina Model Name",
    verifyType="[string]Type of verification",
    value="[int]Value to be verified",
    multiplyValueSpecifyingQuantity="[bool]Whether to multiply the value used for verification when specifying the quantity",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Stamina:VerifyStaminaRecoverValueByUserId

Verify the value of the recovery value by User ID

Validates that the stamina recovery amount (including buff modifications) for the specified user meets the specified condition against the given threshold without modifying any state.

**Quantity specification supported: 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. |
| staminaName | string |  | ✓|  |  ~ 128 chars | Stamina Model Name<br>The name of the StaminaModel that defines the recovery parameters, capacity, and table references for this stamina instance.<br>This links the per-user stamina state to its corresponding model definition. |
| verifyType | string (enum)<br>enum {<br>&nbsp;&nbsp;"less",<br>&nbsp;&nbsp;"lessEqual",<br>&nbsp;&nbsp;"greater",<br>&nbsp;&nbsp;"greaterEqual",<br>&nbsp;&nbsp;"equal",<br>&nbsp;&nbsp;"notEqual"<br>}<br> |  | ✓|  |  | Type of verification"less": Value is less than the specified value / "lessEqual": Value is less than or equal to the specified value / "greater": Value is greater than the specified value / "greaterEqual": Value is greater than or equal to the specified value / "equal": Possession quantity is equal to the specified value / "notEqual": Possession quantity is not equal to the specified value /  |
| value | int |  | ✓|  | 0 ~ 2147483646 | Value to be verified |
| multiplyValueSpecifyingQuantity | bool |  | | true |  | Whether to multiply the value used for verification when specifying the quantity |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Stamina:VerifyStaminaRecoverValueByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "staminaName": "[string]Stamina Model Name",
        "verifyType": "[string]Type of verification",
        "value": "[int]Value to be verified",
        "multiplyValueSpecifyingQuantity": "[bool]Whether to multiply the value used for verification when specifying the quantity",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Stamina:VerifyStaminaRecoverValueByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  staminaName: "[string]Stamina Model Name"
  verifyType: "[string]Type of verification"
  value: "[int]Value to be verified"
  multiplyValueSpecifyingQuantity: "[bool]Whether to multiply the value used for verification when specifying the quantity"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("stamina").verify.verify_stamina_recover_value_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    staminaName="[string]Stamina Model Name",
    verifyType="[string]Type of verification",
    value="[int]Value to be verified",
    multiplyValueSpecifyingQuantity="[bool]Whether to multiply the value used for verification when specifying the quantity",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Stamina:VerifyStaminaOverflowValueByUserId

Verify the value of the overflow value by User ID

Validates that the stamina overflow amount for the specified user meets the specified condition against the given threshold without modifying any state.

**Quantity specification supported: 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. |
| staminaName | string |  | ✓|  |  ~ 128 chars | Stamina Model Name<br>The name of the StaminaModel that defines the recovery parameters, capacity, and table references for this stamina instance.<br>This links the per-user stamina state to its corresponding model definition. |
| verifyType | string (enum)<br>enum {<br>&nbsp;&nbsp;"less",<br>&nbsp;&nbsp;"lessEqual",<br>&nbsp;&nbsp;"greater",<br>&nbsp;&nbsp;"greaterEqual",<br>&nbsp;&nbsp;"equal",<br>&nbsp;&nbsp;"notEqual"<br>}<br> |  | ✓|  |  | Type of verification"less": Value is less than the specified value / "lessEqual": Value is less than or equal to the specified value / "greater": Value is greater than the specified value / "greaterEqual": Value is greater than or equal to the specified value / "equal": Possession quantity is equal to the specified value / "notEqual": Possession quantity is not equal to the specified value /  |
| value | int |  | ✓|  | 0 ~ 2147483646 | Value to be verified |
| multiplyValueSpecifyingQuantity | bool |  | | true |  | Whether to multiply the value used for verification when specifying the quantity |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Stamina:VerifyStaminaOverflowValueByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "staminaName": "[string]Stamina Model Name",
        "verifyType": "[string]Type of verification",
        "value": "[int]Value to be verified",
        "multiplyValueSpecifyingQuantity": "[bool]Whether to multiply the value used for verification when specifying the quantity",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Stamina:VerifyStaminaOverflowValueByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  staminaName: "[string]Stamina Model Name"
  verifyType: "[string]Type of verification"
  value: "[int]Value to be verified"
  multiplyValueSpecifyingQuantity: "[bool]Whether to multiply the value used for verification when specifying the quantity"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("stamina").verify.verify_stamina_overflow_value_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    staminaName="[string]Stamina Model Name",
    verifyType="[string]Type of verification",
    value="[int]Value to be verified",
    multiplyValueSpecifyingQuantity="[bool]Whether to multiply the value used for verification when specifying the quantity",
    timeOffsetToken="[string]Time offset token",
})
```


---

## Consume Action



### Gs2Stamina:DecreaseMaxValueByUserId

Subtract the maximum value of stamina by specifying the user ID

Reduces the maximum stamina capacity by the specified amount for the given user. May be used to apply debuffs or penalties to stamina capacity.

**Quantity specification supported: YES**

**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 (.). |
| staminaName | string |  | ✓|  |  ~ 128 chars | Stamina Model Name<br>The name of the StaminaModel that defines the recovery parameters, capacity, and table references for this stamina instance.<br>This links the per-user stamina state to its corresponding model definition. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| decreaseValue | int |  | ✓|  | 0 ~ 2147483646 | Maximum amount of stamina to be decreased |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Stamina:DecreaseMaxValueByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "staminaName": "[string]Stamina Model Name",
        "userId": "[string]User ID",
        "decreaseValue": "[int]Maximum amount of stamina to be decreased",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Stamina:DecreaseMaxValueByUserId
request:
  namespaceName: "[string]Namespace name"
  staminaName: "[string]Stamina Model Name"
  userId: "[string]User ID"
  decreaseValue: "[int]Maximum amount of stamina to be decreased"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("stamina").consume.decrease_max_value_by_user_id({
    namespaceName="[string]Namespace name",
    staminaName="[string]Stamina Model Name",
    userId="[string]User ID",
    decreaseValue="[int]Maximum amount of stamina to be decreased",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Stamina:ConsumeStaminaByUserId

Consume Stamina by User ID

Deducts the specified amount from the current stamina value for the given user. Returns an Insufficient error if the current stamina value is less than the consume amount.

**Quantity specification supported: YES**

**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 (.). |
| staminaName | string |  | ✓|  |  ~ 128 chars | Stamina Model Name<br>The name of the StaminaModel that defines the recovery parameters, capacity, and table references for this stamina instance.<br>This links the per-user stamina state to its corresponding model definition. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| consumeValue | int |  | ✓|  | 1 ~ 2147483646 | Amount of stamina consumed |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Stamina:ConsumeStaminaByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "staminaName": "[string]Stamina Model Name",
        "userId": "[string]User ID",
        "consumeValue": "[int]Amount of stamina consumed",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Stamina:ConsumeStaminaByUserId
request:
  namespaceName: "[string]Namespace name"
  staminaName: "[string]Stamina Model Name"
  userId: "[string]User ID"
  consumeValue: "[int]Amount of stamina consumed"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("stamina").consume.consume_stamina_by_user_id({
    namespaceName="[string]Namespace name",
    staminaName="[string]Stamina Model Name",
    userId="[string]User ID",
    consumeValue="[int]Amount of stamina consumed",
    timeOffsetToken="[string]Time offset token",
})
```


---

## Acquire Action



### Gs2Stamina:RecoverStaminaByUserId

Recover Stamina by User ID

Recovers stamina by the specified amount up to the maximum capacity. If the recovery causes the value to exceed the maximum and overflow mode is enabled, the excess is tracked as an overflow value.

**Quantity specification supported: YES**

**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 (.). |
| staminaName | string |  | ✓|  |  ~ 128 chars | Stamina Model Name<br>The name of the StaminaModel that defines the recovery parameters, capacity, and table references for this stamina instance.<br>This links the per-user stamina state to its corresponding model definition. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| recoverValue | int |  | ✓|  | 1 ~ 2147483646 | Amount of stamina recovery |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Stamina:RecoverStaminaByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "staminaName": "[string]Stamina Model Name",
        "userId": "[string]User ID",
        "recoverValue": "[int]Amount of stamina recovery",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Stamina:RecoverStaminaByUserId
request:
  namespaceName: "[string]Namespace name"
  staminaName: "[string]Stamina Model Name"
  userId: "[string]User ID"
  recoverValue: "[int]Amount of stamina recovery"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("stamina").acquire.recover_stamina_by_user_id({
    namespaceName="[string]Namespace name",
    staminaName="[string]Stamina Model Name",
    userId="[string]User ID",
    recoverValue="[int]Amount of stamina recovery",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Stamina:RaiseMaxValueByUserId

Add the maximum value of stamina by specifying the user ID

Permanently increases the maximum stamina capacity by the specified amount. Used for permanent stat increases such as level-up rewards or item effects.

**Quantity specification supported: YES**

**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 (.). |
| staminaName | string |  | ✓|  |  ~ 128 chars | Stamina Model Name<br>The name of the StaminaModel that defines the recovery parameters, capacity, and table references for this stamina instance.<br>This links the per-user stamina state to its corresponding model definition. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| raiseValue | int |  | ✓|  | 0 ~ 2147483646 | Maximum amount of stamina to be increased |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Stamina:RaiseMaxValueByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "staminaName": "[string]Stamina Model Name",
        "userId": "[string]User ID",
        "raiseValue": "[int]Maximum amount of stamina to be increased",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Stamina:RaiseMaxValueByUserId
request:
  namespaceName: "[string]Namespace name"
  staminaName: "[string]Stamina Model Name"
  userId: "[string]User ID"
  raiseValue: "[int]Maximum amount of stamina to be increased"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("stamina").acquire.raise_max_value_by_user_id({
    namespaceName="[string]Namespace name",
    staminaName="[string]Stamina Model Name",
    userId="[string]User ID",
    raiseValue="[int]Maximum amount of stamina to be increased",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Stamina:SetMaxValueByUserId

Update the maximum value of stamina by User ID

Sets the maximum stamina capacity to the specified value. The old stamina state is preserved in the response for audit purposes. Used for administrative overrides or special event adjustments.

**Quantity specification supported: YES**

**Reversible action: NO**

|  | 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 (.). |
| staminaName | string |  | ✓|  |  ~ 128 chars | Stamina Model Name<br>The name of the StaminaModel that defines the recovery parameters, capacity, and table references for this stamina instance.<br>This links the per-user stamina state to its corresponding model definition. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| maxValue | int |  | ✓|  | 1 ~ 2147483646 | Maximum Stamina<br>The per-user maximum stamina value, resolved from the StaminaModel and optionally overridden by a MaxStaminaTable based on the player's GS2-Experience rank.<br>When overflow is disabled, this value is floored at initialCapacity. When overflow is enabled, it is capped at maxCapacity.<br>Natural time-based recovery stops at this value. |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Stamina:SetMaxValueByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "staminaName": "[string]Stamina Model Name",
        "userId": "[string]User ID",
        "maxValue": "[int]Maximum Stamina",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Stamina:SetMaxValueByUserId
request:
  namespaceName: "[string]Namespace name"
  staminaName: "[string]Stamina Model Name"
  userId: "[string]User ID"
  maxValue: "[int]Maximum Stamina"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("stamina").acquire.set_max_value_by_user_id({
    namespaceName="[string]Namespace name",
    staminaName="[string]Stamina Model Name",
    userId="[string]User ID",
    maxValue="[int]Maximum Stamina",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Stamina:SetRecoverIntervalByUserId

Update stamina recovery interval (minutes) by User ID

Sets the stamina recovery interval to the specified value in minutes. The old stamina state is preserved in the response for audit purposes. Controls how frequently the stamina recovers automatically.

**Quantity specification supported: YES**

**Reversible action: NO**

|  | 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 (.). |
| staminaName | string |  | ✓|  |  ~ 128 chars | Stamina Model Name<br>The name of the StaminaModel that defines the recovery parameters, capacity, and table references for this stamina instance.<br>This links the per-user stamina state to its corresponding model definition. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| recoverIntervalMinutes | int |  | ✓|  | 1 ~ 2147483646 | Stamina recovery interval (minutes) |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Stamina:SetRecoverIntervalByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "staminaName": "[string]Stamina Model Name",
        "userId": "[string]User ID",
        "recoverIntervalMinutes": "[int]Stamina recovery interval (minutes)",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Stamina:SetRecoverIntervalByUserId
request:
  namespaceName: "[string]Namespace name"
  staminaName: "[string]Stamina Model Name"
  userId: "[string]User ID"
  recoverIntervalMinutes: "[int]Stamina recovery interval (minutes)"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("stamina").acquire.set_recover_interval_by_user_id({
    namespaceName="[string]Namespace name",
    staminaName="[string]Stamina Model Name",
    userId="[string]User ID",
    recoverIntervalMinutes="[int]Stamina recovery interval (minutes)",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Stamina:SetRecoverValueByUserId

Set the amount of stamina recovery by specifying the user ID

Sets the stamina recovery amount to the specified value. The old stamina state is preserved in the response for audit purposes. Controls how much stamina is recovered per recovery interval.

**Quantity specification supported: YES**

**Reversible action: NO**

|  | 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 (.). |
| staminaName | string |  | ✓|  |  ~ 128 chars | Stamina Model Name<br>The name of the StaminaModel that defines the recovery parameters, capacity, and table references for this stamina instance.<br>This links the per-user stamina state to its corresponding model definition. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| recoverValue | int |  | ✓|  | 1 ~ 2147483646 | Amount of stamina recovery |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Stamina:SetRecoverValueByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "staminaName": "[string]Stamina Model Name",
        "userId": "[string]User ID",
        "recoverValue": "[int]Amount of stamina recovery",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Stamina:SetRecoverValueByUserId
request:
  namespaceName: "[string]Namespace name"
  staminaName: "[string]Stamina Model Name"
  userId: "[string]User ID"
  recoverValue: "[int]Amount of stamina recovery"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("stamina").acquire.set_recover_value_by_user_id({
    namespaceName="[string]Namespace name",
    staminaName="[string]Stamina Model Name",
    userId="[string]User ID",
    recoverValue="[int]Amount of stamina recovery",
    timeOffsetToken="[string]Time offset token",
})
```


---



