Template:InfoItem: Difference between revisions

From IdleOn MMO Wiki
imported>Blackwolfe
No edit summary
(Moved description from its own section to a caption under the image)
 
(219 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<includeonly>
<noinclude><!--
{| class="Infobox"
 
|-
### Cargo Declare ###
! colspan="2" class="Header" | {{PAGENAME}}
-->{{#cargo_declare:_table=Items
|-
  |Image=Wikitext
| colspan="2" class="HeaderImage" | [[file:{{PAGENAME}}.png]]
  |Type=String
|-
  |Level=Integer
{{#ifeq:{{{type}}}|Trophy|! colspan="2" class="SubHeader" {{!}} Character Effect
  |Class=String
{{!}}-
  |WeaponPower=Integer
! Title
  |SkillPower=Integer
{{!}} [[File:{{PAGENAME}}_Title.png]]
  |UseSpeed=Integer
{{!}}-}}
  |Bonus=String
{{#if: {{{class|}}}{{{level|}}}|! colspan="2" class="SubHeader" {{!}} Requirements
  |STR=Integer
{{!}}- }}
  |AGI=Integer
{{#if:{{{class|}}}|
  |WIS=Integer
! Class
  |LUCK=Integer
{{!}} {{{class | }}}
  |MISC=String
{{!}}-}}
  |MISC2=String
{{#if:{{{level|}}}|
  |WorshipCharge=Integer
! Level
  |Reach=Integer
{{!}} {{#if:{{{skill|}}}|{{skillicon|{{{skill}}}}}}} {{{level | }}}
  |Upgrade=Integer
{{!}}-}}
  |Defence=Integer
{{#if:{{{speed|}}}{{{weaponpower|}}}{{{skillpower|}}}{{{bonus|}}}{{{str|}}}{{{agi|}}}{{{wis|}}}{{{luck|}}}{{{misc|}}}{{{reach|}}}{{{upgrade|}}}{{{defence|}}}{{{bonus|}}}|! colspan="2" class="SubHeader" {{!}} Stats
  |Skill=String
{{!}}-}}
  |Quest=String
{{#if:{{{weaponpower|}}}|
  |Description=Wikitext
! Weapon Power
  |SellPrice=String
{{!}} {{{weaponpower | }}}
  |Rarity=Integer
{{!}}-}}
  |Tier=String
{{#if:{{{skillpower|}}}|
  |Family=String
! Skill Power
  |SetName=String
{{!}} {{skillicon|{{{skill}}}}} {{{skillpower | }}}
}}</noinclude><!--
{{!}}-}}
 
{{#if: {{{bonus|}}} |
### Cargo Store ###
! Bonus
--><includeonly>{{#invoke:SlabStuff|SlabNumGrab|Item={{PAGENAME}}}}{{#cargo_store:_table=Items
{{!}} {{{bonus|}}}
  |Image=[[File:{{{image|{{PAGENAME}}}}}.png]]
{{!}}-}}
  |Type={{{type|Typeless}}}
{{#if: {{{speed|}}} |
  |Level={{{level|0}}}
! Speed
  |Class={{{class|Null}}}
{{!}} {{{speed | }}}
  |WeaponPower={{{weaponpower|0}}}
{{!}}-}}
  |SkillPower={{{skillpower|0}}}
{{#if: {{{str|}}} |
  |UseSpeed={{{speed|0}}}
!Strength
  |Bonus={{{bonus|Null}}}
{{!}} {{{str|}}}  
  |STR={{{str|0}}}
{{!}}- }}
  |AGI={{{agi|0}}}
{{#if: {{{agi|}}} |
  |WIS={{{wis|0}}}
! Agility
  |LUCK={{{luck|0}}}
{{!}} {{{agi}}}
  |MISC={{{misc|Null}}}
{{!}}- }}
  |MISC2={{{misc2|Null}}}
{{#if: {{{wis|}}} |
  |WorshipCharge={{{charge|{{#ifeq:{{{type|}}}|Worship Skull|100|0}}}}}<!-- Default is 100% for Skulls, but 0 for everything else. -->
!Wisdom
  |Reach={{{reach|0}}}
{{!}} {{{wis|}}}
  |Upgrade={{{upgrade|0}}}
{{!}}- }}
  |Defence={{{defence|0}}}
{{#if: {{{luck|}}} |
  |Skill={{{skill|Null}}}
!Luck
  |Quest={{{quest|Null}}}
{{!}} {{{luck}}}  
  |Description={{{description|Null}}}
{{!}}- }}
  |SellPrice={{#switch:{{{type|}}}|Circle Obol|Square Obol|Hexagon Obol|Sparkle Obol=|#default={{{sellprice|1}}}}}
{{#if:{{{reach|}}}|
  |Rarity={{#switch:{{{rarity|}}}|Bronze=1|Silver=2|Golden|Gold=3|Platinum=4|Dementia=5|Void=6|Lustre=7|Dreadlo=8|#default=0}}
! Reach
  |Tier={{{tier|Null}}}
{{!}} {{{reach | }}}
  |Family={{{family|Null}}}
{{!}}-}}
  |SetName={{{setname|Null}}}
{{#if: {{{misc|}}} |
}}<!--
! Misc
 
{{!}} {{{misc}}}  
--><Infobox>
{{!}}-}}
  <title><default>{{#if:{{#var:SlabNum}}|<div class="SlabNum">[[File:The Slab Icon.png|28px|link=The Slab]][[The Slab|<span>{{#var:SlabNum}}</span>]]</div>}} {{PAGENAME}}</default></title>
{{#if: {{{defence|}}}|
  <panel>
! Defence
      <section>
{{!}} {{{defence|}}}
          <image>
{{!}}- }}
              <default>
{{#if: {{{upgrade|}}} |
                  {{#switch:{{{type|}}}
! Upgrade slots
                  |Dungeon Evaporate=
{{!}} {{{upgrade}}}
                  |Cape={{#tag:gallery|
{{!}}-}}
                      File:{{#titleparts:{{PAGENAME}}}}.png{{!}}Item Icon
{{#if: {{{quest|}}}|
                      File:{{#titleparts:{{PAGENAME}}}} Full Spread.{{#ifeq:{{PAGENAME}}|Molten Cloak|gif|png}}{{!}}Full View
! colspan="2" class="SubHeader" {{!}} Quest Specifics
                      }}
{{!}}-
                  |Nametag={{#tag:gallery|
{{#if: {{{quest|}}} |
                      File:{{#titleparts:{{PAGENAME}}}}.png{{!}}Item Icon
!Quest
                      File:{{#titleparts:{{PAGENAME}}}} Nameplate.png{{!}}Nameplate
{{!}} {{{quest|}}}
                      }}
{{!}}- }}}}
                  |Statue={{#tag:gallery|
{{#switch: {{{type|}}}|Ore|Logs|Fish|Bugs=
                      File:{{#titleparts:{{PAGENAME}}}}.png{{!}}Normal
! colspan="2" class="SubHeader" {{!}} Resource Specifics
                      File:{{#titleparts:{{PAGENAME}}}} Gold.png{{!}}Gold
{{!}}-
                      File:{{#titleparts:{{PAGENAME}}}} Void.png{{!}}Onyx
{{#if: {{{skill|}}} |
                      }}
!Skill
                  |Chat Ring={{#tag:gallery|
{{!}} {{skilldis|{{{skill|}}}}}
                      File:{{#titleparts:{{PAGENAME}}}}.png{{!}}Item Icon
{{!}}- }}}}
                      File:{{#titleparts:{{PAGENAME}}}} Chat Box.png{{!}}Chat Message
{{#if: {{{description|}}}|
                      }}
! Description
                  |File:{{#titleparts:{{{image|{{PAGENAME}}}}}}}.png}}<!-- Using Titleparts fixes issues with apostrophes -->
{{!}} {{{description|}}}
              </default>
{{!}}- }}
              <caption source="description" />
! colspan="2" class="SubHeader" | Other
          </image>
|-
      </section>
{{#if: {{{notes|}}} |
  </panel>
! Notes
  <group name="TrophySection">
      <header>Character Effect</header>
      <data>
          <label>Title</label>
          <default>{{#ifeq:{{{type|}}}|Trophy|[[File:{{PAGENAME}}_Title.png]]}}</default>
      </data>
  </group>
  <group name="RequirementsSection">
      <header>Requirements</header>
      <data source="class">
          <label>Class</label>
      </data>
      <data source="level">
          <label>Level</label>
          <format>{{skillicon|{{{type|}}}}} {{{level|}}}</format>
      </data>
  </group>
  <group name="StatsSection">
      <header>Stats</header>
      <data source="weaponpower">
          <label>Weapon Power</label>
      </data>
      <data source="skillpower">
          <label>{{#ifeq:{{lc:{{{type|}}}}}|dna splicer|Splice|{{{skill|Skill}}}}} Power</label>
          <format>{{skillicon|{{{skill|{{{type}}}}}}}} {{{skillpower|}}}</format>
      </data>
      <data source="bonus">
          <label>Bonus</label>
      </data>
      <data source="speed">
          <label>Speed</label>
          <format>{{{speed|}}} ({{#switch:{{{speed|}}}|0=Immobile|1=Molasses|2=Sluggish|3=Slower|4=Slow|5=Medium|6=Quick|7=Fast|8=Faster|9=Turbo|10=Supersonic}})</format>
      </data>
      <data source="str">
          <label>Strength</label>
      </data>
      <data source="agi">
          <label>Agility</label>
      </data>
      <data source="wis">
          <label>Wisdom</label>
      </data>
      <data source="luck">
          <label>Luck</label>
      </data>
      <data source="reach">
          <label>Reach</label>
      </data>
      <data source="misc">
          <label>Misc</label>
      </data>
      <data source="misc2">
          <label>Misc2</label>
      </data>
      <data source="charge">
          <label>Max Charge</label>
          <format>{{{charge|}}}%</format>
      </data>
      <data source="defence">
          <label>Defence</label>
      </data>
      <data source="upgrade">
          <label>Upgrade Slots</label>
      </data>
  </group>
  <group name="QuestSection">
      <header>Quest Specifics</header>
      <data source="quest">
          <label>Quest</label>
      </data>
  </group>
  <group name="OtherSection">
      <header>Other</header>
      <data source="sellprice">
          <label>Sell Price</label>
          <format>{{#switch:{{{type|}}}|Circle Obol|Square Obol|Hexagon Obol|Sparkle Obol=|#default={{Coindisplay|{{{sellprice}}}}} }}</format>
      </data>
      <data source="type">
          <label>Type</label>
          <format>[[{{{type|Uncategorized Item}}}|{{Pluralizer|{{{type|Uncategorized Item}}}}}]]</format>
      </data>
      <data source="rarity">
          <label>Rarity</label>
      </data>
      <data source="tier">
          <label>Tier</label>
      </data>
      <data name="Sources">
          <label>Source</label>
          <default>{{#invoke:SourcesQuery|PullSourcesFromList|item={{PAGENAME}}}}</default>
      </data>
  </group>
  <group name="CardSection">
      <header>Card Info</header>
      <data source="hascard">
        <label>Card</label>
        <format>{{CraftReq|{{PAGENAME}} Card|24px}}</format>
      </data>
      <data source="hascard">
        <label>Effect</label>
        <format>{{#dpl:|uses=Template:InfoCard|includepage={InfoCard}:effect|title={{PAGENAME}} Card|count=1|mode=inline|format=,}}</format>
      </data>
      <data source="hascard">
        <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 source="hascard">
        <label>Category</label>
        <format>{{#dpl:|uses=Template:InfoCard|includepage={InfoCard}:category|title={{PAGENAME}} Card|count=1|mode=inline|format=,}}</format>
      </data>
      <data source="hascard">
        <label>Dropchance</label>
        <format>{{Chancedisplay|{{#invoke:SourcesQuery|DropChance|item={{PAGENAME}} Card}}}}</format>
        <!--{{#dpl:|uses=Template:InfoCard|includepage={InfoCard}:dropchance|title={{PAGENAME}} Card|count=1|mode=inline|format=,}}-->
      </data>
  </group>
</infobox><!--
 
-->{{#if:{{{setname|}}}|{{SetHeader|{{{setname}}}}}}}
{{{notes|}}}
{{{notes|}}}
{{!}}-}}
{{#cargo_query:tables=VendorItems
{{#if: {{{sellprice|}}} |
|fields=Vendor=vendor,OrderNumber=number,Price=buyprice,Stock=stock
! Sell Price
|where=Item LIKE "{{PAGENAME}}"
{{!}} {{Coindisplay | {{{sellprice}}} }} }}
|format=template
|-
|template=Vendoritem/row
! Type
|named args=yes
| {{{type}}}
|default=
|-
|intro={{Vendoritem/head}}
{{#if: {{{rarity|}}} |
|outro=</table>
! Rarity
|order by=OrderNumber
{{!}} {{{rarity|}}}
}}
{{!}}- }}
{{#cargo_query:tables=AnvilCraft
{{#if: {{{tier|}}} |
|fields=AnvilTab=anvtab, EXPGiven=expgiven, CraftNum=craftnum, LevelReq=levelreq, Resource1=resource1, Quantity1=quantity1, Resource2=resource2, Quantity2=quantity2, Resource3=resource3, Quantity3=quantity3, Resource4=resource4, Quantity4=quantity4, RecipeFrom=recipefrom
! Tier
|named args=yes
{{!}} {{{tier|}}}
|where=Item="{{PAGENAME}}"
{{!}}- }}
|format=template
! class="LastTable" | Source
|template=ForgeSlot/itemdisplay
| {{{source | Unobtainable}}}
|default=
{{#ifeq: {{{hascard}}} | yes | {{#dpl:  
}}
|namespace=
{{Usedin}}
|category=Cards
|uses=Template:InfoCard
|include={InfoCard}/boxrow
|includematch=*{{PAGENAME}}*
|format=,,
|allowcachedresults=true
}}}}
|}
{{#switch:{{{type}}}
{{#switch:{{{type}}}
|Leaf=[[Category:Leaves]]
|Exp Balloon|Fisticuff=[[Category:{{{type}}}s]]
|Shoes=[[Category:Shoes]]
|Trash=[[Category:Trash]][[Category:Misc Items]]
|Pants=[[Category:Pants]]
|Obol Fragment|Summon Item|Hunk Of Junk|Lava Letter=[[Category:Misc Items]]
|Fish=[[Category:Fish]]
|Time Candy=[[Category:Consumables]] [[Category:Character Consumables]] [[Category:{{Pluralizer|{{{type}}}}}]]
|Time Candy|Exp Balloon|Usable|Reset Potion|Fragment|Teleport=[[Category:consumables]] [[Category:Character Consumables]]
|Exp Balloon|Reset Potion|Fragment|Teleport=[[Category:Consumables]] [[Category:Character Consumables]] [[Category:{{Pluralizer|{{{type}}}}}]]
|Ticket|Boss Key|Gem|Office Pen|Talent Point=[[Category:consumables]] [[Category:Account Consumables]]
|Ticket|Boss Key|Gem|Office Pen|Talent Point=[[Category:Consumables]] [[Category:Account Consumables]] [[Category:{{Pluralizer|{{{type}}}}}]]
|Anvil Expansion=[[Category:upgrades]] [[Category:consumables]]
|Barrel|Box|Card Pack|Event Item=[[Category:Misc Items]] [[Category:{{Pluralizer|{{{type}}}}}]]
|Barrel|Box|Card Pack|Event Item|Hunk Of Junk|Lava Letter=[[Category:Misc Items]]
|#default=[[Category:{{Pluralizer|{{{type}}}}}]]
|Obol Fragment|Summon Item=[[Category:Misc Items]]
|#default= [[Category:{{{type}}}s]]
}}
}}
{{#seo:
{{#seo:
|image={{PAGENAME}}.png
|image={{PAGENAME}}.png
|description=Type:&nbsp;{{{type}}}
|description=Type:&nbsp;{{{type}}}
{{#if:{{{description|}}}|{{{description}}}|{{#if: {{{speed|}}}|Speed:&nbsp;{{{speed}}}&#10;}}{{#if: {{{defence|}}}|Defence: {{{defence}}}&#10;}}{{#if: {{{weaponpower|}}}| Weapon Power:&nbsp;{{{weaponpower}}}&#10;}}{{#if: {{{str|}}}| Str:&nbsp;{{{str}}}&#10;}}{{#if: {{{agi|}}}|Agi:&nbsp;{{{agi}}}&#10;}}{{#if: {{{wis|}}}| Wis:&nbsp;{{{wis}}}&#10;}}{{#if: {{{luck|}}}| Luck:&nbsp;{{{luck}}}&#10;}}{{#if: {{{misc|}}}| Misc:&nbsp;{{{misc}}}&#10;}}{{#if: {{{upgrade|}}}|Upgrade Slots:&nbsp;{{{upgrade}}}}}}}
{{#if:{{{description|}}}|{{{description}}}}}{{#if: {{{speed|}}}|Speed:&nbsp;{{{speed}}}&#10;}}{{#if: {{{defence|}}}|Defence: {{{defence}}}&#10;}}{{#if: {{{weaponpower|}}}| Weapon Power:&nbsp;{{{weaponpower}}}&#10;}}{{#if: {{{skillpower|}}}| Skill Power:&nbsp;{{{skillpower}}} ({{{skill}}})&#10;}}{{#if: {{{str|}}}| Str:&nbsp;{{{str}}}&#10;}}{{#if: {{{agi|}}}|Agi:&nbsp;{{{agi}}}&#10;}}{{#if: {{{wis|}}}| Wis:&nbsp;{{{wis}}}&#10;}}{{#if: {{{luck|}}}| Luck:&nbsp;{{{luck}}}&#10;}}{{#if: {{{misc|}}}| Misc:&nbsp;{{{misc}}}&#10;}}{{#if: {{{upgrade|}}}|Upgrade Slots:&nbsp;{{{upgrade}}}}}
}}</includeonly><noinclude><pre>
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)
}}
}}
</includeonly>


<noinclude>
Don't have empty definitions, that will produce empty fields. If there is no description for example, don't include a description= at all.</pre>
Should be mostly complete, needs more testing before being released into the wild.
[[category:infobox templates]]
[[category:infobox templates]]
</noinclude>
</noinclude>

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.