Attribute Modifier
An object used to specify how a numerical value should be modified. The numerical value in question can be anything depending on the power/action type using this data type.
Note
Not to be confused with Attributed Attribute Modifier, which are strictly for modifying attributes.
Note
Any of the amount or resource fields must be present. If both fields are present, the resource field will be prioritized over amount.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
operation |
Attribute Modifier Operation | The operation which will be performed by this modifier. | |
amount |
Float | optional | If specified, this amount will be used for the operation. |
resource |
Identifier | optional | If specified, the value of this power will be used for the operation. |
modifier |
Attribute Modifier | optional | If specified, this modifier will be applied to the value of this modifier. |
Examples
"modifier": {
"operation": "add_base_early",
"amount": 9
}
This example will add 9.0 to the base value.
(For example: if the current base value is 6.0, the new base value will be 15 since 6 + 9 = 15)
"modifier": {
"operation": "multiply_base_additive",
"amount": 2
}
This example will add the base value multiplied by the modifier value to the current base value.
(For example: if the current base value is 5, the new base value will be 15 since 5 + (5 * 2) = 15)
"modifier": {
"operation": "multiply_total_multiplicative",
"amount": 0.25
}
This example will multiply the total value by 1.25, essentially increasing the total value by 125%.
(For example: if the current total value is 30, the new total value will be 37.5 since 30 * (1 + 0.25) = 37.5)
"modifier": {
"operation": "add_base_early",
"resource": "example:resource"
}
This example will add the value of the example:resource (data/example/powers/resource.json) power to the base value.
(For example: if the current base value is 20.0 and the value of the example:resource power is 10, the new base value will be 30.0 since 20.0 + 10 = 30)
"modifier": {
"operation": "add_base_early",
"resource": "example:resource",
"modifier": {
"operation": "multiply_total_multiplicative",
"value": -0.999
}
}
This example will add the value of the example:resource (data/example/powers/resource.json) power to the base value of the modifier and multiply it by 0.01.
(For example: if the current base value is 0.1 and the value of the example:resource power is 25, the new base value will be 0.125 since 0.1 + (25 * (1 - 0.999)) = 0.125)