Jump to content

Template:Range/doc

From Community Wiki | Soulbound: Online
This is the documentation subpage for Template:Range. It holds usage notes, parameters and examples, and is transcluded onto the template page itself. Edit the documentation here; edit the template's code on the template page.

A rolled value range, written the way an ARPG player expects to read it.

You type You get
{{Range|2|10|unit=%}} +(2–10)%
{{Range|10}} +10
{{Range|10|10}} +10
  • Omit the maximum, leave it blank, or make it equal to the minimum and it collapses to a flat bonus.
  • An empty minimum renders nothing at all, so an incomplete row does not leave a stray + behind.
  • Pass bare numbers. The + is added; a leading minus is kept.
  • unit is appended verbatim — in practice always % or nothing.
  • The span carries data-min and data-max for any future sorting or calculator work, so keep values numeric.

Never put #expr around one of these values. A range is display text, not a number. Doing arithmetic on rolled values is how other game wikis ended up covered in "Expression error". If you need a stat's name and unit as well as its range, use {{RollStat}}

instead — it does all three from the stat key.

This template is a one-line wrapper around {{#invoke:Stat|range}}; the formatting lives in Module:Stat.

A rolled bonus-stat range, e.g. +(2–10)%.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Minimum1

no description

Numberrequired
Maximum2

no description

Numbersuggested
Unitunit

Appended verbatim, e.g. %

Stringoptional