Template:Drops/row: Difference between revisions

From Vintage Story Wiki
m (doc of new unnamed params)
m (use Template:Drops/range and doc)
Line 1: Line 1:
<includeonly>|-
<includeonly>|-
|'''{{{Code|{{{1}}}}}}'''
|'''{{{Code|{{{1}}} }}}'''
|{{#if: {{{Var|{{{3}}}}}}
|{{Drops/range
  | {{#expr: {{{Avg|{{{2}}}}}} - {{{Var|{{{3}}}}}} }} - {{#expr: {{{Avg|{{{2}}}}}} + {{{Var|{{{3}}}}}} }}
  |{{{Avg|{{{2}}} }}}
|{{{Avg|{{{2}}}}}}
|{{{Var|{{{3}}} }}}
}}
}}
</includeonly><noinclude>
}}</includeonly><noinclude>
 
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 18: Line 17:
|}
|}


''Code'', ''Avg'', and ''Var'' can also be supplied as anon params. E.g. <code><nowiki>{{Drops/row|Dirt|1.1|0.5}}</nowiki></code>.
''Code'', ''Avg'', and ''Var'' can also be supplied as anon params. E.g. <code><nowiki>{{Drops/row|Dirt|1.1|0.5}}</nowiki></code> and <code><nowiki>{{Drops/row|Code=Dirt|Avg=1.1|Var=0.5}}</nowiki></code> both become:
 
{| class="wikitable"
|-
{{Drops/row|Dirt|1.1|0.5}}
|}


Used in [[Template:Drops]].
Used in [[Template:Drops]].
</noinclude>
</noinclude>

Revision as of 12:33, 19 April 2020

Parameter Required or Optional, default if applicable Example
Code Required Dirt
Avg Required 1.1
Var Optional 0.5

Code, Avg, and Var can also be supplied as anon params. E.g. {{Drops/row|Dirt|1.1|0.5}} and {{Drops/row|Code=Dirt|Avg=1.1|Var=0.5}} both become:

Dirt Template:Drops/range

}}

Used in Template:Drops.