Template:InfoCard: Difference between revisions

From IdleOn MMO Wiki
No edit summary
mNo edit summary
 
(20 intermediate revisions by 4 users not shown)
Line 10: Line 10:
   |TierAquirements=Float
   |TierAquirements=Float
   |DropChance=Float
   |DropChance=Float
  |Source=Wikitext
}}</noinclude><!--
}}</noinclude><!--


Line 21: Line 20:
   |Bonus={{{bonus|0}}}
   |Bonus={{{bonus|0}}}
   |TierAquirements={{{reqtier|0}}}
   |TierAquirements={{{reqtier|0}}}
   |DropChance={{{dropchance|{{{cdc|{{#invoke:SourcesQuery|DropChance|item={{PAGENAME}}}}}}}}}}
   |DropChance={{{dropchance|{{#invoke:SourcesQuery|DropChance|item={{PAGENAME}}}}}}}
  |Source={{#invoke:SourcesQuery|Main|item={{PAGENAME}}}}
}}<!-- First takes dropchance parameter. If that is empty then queries the Drop table for the value.  
}}<!-- 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.


--><div class="Infobox">
--><infobox>
<div class="Header">{{{title|{{PAGENAME}}}}}</div>
<title source="title">
<div class="HeaderImage">[[file:{{PAGENAME}}.png]]</div>
<default>{{PAGENAME}}</default>
<div class="SubHeader">Card Notes</div>
</title>
<dl>
<image source="image">
<dt>Order</dt>
        <default>[[File:{{PAGENAME}}.png]]</default>
<dd>{{{order}}}</dd>
    </image>
</dl>
    <header>Card Bonus</header>
<div class="SubHeader">Bonuses</div>
<data source="effect">
<dl>
<label>Effect</label>
<dt>Effect</dt>
</data>
<dd>{{{effect}}}</dd>
    <group name="CardBonus" layout="horizontal">
<dt>Base</dt>
<data source="bonus">
<dd>{{{bonus}}}</dd>
<label>[[File:Star0.png|class=CardStar|link=]]</label>
<dt>[[File:Star1.png|class=CardStar]]</dt>
</data>
<dd>{{#expr:{{{bonus}}}*2}}</dd>
<data source="bonus">
<dt>[[File:Star2.png|class=CardStar]]</dt>
<label>[[File:Star1.png|class=CardStar|link=]]</label>
<dd>{{#expr:{{{bonus}}}*3}}</dd>
<format>{{#expr:{{{bonus}}}*2}}</format>
<dt>[[File:Star3.png|class=CardStar]]</dt>
</data>
<dd>{{#expr:{{{bonus}}}*4}}</dd>
<data source="bonus">
<dt>[[File:Star4.png|class=CardStar]]</dt>
<label>[[File:Star2.png|class=CardStar|link=]]</label>
<dd>{{#expr:{{{bonus}}}*5}}</dd>
<format>{{#expr:{{{bonus}}}*3}}</format>
</dl>
</data>
<div class="SubHeader">Tier Requirements</div>
<data source="bonus">
<dl>
<label>[[File:Star3.png|class=CardStar|link=]]</label>
<dt>[[File:Star1.png|class=CardStar]]</dt>
<format>{{#expr:{{{bonus}}}*4}}</format>
<dd>{{#if:{{{reqtier|}}}|{{#expr: ceil({{{reqtier}}}) }}}}</dd>
</data>
<dt>[[File:Star2.png|class=CardStar]]</dt>
<data source="bonus">
<dd>{{#if:{{{reqtier|}}}|{{#expr: ceil({{{reqtier}}}*3) }}}}</dd>
<label>[[File:Star4.png|class=CardStar|link=]]</label>
<dt>[[File:Star3.png|class=CardStar]]</dt>
<format>{{#expr:{{{bonus}}}*5}}</format>
<dd>{{#if:{{{reqtier|}}}|{{#expr: ceil({{{reqtier}}}*5) }}}}</dd>
</data>
<dt>[[File:Star4.png|class=CardStar]]</dt>
<data source="bonus">
<dd>{{#if:{{{reqtier|}}}|{{#expr: ceil({{{reqtier}}}*16) }}}}</dd>
<label>[[File:Star5.png|class=CardStar|link=]]</label>
</dl>
<format>{{#expr:{{{bonus}}}*6}}</format>
<div class="SubHeader">Other Details</div>
</data>
<dl>
</group>
<dt>Dropchance</dt>
    <header>{{Tooltip|Number of cards since unlocking previous tier required to unlock indicated tier.|Tier Requirements<sup>*</sup>|nocolor=true}}</header>
<dd>{{#if:{{{dropchance|{{#invoke:LuaVar|var|name=Chance}}}}}|}}</dd>
    <group name="CardTier" layout="horizontal">
<dt>Category</dt>
<data source="reqtier">
<dd>[[Cards#{{{category}}}|{{{category}}}]]</dd>
<label>[[File:Star1.png|class=CardStar|link=]]</label>
<dt>Source</dt>
<format>{{InfoCard/TierReqForm|{{{reqtier}}}|0|{{PAGENAME}}}}</format>
<dd style="display:inline;">{{#invoke:LuaVar|var|name=Sources}}</dd>
</data>
</dl>
<data source="reqtier">
</div>{{#seo:
<label>[[File:Star2.png|class=CardStar|link=]]</label>
<format>{{InfoCard/TierReqForm|{{{reqtier}}}|1|{{PAGENAME}}}}</format>
</data>
<data source="reqtier">
<label>[[File:Star3.png|class=CardStar|link=]]</label>
<format>{{InfoCard/TierReqForm|{{{reqtier}}}|2|{{PAGENAME}}}}</format>
</data>
<data source="reqtier">
<label>[[File:Star4.png|class=CardStar|link=]]</label>
<format>{{InfoCard/TierReqForm|{{{reqtier}}}|3|{{PAGENAME}}}}</format>
</data>
<data source="reqtier">
<label>[[File:Star5.png|class=CardStar|link=]]</label>
<format>{{Tooltip|Ruby Cards bonus from The Rift must be acquired in order to be able to get 6 Lv. Card. Or use 5 Star Cardifier from Gem Shop.|{{InfoCard/TierReqForm|{{{reqtier}}}|4|{{PAGENAME}}}}|nocolor=true|nospace=blahblahblah}}</format>
</data>
</group>
    <header>Other Details</header>
<data source="dropchance">
<label>Dropchance</label>
        <format>{{Chancedisplay|{{{dropchance|{{#invoke:LuaVar|var|name=Chance}}}}}}}</format>
</data>
    <data source="category">
<label>Category</label>
        <format>[[File:{{{category}}}_Cardset.png|24px]] [[Cards#{{{category}}}|{{{category}}}]]</format>
</data>
    <data source="order">
<label>Order</label>
</data>
    <data source="source">
<label>Source</label>
        <default>{{#invoke:SourcesQuery|PullSourcesFromList|item={{PAGENAME}}}}</default>
</data>
</infobox>{{#seo:
|image={{PAGENAME}}.png
|image={{PAGENAME}}.png
|description=Category:&nbsp;{{{category}}}
|description=Category:&nbsp;{{{category}}}
{{#if: {{{effect|}}}|Effect: {{{effect}}}&#10;}}{{#if: {{{bonus|}}}|Base Bonus: {{{bonus}}}&#10;}}
{{#if: {{{effect|}}}|Effect: {{{effect}}}&#10;}}{{#if: {{{bonus|}}}|Base Bonus: {{{bonus}}}&#10;}}
}}{{{notes|}}}{{chancedisplay|{{#invoke:LuaVar|var|name=Chance}}}}[[Category:Cards]]</includeonly><noinclude>
}}{{{notes|}}}[[Category:Cards]]</includeonly><noinclude>
Usage
Usage
<pre>{{InfoCard
<pre>{{InfoCard
Line 81: Line 111:
|bonus=example
|bonus=example
|reqtier=Base requirement for increasing tiers (as listed in the code, which in some cases is 1.5)
|reqtier=Base requirement for increasing tiers (as listed in the code, which in some cases is 1.5)
|source=example
}}</pre>
}}</pre>
[[category:infobox templates]]
[[category:infobox templates]]
</noinclude>
</noinclude>

Latest revision as of 02:49, 22 March 2024

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)
}}