Template:Drops: Difference between revisions

From Vintage Story Wiki
No edit summary
(Move documentation to subpage)
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<includeonly>|bgcolor="#000000" colspan="2" style="text-align:center; font-size:13.5px;"|<font color="white">'''<translate><!--T:1--> Drops</translate>'''</font>
<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
{{#ifeq:{{{Code1}}}|Nothing
  |{{!}}- {{Special:MyLanguage/Drops/Nothing}}|
  |{{!}}- {{Drops/Nothing}}|
{{#if: {{{Code1|}}}
{{#if: {{{Code1|}}}
  |{{!}}- {{Special:MyLanguage/Drops/row |Code={{{Code1}}} |Avg={{{Avg1}}} |Var={{{Var1|}}} }}
  |{{!}}- {{Drops/row |Code={{{Code1}}} |Avg={{{Avg1}}} |Var={{{Var1|}}} }}
}}
}}
{{#if: {{{Code2|}}}
{{#if: {{{Code2|}}}
  |{{!}}- {{Special:MyLanguage/Drops/row |Code={{{Code2}}} |Avg={{{Avg2}}} |Var={{{Var2|}}} }}
  |{{!}}- {{Drops/row |Code={{{Code2}}} |Avg={{{Avg2}}} |Var={{{Var2|}}} }}
}}
}}
{{#if: {{{Code3|}}}
{{#if: {{{Code3|}}}
  |{{!}}- {{Special:MyLanguage/Drops/row |Code={{{Code3}}} |Avg={{{Avg3}}} |Var={{{Var3|}}} }}
  |{{!}}- {{Drops/row |Code={{{Code3}}} |Avg={{{Avg3}}} |Var={{{Var3|}}} }}
}}
}}
{{#if: {{{Code4|}}}
{{#if: {{{Code4|}}}
  |{{!}}- {{Special:MyLanguage/Drops/row |Code={{{Code4}}} |Avg={{{Avg4}}} |Var={{{Var4|}}} }}
  |{{!}}- {{Drops/row |Code={{{Code4}}} |Avg={{{Avg4}}} |Var={{{Var4|}}} }}
}}
}}
{{#if: {{{Code5|}}}
{{#if: {{{Code5|}}}
  |{{!}}- {{Special:MyLanguage/Drops/row |Code={{{Code5}}} |Avg={{{Avg5}}} |Var={{{Var5|}}} }}
  |{{!}}- {{Drops/row |Code={{{Code5}}} |Avg={{{Avg5}}} |Var={{{Var5|}}} }}
}}
}}
{{#if: {{{Code6|}}}
{{#if: {{{Code6|}}}
  |{{!}}- {{Special:MyLanguage/Drops/row |Code={{{Code6}}} |Avg={{{Avg6}}} |Var={{{Var6|}}} }}
  |{{!}}- {{Drops/row |Code={{{Code6}}} |Avg={{{Avg6}}} |Var={{{Var6|}}} }}
}}
}}
{{#if: {{{Code7|}}}
{{#if: {{{Code7|}}}
  |{{!}}- {{Special:MyLanguage/Drops/row |Code={{{Code7}}} |Avg={{{Avg7}}} |Var={{{Var7|}}} }}
  |{{!}}- {{Drops/row |Code={{{Code7}}} |Avg={{{Avg7}}} |Var={{{Var7|}}} }}
}}
}}
{{#if: {{{Code8|}}}
{{#if: {{{Code8|}}}
  |{{!}}- {{Special:MyLanguage/Drops/row |Code={{{Code8}}} |Avg={{{Avg8}}} |Var={{{Var8|}}} }}
  |{{!}}- {{Drops/row |Code={{{Code8}}} |Avg={{{Avg8}}} |Var={{{Var8|}}} }}
}}
}}
{{#if: {{{Code9|}}}
{{#if: {{{Code9|}}}
  |{{!}}- {{Special:MyLanguage/Drops/row |Code={{{Code9}}} |Avg={{{Avg9}}} |Var={{{Var9|}}} }}
  |{{!}}- {{Drops/row |Code={{{Code9}}} |Avg={{{Avg9}}} |Var={{{Var9|}}} }}
}}
}}
{{#if: {{{Code10|}}}
{{#if: {{{Code10|}}}
  |{{!}}- {{Special:MyLanguage/Drops/row |Code={{{Code10}}} |Avg={{{Avg10}}} |Var={{{Var10|}}} }}
  |{{!}}- {{Drops/row |Code={{{Code10}}} |Avg={{{Avg10}}} |Var={{{Var10|}}} }}
}}
}}
{{#if: {{{Code11|}}}
{{#if: {{{Code11|}}}
  |{{!}}- {{Special:MyLanguage/Drops/row |Code={{{Code11}}} |Avg={{{Avg11}}} |Var={{{Var11|}}} }}
  |{{!}}- {{Drops/row |Code={{{Code11}}} |Avg={{{Avg11}}} |Var={{{Var11|}}} }}
}}
}}
{{#if: {{{Code12|}}}
{{#if: {{{Code12|}}}
  |{{!}}- {{Special:MyLanguage/Drops/row |Code={{{Code12}}} |Avg={{{Avg12}}} |Var={{{Var12|}}} }}
  |{{!}}- {{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>
<translate><!--T:2--> Use this in infoboxes to display drops.</translate>
{{Documentation}}
{| class="wikitable"
|-
! <translate><!--T:3--> Parameter</translate> !! <translate><!--T:4--> Required or Optional, default if applicable</translate> !! <translate><!--T:5--> Example</translate>
|-
| ''Code1'' - ''Code12'' || <translate><!--T:6--> Required</translate> || <translate><!--T:7--> Dirt</translate>
|-
| ''Avg1'' - ''Avg12'' || <translate><!--T:8--> Required for</translate> ''Code1'' - ''Code4''  || 2
|-
| ''Var1'' - ''Var12'' || <translate><!--T:9--> Optional</translate> || 2
|}
<translate>
<!--T:10-->
Pass <code>Nothing</code> as the <code>Code1</code> parameter to display that it drops nothing.
 
<!--T:11-->
Use this in other templates. Based on [[Template:Drops/row]].
</translate>
</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.