Template:InfoCard: Difference between revisions

From IdleOn MMO Wiki
No edit summary
No edit summary
Line 15: Line 15:
### Cargo Store ###
### Cargo Store ###
--><includeonly>{{#if:{{{dropchance|}}}{{{cdc|}}}||
--><includeonly>{{#if:{{{dropchance|}}}{{{cdc|}}}||
{{#invoke:LuaVar|varDefine|name=chance|value={{#cargo_query:tables=DropTables|fields=DropRate|where=DropItem LIKE '{{PAGENAME}}'|order by=DropRate}}}}}}{{#cargo_store:_table=Cards
{{#cargo_store:_table=Cards
   |Title={{{title|{{PAGENAME}}}}}
   |Title={{{title|{{PAGENAME}}}}}
   |CardOrder={{{order|-1}}}
   |CardOrder={{{order|-1}}}
Line 22: Line 22:
   |Bonus={{{bonus|0}}}
   |Bonus={{{bonus|0}}}
   |TierAquirements={{{reqtier|0}}}
   |TierAquirements={{{reqtier|0}}}
   |DropChance={{{dropchance|{{{cdc|{{#invoke:LuaVar|var|name=chance}}}}}}}}
   |DropChance={{{dropchance|{{{cdc|{{#invoke:SourcesQuery|DropChance|item={{PAGENAME}}}}}}}}}}
   |Source={{#invoke:SourcesQuery|Main|item={{PAGENAME}}}}
   |Source={{#invoke:SourcesQuery|Main|item={{PAGENAME}}}}
}}<!-- First takes dropchance parameter. If that's empty checks for cdc parameter. If that is empty then queries the Drop table for the value. Finally if all others fail, defaults to 999.0 so that there will be an obvious value to correct.
}}<!-- First takes dropchance parameter. If that's empty checks for cdc parameter. If that is empty then queries the Drop table for the value. Finally if all others fail, defaults to 999.0 so that there will be an obvious value to correct.
Line 63: Line 63:
<dl>
<dl>
<dt>Dropchance</dt>
<dt>Dropchance</dt>
<dd>{{#if:{{{dropchance|}}}|{{chancedisplay|{{{dropchance}}}}}|}}</dd>
<dd>{{#if:{{{dropchance|{{#invoke:LuaVar|var|name=Chance}}}}}|{{chancedisplay|{{{dropchance|}}}}}|}}</dd>
<dt>Category</dt>
<dt>Category</dt>
<dd>[[Cards#{{{category}}}|{{{category}}}]]</dd>
<dd>[[Cards#{{{category}}}|{{{category}}}]]</dd>

Revision as of 20:25, 30 December 2022

This template defines the table "Cards". View table. Usage

{{InfoCard
|title=example
|order=example
|category=example
|effect=example
|bonus=example
|reqtier=Base requirement for increasing tiers (as listed in the code, which in some cases is 1.5)
|source=example
}}