Template:ProbabilityTable: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<includeonly><onlyinclude><table class="wikitable"> <tr style="text-align:center"><th>Quantity</th>{{#af_foreach: {{#af_split: {{{quantities}}}|,}} || q | <td>{{{q}}}</td> }}</tr> <tr style="text-align:center"><th>Chance</th> {{#af_foreach: {{#af_split: {{{probabilities}}}|,}} || p | <td>{{{p}}}</td> }}</tr> </table></onlyinclude></includeonly><noinclude> This template inserts a table of probabilities into an article. This is useful for describing drop tables. Often...") |
(No difference)
|
Revision as of 21:40, 31 August 2023
This template inserts a table of probabilities into an article. This is useful for describing drop tables. Often, treasure tables will specify a certain number of rolls, each with its own weight, on a separate table.
{{ProbabilityTable |quantities=Comma separated list of quantities. No spaces. |probabilities=Comma separated list of probabilities, usually expressed as fractions. No spaces. }}
It should look like this:
Quantity | 2 | 3 | 4 | 5 |
---|---|---|---|---|
Chance | 1/5 | 2/5 | 1/5 | 1/5 |
Copy-ready example:
{{ProbabilityTable |quantities= |weights= }}