Template:Item recipe: Difference between revisions

From Space Station 14 Wiki
Aliser (talk | contribs)
wip
Aliser (talk | contribs)
mat only mode param visibility & default fix
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><!--
<includeonly>{{#invoke: Item recipe|generate_item_recipe}}</includeonly><noinclude>
--><templatestyles src="Template:Item recipe/styles.css" /><!--
 
# template arguments are all passed to this method
-->{{#invoke: Item recipe|generate_item_recipe}}</includeonly><noinclude>
{{docs|bb=
{{docs|bb=
{{uses lua|Item recipe}}
{{uses lua|Item recipe}}
Line 9: Line 5:
}}
}}


{{item recipe|satchel of holding}}
[[Category:Recipe templates]]
{{item recipe|bluespace beaker|10}}
[[Category:Template starter-kit]]
{{item recipe|force gun|materials only=1}}
{{item recipe|satchel of holding|lay=vertical}}
{{item recipe|force gun|lay=vertical|materials only=1}}
 
<templatedata>
<templatedata>
{
{
Line 26: Line 18:
},
},
"2": {
"2": {
"label": "Amount",
"label": "Amount multiplier",
"description": "Amount of items to adjust the recipe for.",
"description": "How many times to repeat the recipe? Will adjust the recipe costs, duration and product amounts.",
"type": "number",
"type": "number",
"default": "1",
"default": "1",
Line 38: Line 30:
"suggestedvalues": [
"suggestedvalues": [
"autolathe",
"autolathe",
"protolathe"
"protolathe",
"uniform printer",
"circuit imprinter",
"exosuit fabricator",
"medical techfab",
"biocube fabricator",
"security techfab",
"ore processor",
"industrial ore processor",
"sheet-meister 2000",
"cutter machine",
"biogenerator"
],
],
"suggested": true,
"suggested": true,
"example": "lathe"
"example": "lathe"
},
},
"layout": {
"materials only": {
"aliases": [
"mat only"
],
"label": "Materials only mode",
"description": "If set, only the recipe materials will be rendered, as opposed to also rendering both the product and the method by default.",
"type": "boolean",
"autovalue": "0",
"suggested": true
},
"materials only layout": {
"aliases": [
"aliases": [
"lay"
"mat only layout"
],
],
"label": "Layout",
"label": "Materials only mode",
"description": "How to layout the recipe?",
"description": "When in materials only mode, how to lay out the materials?",
"type": "line",
"type": "line",
"suggestedvalues": [
"suggestedvalues": [
Line 56: Line 69:
"hor"
"hor"
],
],
"default": "horizontal",
"default": "vertical",
"suggested": true
"suggested": true
},
},
"materials only": {
"blocky": {
"aliases": [
"label": "Block formatting",
"mat only"
"description": "If enabled, the recipe box will be formatted as a block, resulting in a vertical stacking of recipes if there are multiple of them. By default, recipe boxes are formatted inline.",
],
"label": "Materials only",
"description": "If set, only the recipe materials will be rendered, as opposed to also rendering both the product and the method by default.",
"type": "boolean",
"type": "boolean",
"default": "0"
"autovalue": "0",
"suggested": true
}
}
},
},
Line 73: Line 84:
"2",
"2",
"3",
"3",
"layout",
"materials only",
"materials only"
"materials only layout",
"blocky"
]
]
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Latest revision as of 12:50, 9 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:

Examples

Basic

{{item recipe|small-capacity power cell}}

Small-capacity power cell [1]
Autolathe
steel [1]plastic [0.5]
1 sec.

Non-default recipes

Not all recipes are available by default.

Non-default recipes will have a note attached, specifying the means of getting said recipe.

Researchable recipes

Recipes that need to be researched first to manufacture.

{{item recipe|satchel of holding}}

Satchel of holding [1]
Protolathe
This recipe is unlocked by research
steel [20]silver bar [7.5]uranium [1.5]plasma [15]
5 sec.

Emagged recipes

Recipes that can only be accessed by EMAGging a machine.

{{item recipe|combat knife|1|autolathe}}

Lua error in Module:Item_recipe at line 625: failed to generate a recipe for item: no production methods were found for recipe ID 'CombatKnife' (input query: 'combat knife') matching input method 'autolathe'. Make sure a recipe exists for this item with the specified production method or define a product override for an existing recipe with the specified production method in Module:Item recipe.

Researchable emagged recipes

Recipes that can only be accessed by researching and then EMAGging a machine.

{{item recipe|x-ray cannon|1|protolathe}}

X-ray cannon [1]
Protolathe
This recipe is unlocked by researchThis recipe is unlocked by EMAG
steel [15]plastic [2.5]glass [5]gold bar [2.5]
5 sec.
This recipe is unlocked by EMAG after it has been researched

Materials-only mode

Renders only the materials, without header or notes.

{{item recipe|Jaws of life|materials only=1}}

glass [5]plastic [0.5]plasma [3]gold bar [0.5]steel [10]

Materials-only mode layout

Allows to change how materials are layed out.

Vertical

The default.

Horizontal

{{item recipe|Jaws of life|materials only=1|materials only layout=horizontal}}

glass [5]plastic [0.5]plasma [3]gold bar [0.5]steel [10]

List of recipes by method

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Item1

Item name, ID or alias. Any casing is allowed for name/alias, but not for ID. Do not pass {{item}} here.

Example
lathe
Linerequired
Amount multiplier2

How many times to repeat the recipe? Will adjust the recipe costs, duration and product amounts.

Default
1
Numbersuggested
Method3

Item production method. Use to differentiate between multiple recipes for a single item, if it has multiple.

Suggested values
autolathe protolathe uniform printer circuit imprinter exosuit fabricator medical techfab biocube fabricator security techfab ore processor industrial ore processor sheet-meister 2000 cutter machine biogenerator
Example
lathe
Linesuggested
Materials only modematerials only mat only

If set, only the recipe materials will be rendered, as opposed to also rendering both the product and the method by default.

Auto value
0
Booleansuggested
Materials only modematerials only layout mat only layout

When in materials only mode, how to lay out the materials?

Suggested values
vertical ver horizontal hor
Default
vertical
Linesuggested
Block formattingblocky

If enabled, the recipe box will be formatted as a block, resulting in a vertical stacking of recipes if there are multiple of them. By default, recipe boxes are formatted inline.

Auto value
0
Booleansuggested