World of Warcraft Forever API · NumericRuleFormatterShared.md, for your AI
NumericRuleFormatterShared (types and enums)
3 tables, as Blizzard documents them for Forever 1.60.1 (70959).
Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.
Tables
Enum.NumericRuleFormatRounding enumeration
Nearest | 0 |
|---|---|
Up | 1 |
Down | 2 |
NumericRuleFormatBreakpoint structure
threshold | number | Minimum input value that this rule applies to. |
|---|---|---|
step | number may be nil | If specified, the input value is rounded to multiples of this step before processing. |
rounding | NumericRuleFormatRounding default "Nearest" | If specified, the rounding mode to apply to the step. |
min | number may be nil | If specified, clamps the input value to this value if lesser after rounding. |
max | number may be nil | If specified, clamps the input value to this value if greater after rounding. |
format | string | The format string to apply at this threshold. If no components are specified, this can include at-most one numeric format specifier - else, should contain an equal number of format specifiers to elements in the components array. |
components | NumericRuleFormatComponent[] may be nil | Vector of component descriptions for this rule. |
NumericRuleFormatComponent structure
div | number may be nil | If specified, divide the value by this amount and use the resulting quotient. This is applied before modulo division. |
|---|---|---|
mod | number may be nil | If specified, divide the value by this amount and use the resulting remainder. This is applied after quotient division. |
step | number may be nil | If specified, round the value to multiples of this step. This is applied after all division. |
rounding | NumericRuleFormatRounding default "Nearest" | If specified, rounding mode to apply to the step. |