Modify Resource Maximum

Power Type

Modifies the maximum value of a resource that uses the Modifiable Resource (Power Type).

Type ID: origins-math:modify_resource_maximum

Note

When modifying the maximum value of a Modifiable Resource (Power Type), the resulting maximum value will have it's decimal counterpart removed, effectively being truncated. This is because the maximum value of a resource must be as an Integer.

Fields

Field Type Default Description
resource Identifier The namespace and ID of the power that uses the Modifiable Resource (Power Type)
modifier Attribute Modifier optional If specified, this modifier will be applied to the resource's maximum value.
modifiers Array of Attribute Modifiers optional If specified, these modifiers will be applied to the resource's maximum value.

Examples

{
    "type": "origins-math:modify_resource_maximum",
    "condition": {
        "type": "origins:sneaking"
    },
    "modifier": {
        "value": 65,
        "operation": "add_base_early"
    }
}

This example will provide a variable with an initial minimum value of 0 and an initial maximum value of 75. When the user is sneaking, the effective maximum value of the resource would be 140.