Template:Party Size: Difference between revisions

From Phantasy Star Universe Clementine
(automatic template to parse number of players for infobox mission)
 
(hack to fix text spacing)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly> {{#ifexpr:{{{min}}}-{{{max}}}<0|{{{min}}}-{{{max}}}|{{{min}}}}} Player{{#switch: {{{max}}}
<includeonly>{{#ifexpr:{{{min}}} > {{{max}}} | Error: {{{min}}} must be smaller or equal to {{{max}}}
|1 =  
|{{
|#default = s
#ifexpr:{{{min}}} - {{{max}}} < 0 | {{{min}}}-{{{max}}} | {{{min}}}}} Player{{#switch: {{{max}}}
}}</includeonly>
|1 =
<noinclude>==Purpose==
|#default = s {{#if:{{{recommended|}}}|({{{recommended|}}} recom.)}}}}
Party Size turns the upper and lower bounds of two numbers into a pretty string. Used for infoboxes and other templates.
}}</includeonly><noinclude>==Purpose==
Party Size turns the the inclusive bookends of an integer range into a pretty string. Used for infoboxes and other templates.
==Parameter List==
<pre>
{{Party Size
|min =        <!-- The minimum amount of players that a mission supports. Must be an integer. Must be less than or equal to the maximum player count. -->
|max =        <!-- The maximum amount of players that a mission supports. Must be an integer. Must be greater than or equal to the minimum player count. -->
|recommended = <!-- Optional. Arbitrary text to be included if a mission has a recommended party size. This param has no validation if the max player count is more than 1. -->
}}
</pre>
==Examples==
==Examples==
Party size of min 1, max 6:
===Party Size Between 1 and 6===
<pre>{{Party Size|min=1|max=6}}</pre>
<pre>{{Party Size|min=1|max=6}}</pre>
{{Party Size|min=1|max=6}}
{{Party Size|min=1|max=6}}


Party size of min 1, max 1:
===Party Size Between 1 and 6 With Recommended Size of 4+===
<pre>{{Party Size|min=1|max=6}}</pre>
{{Party Size|min=1|max=6|recommended=4+}}
 
===Party Size Between 1 and 1===
<pre>{{Party Size|min=1|max=1}}</pre>
<pre>{{Party Size|min=1|max=1}}</pre>
{{Party Size|min=1|max=1}}
{{Party Size|min=1|max=1}}


Party size of min 2, max 2:
===Party Size Between 1 and 1 With Recommended Size of 2+===
<pre>{{Party Size|min=1|max=1|recommended=2+}}</pre>
{{Party Size|min=1|max=1|recommended=2+}}
 
===Party Size Between 2 and 2===
<pre>{{Party Size|min=2|max=2}}</pre>
<pre>{{Party Size|min=2|max=2}}</pre>
{{Party Size|min=2|max=2}}
{{Party Size|min=2|max=2}}
===Party Size Between 6 and 1 With Arbitrary Recommended Size===
<pre>{{Party Size|min=6|max=1|rec=69420ayylmao}}</pre>
{{Party Size|min=6|max=1|rec=69420ayylmao}}
‎</noinclude>
‎</noinclude>

Latest revision as of 18:10, 31 December 2023

Purpose

Party Size turns the the inclusive bookends of an integer range into a pretty string. Used for infoboxes and other templates.

Parameter List

{{Party Size
|min =         <!-- The minimum amount of players that a mission supports. Must be an integer. Must be less than or equal to the maximum player count. -->
|max =         <!-- The maximum amount of players that a mission supports. Must be an integer. Must be greater than or equal to the minimum player count. -->
|recommended = <!-- Optional. Arbitrary text to be included if a mission has a recommended party size. This param has no validation if the max player count is more than 1. -->
}}

Examples

Party Size Between 1 and 6

{{Party Size|min=1|max=6}}

1-6 Players

Party Size Between 1 and 6 With Recommended Size of 4+

{{Party Size|min=1|max=6}}

1-6 Players (4+ recom.)

Party Size Between 1 and 1

{{Party Size|min=1|max=1}}

1 Player

Party Size Between 1 and 1 With Recommended Size of 2+

{{Party Size|min=1|max=1|recommended=2+}}

1 Player

Party Size Between 2 and 2

{{Party Size|min=2|max=2}}

2 Players

Party Size Between 6 and 1 With Arbitrary Recommended Size

{{Party Size|min=6|max=1|rec=69420ayylmao}}

Error: 6 must be smaller or equal to 1 ‎