Template:Infobox item/Draft: Difference between revisions

From Coral Island Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(16 intermediate revisions by the same user not shown)
Line 19: Line 19:
               -->|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 48: Line 49:
         <format>{{{journal|}}}</format> <!-- Journal side nav -->
         <format>{{{journal|}}}</format> <!-- Journal side nav -->
       </data>
       </data>
       <data source="size">
       <data source="farm">
         <label>Size</label>
         <label>Farm</label>
         <format>{{{size|}}}</format>
         <format><!--
            -->{{#switch:{{{farm}}}<!--
              -->|Land|Ocean = {{{farm}}}<!--
              -->|#default = {{{farm|}}}<!--
          -->}}
        </format>
       </data>
       </data>
       <data source="season">
       <data source="season">
Line 57: 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 source="size">
        <label>Size</label>
      </data>
      <data source="difficulty">
        <label>Difficulty</label>
      </data>
      <data source="pattern">
      <label>Pattern</label>
       </data>
       </data>
       <data source="seed">
       <data source="seed">
Line 100: Line 118:
         <label>[[Enchanting]] value</label>
         <label>[[Enchanting]] value</label>
       </data>
       </data>
       <data source="animal">
       <data source="produced_by">
         <label>Animal</label>
         <label>Produced by</label>
        <format>{{Icon|{{{animal|}}}}}</format>
       </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>
Line 114: Line 209:
         <label>Base</label>
         <label>Base</label>
         <format>{{#switch:{{lc:{{{sell|}}}}}
         <format>{{#switch:{{lc:{{{sell|}}}}}
         | 0 = ''Unsellable''
         |0 = ''Unsellable''
         | #default= {{#if:{{{diff_quality|}}}|{{formatnum:{{{sell|}}}}}|{{c|{{{sell|}}}}}}}
         |#default= {{formatnum:{{{sell|}}}}}
         }}</format>
         }}</format>
       </data>
       </data>
Line 211: Line 306:
         -->|{{Array|{{{season}}}|;|[[Category:{item} crops]]}}<!--
         -->|{{Array|{{{season}}}|;|[[Category:{item} crops]]}}<!--
       -->}}}}<!--
       -->}}}}<!--
   -->|Cooked dish<!-- food
   -->|Cooked dish=<!-- food
       -->= [[Category:{{{type}}}es]]<!--
       --> [[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 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 235: Line 337:
   -->|Others<!--
   -->|Others<!--
       -->= [[Category:{{{type}}}]]<!--
       -->= [[Category:{{{type}}}]]<!--
  -->|#default = [[Category:Pages with wrong input]]<!--
-->}}<!--
  Farm
-->{{#switch:{{{farm}}}<!--
  -->|Land|Ocean=<!-- crops
      -->[[Category:{{{farm}}} crops]]<!--
   -->|#default = [[Category:Pages with wrong input]]<!--
   -->|#default = [[Category:Pages with wrong input]]<!--
-->}}<!--
-->}}<!--
Line 249: Line 357:
-->}}<!--
-->}}<!--
   Animal products
   Animal products
-->{{#if:{{{animal|}}}|<!--
-->{{#if:{{{produced_by|}}}|<!--
   -->{{#switch:{{{animal}}}<!--
   -->{{#switch:{{{produced_by}}}<!--
       -->|Chicken|Duck|Peafowl|Quail = [[Category:{{{animal}}} products]][[Category:Coop products]]<!--
       -->|Chicken|Duck|Peafowl|Quail = [[Category:{{{produced_by}}} products]][[Category:Coop products]]<!--
       -->|Pig|Luwak|Goat|Cow|Llama = [[Category:{{{animal}}} products]][[Category:Barn products]]<!--
       -->|Pig|Luwak|Goat|Cow|Llama|Sheep = [[Category:{{{produced_by}}} products]][[Category:Barn products]]<!--
      -->|#default = [[Category:{{{produced_by}}} products]]<!--
   -->}}<!--
   -->}}<!--
-->}}<!--
-->}}<!--
   Categories<!--
   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 263: 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
   Sorting categories based on journal order
-->{{#switch:{{{type}}}<!--
-->{{#switch:{{{type}}}<!--
Line 272: Line 381:
   -->|#default=<!--
   -->|#default=<!--
   -->}}<!--
   -->}}<!--
-->}}<!--
Necessary new line due to styling issues
Necessary new line due to styling issues
-->
-->
Line 279: Line 389:
--><noinclude>{{Documentation|content=
--><noinclude>{{Documentation|content=
==Example 1==
==Example 1==
{{T|Infobox item
{{Infobox item/Draft
|p1 =mastery      = Diving;7
|name        = Carrot
|p2 =type        = Animal product
|image        = Carrot.png
|p3 =item_group   = Milk; Eggs
|journal_id   = 6
|p4 =journal      = Produce
|farm        = Land
|p5 =season      = Winter; Spring
|type        = Vegetable
|p6 =seed        = Apple sapling
|seed        = Carrot seeds
|p7 =seed_price  = 20
|seed_price  = 35
|p8 =growth      = 9
|rank        = F
|p9 =regrowth    = 3
|growth      = 7
|p10=giant_crop  = yes
|sell         = 78
|p11=wild_seed    = yes
|description  = A brightly colored root vegetable. Very crunchy when raw.
|p12=rank         = B
|season      = Spring
|p13=year        = 2
|size         = 1x1
|p14=building    = Coop;2
|health      = 31
|p15=sell         = 100
|energy      = 33
|p16=health      = 40
|diff_quality = 1
|p17=energy      = 20
}}
|p18=effect      = Drunk
|p19=source      = Foraging;Diving;Farming
|_Y_=1|block=1}}
{{clr}}
{{clr}}
==Example 2==
==Example 2==
{{T|Infobox item
{{Infobox item/Draft
|p1 =type        = Animal product
|name        = Grill
|p2 =item_group  = Milk; Eggs
|image        = Grill.png
|p3 =journal      = Produce
|type        = Cooking utensil
|p4 =season       = Winter; Spring
}}
|p5 =seed         = Apple sapling
{{clr}}
|p6 =seed_price  = 20
 
|p7 =growth      = 9
==Example 3==
|p8 =regrowth    = 3
{{Infobox item/Draft
|p9 =giant_crop  = yes
|name        = Coconut
|p10=wild_seed   = yes
|image        = Coconut.png
|p11=rank         = B
|description  = This plant can be foraged in Spring and made into a cooking oil.
|p12=year        = 2
|journal_id  = 17
|p13=building    = Coop;2
|type        = Scavengeable
|p14=sell         = 100
|item_group  = Coconut; Fruit
|p15=health       = 40
|source      = Foraging
|p16=energy       = 20
|season      = Spring
|p17=effect      = Drunk
|sell        = 35
|p18=diff_quality = 1
|health      = 36
|_Y_=1|block=1}}
|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>
}}</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