Template:Infobox item/Draft: Difference between revisions

From Coral Island Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 14: Line 14:
             -->{{#switch:{{{type}}}<!--
             -->{{#switch:{{{type}}}<!--
               -->|Vegetable|Fruit|Flower|Herb|Grain<!-- crops
               -->|Vegetable|Fruit|Flower|Herb|Grain<!-- crops
               -->|Seed|Seedling<!--seeds
               -->|Seed|Seedling<!-- seeds
              -->|Cooked dish<!-- food
               -->|Loot|Bomb|Decoy<!-- combat
               -->|Loot|Bomb|Decoy<!-- combat
               -->|Resource<!-- crafting mat
               -->|Resource<!-- crafting mat
               -->|Resource equipment|Artisan equipment<!-- crafting
               -->|Resource equipment|Artisan equipment<!-- crafting
              -->|Artisan product<!-- artisan product
               -->|Animal product<!-- ranching
               -->|Animal product<!-- ranching
               -->|Scavengeable|Mushroom<!-- foraging
               -->|Scavengeable|Mushroom<!-- foraging
Line 25: Line 27:
               -->|Geode|Gem<!-- mining
               -->|Geode|Gem<!-- mining
               -->|Letter|Torn page<!-- notes
               -->|Letter|Torn page<!-- notes
               -->|Tool|Weapon<!--  
               -->|Tool|Weapon<!-- tools
               -->|Consumable<!-- snacks
               -->|Consumable<!-- snacks
               -->|Bait<!-- fishing
               -->|Bait<!-- fishing
Line 31: Line 33:
               -->|Fish<!-- fishing
               -->|Fish<!-- fishing
               -->|Misc<!-- misc
               -->|Misc<!-- misc
               -->|Farming<!-- farming stuff
               -->|Farming|Ranch<!-- farming stuff
               -->|Decor<!-- farm decor
               -->|Decor<!-- farm decor
              -->|Cooking utensil<!-- cooking
                   --> = [[{{{type}}}]]<!--
                   --> = [[{{{type}}}]]<!--
               -->|#default = {{{type|}}}<!--
               -->|#default = {{{type|}}}<!--
Line 38: Line 41:
         </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>{{Array|{{{category|}}}|;|[[{item}]]|<br />}}</format>
         <format>{{Array|{{{item_group|}}}|;|[[{item}]]|<br />}}</format>
       </data>
       </data>
       <data source="journal">
       <data source="journal">
         <label>Journal category</label>
         <label>Journal category</label>
         <format>{{{journal|}}}</format> <!-- Journal side nav -->
         <format>{{{journal|}}}</format> <!-- Journal side nav -->
      </data>
      <data source="farm">
        <label>Farm</label>
        <format><!--
            -->{{#switch:{{{farm}}}<!--
              -->|Land|Ocean = {{{farm}}}<!--
              -->|#default = {{{farm|}}}<!--
          -->}}
        </format>
       </data>
       </data>
       <data source="season">
       <data source="season">
Line 51: Line 63:
           -->{{#ifeq:{{{season|}}}<!--
           -->{{#ifeq:{{{season|}}}<!--
             -->|Any|Any season<!--
             -->|Any|Any season<!--
             -->|{{Array|{{{season|}}}|;|[[{item}]]|{newline}|sort=0}}<!--
             -->|{{Array|{{{season|}}}|;|[[{item}]]|<br />|sort=0}}<!--
           -->}}
           -->}}
         </format>
         </format>
      </data>
      <data source="rarity">
        <label>Rarity</label>
       </data>
       </data>
       <data source="size">
       <data source="size">
         <label>Size</label>
         <label>Size</label>
         <format>{{{size|}}}</format>
      </data>
      <data source="difficulty">
         <label>Difficulty</label>
      </data>
      <data source="pattern">
      <label>Pattern</label>
       </data>
       </data>
       <data source="seed">
       <data source="seed">
         <label>Seed</label>
         <label>Seed</label>
         <format>{{Icon|{{{seed|}}}|note={{#if:{{{seed_price|}}}|{{g|{{{seed_price|}}}}}}}}}</format>
         <format>{{Icon|{{{seed|}}}|note={{#if:{{{seed_price|}}}|{{c|{{{seed_price|}}}}}}}}}</format>
       </data>
       </data>
       <data source="growth">
       <data source="growth">
Line 67: Line 87:
         <format><!--
         <format><!--
         -->{{{growth|}}} days<!--
         -->{{{growth|}}} days<!--
        -->{{#if:{{{growth_note|}}}|&nbsp;({{{growth_note|}}})}}<!--
         -->{{#if:{{{regrowth|}}}|<br />{{{regrowth|}}} {{#ifeq:{{{regrowth|}}}|1|day|days}} (regrowth)}}
         -->{{#if:{{{regrowth|}}}|<br />{{{regrowth|}}} {{#ifeq:{{{regrowth|}}}|1|day|days}} (regrowth)}}
         </format>
         </format>
      </data>
      <data source="giant_crop">
        <label>[[Crop#Giant crops|Giant crop]]</label>
      </data>
      <data source="wild_seed">
        <label>[[Wild seeds]]</label>
       </data>
       </data>
       <data>
       <data>
Line 79: Line 106:
         -->}}<!--
         -->}}<!--
         -->{{#if:{{{mastery|}}}|<!--
         -->{{#if:{{{mastery|}}}|<!--
             -->{{#switch:{{#explode:{{{mastery|}}}|;|0}}|Farming|Ranching|Foraging|Mining|Diving|<!--bug-->Catching|Fishing|Combat=<!--
             -->{{#switch:{{#explode:{{{mastery|}}}|;|0}}|Farming|Ranching|Foraging|Mining|Diving|<!--bug-->Catching|Fishing|Combat|0=<!--
               -->{{#if:{{{rank|}}}|<br />}}{{Mastery|{{#explode:{{{mastery|}}}|;|0}}|{{#explode:{{{mastery|}}}|;|1}}}}<!--
               -->{{#if:{{{rank|}}}|<br />}}{{Mastery|{{{mastery|}}}}}<!--
             -->}}<!--
             -->}}<!--
         -->}}<!--
         -->}}<!--
     --></default>
     --></default>
      </data>
      <data source="effect">
        <label>Effects</label>
      </data>
      <data source="enchanting">
        <label>[[Enchanting]] value</label>
      </data>
      <data source="produced_by">
        <label>Produced by</label>
       </data>
       </data>
       <data source="source">
       <data source="source">
         <label>Source</label>
         <label>Source</label>
         <format>{{Array|{{{source|}}}|;|{item}|<hr />}}</format>
         <format>{{Array|{{{source|}}}|;|{item}|<hr />}}</format>
      </data>
      <data source="location">
        <label>Location</label>
        <format>{{Array|{{{location|}}}|;|[[{item}]]|<br />|sort=0}}</format>
       </data>
       </data>
     </group>
     </group>
    <group layout="horizontal">
        <header>Conditions</header>
        <data source="spring">
          <label>Spring</label>
          <format>{{#if:{{{spring|}}}|<!--
          -->{{#ifeq:{{#explode:{{{spring|}}}|;|0}}|1|{{check|yes}}|&nbsp;}}{{#if:{{#explode:{{{spring|}}}|;|1}}<!--
          -->|<br />({{#explode:{{{spring|}}}|;|1}})}}}}
          </format>
        </data>
        <data source="summer">
          <label>Summer</label>
          <default>&nbsp;</default>
          <format>{{#if:{{{summer|}}}|<!--
          -->{{#ifeq:{{#explode:{{{summer|}}}|;|0}}|1|{{check|yes}}|&nbsp;}}{{#if:{{#explode:{{{summer|}}}|;|1}}<!--
          -->|<br />({{#explode:{{{summer|}}}|;|1}})}}}}
          </format>
        </data>
        <data source="fall">
          <label>Fall</label>
          <default>&nbsp;</default>
          <format>{{#if:{{{fall|}}}|<!--
          -->{{#ifeq:{{#explode:{{{fall|}}}|;|0}}|1|{{check|yes}}|&nbsp;}}{{#if:{{#explode:{{{fall|}}}|;|1}}<!--
          -->|<br />({{#explode:{{{fall|}}}|;|1}})}}}}
          </format>
        </data>
        <data source="winter">
          <label>Winter</label>
          <default>&nbsp;</default>
          <format>{{#if:{{{winter|}}}|<!--
          -->{{#ifeq:{{#explode:{{{winter|}}}|;|0}}|1|{{check|yes}}|&nbsp;}}{{#if:{{#explode:{{{winter|}}}|;|1}}<!--
          -->|<br />({{#explode:{{{fall|}}}|;|1}})}}}}
          </format>
        </data>
      </group>
      <data source="weather">
        <label>Weather</label>
        <format><!--
            -->{{#ifeq:{{{weather|}}}<!--
              -->|Any|Any weather<!--
              -->|{{Array|{{{weather|}}}|;|[[{item}]]|<br />|sort=0}}<!--
            -->}}
        </format>
      </data>
      <data source="time">
        <label>[[Time of day]]</label>
        <format><!--
          -->{{#switch:{{{time|}}}<!--
            -->|All day  = All day<!--
            -->|Morning  = Morning (06:00 - 11:50)<!--
            -->|Afternoon = Afternoon (12:00 - 15:50)<!--
            -->|Evening  = Evening (16:00 - 17:50)<!--
            -->|Night    = Night (18:00 - 01:50)<!--
            -->|#default  = {{{time}}}<!--
          -->}}<!--
          -->{{#if:{{{time2|}}}|<!--
            -->{{#switch:{{{time2|}}}<!--
              -->|All day  = <br />All day<!--
              -->|Morning  = <br />Morning (06:00 - 11:50)<!--
              -->|Afternoon = <br />Afternoon (12:00 - 15:50)<!--
              -->|Evening  = <br />Evening (16:00 - 17:50)<!--
              -->|Night    = <br />Night (18:00 - 01:50)<!--
              -->|#default  = <br />{{{time2}}}<!--
          -->}}}}<!--
          -->{{#if:{{{time3|}}}|<!--
            -->{{#switch:{{{time3|}}}<!--
              -->|All day  = <br />All day<!--
              -->|Morning  = <br />Morning (06:00 - 11:50)<!--
              -->|Afternoon = <br />Afternoon (12:00 - 15:50)<!--
              -->|Evening  = <br />Evening (16:00 - 17:50)<!--
              -->|Night    = <br />Night (18:00 - 01:50)<!--
              -->|#default  = <br />{{{time3}}}<!--
          -->}}}}<!--
        --></format>
      </data>
     <group layout="horizontal">
     <group layout="horizontal">
       <header>Sell prices</header>
       <header>Sell prices</header>
       <data source="sell">
       <data source="sell">
         <label>Base</label>
         <label>Base</label>
         <format>{{#if:{{{diff_quality|}}}|{{{sell|}}}|{{g|{{{sell|}}}}}}}</format>
         <format>{{#switch:{{lc:{{{sell|}}}}}
        |0 = ''Unsellable''
        |#default= {{formatnum:{{{sell|}}}}}
        }}</format>
       </data>
       </data>
       <data source="bronze">
       <data source="bronze">
Line 164: Line 281:
       </data>
       </data>
     </group>
     </group>
    <data source="effect">
 
      <label>Effects</label>
    </data>
   </infobox><!--
   </infobox><!--
-->{{Namespace|main=<!--
-->{{Namespace|main=<!--
-->{{#ifeq:{{NAMESPACE}}||{{DISPLAYTITLE:{{{title|{{PAGENAME}}}}}|noreplace}}}}<!--
   Type
   Type
-->{{#switch:{{{type}}}<!--
-->{{#switch:{{{type}}}<!--
   -->|Vegetable|Fruit|Flower|Herb|Grain=<!-- crops
   -->|Vegetable|Fruit|Flower|Herb|Grain=<!-- crops
       -->[[Category:Crops]]<!--
       -->[[Category:Crops]]<!--
      -->[[Category:{{{type}}}s]]<!--
       -->{{#if:{{{season|}}}|{{#ifeq:{{{season|}}}|Any<!--
       -->{{#if:{{{season|}}}|{{#ifeq:{{{season|}}}|Any<!--
         -->|[[Category:Any season crops}}]]<!--
         -->|[[Category:Any season crops}}]]<!--
         -->|{{Array|{{{season}}}|;|[[Category:{item} crops}}]]}}<!--
         -->|{{Array|{{{season}}}|;|[[Category:{item} crops]]}}<!--
       -->}}}}<!--
       -->}}}}<!--
   -->|Seed|Seedling=<!-- seeds
   -->|Seed|Seedling=<!-- seeds
Line 183: Line 298:
         -->|[[Category:Any season {{lc:{{{type}}}s}}]]<!--
         -->|[[Category:Any season {{lc:{{{type}}}s}}]]<!--
         -->|{{Array|{{{season}}}|;|[[Category:{item} {{lc:{{{type}}}s}}]]}}<!--
         -->|{{Array|{{{season}}}|;|[[Category:{item} {{lc:{{{type}}}s}}]]}}<!--
      -->}}}}<!--
  -->|Resource=<!-- crafting mat
      -->[[Category:Resources]]<!--
      -->{{#if:{{{seed}}}|[[Category:Crops]][[Category:Crop|{{{journal_id}}}]]}}<!--
      -->{{#if:{{{season|}}}|{{#ifeq:{{{season|}}}|Any<!--
        -->|[[Category:Any season crops}}]]<!--
        -->|{{Array|{{{season}}}|;|[[Category:{item} crops]]}}<!--
      -->}}}}<!--
  -->|Cooked dish=<!-- food
      --> [[Category:{{{type}}}es]]<!--
  -->|Scavengeable|Mushroom=<!-- foraging
      -->[[Category:Forageables]]<!--
      -->[[Category:{{{type}}}s]]<!--
      -->{{#if:{{{season|}}}|{{#ifeq:{{{season|}}}|Any<!--
        -->|[[Category:Any season forageables}}]]<!--
        -->|{{Array|{{{season}}}|;|[[Category:{item} forageables]]}}<!--
       -->}}}}<!--
       -->}}}}<!--
   -->|Bomb|Decoy<!-- combat
   -->|Bomb|Decoy<!-- combat
  -->|Resource<!-- crafting mat
   -->|Resource equipment|Artisan equipment<!-- crafting
   -->|Resource equipment|Artisan equipment<!-- crafting
  -->|Artisan product<!-- artisan product
   -->|Animal product<!-- ranching
   -->|Animal product<!-- ranching
  -->|Scavengeable|Mushroom<!-- foraging
   -->|Bug<!-- land catcheables
   -->|Bug<!-- land catcheables
   -->|Ocean critter<!-- ocean catcheables
   -->|Ocean critter<!-- ocean catcheables
Line 197: Line 327:
   -->|Consumable<!-- snacks
   -->|Consumable<!-- snacks
   -->|Bait<!-- fishing
   -->|Bait<!-- fishing
   -->|Trap=<!-- combat
   -->|Trap<!-- combat
       -->[[Category:{{{type}}}s]]<!--
  -->|Cooking utensil<!-- cooking
       -->= [[Category:{{{type}}}s]]<!--
   -->|Loot<!-- combat
   -->|Loot<!-- combat
   -->|Fish<!-- fishing
   -->|Fish<!-- fishing
   -->|Misc<!-- misc
   -->|Misc<!-- misc
   -->|Farming<!-- farming stuff
   -->|Farming|Ranch<!-- farming stuff
   -->|Decor=<!-- farm decor
   -->|Decor<!-- farm decor
       -->[[Category:{{{type}}}]]<!--
  -->|Others<!--
       -->= [[Category:{{{type}}}]]<!--
  -->|#default = [[Category:Pages with wrong input]]<!--
-->}}<!--
-->}}<!--
   Categories
  Farm
-->{{#switch:{{{farm}}}<!--
  -->|Land|Ocean=<!-- crops
      -->[[Category:{{{farm}}} crops]]<!--
  -->|#default = [[Category:Pages with wrong input]]<!--
-->}}<!--
  Seed type
-->{{#if:{{{seed|}}}|<!--
    -->{{If match|{{{seed|}}}<!--
        -->|seedlings?$<!--
        -->|saplings?$<!--
        -->|seeds?$<!--
        -->|true1=[[Category:Seedling crops]]<!--
        -->|true2=[[Category:Sapling crops]]<!--
        -->|true3=[[Category:Seed crops]]<!--
    -->}}<!--
-->}}<!--
  Animal products
-->{{#if:{{{produced_by|}}}|<!--
  -->{{#switch:{{{produced_by}}}<!--
      -->|Chicken|Duck|Peafowl|Quail = [[Category:{{{produced_by}}} products]][[Category:Coop products]]<!--
      -->|Pig|Luwak|Goat|Cow|Llama|Sheep = [[Category:{{{produced_by}}} products]][[Category:Barn products]]<!--
      -->|#default = [[Category:{{{produced_by}}} products]]<!--
  -->}}<!--
-->}}<!--
   Categories<!--
-->{{#if:{{{category|}}}|{{Array|{{{category|}}}|;|[[Category:{item}]]}}}}<!--
-->{{#if:{{{category|}}}|{{Array|{{{category|}}}|;|[[Category:{item}]]}}}}<!--
-->{{#if:{{{item_group|}}}|{{Array|{{{item_group}}}|;|[[Category:{item}s]]}}}}<!--
-->{{#if:{{{regrowth|}}}|[[Category:Regrowing crops]]}}<!--
-->{{#if:{{{regrowth|}}}|[[Category:Regrowing crops]]}}<!--
-->{{#if:{{{rank|}}}|[[Category:Town rank {{{rank}}}]]}}<!--
-->{{#if:{{{rank|}}}|[[Category:Town rank {{{rank}}}]]}}<!--
Line 214: Line 373:
-->{{#if:{{{wild_seed|}}}|[[Category:Crops from wild seeds]]}}<!--
-->{{#if:{{{wild_seed|}}}|[[Category:Crops from wild seeds]]}}<!--
-->{{#if:{{{health|}}}|[[Category:Consumables]][[Category:Edible ingredients]]}}<!--
-->{{#if:{{{health|}}}|[[Category:Consumables]][[Category:Edible ingredients]]}}<!--
  Sorting categories based on journal order
-->{{#switch:{{{type}}}<!--
  -->|Vegetable|Fruit|Flower|Herb|Grain= {{#if:{{{journal_id|}}}|[[Category:Crop|{{{journal_id}}}]]|[[Category:Crop]][[Category:Item missing sort ID]]}}<!--
  -->|Scavengeable|Mushroom= {{#if:{{{journal_id|}}}|[[Category:Scavengeable|{{{journal_id}}}]]|[[Category:Scavengeable]][[Category:Item missing sort ID]]}}<!--
  -->|Gem|Geode= {{#if:{{{journal_id|}}}|[[Category:Gem|{{{journal_id}}}]]|[[Category:Gem]][[Category:Item missing sort ID]]}}<!--
  -->|Animal product|Fish|Ocean critter|Artifact|Fossil|Letter|Torn page= {{#if:{{{journal_id|}}}|[[Category:{{{type}}}|{{{journal_id}}}]]|[[Category:{{{type}}}]][[Category:Item missing sort ID]]}}<!--
  -->|#default=<!--
  -->}}<!--
-->}}<!--
-->}}<!--
Necessary new line due to styling issues
Necessary new line due to styling issues
-->
-->
</includeonly><!--
</includeonly><!--
Examples
--><noinclude>{{Documentation|content=
==Example 1==
{{Infobox item/Draft
|name        = Carrot
|image        = Carrot.png
|journal_id  = 6
|farm        = Land
|type        = Vegetable
|seed        = Carrot seeds
|seed_price  = 35
|rank        = F
|growth      = 7
|sell        = 78
|description  = A brightly colored root vegetable. Very crunchy when raw.
|season      = Spring
|size        = 1x1
|health      = 31
|energy      = 33
|diff_quality = 1
}}
{{clr}}
==Example 2==
{{Infobox item/Draft
|name        = Grill
|image        = Grill.png
|type        = Cooking utensil
}}
{{clr}}
==Example 3==
{{Infobox item/Draft
|name        = Coconut
|image        = Coconut.png
|description  = This plant can be foraged in Spring and made into a cooking oil.
|journal_id  = 17
|type        = Scavengeable
|item_group  = Coconut; Fruit
|source      = Foraging
|season      = Spring
|sell        = 35
|health      = 36
|energy      = 25
}}
==Example 4==
{{Infobox item/Draft
|description    = Red and gooey.
|type          = Artisan product
|source        = Mason jar
|item_group    = Jam
<!--Sell Prices-->
|sell          =  220
|bronze        =  250
|silver        =  280
|gold          =  320
|osmium        =  425
<!--Health-->
|health        = 100
|health_bronze  = 115
|health_silver  = 125
|health_gold    = 150
|health_osmium  = 200
<!--Restoration-->
|energy        = 50
|energy_bronze  = 60
|energy_silver  = 65
|energy_gold    = 80
|energy_osmium  = 105
}}
{{clr}}
==Example==
{{Infobox item/Draft
|title        = Raja Ampat shark
|type        = Fish
|size        = Large
|rarity      = Legendary
|weather      = Sunny;Rain;Windy;Storm
|spring      = 1;1-16
|fall        = 1
|time        = Evening
|time2        = Morning
|time3        = Night
|time4        = Afternoon
|sell        = 745
|diff_quality = 1
|description  = A legendary saltwater fish. It can “walk” along the seafloor and over shallow reefs.
|difficulty  = Hard
|location    = Ocean
|pattern      = Straight
}}
}}</noinclude>

Latest revision as of 10:24, 16 July 2024

225Asian Bookshelves.png
This is the template draft page for Template:Infobox item (diff).
Documentation icon Template documentation
Note: parts of or the entire template might not be visible without values provided.

Example 1

Example 2

Example 3


Example 4

Example