8,290
edits
m (correct syntaxhighlight error) |
(support non-numeric attribute values (such a ? when stat is unknown)) |
||
Line 1: | Line 1: | ||
<includeonly><div class="qud-attribute-entry qud-tooltip"><div class="qud-attribute-label qud-attribute-{{lc:{{{2}}}}}">{{{2}}}:</div><div class="qud-attribute-value">{{#invoke:dice/Format | diceStats | roll = {{{3|}}} | template = Dice_mean_truncated}}</div>{{#if: {{{3|}}} | <!-- create hover tooltip if a value was specified for the attribute: --><span class="qud-tooltip-text delayed-tooltip">[[{{{link|Attributes}}}|{{{1}}}]]: {{#invoke:dice/Format | diceStats | roll = {{{3|}}} | template = Dice_mean_truncated}}{{#invoke:dice/Format | diceStats | roll = {{{3|}}} | template = Tooltip_dice_range_string}}</span> | }}</div></includeonly><noinclude> | <includeonly><div class="qud-attribute-entry qud-tooltip"><div class="qud-attribute-label qud-attribute-{{lc:{{{2}}}}}">{{{2}}}:</div><div class="qud-attribute-value">{{#switch: {{#iferror:{{#ifexpr:{{{3|<check if param is numeric>}}}^0 = 1 | number | string }}| string }} | string = {{{3}}}</div> | {{#invoke:dice/Format | diceStats | roll = {{{3|}}} | template = Dice_mean_truncated}}</div>{{#if: {{{3|}}} | <!-- create hover tooltip if a value was specified for the attribute: --><span class="qud-tooltip-text delayed-tooltip">[[{{{link|Attributes}}}|{{{1}}}]]: {{#invoke:dice/Format | diceStats | roll = {{{3|}}} | template = Dice_mean_truncated}}{{#invoke:dice/Format | diceStats | roll = {{{3|}}} | template = Tooltip_dice_range_string}}</span> | }} }}</div></includeonly><noinclude> | ||
Outputs a single character attribute. Intended for use in [[Template:Character]]. | Outputs a single character attribute. Intended for use in [[Template:Character]]. | ||