Template:SortMid

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

Summary[edit]

In Arena, Daggerfall and Morrowind, weapons do not have a singular base damage and, instead, has a range of possible values. These values, when presented in a sortable table, are often sorted alphabetically, instead of numerically.

This typically results in sorting by the min-value first, then sorting by the max-value. For example, a range of 1-10 is presented as less damaging than a range of 2-4. Furthermore, when min-values are a mix of single- and double-digit number, min-values like 10 or 11 would incorrectly precede values like 8 or 9.

This template allows number ranges in table cells to be sorted by their midpoint, that is, the average between the min-value and the max-value.

Parameters[edit]

SortMid
Parameter Scope Description
1 or min optional The min-value; defaults to 0.
2 or max optional The max-value; defaults to the min-value.
3 or round optional The number of decimal places to which the average is rounded; defaults to 1.

Examples[edit]

Default Sorting[edit]

!{{Anchor|Dwarven Long bow}}
|[[File:DF-icon-weapon-Dwarven Long Bow.png|100px]]
|6-20||8-22||960||1.00
Long bows
Picture Damage
(actual)
Damage
(displayed)
Value
(gold)
Weight
(kg)
Iron Long bow DF-icon-weapon-Iron Long Bow.png 3-17 2-16 60 1.50
Steel Long bow DF-icon-weapon-Steel Long Bow.png 4-18 4-18 120 1.75
Silver Long bow DF-icon-weapon-Silver Long Bow.png 4-18 4-18 240 1.50
Elven Long bow DF-icon-weapon-Elven Long Bow.png 5-19 6-20 460 1.50
Dwarven Long bow DF-icon-weapon-Dwarven Long Bow.png 6-20 8-22 960 1.00
Mithril Long bow DF-icon-weapon-Mithril Long Bow.png 7-21 10-24 1920 1.50
Adamantium Long bow DF-icon-weapon-Adamantium Long Bow.png 7-21 10-24 3840 1.50
Ebony Long bow DF-icon-weapon-Ebony Long Bow.png 8-22 12-26 7680 0.75
Orcish Long bow DF-icon-weapon-Orcish Long Bow.png 9-23 14-28 15360 1.50
Daedric Long bow DF-icon-weapon-Daedric Long Bow.png 10-24 16-30 30720 1.75

Sorting with Template[edit]

!{{Anchor|Dwarven Long bow}}
|[[File:DF-icon-weapon-Dwarven Long Bow.png|100px]]
|{{SortMid|6|20}}||{{SortMid|8|22}}||960||1.00
Long bows
Picture Damage
(actual)
Damage
(displayed)
Value
(gold)
Weight
(kg)
Iron Long bow DF-icon-weapon-Iron Long Bow.png 3-17 2-16 60 1.50
Steel Long bow DF-icon-weapon-Steel Long Bow.png 4-18 4-18 120 1.75
Silver Long bow DF-icon-weapon-Silver Long Bow.png 4-18 4-18 240 1.50
Elven Long bow DF-icon-weapon-Elven Long Bow.png 5-19 6-20 460 1.50
Dwarven Long bow DF-icon-weapon-Dwarven Long Bow.png 6-20 8-22 960 1.00
Mithril Long bow DF-icon-weapon-Mithril Long Bow.png 7-21 10-24 1920 1.50
Adamantium Long bow DF-icon-weapon-Adamantium Long Bow.png 7-21 10-24 3840 1.50
Ebony Long bow DF-icon-weapon-Ebony Long Bow.png 8-22 12-26 7680 0.75
Orcish Long bow DF-icon-weapon-Orcish Long Bow.png 9-23 14-28 15360 1.50
Daedric Long bow DF-icon-weapon-Daedric Long Bow.png 10-24 16-30 30720 1.75