Skip to content

[Version 4.10] Range

Insane96 edited this page Jan 4, 2024 · 1 revision

The Range object is used to set a min and max value of a property. Range inherits from (Modifiable Value Object) so can use modifiers and rounding.

Range

  • min: (Number) minimum value. value is an alias
  • max: (Number) maximum value. Can be omitted and will be equal to min
  • modifiers_behaviour: (String) Defines how modifiers behave:
    • "both" (default): Modifiers will affect both min and max
    • "min_only"
    • "max_only"

Shortened version

Ranges can be shortened in various ways
This:

"range": 10

equals to:

"range": {
    "value": 10
}

that equals to:

"range": {
    "min": 10,
    "max": 10
}

Simple round example. This will round the value to the nearest integer:

"range": {
    "min": 0,
    "max": 5,
    "round": 0
}

Example

Potion Effect has an example using a Range Object.

Clone this wiki locally