Template:Infobox item: Difference between revisions

From Coral Island Wiki
Jump to navigation Jump to search
(remove display title if title is entered)
(add formatnum)
 
(22 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 32: 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
               -->|Cooking utensil<!-- cooking
Line 99: Line 100:
       <data source="enchanting">
       <data source="enchanting">
         <label>[[Enchanting]] value</label>
         <label>[[Enchanting]] value</label>
      </data>
      <data source="produced_by">
        <label>Produced by</label>
        <format>{{Icon|{{{produced_by|}}}|note={{#if:{{{produced_note|}}}|{{{produced_note|}}}}}}}</format>
       </data>
       </data>
       <data source="source">
       <data source="source">
Line 110: Line 115:
         <label>Base</label>
         <label>Base</label>
         <format>{{#switch:{{lc:{{{sell|}}}}}
         <format>{{#switch:{{lc:{{{sell|}}}}}
         | 0 = ''Unsellable''
         |0 = ''Unsellable''
         | #default= {{#if:{{{diff_quality|}}}|{{formatnum:{{{sell|}}}}}|{{g|{{{sell|}}}}}}}
         |#default= {{formatnum:{{{sell|}}}}}
         }}</format>
         }}</format>
       </data>
       </data>
Line 117: Line 122:
         <label>{{q|1}}</label>
         <label>{{q|1}}</label>
         <default>{{#if:{{{diff_quality|}}}|{{Sell prices|B|{{{sell|}}}}}}}</default>
         <default>{{#if:{{{diff_quality|}}}|{{Sell prices|B|{{{sell|}}}}}}}</default>
        <format>{{formatnum:{{{bronze}}}}}</format>
       </data>
       </data>
       <data source="silver">
       <data source="silver">
         <label>{{q|2}}</label>
         <label>{{q|2}}</label>
         <default>{{#if:{{{diff_quality|}}}|{{Sell prices|S|{{{sell|}}}}}}}</default>
         <default>{{#if:{{{diff_quality|}}}|{{Sell prices|S|{{{sell|}}}}}}}</default>
        <format>{{formatnum:{{{silver}}}}}</format>
       </data>
       </data>
       <data source="gold">
       <data source="gold">
         <label>{{q|3}}</label>
         <label>{{q|3}}</label>
         <default>{{#if:{{{diff_quality|}}}|{{Sell prices|G|{{{sell|}}}}}}}</default>
         <default>{{#if:{{{diff_quality|}}}|{{Sell prices|G|{{{sell|}}}}}}}</default>
        <format>{{formatnum:{{{gold}}}}}</format>
       </data>
       </data>
       <data source="osmium">
       <data source="osmium">
         <label>{{q|4}}</label>
         <label>{{q|4}}</label>
         <default>{{#if:{{{diff_quality|}}}|{{Sell prices|O|{{{sell|}}}}}}}</default>
         <default>{{#if:{{{diff_quality|}}}|{{Sell prices|O|{{{sell|}}}}}}}</default>
        <format>{{formatnum:{{{osmium}}}}}</format>
       </data>
       </data>
     </group>
     </group>
Line 207: Line 216:
         -->|{{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 227: Line 243:
   -->|Fish<!-- fishing
   -->|Fish<!-- fishing
   -->|Misc<!-- misc
   -->|Misc<!-- misc
   -->|Farming<!-- farming stuff
   -->|Farming|Ranch<!-- farming stuff
   -->|Decor<!-- farm decor
   -->|Decor<!-- farm decor
  -->|Others<!--
       -->= [[Category:{{{type}}}]]<!--
       -->= [[Category:{{{type}}}]]<!--
   -->|#default = [[Category:Pages with wrong input]]<!--
   -->|#default = [[Category:Pages with wrong input]]<!--
Line 243: Line 260:
     -->}}<!--
     -->}}<!--
-->}}<!--
-->}}<!--
  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]]<!--
  -->}}<!--
-->}}<!--
-->{{#ifeq:{{{produced_note|}}}|winner|[[Category:Golden animal 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 251: Line 278:
-->{{#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 260: Line 286:
   -->|#default=<!--
   -->|#default=<!--
   -->}}<!--
   -->}}<!--
-->}}<!--
Necessary new line due to styling issues
Necessary new line due to styling issues
-->
-->
Line 265: Line 292:


Examples
Examples
--><noinclude>{{Documentation|content=
--><noinclude>{{Documentation|Type=Infobox}}</noinclude>
==Example 1==
{{T|Infobox item
|p1 =mastery      = Diving;7
|p2 =type        = Animal product
|p3 =item_group  = Milk; Eggs
|p4 =journal      = Produce
|p5 =season      = Winter; Spring
|p6 =seed        = Apple sapling
|p7 =seed_price  = 20
|p8 =growth      = 9
|p9 =regrowth    = 3
|p10=giant_crop  = yes
|p11=wild_seed    = yes
|p12=rank        = B
|p13=year        = 2
|p14=building    = Coop;2
|p15=sell        = 100
|p16=health      = 40
|p17=energy      = 20
|p18=effect      = Drunk
|p19=source      = Foraging;Diving;Farming
|_Y_=1|block=1}}
{{clr}}
==Example 2==
{{T|Infobox item
|p1 =type        = Animal product
|p2 =item_group  = Milk; Eggs
|p3 =journal      = Produce
|p4 =season      = Winter; Spring
|p5 =seed        = Apple sapling
|p6 =seed_price  = 20
|p7 =growth      = 9
|p8 =regrowth    = 3
|p9 =giant_crop  = yes
|p10=wild_seed    = yes
|p11=rank        = B
|p12=year        = 2
|p13=building    = Coop;2
|p14=sell        = 100
|p15=health      = 40
|p16=energy      = 20
|p17=effect      = Drunk
|p18=diff_quality = 1
|_Y_=1|block=1}}
}}</noinclude>

Latest revision as of 05:21, 21 April 2024

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

Example 1

Example 2

Example 3