Template:Dice tooltip: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
(Created page with "<includeonly>{{tooltip|{{#invoke:dice/Format | diceStats | roll ={{{1|}}}}}|{{{1|}}}}}</includeonly><noinclude>Category:Templates Takes a Dice roll formula and returns...")
 
(attempt to fix tooltip page leak)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{tooltip|{{#invoke:dice/Format | diceStats | roll ={{{1|}}}}}|{{{1|}}}}}</includeonly><noinclude>[[Category:Templates]]
<includeonly>{{#ifeq: {{{2|}}} | summary |{{tooltip|1={{{1|}}}|2={{#invoke:dice/Format | diceStats | roll ={{{1|}}}}}}}|{{tooltip|1={{#invoke:dice/Format | diceStats | roll ={{{1|}}}}}|2={{{1|}}}}}}}</includeonly><noinclude>[[Category:Dice Templates]]
Takes a [[Dice roll]] formula and returns it with the minimum, maximum, and mean as a tooltip.
Takes a [[Dice roll]] formula and returns it with the minimum, maximum, and mean as a tooltip.


Line 9: Line 9:


{{dice tooltip|2+3d2+2d6}}
{{dice tooltip|2+3d2+2d6}}
If you want the summary tooltip as the main text, set the second argument to <code>summary</code>
<syntaxhighlight lang="xml">
{{dice tooltip|2+3d2+2d6|summary}}
</syntaxhighlight>
{{dice tooltip|2+3d2+2d6|summary}}
</noinclude>
</noinclude>

Latest revision as of 15:20, 19 January 2024

Takes a Dice roll formula and returns it with the minimum, maximum, and mean as a tooltip.

Usage:

{{dice tooltip|2+3d2+2d6}}

2+3d2+2d67-20 (Avg: 13.5)

If you want the summary tooltip as the main text, set the second argument to summary

{{dice tooltip|2+3d2+2d6|summary}}

7-20 (Avg: 13.5)2+3d2+2d6