Modifier
Modifiers are objects used to specify how a floating point value is modified.
| Field |
Type |
Default |
Description |
type |
Identifier |
|
The identifier of the desired modifier type. |
phase |
Phase |
|
Determines when the modifier will be applied. |
modifiers |
Array of Modifiers |
optional |
If specified, these modifiers will be applied first before the this modifier is applied. |
amount |
Float Provider |
|
The amount of the modifier. |
Phase
Modifiers are applied in the following order:
| Phase |
Description |
base |
Determines that the base value will be modified. This is the first phase where the total value is equal to the base value. |
total |
Determines that the total value will be modified. |
Types
Note
Modifiers are applied in the order they're listed below, with add being applied first and set being applied last.
| Type |
Description |
add |
Adds all of the modifiers' amounts to the value. $(Total = Amount_1 + Amount_2 + ... + Amount_n)$ |
multiply |
Multiplies the modifiers' amounts to the value. $(Total = Amount_1 * Amount_2 + ... + Amount_n)$ |
multiply_additive |
Multiplies the base value by (1 + sum of modifiers' amounts.) $(Total = Base * (1 + Amount_1 + Amount_2 + ... + Amount_n))$ |
multiply_multiplicative |
Multiplies the base value by (1 + modifiers' amount) for every modifier. $(Total = Base * (1 + Amount_1) * (1 + Amount_2) * ... * (1 + Amount_n))$ |
divide |
Divides the value to all of the modifiers' amounts. $(Total = Amount_1 \div Amount_2 \div ... \div Amount_3)$ |
min |
Returns the minimum value of all the modifiers' amounts. $(Total = \argmin f(Amount_n))$ |
max |
Returns the maximum value of all the modifiers' amounts. $(Total = \argmax f(Amount_n))$ |
set |
Uses the modifier's value as the new total value. $(Total = Amount_n)$ |