Jump to: navigation, search

Template:Crafting usage/doc

< Template:Crafting usage
Revision as of 14:24, 6 April 2014 by Mastergalen (talk | contribs) (Created page with "<!-- Documentation here --> This template automatically populates the "As a crafting ingredient" section of pages by retrieving recipes from other pages which use it as an ing...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template automatically populates the "As a crafting ingredient" section of pages by retrieving recipes from other pages which use it as an ingredient.

Only pages which are in Category:Recipe using <ingredient> (category list) are searched for recipes. Only recipes using {{crafting}} are used.

The recipes are preprocessed by Template:Crafting DPL before being displayed on the page.

Usage

  • {{{1}}}: is used to control which category to look through and which ingredient it is looking for, this defaults to the page name.
  • {{{match}}}: how exact the ingredient match should be, the default being an exact match.
    • start means the start of the ingredient has to exactly match. E.g: "Redstone" will match "Redstone Torch", "Redstone Block", "Redstone", etc.; but not "Block of Redstone", "Some Redstone thing", etc.
    • end means the end of the ingredient has to exactly match. E.g: "Redstone" will match "Block of Redstone", "Redstone", etc.; but not "Redstone Block", "Some Redstone thing", etc.
    • any means the ingredient can be found anywhere within the name. E.g: "Redstone" will match "Block of Redstone, "Redstone", "Redstone Block", "Some Redstone thing", etc.; but not "Red stone", "Block of Reddishstone", etc.
  • {{{category}}}: look through a different category from the ingredient name, defaults to {{{1}}}
  • {{{ignore}}}: a regex string of pages to ignore, without namespace and with spaces replaced with underscores. Pipe characters have to be replaced with ¦.
  • {{{description}}}: if set, the description column will be shown.
  • {{{continue}}}: if set, the table will not be ended, allowing additional recipes to be manually added to it, same as with normal {{crafting}} usage, the last recipe must have {{{foot}}} set. This is really just a stopgap for if the template somehow misses some recipes.
  • {{{debug}}}: if set, shows which page the recipe was retrieved from in the name column.

Since the template technically searches the whole page for {{crafting}} usage, it can pick up recipes from anywhere on the page, such as the "As a crafting ingredient" section of pages which haven't be changed to use this template, thus always look through the list of recipes to make sure there are no duplicate or missing recipes before saving. Once every page uses this template, this will happen far less.

In addition to using the ignore argument here, {{{ignoreusage}}} can be added to {{crafting}} recipes which should be ignored by this template.

If not all frames of an animation is used, any value set in the name or ingredients arguments will be removed.

Example

[edit]





Cookies help us deliver our services. By using our services, you agree to our use of cookies.