Template:5e Dice Table: Difference between revisions

From Rlyehwiki
Jump to navigation Jump to search
(Created page with "<includeonly>{{{!}} class="zebra" {{#if: {{{width|}}} | style="width:{{{width}}};"}} {{!}}- ! style="width:30px" {{!}} d{{#if: {{{entry13|}}}|20|{{#if: {{{entry11|}}}|12|{{#if...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{{!}} class="zebra" {{#if: {{{width|}}} | style="width:{{{width}}};"}}
<includeonly>{{{!}} {{#if: {{{small|}}}|class="zebra small"|class="zebra"}} {{#if: {{{width|}}} | style="width:{{{width}}};"}}
{{!}}-
{{!}}-
! style="width:30px" {{!}} d{{#if: {{{entry13|}}}|20|{{#if: {{{entry11|}}}|12|{{#if: {{{entry9|}}}|10|{{#if: {{{entry7|}}}|8|{{#if: {{{entry5|}}}|6|{{#if: {{{entry4|}}}|4|{{#if: {{{entry3|}}}|3|2}} }} }} }} }} }} }} !! class="left" {{!}} {{{name|}}}
! style="min-width:4em;" {{!}} d{{#if: {{{entry13|}}}|20|{{#if: {{{entry11|}}}|12|{{#if: {{{entry9|}}}|10|{{#if: {{{entry7|}}}|8|{{#if: {{{entry5|}}}|6|{{#if: {{{entry4|}}}|4|{{#if: {{{entry3|}}}|3|2}} }} }} }} }} }} }} !! class="left" {{!}} {{{name|}}}
{{!}}-
{{!}}-
{{!}} 1 {{!!}} class="left" {{!}} {{{entry1|}}}
{{!}} 1 {{!!}} class="left" {{!}} {{{entry1|}}}
Line 43: Line 43:
{{!}} 20 {{!!}} class="left" {{!}} {{{entry20|}}}}}
{{!}} 20 {{!!}} class="left" {{!}} {{{entry20|}}}}}
{{!}}}</includeonly><noinclude>
{{!}}}</includeonly><noinclude>
{{documentation}}</noinclude>
==Syntax==
<pre>
{{5e Dice Table
|name=<!-- table name -->
|entry1=<!-- value associated with rolling a 1 on the table -->
|entry2=<!-- value associated with rolling a 2 on the table -->
|entry3=<!-- value associated with rolling a 3 on the table -->
...
|entry20=<!-- value associated with rolling a 20 on the table -->
}}
</pre>
 
===Optional Entries===
<pre>
|small= <!--blank, otherwise applies "small" class to table
|width= <!--blank, or width
</pre>
 
Delete unused entry values. Table will automatically size to d2, d3, d4, d6, d8, d10, d12, or d20. It does not support entries in an amount that does not correspond to one of those dice.
 
==Example==
<pre>
{{5e Dice Table
|name=Foo<!-- table name -->
|entry1=This is entry one
|entry2=This is entry two
|entry3=This is entry three
|entry4=This is entry four
}}
</pre>
 
produces...
 
{{5e Dice Table
|name=Foo<!-- table name -->
|small=
|entry1=This is entry one
|entry2=This is entry two
|entry3=This is entry three
|entry4=This is entry four
}}
 
{{5e Dice Table
|name=Foo<!-- table name -->
|small=true
|entry1=This is entry one
|entry2=This is entry two
|entry3=This is entry three
|entry4=This is entry four
}}
[[Category:5e Templates]]
</noinclude>

Latest revision as of 12:02, 11 March 2021

Syntax

{{5e Dice Table
|name=<!-- table name -->
|entry1=<!-- value associated with rolling a 1 on the table -->
|entry2=<!-- value associated with rolling a 2 on the table -->
|entry3=<!-- value associated with rolling a 3 on the table -->
...
|entry20=<!-- value associated with rolling a 20 on the table -->
}}

Optional Entries

|small= <!--blank, otherwise applies "small" class to table
|width= <!--blank, or width 

Delete unused entry values. Table will automatically size to d2, d3, d4, d6, d8, d10, d12, or d20. It does not support entries in an amount that does not correspond to one of those dice.

Example

{{5e Dice Table
|name=Foo<!-- table name -->
|entry1=This is entry one
|entry2=This is entry two
|entry3=This is entry three
|entry4=This is entry four
}}

produces...

d4 Foo
1 This is entry one
2 This is entry two 
3 This is entry three 
4 This is entry four
d4 Foo
1 This is entry one
2 This is entry two 
3 This is entry three 
4 This is entry four