Template:Character/Attribute: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<includeonly><div class="qud-attribute-entry qud-tooltip"><div class="qud-attribute-label qud-attribute-{{lc:{{{label}}}}}">{{{label}}}:</div><div class="qud-attribute-value">{{#invoke:dice/Format | diceStats | roll = {{{value|}}} | template = Dice_mean_truncated}}</div>{{#if: {{{value|}}} | <!-- create hover tooltip if a value was specified for the attribute: --><span class="qud-tooltip-text delayed-tooltip">[[{{{link|Attributes}}}|{{{name}}}]]: {{#invoke:dice/Format | diceStats | roll = {{{value|}}} | template = Dice_mean_truncated}}{{#invoke:dice/Format | diceStats | roll = {{{value|}}} | 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">{{#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]].
The fourth parameter is the link for the tooltip. If not specified it will link to the [[Attributes]] page by default.


<syntaxhighlight>{{Character/Attribute
<syntaxhighlight>{{Character/Attribute
| name = Strength
| 1 = Strength
| label = ST
| 2 = ST
| link = Attributes
| 3 = 17+3d2
| value = 17
| 4 = Attributes
}}</syntaxhighlight>
}}</syntaxhighlight>


Line 12: Line 14:
<div style="display:inline-block;">
<div style="display:inline-block;">
{{Character/Attribute
{{Character/Attribute
| name = Strength
| 1 = Strength
| label = ST
| 2 = ST
| link = Attributes
| 3 = 17+3d2
| value = 17
| 4 = Attributes
}}
}}
</div>
</div>


</noinclude>
</noinclude>

Revision as of 14:26, 12 August 2019

Outputs a single character attribute. Intended for use in Template:Character.

The fourth parameter is the link for the tooltip. If not specified it will link to the Attributes page by default.

{{Character/Attribute
| 1 = Strength
| 2 = ST
| 3 = 17+3d2
| 4 = Attributes
}}


ST:
21
Strength: 21range: 20-23