Template:Infobox food: Difference between revisions

From Coral Island Wiki
Jump to navigation Jump to search
(Created page with "<includeonly><infobox> <title source="title"> <default>{{PAGENAME}}</default> </title> <image source="image"> <default>{{PAGENAME}}.png</default> <caption source="description" /> </image> <group> <header>Information</header> <data source="type"> <label>Type</label><default>Consumable</default> </data> <data source="source"> <label>Source</label> </data> <data source="health"> <label>Restores</label><form...")
 
(Copied from Coral Island Fandom Wiki)
Line 10: Line 10:
     <header>Information</header>
     <header>Information</header>
     <data source="type">
     <data source="type">
       <label>Type</label><default>[[Consumable]]</default>
       <label>Type</label>
      <default>[[Consumable]]</default>
    </data>
    <data source="recipe_source">
      <label>Recipe source</label>
     </data>
     </data>
     <data source="source">
     <data source="source">
Line 16: Line 20:
     </data>
     </data>
     <data source="health">
     <data source="health">
       <label>Restores</label><format>{{Health|{{{health|}}}}}{{Energy|{{{energy|}}}}}</format>
       <label>Restores</label>
      <format>{{Health|{{{health}}}}}{{Energy|{{{energy}}}}}</format>
    </data>
    <data source="effect">
      <label>Effects</label>
     </data>
     </data>
  </group>
  <group>
     <data source="buff">
     <data source="buff">
       <label>Buff</label>
       <label>[[Buff]]</label>
      <format><!--
        -->{{#switch:{{{buff}}}<!--
          -->|Attack|Defense|Go fast = {{Icon|{{{buff}}}|nolink=1|size=12}} +10% <!--
          -->|Farming|Ranching|Diving|Gathering|Mining|Fishing|Catching  = {{Icon|{{{buff}}}|nolink=1|size=12}} proficiency +10%<!--
          -->|Defense flat          = {{Icon|Defense|nolink=1|size=12}} +2<!--
          -->|Stamina                = {{Icon|Stamina|notext=1|nolink=1|size=12}} Extra stamina +100<!--
          -->|Bug awareness          = {{Icon|Scent icon|notext=1|nolink=1|size=12}} Bug awareness 4%<!--
          -->|Debuff immunity        = {{Icon|Debuff immunity|nolink=1|size=12}}<!--
          -->|#default              = {{{buff}}}<!--
        -->}}
      </format>
     </data>
     </data>
     <data source="debuff">
     <data source="debuff">
       <label>Debuff</label>
       <label>[[Buff#Negative buffs|Debuff]]</label>
      <format><!--
        -->{{#switch:{{{debuff}}}<!--
          -->|Slow    = {{Icon|Slow|nolink=1|size=12}} -30%<!--
          -->|Poison  = {{Icon|Poison|nolink=1|size=12}} -1% hp/sec<!--
          -->|Burn    = {{Icon|Burn|nolink=1|size=12}}<!--
          -->|#default = {{{debuff}}}<!--
        -->}}
      </format>
    </data>
    <data source="effect_source">
    <label>Effect source</label>
    <format><!--
        -->{{#switch:{{{effect_source}}}<!--
          -->|Food|Drink  = {{Icon|{{{effect_source}}}|size=12}}<!--
          -->|#default    = {{{effect_source}}}<!--
        -->}}
        </format>
     </data>
     </data>
   
   </group>
   </group>
   <group>
   <group layout="horizontal">
     <header>Crafting</header>
     <header>{{#if:{{{buff|}}}|Buff}}{{#if:{{{debuff|}}}|Debuff}} duration</header>
     <data source="recipe">
     <data source="duration">
       <label>Recipe</label>
      <label>Base</label>
      <default>{{#if:{{{buff|}}}|2h}}{{#if:{{{debuff|}}}|2h}}</default>
    </data>
    <data source="bronzeduration">
       <label>{{q|1}}</label>
      <default>{{#if:{{{buff|}}}|2h 18m}}{{#if:{{{debuff|}}}|2h 18m}}</default>
    </data>
    <data source="silverduration">
      <label>{{q|2}}</label>
  <default>{{#if:{{{buff|}}}|3h 36m}}{{#if:{{{debuff|}}}|3h 36m}}</default>
     </data>
     </data>
     <data source="utensil">
     <data source="goldduration">
       <label>Utensil</label>
       <label>{{q|3}}</label>
  <default>{{#if:{{{buff|}}}|3h}}{{#if:{{{debuff|}}}|3h}}</default>
     </data>
     </data>
     <data source="recipe_source">
     <data source="osmiumduration">
       <label>Recipe source</label><default>''Unknown''</default>
       <label>{{q|4}}</label>
  <default>{{#if:{{{buff|}}}|4h}}{{#if:{{{debuff|}}}|4h}}</default>
     </data>
     </data>
   </group>
   </group>
   <group layout="horizontal">
   <group layout="horizontal">
     <header>Economy</header>
     <header>Sell prices</header>
     <data source="buy">
     <data source="sell">
       <label>Buy price</label><format>{{g|{{{buy|}}}}}</format><default>''Unbuyable''</default>
       <label>Base</label>
     </data>
     </data>
     <data source="sell">
     <data source="bronze">
       <label>Sell price</label><format>{{g|{{{sell|}}}}}</format>
      <label>{{q|1}}</label>
      <default>{{#if:{{{sell|}}}|{{Sell prices|B|{{{sell|}}}|type=Food}}}}</default>
      <format>{{formatnum:{{{bronze|}}}}}</format>
    </data>
    <data source="silver">
       <label>{{q|2}}</label>
      <default>{{#if:{{{sell|}}}|{{Sell prices|S|{{{sell|}}}|type=Food}}}}</default>
      <format>{{formatnum:{{{silver|}}}}}</format>
    </data>
    <data source="gold">
      <label>{{q|3}}</label>
      <default>{{#if:{{{sell|}}}|{{Sell prices|G|{{{sell|}}}|type=Food}}}}</default>
      <format>{{formatnum:{{{gold|}}}}}</format>
    </data>
    <data source="osmium">
      <label>{{q|4}}</label>
      <default>{{#if:{{{sell|}}}|{{Sell prices|O|{{{sell|}}}|type=Food}}}}</default>
      <format>{{formatnum:{{{osmium|}}}}}</format>
     </data>
     </data>
   </group>
   </group>
</infobox>
</infobox>
{{Namespace|main=<!--
-->[[Category:Consumables]]<!--
-->[[Category:Food]]<!--
-->{{#if:{{{recipe_source|}}}|[[Category:Food with recipes]]}}<!--
-->{{#if:{{{buff|}}}|<!--
    -->{{#switch:{{{buff|}}}<!--
        -->|Go fast      = [[Category:Movement speed buffs]]<!--
        -->|Defense flat  = [[Category:Defense flat buffs]]<!--
        -->|Max energy    = [[Category:Stamina buffs]]<!--
        -->|#default      = [[Category:{{{buff}}} buffs]]<!--
    -->}}<!--
-->}}<!--
-->{{#if:{{{effect_source|}}}|[[Category:Effect from {{lc:{{{effect_source}}}}}]]}}<!--
-->{{#if:{{{debuff|}}}|[[Category:{{{debuff}}} debuffs]]}}
}}</includeonly><noinclude>{{documentation}}[[Category:Infobox templates|food]]</noinclude>

Revision as of 08:04, 30 January 2024

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

Infobox to be used for items.

Syntax

{{Infobox item
|title         = Defaults to pagename.
|image         = Defaults to pagename.png
|type          = Type as it shows in-game, written in singular form. Defaults to Consumable.
|category      = Hidden category that an item may fall under.
|health        = Health value.
|energy        = Stamina value
|recipe_source = Mail, Mastery, etc
|recipe        = NPC or Mastery
|effect_source = Considered a food or drink buff.
|buff          = Attack, Defense, Go fast, Farming, Defense flat, etc.
|debuff        = Slow, Poison, Burn, etc
|effect        = Effect that is neither a buff or debuff.
|sell          = Value if sold through the shipping bin. Automatically calculated until osmium quality.
}}

  • category — Other categories that an item may fall under. Usually used for gifting, offering, or cooking.
  • buff — values are Attack, Defense, Go fast, Mastery names, Defense flat, Stamina, Bug awareness, Debuff immunity.
  • debuff — values are Slow, Poison, and Burn.
  • duration — Automatically added by the template if buff or debuff is entered.
    • dur_bronze, dur_silver, etc. — Duration for each quality may be overriden.
  • recipe_source — Mail, Mastery, etc. Not visible in the infobox. Adds Category:Mail recipes or Category:Mastery recipes

Example

{{Infobox food
|description   = Nutritious and colorful. Yum!
|source        = 
|health        = 150
|energy        = 160
|sell          = 38
|buff          = Gathering
|effect_source = Food
|recipe        = {{NPC|Emily}} (4 hearts)
|recipe_source = Mail
}}