Template:Recipe/doc

From Against the Storm Official Wiki
Revision as of 23:19, 12 February 2023 by Aeredor (talk | contribs) (separated the documentation page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template calls renderRecipe in Module:RenderRecipe to get recipes for a product and/or a building. This will generate a new wikitable full of content from the game: buildings, stars of efficiency, ingredients, and products.

This template standardizes the display of recipes throughout this wiki and greatly simplifies the amount of writing that is necessary when adding new content pages, especially for resources and buildings.


Usage

The table will contain exactly one recipe if the template is given both a product and building. The table will (usually) contain more than one row if the template is given either a product or a building. If nothing is provided, for example {{Recipe}}, an error will appear instead.

Here are ways to call the template, as they would be written in the article calling the template:

Argument Examples Expected outcome
None {{Recipe}} An error
Product and building {{Recipe|Crystalized Dew|Brickyard}}
{{Recipe|product=Crystalized Dew|building=Brickyard}}
A table with one row.
Product only {{Recipe|Pie}}
{{Recipe|product=Pie}}
A table with several rows, one for each building in which Pie can be produced.
Building only {{Recipe||Scribe}} (note the double pipe)
{{Recipe|building=Scribe}}
A table with several rows, one for each product that can be produced in the Scribe.


Examples

The following are generated by calling the template, as shown in the examples in the table above.

{{Recipe}} yields:

[Recipe needs at least a product, building, or ingredient]


{{Recipe|Crystalized Dew|Brickyard}} yields:

1 Recipe for Crystalized Dew in the Brickyard
Building Grade Ingredient #1 Ingredient #2 Ingredient #3 # Product
Brickyard ★
0:42
3 Herbs Herbs
3 Insects Insects
3 Resin Resin
3 Vegetables Vegetables
3 Algae Algae
4 Stone Stone
4 Clay Clay
3 Salt Salt
10 Storm Water Storm Water
14 Clearance Water Clearance Water
18 Drizzle Water Drizzle Water
2 Crystalized Dew


{{Recipe|Pie}} yields:

5 Recipes for Pie
Buildings Grade Ingredient #1 Ingredient #2 # Product
Flawless Smelter Flawless Smelter ★★★
1:45
6 Flour Flour
3 Herbs Herbs
3 Meat Meat
3 Insects Insects
3 Berries Berries
3 Fish Fish
10 Pie
Bakery Bakery
Furnace Furnace
Pantry Pantry
★★
2:06
6 Flour Flour
4 Herbs Herbs
4 Meat Meat
4 Insects Insects
4 Berries Berries
4 Fish Fish
10 Pie
Smelter Smelter ★
2:06
6 Flour Flour
5 Herbs Herbs
5 Meat Meat
5 Insects Insects
5 Berries Berries
5 Fish Fish
10 Pie


{{Recipe||Scribe}} yields:

3 Recipes in the Scribe
Buildings Grade Ingredient #1 Ingredient #2 # Product
Scribe ★
2:06
6 Grain Grain
6 Roots Roots
3 Pottery Pottery
2 Barrels Barrels
3 Waterskins Waterskins
10 Ale Ale
Scribe ★★
0:42
—
6 Dye Dye
6 Oil Oil
4 Flour Flour
4 Pottery Pottery
4 Barrels Barrels
4 Waterskins Waterskins
2 Pack of Trade Goods Pack of Trade Goods
Scribe ★★★
1:03
2 Leather Leather
2 Plant Fiber Plant Fiber
6 Wood Wood
1 Dye Dye
1 Wine Wine
8 Scrolls Scrolls