Template:Recipe

Generates recipe tables. Use this wherever you need to show how to use Goods, Services, or Buildings.

Overview
Create a concise, sortable table using game data to show in-game recipes. The table mimics the layout of the in-game recipe browser, with the building, efficiency of the recipe, number of ingredients, and the product (or service). Optionally, outputs just a list of buildings (or products or services at a building) with their efficiency stars.

Links to Resource Pages
Links within the table point to the product's or service's page and the anchor corresponding to its location in the table. Goods in ingredients columns will point to the recipes where that good is a product, so you can see where it comes from. Goods in the product column will point to the recipes where that good is an ingredient, so you can see where it can be used.

Parameters
At least one of these is required. If the names provided are not spelled correctly (including punctuation), matching their in-game names, the recipe will return an error.

Errors
When a product, service, building, or ingredient is not spelled correctly or is not a valid name, the template returns an error message to help you locate the spelling or name mistake.

Example:

Broken:

Fixed:

There may be cases where the name you should use to look up a good or building is not the right name. Please post these to this template's discussion page.

Basic Usage for Products and Buildings
A standard use of the template to show exactly one recipe for a product or service, in one building:

Yields:

Alternatively, for a service building:

Yields:

Here are several ways to call the template for products and buildings.

Ingredients
Unlike when specifying the product (or service) and/or building, when you specify the ingredient, you explicitly must name the parameter with  in the template. Currently, you cannot select both a product and an ingredient (for example, all recipes where Berries are the ingredient and Pie is the product), because this is redundant with the product parameter by itself (since there is currently only one arrangement of ingredients and options that will make a product).

The results of specifying the ingredient without also filtering on a building can display a long table. But on a resource's page, this information is expected to be valuable.

Yields:

Yields:

Further Examples and Errors
The following are generated by calling the template as shown in the parameter examples table above.

1. product and building:

Yields:

2. product only

Yields:

3. building only

Yields:

4. with the output override

Yields:

5 with the output override but specifying a building

Yields:

The following are error states generated by calling the template incorrectly.

6. with no parameters

Yields:

7. using only one pipe and not specifying that the provided name is the building

Yields:

8. asking for products or buildings with no recipes

Yields: