Template:Item infobox: Difference between revisions

From Space Station 14 Wiki
Aliser (talk | contribs)
fixed multiple categories display; autolink categories; updated categories param desc
Aliser (talk | contribs)
fix kind
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><templatestyles src="Template:Item infobox/styles.css"></templatestyles><!--
<includeonly><templatestyles src="Template:Item infobox/styles.css"></templatestyles><!--
-->{{reset solution count}}<!--


-->{{#invoke:Infobox|main
-->{{#invoke:Infobox|main
|kind=role
|kind=item
|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, Weapon, Food, Processing, Chemical composition, Technical Information


|Main=Categories, Type, Max stack, Size, Meow, Internal Size
|Main=Categories, Type, Max stack, Size, Meow, Internal Size
|Main_nolabel = yes
|Main_nolabel = yes
|Categories = <ul>{{#invoke:params|with_name_matching|category|plain|for_each<!--
|Categories = <ul>{{#invoke:params|with_name_matching|category|plain|for_each<!--
     -->|<li>[[$@]][[Category:$@]]</li><!--
     -->|<li>{{catt|$@}}[[Category:$@]]</li><!--
-->}}</ul>
-->}}</ul>
|Categories_class = flat-bullet-list
|Categories_class = flat-bullet-list
Line 20: Line 23:
|Meow = {{{meoow|}}}
|Meow = {{{meoow|}}}
|Internal Size = {{{internal size|}}}
|Internal Size = {{{internal size|}}}
|Weapon = Fire mode, Wieldable, Damage, Fire rate, Range, Spread, Projectile prototype, Projectile speed, Projectile lifetime, Auto-recharge, Auto-recharge rate, Internal magazine, Internal magazine capacity
|Fire mode = {{{fire mode|}}}
|Wieldable = {{#ifeq: {{yesno|{{{wieldable|}}}}}|yes|{{colored text|chartreuse|'''Yes'''}}<!---->}}
|Damage = {{{damage|}}}
|Damage_class = flat-bullet-list
|Fire rate = {{{fire rate|}}}
|Range = {{{range|}}}
|Spread = {{{spread|}}}
|Spread_class = flat-bullet-list
|Projectile prototype = {{{projectile proto|}}}
|Projectile speed = {{{projectile speed|}}}
|Projectile lifetime = {{{projectile lifetime|}}}
|Auto-recharge = {{#ifeq: {{yesno|{{{auto recharge|}}}}}|yes|{{colored text|chartreuse|'''Yes'''}}<!---->}}
|Auto-recharge rate = {{{auto recharge rate|}}}
|Internal magazine = {{#ifeq: {{yesno|{{{internal magazine|}}}}}|yes|{{colored text|chartreuse|'''Yes'''}}<!---->}}
|Internal magazine capacity = {{{internal magazine capacity|}}}
|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
Line 28: Line 64:
-->[[Category:Items]]</includeonly><noinclude>
-->[[Category:Items]]</includeonly><noinclude>
{{docs|bb=
{{docs|bb=
{{uses lua|Item infobox}}
{{uses template styles}}
{{uses template styles}}
{{template populates categories|Items|<category>}}
{{template populates categories|Items|<category>}}
Line 134: Line 171:
"category 8": {
"category 8": {
"label": "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
},
"damage": {
"label": "[WEAPON] Damage",
"example": "{{blunt|25}} (single type of damage) | * {{blunt|10}} * {{poison|10}} (multiple types; use multiple lines)",
"type": "string",
"suggested": true
},
"fire rate": {
"label": "[WEAPON] Fire rate",
"description": "Shots per second",
"example": "5 shots/sec",
"type": "string",
"suggested": true
},
"range": {
"label": "[WEAPON] Range",
"description": "Range in tiles.",
"example": "3 tiles",
"type": "string",
"suggested": true
},
"fire mode": {
"label": "[WEAPON] Fire mode",
"type": "line",
"suggestedvalues": [
"Semi-auto",
"Burst",
"Full-auto"
],
"suggested": true
},
"wieldable": {
"label": "[WEAPON] Can be wielded?",
"type": "boolean",
"autovalue": "0",
"suggested": true
},
"spread": {
"label": "[WEAPON] Spread",
"description": "Spread when shooting, in degrees.",
"type": "string",
"example": "30° (5° wielded)",
"suggested": true
},
"auto recharge": {
"label": "[WEAPON] Auto recharge?",
"description": "Whether the weapon recharges by itself.",
"type": "boolean",
"autovalue": "0",
"suggested": true
},
"auto recharge rate": {
"label": "[WEAPON] Auto recharge rate",
"description": "Rate of auto recharge, if any.",
"example": "0.8 bullets/sec",
"type": "line",
"suggested": true
},
"internal magazine": {
"label": "[WEAPON] Has internal magazine?",
"description": "Does the weapon has an internal unequipable magazine?",
"type": "boolean",
"autovalue": "0",
"suggested": true
},
"internal magazine capacity": {
"label": "[WEAPON] Internal magazine capacity",
"example": "1 bullet",
"type": "line",
"suggested": true
},
"projectile proto": {
"label": "[WEAPON] Projectile prototype",
"example": "{{c|BulletKinetic}}",
"type": "line",
"suggested": true
},
"projectile speed": {
"label": "[WEAPON] Projectile speed",
"example": "1.5 tiles/sec",
"type": "string",
"suggested": true
},
"projectile lifetime": {
"label": "[WEAPON] Projectile lifetime",
"description": "Does the projectile despawns after a certain time?",
"example": "1.5 seconds",
"type": "line",
"type": "line",
"suggested": true
"suggested": true
Line 141: Line 321:
"title",
"title",
"image",
"image",
"caption",
"category 1",
"category 1",
"category 2",
"category 2",
Line 150: Line 331:
"category 8",
"category 8",
"type",
"type",
"edible by reptilians",
"edible by moths",
"edible by rest",
"grindable",
"juiceable",
"fire mode",
"wieldable",
"damage",
"fire rate",
"range",
"spread",
"projectile proto",
"projectile speed",
"projectile lifetime",
"auto recharge",
"auto recharge rate",
"internal magazine",
"internal magazine capacity",
"max stack",
"max stack",
"size",
"size",
"internal size",
"internal size",
"solution capacity",
"solution",
"id"
"id"
],
],

Latest revision as of 21:23, 15 May 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
[WEAPON] Fire modefire mode

no description

Suggested values
Semi-auto Burst Full-auto
Linesuggested
[WEAPON] Can be wielded?wieldable

no description

Auto value
0
Booleansuggested
[WEAPON] Damagedamage

no description

Example
{{blunt|25}} (single type of damage) | * {{blunt|10}} * {{poison|10}} (multiple types; use multiple lines)
Stringsuggested
[WEAPON] Fire ratefire rate

Shots per second

Example
5 shots/sec
Stringsuggested
[WEAPON] Rangerange

Range in tiles.

Example
3 tiles
Stringsuggested
[WEAPON] Spreadspread

Spread when shooting, in degrees.

Example
30° (5° wielded)
Stringsuggested
[WEAPON] Projectile prototypeprojectile proto

no description

Example
{{c|BulletKinetic}}
Linesuggested
[WEAPON] Projectile speedprojectile speed

no description

Example
1.5 tiles/sec
Stringsuggested
[WEAPON] Projectile lifetimeprojectile lifetime

Does the projectile despawns after a certain time?

Example
1.5 seconds
Linesuggested
[WEAPON] Auto recharge?auto recharge

Whether the weapon recharges by itself.

Auto value
0
Booleansuggested
[WEAPON] Auto recharge rateauto recharge rate

Rate of auto recharge, if any.

Example
0.8 bullets/sec
Linesuggested
[WEAPON] Has internal magazine?internal magazine

Does the weapon has an internal unequipable magazine?

Auto value
0
Booleansuggested
[WEAPON] Internal magazine capacityinternal magazine capacity

no description

Example
1 bullet
Linesuggested
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