Template:ProbabilityTable: Difference between revisions

From bg3.wiki
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...")
 
(Add template category)
 
Line 25: Line 25:
}}
}}
</pre>
</pre>
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 22:25, 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:

Quantity2345
Chance 1/52/51/51/5

Copy-ready example:

{{ProbabilityTable
|quantities=
|weights=
}}