Template:Drops: Difference between revisions

From Vintage Story Wiki
mNo edit summary
(Move documentation to subpage)
 
(18 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>|bgcolor="#000000" colspan="2" style="text-align:center; font-size:13.5px;"|<font color="white">'''Drops'''</font>
<noinclude><languages /></noinclude>
{{#ifeq:{{{Code1}}}|Nothing| {{!}}- {{!}} colspan="2" style="text-align:center;" {{!}} Nothing |
<includeonly>|bgcolor="#000000" colspan="2" style="text-align:center; font-size:13.5px;"|<font color="white">'''<translate><!--T:1--> Drops</translate>'''</font>
{{#ifeq:{{{Code1}}}|Nothing
|{{!}}- {{Drops/Nothing}}|
{{#if: {{{Code1|}}}
{{#if: {{{Code1|}}}
  |{{!}}- {{Drops/row |Code={{{Code1}}} |Avg={{{Avg1}}} |Var={{{Var1|}}} }}
  |{{!}}- {{Drops/row |Code={{{Code1}}} |Avg={{{Avg1}}} |Var={{{Var1|}}} }}
Line 12: Line 14:
{{#if: {{{Code4|}}}
{{#if: {{{Code4|}}}
  |{{!}}- {{Drops/row |Code={{{Code4}}} |Avg={{{Avg4}}} |Var={{{Var4|}}} }}
  |{{!}}- {{Drops/row |Code={{{Code4}}} |Avg={{{Avg4}}} |Var={{{Var4|}}} }}
}}
{{#if: {{{Code5|}}}
|{{!}}- {{Drops/row |Code={{{Code5}}} |Avg={{{Avg5}}} |Var={{{Var5|}}} }}
}}
{{#if: {{{Code6|}}}
|{{!}}- {{Drops/row |Code={{{Code6}}} |Avg={{{Avg6}}} |Var={{{Var6|}}} }}
}}
{{#if: {{{Code7|}}}
|{{!}}- {{Drops/row |Code={{{Code7}}} |Avg={{{Avg7}}} |Var={{{Var7|}}} }}
}}
{{#if: {{{Code8|}}}
|{{!}}- {{Drops/row |Code={{{Code8}}} |Avg={{{Avg8}}} |Var={{{Var8|}}} }}
}}
{{#if: {{{Code9|}}}
|{{!}}- {{Drops/row |Code={{{Code9}}} |Avg={{{Avg9}}} |Var={{{Var9|}}} }}
}}
{{#if: {{{Code10|}}}
|{{!}}- {{Drops/row |Code={{{Code10}}} |Avg={{{Avg10}}} |Var={{{Var10|}}} }}
}}
{{#if: {{{Code11|}}}
|{{!}}- {{Drops/row |Code={{{Code11}}} |Avg={{{Avg11}}} |Var={{{Var11|}}} }}
}}
{{#if: {{{Code12|}}}
|{{!}}- {{Drops/row |Code={{{Code12}}} |Avg={{{Avg12}}} |Var={{{Var12|}}} }}
}}
{{#if: {{{Code13|}}}
|{{!}}- {{Drops/row |Code={{{Code13}}} |Avg={{{Avg13}}} |Var={{{Var13|}}} }}
}}
{{#if: {{{Code14|}}}
|{{!}}- {{Drops/row |Code={{{Code14}}} |Avg={{{Avg14}}} |Var={{{Var14|}}} }}
}}
{{#if: {{{Code15|}}}
|{{!}}- {{Drops/row |Code={{{Code15}}} |Avg={{{Avg15}}} |Var={{{Var15|}}} }}
}}
}}
}}
}}
</includeonly><noinclude>
</includeonly><noinclude>
Use this in infoboxes to display drops.
{{Documentation}}
{| class="wikitable"
|-
! Parameter !! Required or Optional, default if applicable !! Example
|-
| ''Code1'' - ''Code4'' || Required|| Dirt
|-
| ''Avg1'' - ''Avg4'' || Required for ''Code1'' - ''Code4''  || 2
|-
| ''Var1'' - ''Var4'' || Optional || 2
|}
Pass <code>Nothing</code> as the <code>Code1</code> parameter to display that it drops nothing.
 
Use this in other templates.
{|
{{Drops
|Code1=Nothing
}}
|}
</noinclude>
</noinclude>

Latest revision as of 12:16, 30 January 2024

Other languages:


[view | edit | history | purge this page]Documentation

Use this in other templates to display drops. Based on Template:Drops/row.

Template parameters

ParameterDescriptionTypeStatus
Code1Code1

Drop item info

Example
Dirt
Stringrequired
Avg1Avg1

Average drop value

Example
1.1
Numberrequired
Var1Var1

Variance of Avg parameter

Default
0
Numberoptional

Usage

{{Drops
|Code1= Dirt
|Avg1= 1.1
|Var1= 0.5
}}

Examples

{| class="wikitable"
|-
{{Drops |Code1 = Nothing}}
|}

turns into

Drops
Nothing
{| class="wikitable"
|-
{{Drops 
|Code1={{ll|Poultry}}
|Avg1=1.25
|Var1=0.25
|Code2={{ll|Feather}}
|Avg2=12
|Var2=4
|Code3={{ll|Bone}}
|Avg3=0.5
}}
|}

turns into

Drops
Poultry 1 - 1.5*
Feather 8 - 16*
Bone 0.5*
[view | edit | history | purge this page]The above documentation is transcluded from Template:Drops/doc.