Template:InfoItem: Difference between revisions

From IdleOn MMO Wiki
mNo edit summary
(Moved description from its own section to a caption under the image)
 
(17 intermediate revisions by 3 users not shown)
Line 27: Line 27:
   |Rarity=Integer
   |Rarity=Integer
   |Tier=String
   |Tier=String
  |Source=Wikitext
   |Family=String
   |Family=String
  |SetName=String
}}</noinclude><!--
}}</noinclude><!--


### Cargo Store ###
### Cargo Store ###
--><includeonly>{{#invoke:SlabStuff|SlabNumGrab|Item={{PAGENAME}}}}{{#cargo_store:_table=Items
--><includeonly>{{#invoke:SlabStuff|SlabNumGrab|Item={{PAGENAME}}}}{{#cargo_store:_table=Items
   |Image=[[File:{{PAGENAME}}.png]]
   |Image=[[File:{{{image|{{PAGENAME}}}}}.png]]
   |Type={{{type|Typeless}}}
   |Type={{{type|Typeless}}}
   |Level={{{level|0}}}
   |Level={{{level|0}}}
Line 57: Line 57:
   |Rarity={{#switch:{{{rarity|}}}|Bronze=1|Silver=2|Golden|Gold=3|Platinum=4|Dementia=5|Void=6|Lustre=7|Dreadlo=8|#default=0}}
   |Rarity={{#switch:{{{rarity|}}}|Bronze=1|Silver=2|Golden|Gold=3|Platinum=4|Dementia=5|Void=6|Lustre=7|Dreadlo=8|#default=0}}
   |Tier={{{tier|Null}}}
   |Tier={{{tier|Null}}}
  |Source={{#invoke:SourcesQuery|Main|item={{PAGENAME}}}}
   |Family={{{family|Null}}}
   |Family={{{family|Null}}}
  |SetName={{{setname|Null}}}
}}<!--
}}<!--


Line 77: Line 77:
                       File:{{#titleparts:{{PAGENAME}}}} Nameplate.png{{!}}Nameplate
                       File:{{#titleparts:{{PAGENAME}}}} Nameplate.png{{!}}Nameplate
                       }}
                       }}
                   |File:{{#titleparts:{{PAGENAME}}}}.png}}<!-- Using Titleparts fixes issues with apostrophes -->
                   |Statue={{#tag:gallery|
                      File:{{#titleparts:{{PAGENAME}}}}.png{{!}}Normal
                      File:{{#titleparts:{{PAGENAME}}}} Gold.png{{!}}Gold
                      File:{{#titleparts:{{PAGENAME}}}} Void.png{{!}}Onyx
                      }}
                  |Chat Ring={{#tag:gallery|
                      File:{{#titleparts:{{PAGENAME}}}}.png{{!}}Item Icon
                      File:{{#titleparts:{{PAGENAME}}}} Chat Box.png{{!}}Chat Message
                      }}
                  |File:{{#titleparts:{{{image|{{PAGENAME}}}}}}}.png}}<!-- Using Titleparts fixes issues with apostrophes -->
               </default>
               </default>
              <caption source="description" />
           </image>
           </image>
       </section>
       </section>
   </panel>
   </panel>
  <group name="InfoSection">
      <header>Description</header>
      <data source="description" />
  </group>
   <group name="TrophySection">
   <group name="TrophySection">
       <header>Character Effect</header>
       <header>Character Effect</header>
Line 109: Line 115:
       </data>
       </data>
       <data source="skillpower">
       <data source="skillpower">
           <label>{{{skill|Skill}}} Power</label>
           <label>{{#ifeq:{{lc:{{{type|}}}}}|dna splicer|Splice|{{{skill|Skill}}}}} Power</label>
           <format>{{skillicon|{{{skill|{{{type}}}}}}}} {{{skillpower|}}}</format>
           <format>{{skillicon|{{{skill|{{{type}}}}}}}} {{{skillpower|}}}</format>
       </data>
       </data>
Line 165: Line 171:
       <data source="type">
       <data source="type">
           <label>Type</label>
           <label>Type</label>
           <format>[[{{Pluralizer|{{{type|Uncategorized Item}}}}}]]</format>
           <format>[[{{{type|Uncategorized Item}}}|{{Pluralizer|{{{type|Uncategorized Item}}}}}]]</format>
       </data>
       </data>
       <data source="rarity">
       <data source="rarity">
Line 175: Line 181:
       <data name="Sources">
       <data name="Sources">
           <label>Source</label>
           <label>Source</label>
           <default>{{#var:Sources}}</default>
           <default>{{#invoke:SourcesQuery|PullSourcesFromList|item={{PAGENAME}}}}</default>
       </data>
       </data>
   </group>
   </group>
Line 182: Line 188:
       <data source="hascard">
       <data source="hascard">
         <label>Card</label>
         <label>Card</label>
         <format>[[File:{{PAGENAME}} Card.png|24px]] [[{{PAGENAME}} Card]]</format>
         <format>{{CraftReq|{{PAGENAME}} Card|24px}}</format>
       </data>
       </data>
       <data source="hascard">
       <data source="hascard">
Line 189: Line 195:
       </data>
       </data>
       <data source="hascard">
       <data source="hascard">
         <format>{{#dpl:|uses=Template:InfoCard|includepage={InfoCard}:bonus:bonus:bonus:bonus:bonus|title={{PAGENAME}} Card|count=1|mode = userformat|table = class="pi-horizontal-group",-, Base, [[File:Star1.png|class=CardStar|link=]], [[File:Star2.png|class=CardStar|link=]], [[File:Star3.png|class=CardStar|link=]], [[File:Star4.png|class=CardStar|link=]], [[File:Star5.png|class=CardStar|link=]]|tablerow=%%, <!-- Star1 -->²{#expr:%% * 2}², <!-- Star2 -->²{#expr:%% * 3}², <!-- Star3 -->²{#expr:%% * 4}², <!-- Star4 -->²{#expr:%% * 5}², <!-- Star5 -->²{#expr:%% * 6}²}}</format>
         <format>{{#dpl:|uses=Template:InfoCard|includepage={InfoCard}:bonus:bonus:bonus:bonus:bonus:bonus|title={{PAGENAME}} Card|count=1|mode = userformat|table = class="pi-horizontal-group",-, [[File:Star0.png|class=CardStar|link=]], [[File:Star1.png|class=CardStar|link=]], [[File:Star2.png|class=CardStar|link=]], [[File:Star3.png|class=CardStar|link=]], [[File:Star4.png|class=CardStar|link=]], [[File:Star5.png|class=CardStar|link=]]|tablerow=%%, <!-- Star1 -->²{#expr:%% * 2}², <!-- Star2 -->²{#expr:%% * 3}², <!-- Star3 -->²{#expr:%% * 4}², <!-- Star4 -->²{#expr:%% * 5}², <!-- Star5 -->²{#expr:%% * 6}²}}</format>
       </data>
       </data>
       <data source="hascard">
       <data source="hascard">
Line 203: Line 209:
</infobox><!--
</infobox><!--


-->{{SetHeader}}
-->{{#if:{{{setname|}}}|{{SetHeader|{{{setname}}}}}}}
{{{notes|}}}
{{{notes|}}}
{{#cargo_query:tables=VendorItems
{{#cargo_query:tables=VendorItems
Line 224: Line 230:
|default=
|default=
}}
}}
{{#vardefine:used|{{Usedin}}}}{{#if:{{#var:used}}|{{Usedin/head}}
{{Usedin}}
{{#var:used}}
{{!}}}
}}
{{#switch:{{{type}}}
{{#switch:{{{type}}}
|Exp Balloon|Fisticuff=[[Category:{{{type}}}s]]
|Exp Balloon|Fisticuff=[[Category:{{{type}}}s]]
Line 266: Line 269:
|rarity=example (for obols)
|rarity=example (for obols)
|tier=example (for upgrade stones)
|tier=example (for upgrade stones)
|source=example
|quest=example
|quest=example
|hascard=Yes/No (for ores, logs, fish and bugs)
|hascard=Yes/No (for ores, logs, fish and bugs)
|setname=Amarok (For any items that are part of a themed set and have a page made)
}}
}}



Latest revision as of 20:22, 12 June 2024

This template defines the table "Items". View table.

Usage:
{{InfoItem
|type=example (needs to be included every time)
|class=example
|level=example
|skill=example
|skillpower=example (needs a defined skill to display correctly)
|weaponpower=example
|str=example
|agi=example
|wis=example
|luck=example
|reach=example (only for weapons)
|speed=example (only for weapons)
|misc=example
|defence=example
|upgrade=example
|quest=example (only for quest items)
|description=example
|notes=example 
|sellprice=example
|rarity=example (for obols)
|tier=example (for upgrade stones)
|quest=example
|hascard=Yes/No (for ores, logs, fish and bugs)
|setname=Amarok (For any items that are part of a themed set and have a page made)
}}

Don't have empty definitions, that will produce empty fields. If there is no description for example, don't include a description= at all.