wiki:olivine/dsl/attribs/modifier

Item or Mob Modifier

Visit core types for information on primitive and core types such as real.

The modifier definition is a way to alter some fixed properties of a mob or indirectly through an item.

Name Type Description
amountrealThis is a numerical value that characterizes the modification, how it is used is dictated by the operator property below
operatoroperatorHow to apply amount to the base-value of whatever attribute this is going to modify, see below for a description

Operator

The following three values determine how a modifier value is applied, any modifiers that are to be applied to some attribute are applied in sequence starting with boost modifiers then augment modifiers and then finally scale modifiers. First, there are two terms to familiarize yourself with in order to understand how this application works:

  • base value - That is the starting value of the attribute without any modifiers
  • current value - This is the value of the attribute after previous modifiers have been applied to it
Name Vanilla Operation ID Math Description
boost0current value = base value + amountAdds the amount value to the base value of the attribute
augment1current value += base value * amountThe current value is increased by an amount calculated by multiplying the base value of the attribute by the amount value
scale2current value *= amount + 1The current value is multiplied by amount times plus one, in other words, a value of 0 doesn't increase it or decrease it but a value of 1 will double the current value, 2 will triple, etc.

As a Morph

It is possible to define an attribute modifier as a morphed data value using the with reserved word. This is useful for defining non-standard (modded) attribute modifiers beyond the default Vanilla ones.

Syntax Example

Applies intelligence to a set of attribute modifiers:

   modifiers → {
      ext → [
         attr &mmm:intelligence with {
            operator → boost
            amount → 0.25
         }
      ]
   }
Last modified 19 months ago Last modified on Sep 11, 2022 1:22:58 PM