Template:Item infobox: Difference between revisions

From Space Station 14 Wiki
Aliser (talk | contribs)
added an id field
Aliser (talk | contribs)
automatic solution total
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#invoke:Infobox|main
<includeonly><templatestyles src="Template:Item infobox/styles.css"></templatestyles><!--
 
-->{{reset solution count}}<!--
 
-->{{#invoke:Infobox|main
|kind=role
|kind=role
|sep=,
|sep=,
|title={{{title|}}}
|title={{{title|}}}
|image={{#if:{{{image|{{{img|}}}}}}|[[File:{{{image|{{{img}}}}}}|250px]]}}
|image={{#if:{{{image|{{{img|}}}}}}|[[File:{{{image|{{{img}}}}}}|250px]]}}
|sections=Main, Technical Information
|caption={{{caption|}}}
|sections=Main, Food, Processing, Chemical composition, Technical Information


|Main=Category, Type, Max stack, Size, Meow, Internal Size
|Main=Categories, Type, Max stack, Size, Meow, Internal Size
|Main_nolabel = yes
|Main_nolabel = yes
|Category = {{{category|}}}
|Categories = <ul>{{#invoke:params|with_name_matching|category|plain|for_each<!--
    -->|<li>{{catt|$@}}[[Category:$@]]</li><!--
-->}}</ul>
|Categories_class = flat-bullet-list
|Type = {{{type|}}}
|Type = {{{type|}}}
|Max stack = {{{max stack|}}}
|Max stack = {{{max stack|}}}
|Size = {{{size|}}}
|Size = {{{size|}}}
|Size_class = flat-bullet-list list-gap-medium
|Meow = {{{meoow|}}}
|Meow = {{{meoow|}}}
|Internal Size = {{{internal size|}}}
|Internal Size = {{{internal size|}}}
|Food = Edible by:
|Edible by: = {{#invoke:Item infobox|generate_edible_by}}
|Processing = Grindable, Juiceable
|Grindable = {{#ifeq: {{yesno|{{{grindable|}}}}}|yes|Yes}}
|Grindable_label = {{Tooltip|Grindable|Can be grinded in a grinder.}}
|Juiceable = {{#ifeq: {{yesno|{{{juiceable|}}}}}|yes|Yes}}
|Juiceable_label = {{Tooltip|Juiceable|Can be juiced in a grinder.}}
|Chemical composition=Capacity, Solution
|Capacity = {{{solution capacity|}}}
|Solution = {{#if: {{{solution|}}}
    |{{{solution}}}<br><br>'''Total: {{solution count}}u'''
}}
|Solution_class = flat-bullet-list


|Technical Information = ID
|Technical Information = ID
|ID = {{{id|}}}
|ID = {{{id|}}}
|ID_class = flat-bullet-list list-gap-medium
}}<!--
}}<!--


-->[[Category:Items]]<!--
-->[[Category:Items]]</includeonly><noinclude>
-->{{#if: {{{category|}}}|[[Category:{{{category}}} items]]}}</includeonly><noinclude>
{{docs|bb=
{{docs|bb=
{{template populates categories|Items|<category> items}}
{{uses lua|Item infobox}}
{{uses template styles}}
{{template populates categories|Items|<category>}}
}}
}}


Line 33: Line 60:
"type": "line",
"type": "line",
"required": true,
"required": true,
"example": "Regenerative Mesh"
"example": "Regenerative Mesh",
"description": "{{PAGENAME}} by default, using the title of the page.",
"autovalue": "{{PAGENAME}}"
},
},
"image": {
"image": {
Line 52: Line 81:
"size": {
"size": {
"label": "Size",
"label": "Size",
"description": "How big is this item? (use smaller number first)",
"description": "How big is this item? If it's a predefined size (like 'Large'), use template {{isize|<size>}} to format it. If it's a specific size (like 1x3), specify it as is. If it has multiple sizes (eg a welding tool), specify them in a bullet list (use smaller number first)",
"example": "1x2, 2x4, 1x5,",
"example": "{{isize|Large}} (for predefined sizes) OR 1x2, 2x4, 1x5 (for specific sizes) OR * 1x2 [off] * 4x2 [on]",
"type": "line",
"type": "string",
"suggested": true
},
"category": {
"label": "Category",
"example": "Medical",
"type": "line",
"suggested": true
"suggested": true
},
},
Line 71: Line 94:
"internal size": {
"internal size": {
"label": "Internal size",
"label": "Internal size",
"description": "How big is this item on the inside? For Example, medkits are 3x3 in a backpack but 2x4 on the inside",
"description": "How big is this item on the inside? Use {{infobox storage grid|grid1|grid2|grid3}} from the ingame YML files to define this.",
"example": "2x3, 2x4, 10x8,",
"example": "{{infobox storage grid|0,0,1,3|3,0,6,3|8,0,9,3}} (smugglers satchel)",
"type": "line",
"type": "line",
"suggested": true
"suggested": true
Line 78: Line 101:
"id": {
"id": {
"label": "Item ID",
"label": "Item ID",
"description": "Can be found in .yml files.",
"description": "Can be found in .yml files. If there are multiple IDs, use a bullet list.",
"type": "string",
"suggested": true,
"example": "{{c|BloodPack}} / * {{c|MedkitCombatFilled}} [filled] * {{c|MedkitCombat}} [empty]"
},
"category 1": {
"label": "Category 1",
"example": "Medical",
"type": "line",
"suggested": true,
"description": "Item category. If it has multiple, use other category fields. All specified categories will also be added as categories to the page. DO NOT put links are any formatting here.",
"suggestedvalues": [
"Medical items",
"Satchels",
"Random spawns",
"Syndicate Uplink items"
],
"aliases": [
"category"
]
},
"category 2": {
"label": "Category 2",
"type": "line",
"suggested": true
},
"category 3": {
"label": "Category 3",
"type": "line",
"suggested": true
},
"category 4": {
"label": "Category 4",
"type": "line",
"type": "line",
"suggested": true
},
"category 5": {
"label": "Category 5",
"type": "line",
"suggested": true
},
"category 6": {
"label": "Category 6",
"type": "line",
"suggested": true
},
"category 7": {
"label": "Category 7",
"type": "line",
"suggested": true
},
"category 8": {
"label": "Category 8",
"type": "line",
"suggested": true
},
"solution": {
"label": "Solution composition",
"description": "If an item holds a solution, which chemicals it is composed of? List them using a bullet list, each item starting on a new line.",
"example": "* {{r|nutriment|6}} * {{r|amatoxin|3}} * {{r|vitamin|4}}",
"type": "string",
"suggested": true
},
"solution capacity": {
"label": "Solution capacity",
"description": "If an item can hold a solution, how much can it hold?",
"example": "13u",
"type": "line",
"suggested": true
},
"caption": {
"label": "Image caption",
"type": "line",
"suggested": true
},
"edible by reptilians": {
"label": "[Food] Edible by reptilians",
"description": "If item is food, whether it's edible by reptilians (lizards).",
"type": "boolean",
"suggested": true,
"autovalue": "0"
},
"edible by moths": {
"label": "[Food] Edible by moths",
"description": "If item is food, whether it's edible by moth people (moffs).",
"type": "boolean",
"suggested": true,
"autovalue": "0"
},
"edible by rest": {
"label": "[Food] Edible by everyone else",
"description": "If item is food, whether it's edible by everyone except those in previous \"Edible by X\" parameters.",
"type": "boolean",
"suggested": true,
"autovalue": "0"
},
"grindable": {
"label": "[Processing] Grindable",
"description": "Can be grinded in a grinder?",
"type": "boolean",
"autovalue": "0",
"suggested": true
},
"juiceable": {
"label": "[Processing] Juiceable",
"description": "Can be juiced in a grinder?",
"type": "boolean",
"autovalue": "0",
"suggested": true
"suggested": true
}
}
Line 86: Line 215:
"title",
"title",
"image",
"image",
"category",
"caption",
"category 1",
"category 2",
"category 3",
"category 4",
"category 5",
"category 6",
"category 7",
"category 8",
"type",
"type",
"edible by reptilians",
"edible by moths",
"edible by rest",
"grindable",
"juiceable",
"max stack",
"max stack",
"size",
"size",
"internal size",
"internal size",
"solution capacity",
"solution",
"id"
"id"
],
],
"description": "Infobox templates for roles/jobs.",
"description": "Infobox templates for roles/jobs.",
"format": "inline"
"format": "block"
}
}
</templatedata></noinclude>
</templatedata></noinclude>

Latest revision as of 05:52, 4 April 2025

Template documentation
view or edit this documentation about template documentation
Uses Lua module
This template uses Lua module:
Uses template styles
This template uses template styles found in:
Populates categories
This template will add categories when used:
(though on what conditions — consult with the template itself)

Template:Item infobox/doc

Infobox templates for roles/jobs.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Infobox titletitle

{{PAGENAME}} by default, using the title of the page.

Example
Regenerative Mesh
Auto value
{{PAGENAME}}
Linerequired
Imageimage img

no description

Example
Regenerative Mesh Sprite.png
Filesuggested
Image captioncaption

no description

Linesuggested
Category 1category 1 category

Item category. If it has multiple, use other category fields. All specified categories will also be added as categories to the page. DO NOT put links are any formatting here.

Suggested values
Medical items Satchels Random spawns Syndicate Uplink items
Example
Medical
Linesuggested
Category 2category 2

no description

Linesuggested
Category 3category 3

no description

Linesuggested
Category 4category 4

no description

Linesuggested
Category 5category 5

no description

Linesuggested
Category 6category 6

no description

Linesuggested
Category 7category 7

no description

Linesuggested
Category 8category 8

no description

Linesuggested
Typetype

no description

Example
Advanced topicals, tools, ect
Linesuggested
[Food] Edible by reptiliansedible by reptilians

If item is food, whether it's edible by reptilians (lizards).

Auto value
0
Booleansuggested
[Food] Edible by mothsedible by moths

If item is food, whether it's edible by moth people (moffs).

Auto value
0
Booleansuggested
[Food] Edible by everyone elseedible by rest

If item is food, whether it's edible by everyone except those in previous "Edible by X" parameters.

Auto value
0
Booleansuggested
[Processing] Grindablegrindable

Can be grinded in a grinder?

Auto value
0
Booleansuggested
[Processing] Juiceablejuiceable

Can be juiced in a grinder?

Auto value
0
Booleansuggested
Max Stackmax stack

no description

Example
10, 30, 1
Linesuggested
Sizesize

How big is this item? If it's a predefined size (like 'Large'), use template {{isize|<size>}} to format it. If it's a specific size (like 1x3), specify it as is. If it has multiple sizes (eg a welding tool), specify them in a bullet list (use smaller number first)

Example
{{isize|Large}} (for predefined sizes) OR 1x2, 2x4, 1x5 (for specific sizes) OR * 1x2 [off] * 4x2 [on]
Stringsuggested
Internal sizeinternal size

How big is this item on the inside? Use {{infobox storage grid|grid1|grid2|grid3}} from the ingame YML files to define this.

Example
{{infobox storage grid|0,0,1,3|3,0,6,3|8,0,9,3}} (smugglers satchel)
Linesuggested
Solution capacitysolution capacity

If an item can hold a solution, how much can it hold?

Example
13u
Linesuggested
Solution compositionsolution

If an item holds a solution, which chemicals it is composed of? List them using a bullet list, each item starting on a new line.

Example
* {{r|nutriment|6}} * {{r|amatoxin|3}} * {{r|vitamin|4}}
Stringsuggested
Item IDid

Can be found in .yml files. If there are multiple IDs, use a bullet list.

Example
{{c|BloodPack}} / * {{c|MedkitCombatFilled}} [filled] * {{c|MedkitCombat}} [empty]
Stringsuggested