Template:Crafting

From Cosmoteer Wiki
Jump to navigation Jump to search

This template forms a 'central database' of sorts for crafting recipes. When this template is called, it looks up the relevant recipe, and then passes the data along to the Crafting/Display sub-template which actually draws the table.

Usage is as simple as calling the template, and specifying the output product as a parameter.

By storing all recipes here it is extremely easy to edit them when they are changed by game updates. Instead of having to change the recipe on every page that displays it, it can simply be updated here, and the changes will apply everywhere.

Example Usage

To display the crafting recipe for the Processor Icon.pngProcessor, the following would be used:

{{Crafting|Processor}}

This results in the following:

Result Inputs Factory
Processor Icon.pngProcessor x1 Gold Icon.pngGold x3
Coils Icon.pngCoils x20
ProcessorFabricatorIcon.pngProcessor Fabricator

Adding Recipes

Adding recipes is simple assuming the syntax is followed correctly.

The following code is used for the Processor recipe:

  | Processor = {{Crafting/Display
    |Result={{Resource|Processor}} x1
    |Inputs={{Resource|Gold}} x3</br>{{Resource|Coils}} x20
    |Factory=Processor Fabricator
  }}
  • | Processor
    This is the name of the recipe and what the user will type when calling the template, in this case {{Crafting|Processor}}}
  • | Result={{Resource|Processor}} The output of the recipe; in this case a Processor. We use the Resource template to display an icon.
  • | Inputs={{Resource|Gold}} x3</br>{{Resource|Coils}} x20 The ingredient inputs for the recipe, in this case Gold and Coils. Each input MUST be separated with a </br> tag to display correctly.
  • | Factory=Processor Fabricator The factory part the recipe is used in, in this case the Processor Fabricator. Just enter the name of the factory, the is no need to use square brackets like a normal wiki link.
  • }} Used to 'close' the recipe so the template knows when the next one begins.
CalloutIconDanger.png
Double Warning
Each input >MUST< on a new line using </br>. Failure to do so will result in the template not rendering correctly.

Take care to match the indentations on each line with the existing examples in order to keep the list as clean as possible.

Current Recipes

Below is a list of recipes as of time of writing:

Result Inputs Factory
Processor Icon.pngProcessor x1 Gold Icon.pngGold x3
Coils Icon.pngCoils x20
ProcessorFabricatorIcon.pngProcessor Fabricator
Result Inputs Factory
Diamond Icon.pngDiamond x1 Carbon Icon.pngCarbon x20 DiamondSmelterIcon.pngDiamond Smelter
Result Inputs Factory
Coils Icon.pngCoils x1 Copper Icon.pngCopper x1 CoilFactoryIcon.pngCoil Factory
Result Inputs Factory
Steel Icon.pngSteel x1 Iron Icon.pngIron x1 SteelSmelterIcon.pngSteel Smelter
Result Inputs Factory
Enriched Uranium Icon.pngEnriched Uranium x1 Uranium Icon.pngUranium x4 UraniumEnricherIcon.pngUranium Enricher
Result Inputs Factory
Tri-Steel Icon.pngTri-Steel x1 Tritanium Icon.pngTritanium x1 TriSteelSmelterIcon.pngTri-Steel Smelter
Result Inputs Factory
Hyper-Coils Icon.pngHyper-Coils x1 Coils Icon.pngCoils x2
Copper Icon.pngCopper x0.5
HyperCoilFactoryIcon.pngHyper-Coil Factory
Result Inputs Factory
Ammo Icon.pngAmmo x1 Sulfur Icon.pngSulfur x0.05 CannonAmmoFactoryIcon.pngCannon Ammo Factory
Result Inputs Factory
HE Missile Parts Icon.pngHE Missile Parts x1 Iron Icon.pngIron x0.05
Sulfur Icon.pngSulfur x0.05
HEMissileFactoryIcon.pngHigh-Explosive Missile Factory
Result Inputs Factory
EMP Missile Parts Icon.pngEMP Missile Parts x1 Iron Icon.pngIron x0.45
Copper Icon.pngCopper x0.45
EMPMissileFactoryIcon.pngE.M.P. Missile Factory
Result Inputs Factory
Nuclear Missile Parts Icon.pngNuclear Missile Parts x1 Iron Icon.pngIron x0.05
Uranium Icon.pngUranium x0.02
NuclearMissileFactoryIcon.pngNuclear Missile Factory
Result Inputs Factory
Mine Parts Icon.pngMine Parts x1 Iron Icon.pngIron x0.1
Ammo Icon.pngAmmo x0.4
MineFactoryIcon.pngMine Factory


Template parameters

ParameterDescriptionTypeStatus
Reciperecipe

The recipe to be displayed. Enter the name of the end product. For example, to display the recipe for Processor, enter Processor

Example
Processor
Unknownrequired