Template:Infobox literature: Difference between revisions
(added up to 5 alternate images, increased infobox width, added "image_width" parameter for custom title image sizes) |
(added volumes (up to 4 for item ID) |
||
Line 29: | Line 29: | ||
| data3 = {{{weight|}}} | | data3 = {{{weight|}}} | ||
| label6 = | | label6 = Skills learnt | ||
| data6= {{{recipes|}}} | | data6= {{{recipes|{{{learnt|}}}}}} | ||
| label8 = Map | | label8 = Map | ||
Line 43: | Line 43: | ||
| label11 = Number of pages | | label11 = Number of pages | ||
| data11 = {{#if: {{{page_number|}}}|{{{page_number}}} pages}} | | data11 = {{#if: {{{page_number|}}}|{{{page_number}}} pages}} | ||
| label12 = Number of volumes | |||
| data12 = {{#if: {{{volume_number|{{{vol_number|}}}}}}|{{{volume_number|{{{vol_number}}}}}} volumes}} | |||
| header16 = {{#if:{{{unhappy_change|{{{boredom_change|{{{stress_change|}}}}}}}}}|Effect}} | | header16 = {{#if:{{{unhappy_change|{{{boredom_change|{{{stress_change|}}}}}}}}}|Effect}} | ||
Line 57: | Line 60: | ||
| header31 = Technical details | | header31 = Technical details | ||
| label32 = Base ID | | label32 = Base ID {{#if:{{{class_name2|}}}|<small>(Vol. 1)</small>}} | ||
| data32 = {{#if:{{{no_style|true}}}|{{ID|{{{class_name|[[#Item IDs|Item IDs]]}}}}}|{{{class_name|[[#Item IDs|Item IDs]]}}}}} | | data32 = {{#if:{{{no_style|true}}}|{{ID|{{{class_name|[[#Item IDs|Item IDs]]}}}}}|{{{class_name|[[#Item IDs|Item IDs]]}}}}} | ||
| label33 = Base ID <small>(Vol. 2)</small> | |||
| data33 = {{#if:{{{class_name2|}}}|{{#if:{{{no_style|true}}}|{{ID|{{{class_name2|}}}}}|{{{class_name2|}}}}}}} | |||
| label34 = Base ID <small>(Vol. 3)</small> | |||
| data34 = {{#if:{{{class_name3|}}}|{{#if:{{{no_style|true}}}|{{ID|{{{class_name3|}}}}}|{{{class_name3|}}}}}}} | |||
| label35 = Base ID <small>(Vol. 4)</small> | |||
| data35 = {{#if:{{{class_name4|}}}|{{#if:{{{no_style|true}}}|{{ID|{{{class_name4|}}}}}|{{{class_name4|}}}}}}} | |||
}}</includeonly><noinclude>{{Documentation}}[[Category:Infobox]]</noinclude> | }}</includeonly><noinclude>{{Documentation}}[[Category:Infobox]]</noinclude> |
Revision as of 11:25, 31 July 2021
This infobox is used to create an infobox in an article about food items.
Usage
To use this template in an article, copy the template below, then paste the template into an article.
All parameters are optional – those you do not populate with data will not show up in the infobox when the article is saved.
It is strongly advised to only include variables that are relevant to the specific item in question, i.e., parameters that do not display as false or 0.
display_name | ||||||
---|---|---|---|---|---|---|
| ||||||
General | ||||||
Category | category | |||||
Weight | weight | |||||
Skills learnt | recipes | |||||
Map | map | |||||
Consumed | consumed | |||||
Writable | writable | |||||
Number of pages | page_number pages | |||||
Number of volumes | vol_number volumes | |||||
Effect | ||||||
Unhappiness | unhappy_change | |||||
Boredom | boredom_change | |||||
Stress | stress_change | |||||
Technical details | ||||||
Base ID | Item IDs |
{{Infobox literature |name = |image= |image_width= |alternate_image= |alternate_name= |alternate_link= |alternate_image2= |alternate_name2= |alternate_link2= |alternate_image3= |alternate_name3= |alternate_link3= |alternate_image4= |alternate_name4= |alternate_link4= |alternate_image5= |alternate_name5= |alternate_link5= |alternate_image6= |alternate_name6= |alternate_link6= |alternate_image7= |alternate_name7= |alternate_link7= |alternate_image8= |alternate_name8= |alternate_link8= |alternate_image9= |alternate_name9= |alternate_link9= |alternate_image10= |alternate_name10= |alternate_link10= |alternate_image11= |alternate_name11= |alternate_link11= |alternate_image12= |alternate_name12= |alternate_link12= |alternate_image13= |alternate_name13= |alternate_link13= |alternate_image14= |alternate_name14= |alternate_link14= |alternate_image15= |alternate_name15= |alternate_link15= |alternate_image16= |alternate_name16= |alternate_link16= <!--GENERAL--> |category= |weight= |map= |consumed= |writable= |page_number= |vol_number= <!--EFFECT--> |unhappy_change= |boredom_change= |stress_change= |recipes= <!--TECHNICAL DETAILS--> |item_id = }}
Parameters
Heading/Image
- display_name
- The display name of the item as it appears in-game. Leaving blank will display the pagename.
- name_colour
- The background colour for the display name. Codes can be found at Template:Infobox nc.
- name_text_colour
- The text colour for the display name. Codes can be found at Template:Infobox nc.
- image
- Image of the model.
- image_width
- Width of the image model. Default: 128px
- alternate_image
- An alternate image displayed at 32px. Can be an empty, packaged, open or any other variant.
- alternate_name
- The name of the alternate item image. Leaving blank will display no name when the image is hovered over.
- alternate_link
- An optional link to the alternate image page. Leaving blank will have no link.
General
- weight
- The base weight of the item.
- category
- The in-game category the item is displayed in in the inventory.
- recipes
- The recipes taught by this item. (remove if value is false)
- skill_book
- Whether this item is a skill book. (remove if value is false)
- consumed
- Whether this item is consumed once used. (remove if value is false)
- writable
- Whether this item can be written/annotated with a pen or pencil. (remove if value is false)
- page_number
- The number of pages in this item. (remove if value is empty)
- vol_number
- The number of volumes in this series. (remove if value is empty)
Effect
- unhappy_change
- The value of unhappiness that is changed from using/consuming this item. (remove if value is empty)
- boredom_change
- The value of boredom that is changed from using/consuming this item. (remove if value is empty)
- stress_change
- The value of stress that is changed from using/consuming this item. (remove if value is empty)
Technical details
- class_name
- The item's class name.
Examples
Book infobox
Book | |
---|---|
General | |
Category | Literature |
Weight | 0.5 |
Consumed | True |
Effect | |
Unhappiness | -40 |
Boredom | -50 |
Stress | -40 |
Technical details | |
Base ID | Item IDs |
{{Infobox literature |name =Book |image=Book.png |category=Literature |weight=0.5 |consumed=True |unhappy_change=-40 |boredom_change=-50 |stress_change=-40 |item_id =Base.Book }}
Skill Book infobox
Metalwork for Beginners | |
---|---|
General | |
Category | Literature |
Weight | 0.8 |
Number of pages | 220 pages |
Technical details | |
Base ID | Item IDs |
{{Infobox literature |name =Metalwork for Beginners |image=Book7.png |category=literature |weight=0.8 |skill_trained=[[Metalworking]] |page_number=220 |item_id =Base.BookMetalWelding1 }}
The Farming Magazine infobox
The Farming Magazine | ||
---|---|---|
| ||
General | ||
Category | Literature | |
Weight | 0.1 | |
Skills learnt |
Make Mildew Cure Make Flies Cure | |
Consumed | False | |
Number of volumes | 1 volumes | |
Technical details | ||
Base ID | Item IDs |
{{Infobox literature |name =The Farming Magazine |image=Model Magazine.png |image_width=200px |alternate_image=MagazineFish.png |alternate_name=The Farming Magazine |alternate_link= <!--GENERAL--> |category=Literature |weight=0.1 |consumed=False |vol_number=1 <!--EFFECT--> |recipes=Make [[Mildew Spray|Mildew Cure]]<br>Make [[Insecticide Spray|Flies Cure]] <!--TECHNICAL DETAILS--> |item_id =Base.FarmingMag1 }}
Map infobox
March Ridge Map | |
---|---|
General | |
Category | Item |
Weight | 0.1 |
Writable | True |
Technical details | |
Base ID | Item IDs |
{{Infobox literature |name =March Ridge Map |image=Map.png |category=Item |weight=0.1 |writable=True |item_id =Base.MarchRidgeMap }}
Journal infobox
Journal | |
---|---|
General | |
Category | Literature |
Weight | 0.1 |
Writable | True |
Number of pages | 20 pages |
Technical details | |
Base ID | Item IDs |
{{Infobox literature |name =Journal |image=Notebook.png |category=Literature |weight=0.1 |writable=True |page_number=20 |item_id =Base.Journal }}
Editors can experiment in this template's sandbox (create)