Template:DropTable: Difference between revisions

From IdleOn MMO Wiki
imported>Blackwolfe
m (Text replacement - "PurpleHeaderRow" to "")
imported>Kiokurashi
No edit summary
Line 1: Line 1:
<includeonly>
<noinclude><!--
{|class="wikitable sortable mw-collapsible "
|+class="nowrap" | +{{#if:{{{description|}}}|{{{description}}}|Droptable for {{PAGENAME}}}}
!Icon
!Item
!Quantity
!Chance
{{#if:{{{coinQuantity|}}}|
        {{!}}-
        {{!}}
        {{!}}{{coindisplay|{{{coinQuantity}}}}}
        {{!}}
        {{!}}{{chancedisplay|{{{coinChance}}}}}}}
{{#if:{{{item1Name|}}}|
        {{!}}-
        {{!}}[[File:{{{item1Icon}}}|50px|link={{{item1Name}}}]]
        {{!}}{{{item1Name}}}
        {{!}}{{{item1Quantity}}}
        {{!}}{{chancedisplay|{{{item1Chance}}}}}}}
{{#if:{{{item2Name|}}}|
        {{!}}-
        {{!}}[[File:{{{item2Icon}}}|50px|link={{{item2Name}}}]]
        {{!}}{{{item2Name}}}
        {{!}}{{{item2Quantity}}}
        {{!}}{{chancedisplay|{{{item2Chance}}}}}}}
{{#if:{{{item3Name|}}}|
        {{!}}-
        {{!}}[[File:{{{item3Icon}}}|50px|link={{{item3Name}}}]]
        {{!}}{{{item3Name}}}
        {{!}}{{{item3Quantity}}}
        {{!}}{{chancedisplay|{{{item3Chance}}}}}}}
{{#if:{{{item4Name|}}}|
        {{!}}-
        {{!}}[[File:{{{item4Icon}}}|50px|link={{{item4Name}}}]]
        {{!}}{{{item4Name}}}
        {{!}}{{{item4Quantity}}}
        {{!}}{{chancedisplay|{{{item4Chance}}}}}}}
{{#if:{{{item5Name|}}}|
        {{!}}-
        {{!}}[[File:{{{item5Icon}}}|50px|link={{{item5Name}}}]]
        {{!}}{{{item5Name}}}
        {{!}}{{{item5Quantity}}}
        {{!}}{{chancedisplay|{{{item5Chance}}}}}}}
{{#if:{{{item6Name|}}}|
        {{!}}-
        {{!}}[[File:{{{item6Icon}}}|50px|link={{{item6Name}}}]]
        {{!}}{{{item6Name}}}
        {{!}}{{{item6Quantity}}}
        {{!}}{{chancedisplay|{{{item6Chance}}}}}}}
{{#if:{{{item7Name|}}}|
        {{!}}-
        {{!}}[[File:{{{item7Icon}}}|50px|link={{{item7Name}}}]]
        {{!}}{{{item7Name}}}
        {{!}}{{{item7Quantity}}}
        {{!}}{{chancedisplay|{{{item7Chance}}}}}}}
{{#if:{{{item8Name|}}}|
        {{!}}-
        {{!}}[[File:{{{item8Icon}}}|50px|link={{{item8Name}}}]]
        {{!}}{{{item8Name}}}
        {{!}}{{{item8Quantity}}}
        {{!}}{{chancedisplay|{{{item8Chance}}}}}}}
{{#if:{{{subtable1|}}}|{{{subtable1}}}}}{{#if:{{{subtable2|}}}|{{{subtable2}}}}}{{#if:{{{subtable3|}}}|{{{subtable3}}}}}{{#if:{{{subtable4|}}}|{{{subtable4}}}}}{{#if:{{{subtable5|}}}|{{{subtable5}}}}}{{#if:{{{subtable6|}}}|{{{subtable6}}}}}{{#if:{{{subtable7|}}}|{{{subtable7}}}}}{{#if:{{{subtable8|}}}|{{{subtable8}}}}}|}</includeonly>


<noinclude>
### Cargo Declare ###
<pre>
-->{{#cargo_declare:_table=DropTables
Used for putting a droptable on a page.
  |OrderNumber=Integer
Usage:
  |TableType=String (allowed values=Base,Rare,Super;mandatory)
{{DropTable
  |TableName=String
|coinQuantity=example
  |DropSourceEntity=String
|coinChance=example
  |DropItem=Wikitext
|item<1-8>Name=example
  |DropImage=Wikitext
|item<1-8>Quantity=example
  |DropQuantity=Integer
|item<1-8>Icon=example
  |DropRate=Float (mandatory)
|item<1-8>Chance=example
}}</noinclude><!--
|subtable<1-5>={{DropTable<1-5>|chance=example}}
}}


Example:  
### Cargo Store ###
--><includeonly>{{#cargo_store:_table=DropTables
  |OrderNumber={{{ordernumber|}}}
  |TableType={{{tableType|Base}}}
  |TableName={{{tablename|}}}
  |DropSourceEntity={{{source|{{PAGENAME}}}}}
  |DropItem={{{item|{{{1}}}}}}
  |DropImage={{{image|[[File:{{{1}}}.png|link={{{1}}}]]}}}
  |DropQuantity={{{quantity|{{{3|}}}}}}
  |DropRate={{{dropchance|{{{2|0}}}}}}
}}<!--


{{DropTable
 
|coinQuantity=1
-->{{#if: {{{displayrow|}}} | {{DropTable/row|{{{item|}}}|{{{dropchance}}}|{{{quantity}}}}}</includeonly>
|coinChance=0.5
|item1Name=Bogusitem
|item1Quantity=42
|item1Icon=Bogusitem.png
|item1Chance=0.7
|subtable1={{DropTable1|chance=0.05}}
}}
</pre>
</noinclude>

Revision as of 00:03, 29 September 2021

This template defines the table "DropTables". This table has not been created yet.