Template:Drop Rate: Difference between revisions

From Phantasy Star Universe Clementine
(Created page with "<includeonly> {{#ifexpr: {{{tickets}}} < 1 |0 |1/{{#ifexpr: {{{tickets}}} > {{{max tickets}}} |1 |{{#expr: trunc {{#expr: {{{max tickets|100000}}}/{{{tickets}}}}}}}}}}}</in...")
 
Line 10: Line 10:
<pre>
<pre>
{{Drop Rate
{{Drop Rate
|tickets      <!-- An integer amount for how many tickets an item has. If it is larger than the max ticket amount, it will be set to the max ticket amount. -->
|tickets      <!-- An integer amount for how many tickets an item has. If it is larger than the max ticket amount, calculation will be skipped and the output will say 1/1. -->
|max tickets  <!-- An integer amount for the remaining ticket amount of a roll source. -->
|max tickets  <!-- An integer amount for the remaining ticket amount of a roll source. -->
}}
}}
</pre>
</pre>
==Examples==
==Examples==
===1 Ticket, 100k Max Tickets===
===1 Ticket, 100k Max Tickets===

Revision as of 15:36, 20 December 2023

Purpose

Shortcut template for converting any ticket amount into a drop rate. All decimals in the output are truncated.

Parameter List

{{Drop Rate
|tickets       <!-- An integer amount for how many tickets an item has. If it is larger than the max ticket amount, calculation will be skipped and the output will say 1/1. -->
|max tickets   <!-- An integer amount for the remaining ticket amount of a roll source. -->
}}

Examples

1 Ticket, 100k Max Tickets

{{Drop Rate|tickets=1|max tickets=100000}}

1/100000

15 Tickets, 100k Max Tickets

{{Drop Rate|tickets=15|max tickets=100000}}

1/6666

1 Ticket, 1 Max Ticket

{{Drop Rate|tickets=1|max tickets=1}}

1/1

100 Tickets, 1 Max Ticket

{{Drop Rate|tickets=100|max tickets=1}}

1/1

0 Tickets, 1 Max Ticket

{{Drop Rate|tickets=0|max tickets=1}}

0