Template:Infobox item: Difference between revisions

From Coral Island Wiki
Jump to navigation Jump to search
mNo edit summary
(simplify source and item category, rename item category to item group)
Line 40: Line 40:
         </format>
         </format>
       </data>
       </data>
       <data source="category">
       <data source="item_group">
         <label>Item category</label> <!-- Gifting, and ingredient categories all in one -->
         <label>Item group</label> <!-- Gifting, and ingredient categories all in one -->
         <format>{{#switch:{{#explode:{{{category|}}}|;|0}}<!--
         <format>{{Array|{{{item_group|}}}|;|[[{item}]]|<br />}}</format>
        -->|Common gem |Uncommon gem |Rare gem |Super rare gem |Legendary gem<!--
        -->|Common artifact |Uncommon artifact |Rare artifact |Super rare artifact |Legendary artifact<!--
        -->|Common fossil |Uncommon fossil |Rare fossil |Super rare fossil |Legendary fossil = [[enchanting|{{#explode:{{{category|}}}|;|0}}]]{{#ifexpr:{{#rpos:{{{category|}}}|;}}>-1|<br />[[{{#explode:{{{category|}}}|;|1}}|{{#replace:{{#explode:{{{category|}}}|;|1}}| (group)}}]]}}<!--
        -->|#default={{Array|{{{category|}}}|;|[[{item}]]|<br />}}}}</format>
       </data>
       </data>
       <data source="journal">
       <data source="journal">
Line 102: Line 98:
         -->}}<!--
         -->}}<!--
     --></default>
     --></default>
      </data>
    </group>
    <group row-items="2">
      <header>Sources</header>
      <data source = "source">
      <label>Buy from</label>
      <format>{{#if:{{#DPL:|category=Sells {{lc:{{#titleparts:{{PAGENAME}}}}}}}}|[[#Shop availability|Shop]]}}</format>
      </data>
      <data source = "source">
      <label>Get from</label>
      <format>{{#if:{{#DPL:|category=Contains {{lc:{{#titleparts:{{PAGENAME}}}}}}}}|[[#Container availability|Container]]}}</format>
      </data>     
      <data source = "source">
      <label>Receive from</label>
      <format>{{#if:{{#DPL:|category=Gives {{lc:{{#titleparts:{{PAGENAME}}}}}}}}|[[#Received gift|NPC]]}}</format>
      </data>     
      <data source = "source">
      <label>Reward from</label>
      <format>{{#if:{{#DPL:|category=Rewards {{lc:{{#titleparts:{{PAGENAME}}}}}}}}|[[#Reward availability|Activity]]}}</format>     
      </data>     
      <data source = "source">
      <label>Drop from</label>
      <format>{{#if:{{#DPL:|category=Drops {{lc:{{#titleparts:{{PAGENAME}}}}}}}}|[[#Loot availability|Monster]]}}</format>           
       </data>
       </data>
       <data source="source">
       <data source="source">
         <label>Other</label>
         <label>Source</label>
         <format>{{Array|{{{source|}}}|;|{item}|<hr />}}</format>
         <format>{{Array|{{{source|}}}|;|{item}|<hr />}}</format>
       </data>    
       </data>
     </group>
     </group>
     <group layout="horizontal">
     <group layout="horizontal">

Revision as of 14:59, 16 January 2024

Documentation icon Template documentation
Note: parts of or the entire template might not be visible without values provided.

Example 1

{{Infobox item/Draft
|mastery      = Diving;7
|type         = Animal product
|category     = Milk; Eggs
|journal      = Produce
|season       = Winter; Spring
|seed         = Apple sapling
|seed_price   = 20
|growth       = 9
|regrowth     = 3
|giant_crop   = yes
|wild_seed    = yes
|rank         = B
|year         = 2
|building     = Coop;2
|sell         = 100
|health       = 40
|energy       = 20
|effect       = Drunk
|source       = Foraging;Diving;Farming
}}

Example 2

{{Infobox item/Draft
|type         = Animal product
|category     = Milk; Eggs
|journal      = Produce
|season       = Winter; Spring
|seed         = Apple sapling
|seed_price   = 20
|growth       = 9
|regrowth     = 3
|giant_crop   = yes
|wild_seed    = yes
|rank         = B
|year         = 2
|building     = Coop;2
|sell         = 100
|health       = 40
|energy       = 20
|effect       = Drunk
|diff_quality = 1
}}