Difference between revisions of "Template:Recipe draw/doc"

From Captain of Industry Wiki
Jump to: navigation, search
(+mining, dumping, and flaring examples)
(Added list of parameter and new example)
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
;Purpose
;Purpose
:This template provides a method to rapidly illustrate crafting recipes without in-depth knowledge of wiki syntax or manual repetition/copy-pasting.
:This template provides a method to rapidly illustrate crafting recipes without in-depth knowledge of wiki syntax or manual repetition/copy-pasting.
;Basic usage
:The following 2 templates are provided for making a recipe.
:*[[Template: Recipe define]]: Defines a recipe. The defined recipe can be called by [[Template: Recipe fetch]] from any page in this wiki. Usually, recipes are defined on the page of a building. This template only defines recipes but does not display anything.
:*[[Template: Recipe draw]]: Only displays a written recipe. The recipe written with this template cannot be called by [[Template: Recipe fetch]].
:Both templates can be used with the format written in [[#Examples]] in this document.
;Parameters
:The template accepts the following parameters:
:*<code>Building</code>: Name of buildings (example: Blast Furnace). No need to specify on pages using [[:Template:Infobox machine]] because the building is automatically detected.
:*<code>Input1Name</code>, <code>Input2Name</code>, ..., <code>Input6Name</code>: Name of materials (example: Iron Ore)
:**<code>Input1Name = Mining</code> (optional): Applies special format for mining.
:*<code>Output1Name</code>, <code>Output2Name</code>, ... <code>Output6Name</code>: Name of products (example: Molten Iron)
:**<code>Output1Name = Dumping</code> (optional): Applies special format for dumping.
:*<code>Input1Qty</code>, ..., <code>Input6Qty</code>, <code>Output1Qty</code>, ..., <code>Output6Qty</code>: Amount of materials or products per 1 cycle of recipe.
:*<code>Time</code>: Cycle time of recipe.
:*<code>Input1Unit</code>, ..., <code>Input6Unit</code>, <code>Output1Unit</code>, ..., <code>Output6Unit</code> (optional): Adds unit (for Electricity and Mechanical Power)
:*<code>HideBldg</code> (optional, rare): Hides building in recipe. No need to specify on pages using [[:Template:Infobox machine]] (the building is automatically hidden).
:*<code>Unreleased = yes</code> (optional, rare): Applies special format for unreleased recipe


;Limitations
;Limitations
:This template can accept up to 6 inputs, 6 outputs, and 1 time value per recipe.
:This template can accept up to 6 inputs, 6 outputs, and 1 time value per recipe. The output can include only 1 pollution.


Example usage for a machine with both inputs and outputs:
== Examples ==
;Example usage for mining:
{{markup|<nowiki>
  {{Recipe
    | Input1Name  = Mining
    | Output1Name = Copper Ore
  }}</nowiki>|
  {{Recipe
    | Input1Name  = Mining
    | Output1Name = Copper Ore
  }}
}}


{{Recipe
;Example usage for dumping loose materials:
  | Building    = Rotary Kiln
{{markup|<nowiki>
   | Input1Name  = Limestone
   {{Recipe
  | Input1Qty  = 12
    | Output1Name = Dumping
  | Input2Name = Coal
    | Input1Name = Rock
   | Input2Qty  = 2
   }}</nowiki>|
   | Time        = 10
   {{Recipe
  | Output1Name = Cement
    | Output1Name = Dumping
  | Output1Qty = 4
    | Input1Name = Rock
  | Output2Name = Exhaust
   }}
   | Output2Qty  = 8
}}
}}


<pre>
;Example usage for a machine with both inputs and outputs without pollution (most recipes):
{{Recipe
  | Building    = Rotary Kiln
  | Input1Name  = Limestone
  | Input1Qty  = 12
  | Input2Name  = Coal
  | Input2Qty  = 2
  | Time        = 10
  | Output1Name = Cement
  | Output1Qty  = 4
  | Output2Name = Exhaust
  | Output2Qty  = 8
}}</pre>


----
{{markup|<nowiki>
  {{Recipe
    | Building    = Rotary Kiln
    | Input1Name  = Limestone
    | Input1Qty  = 12
    | Input2Name  = Coal
    | Input2Qty  = 2
    | Time        = 10
    | Output1Name = Cement
    | Output1Qty  = 4
    | Output2Name = Exhaust
    | Output2Qty  = 8
  }}</nowiki>|
  {{Recipe
    | Building    = Rotary Kiln
    | Input1Name  = Limestone
    | Input1Qty  = 12
    | Input2Name  = Coal
    | Input2Qty  = 2
    | Time        = 10
    | Output1Name = Cement
    | Output1Qty  = 4
    | Output2Name = Exhaust
    | Output2Qty  = 8
  }}
}}


Example usage for mining:
;Example for buildings that "provide" materials ([[Groundwater Pump]], [[Air Separator]], etc.)
{{markup|<nowiki>
  {{Recipe
    | Building    = Groundwater Pump
    | Time        = 10
    | Output1Name = Water
    | Output1Qty  = 8
  }}</nowiki>|
  {{Recipe
    | Building    = Groundwater Pump
    | Time        = 10
    | Output1Name = Water
    | Output1Qty  = 8
  }}
}}


{{Recipe
;Example usage for dumping/flaring/venting ''non-polluting'' liquids/gasses:
   | Building    = Mining
{{markup|<nowiki>
   | Output1Name = Copper Ore
  {{Recipe
    | Building    = Smoke Stack
    | Input1Name  = Oxygen
    | Input1Qty  = 200
    | Time        = 20
   }}</nowiki>|
  {{Recipe
    | Building    = Smoke Stack
    | Input1Name  = Oxygen
    | Input1Qty   = 200
    | Time        = 20
  }}
}}
}}


<pre>
;Example usage for recipe with pollution:
{{Recipe
{{markup|<nowiki>
   | Building    = Mining
  {{Recipe
   | Output1Name = Copper Ore
    | Building    = Liquid Dump
}}</pre>
    | Input1Name  = Waste Water
    | Input1Qty   = 2
    | Time        = 2
    | Output1Name = Water Pollution
    | Output1Qty  = 2
  }}</nowiki>|
  {{Recipe
    | Building    = Liquid Dump
    | Input1Name  = Waste Water
    | Input1Qty   = 2
    | Time        = 2
    | Output1Name = Water Pollution
    | Output1Qty  = 2
  }}|<nowiki>
  {{Recipe
    | Building    = Exhaust Scrubber
    | Input1Name  = Exhaust
    | Input1Qty  = 30
    | Input2Name  = Water
    | Input2Qty  = 4
    | Time        = 10
    | Output1Name = Sulfur
    | Output1Qty  = 1
    | Output2Name = Carbon Dioxide
    | Output2Qty  = 12
    | Output3Name = Steam Lo
    | Output3Qty  = 4
    | Output4Name = Air Pollution
    | Output4Qty  = 4
  }}</nowiki>|
  {{Recipe
    | Building    = Exhaust Scrubber
    | Input1Name  = Exhaust
    | Input1Qty  = 30
    | Input2Name  = Water
    | Input2Qty  = 4
    | Time        = 10
    | Output1Name = Sulfur
    | Output1Qty  = 1
    | Output2Name = Carbon Dioxide
    | Output2Qty  = 12
    | Output3Name = Steam Lo
    | Output3Qty  = 4
    | Output4Name = Air Pollution
    | Output4Qty  = 4
  }}
}}


----
;Example usage for Mechanical Power and Electricity recipes with units:
{{markup|<nowiki>
  {{Recipe
    | Building    = Low-pressure Turbine
    | Input1Name  = Steam Lo
    | Input1Qty  = 4
    | Time        = 5
    | Output1Name = Mechanical Power
    | Output1Qty  = 1
    | Output1Unit = MW
    | Output2Name = Steam Depleted
    | Output2Qty  = 4
  }}</nowiki>|
  {{Recipe
    | Building    = Low-pressure Turbine
    | Input1Name  = Steam Lo
    | Input1Qty  = 4
    | Time        = 5
    | Output1Name = Mechanical Power
    | Output1Qty  = 1
    | Output1Unit = MW
    | Output2Name = Steam Depleted
    | Output2Qty  = 4
  }}
}}


Example usage for dumping:
;Example usage for instantaneous recipes:
{{markup|<nowiki>
  {{Recipe
    | Building    = Power Generator
    | Input1Name  = Mechanical Power
    | Input1Qty  = 500
    | Input1Unit  = KW
    | Time        = 0
    | Output1Name = Electricity
    | Output1Qty  = 250
    | Output1Unit = KW
  }}</nowiki>|
  {{Recipe
    | Building    = Power Generator
    | Input1Name  = Mechanical Power
    | Input1Qty  = 500
    | Input1Unit  = KW
    | Time        = 0
    | Output1Name = Electricity
    | Output1Qty  = 250
    | Output1Unit = KW
  }}
}}


{{Recipe
;Example usage for recipes with variable quantity:
   | Building    = Dumping
{{markup|<nowiki>
  | Output1Name = Rock
  {{Recipe
    | Building    = Waste Collection
    | Time        = 60
    | Output1Name = Waste
    | Output1Unit = ?
   }}</nowiki>|
  {{Recipe
    | Building    = Waste Collection
    | Time        = 60
    | Output1Name = Waste
    | Output1Unit = ?
  }}
}}
}}


<pre>
;Example usage for hiding the building (automatically happens on pages using [[:Template:Infobox machine]]):
{{Recipe
{{markup|<nowiki>
  | Building    = Dumping
  {{Recipe
   | Output1Name = Rock
    | Building    = Mixer
}}</pre>
    | HideBldg    = yes
 
    | Input1Name  = Sand
----
    | Input1Qty  = 18
 
    | Input2Name  = Limestone
Example usage for dumping loose materials:
    | Input2Qty  = 4
    | Input3Name  = Salt
    | Input3Qty   = 4
    | Time        = 20
    | Output1Name = Glass Mix
    | Output1Qty  = 14
  }}</nowiki>|
  {{Recipe
    | Building    = Mixer
    | HideBldg    = yes
    | Input1Name  = Sand
    | Input1Qty  = 18
    | Input2Name  = Limestone
    | Input2Qty  = 4
    | Input3Name  = Salt
    | Input3Qty  = 4
    | Time        = 20
    | Output1Name = Glass Mix
    | Output1Qty  = 14
  }}
}}


{{Recipe
;Example usage for unreleased recipe
   | Building    = Dumping
{{markup|<nowiki>
   | Output1Name = Rock
  {{Recipe
    | Building    = Crusher
    | Input1Name  = Gravel
    | Input1Qty   = 18
    | Time        = 20
    | Output1Name = Gold
    | Output1Qty  = 14
    | Unreleased  = yes
  }}</nowiki>|
  {{Recipe
    | Building    = Crusher
    | Input1Name  = Gravel
    | Input1Qty   = 20
    | Time        = 20
    | Output1Name = Gold
    | Output1Qty  = 1
    | Unreleased  = yes
  }}
}}
}}


<pre>
{{Footer Cargo}}
{{Recipe
  | Building    = Dumping
  | Output1Name = Rock
}}</pre>
 
----
 
Example usage for dumping liquids, venting gasses, or flaring:
 
{{Recipe
  | Building    = Liquid Dump
  | Output1Name = Waste Water
  | Output1Qty  = 2
  | Time        = 2
}}


<pre>
<includeonly>
{{Recipe
[[Category:Formatting templates]]
  | Building    = Liquid Dump
[[Category:Cargo management templates]]
  | Output1Name = Waste Water
</includeonly><!--
  | Output1Qty  = 2
  | Time        = 2
}}</pre>


<includeonly>[[Category:Formatting templates]]</includeonly><!--
--><noinclude>
--><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
[[Category:Template documentation|{{PAGENAME}}]]
</noinclude>

Latest revision as of 17:15, 3 October 2022

Purpose
This template provides a method to rapidly illustrate crafting recipes without in-depth knowledge of wiki syntax or manual repetition/copy-pasting.
Basic usage
The following 2 templates are provided for making a recipe.
Both templates can be used with the format written in #Examples in this document.
Parameters
The template accepts the following parameters:
  • Building: Name of buildings (example: Blast Furnace). No need to specify on pages using Template:Infobox machine because the building is automatically detected.
  • Input1Name, Input2Name, ..., Input6Name: Name of materials (example: Iron Ore)
    • Input1Name = Mining (optional): Applies special format for mining.
  • Output1Name, Output2Name, ... Output6Name: Name of products (example: Molten Iron)
    • Output1Name = Dumping (optional): Applies special format for dumping.
  • Input1Qty, ..., Input6Qty, Output1Qty, ..., Output6Qty: Amount of materials or products per 1 cycle of recipe.
  • Time: Cycle time of recipe.
  • Input1Unit, ..., Input6Unit, Output1Unit, ..., Output6Unit (optional): Adds unit (for Electricity and Mechanical Power)
  • HideBldg (optional, rare): Hides building in recipe. No need to specify on pages using Template:Infobox machine (the building is automatically hidden).
  • Unreleased = yes (optional, rare): Applies special format for unreleased recipe
Limitations
This template can accept up to 6 inputs, 6 outputs, and 1 time value per recipe. The output can include only 1 pollution.

Examples

Example usage for mining
Markup Renders as
  {{Recipe
    | Input1Name  = Mining
    | Output1Name = Copper Ore
  }}
Mining.png
Transform.png
Copper Ore.png
Example usage for dumping loose materials
Markup Renders as
  {{Recipe
    | Output1Name = Dumping
    | Input1Name  = Rock
  }}
Rock.png
Transform.png
Dumping.png
Example usage for a machine with both inputs and outputs without pollution (most recipes)
Markup Renders as
  {{Recipe
    | Building    = Rotary Kiln
    | Input1Name  = Limestone
    | Input1Qty   = 12
    | Input2Name  = Coal
    | Input2Qty   = 2
    | Time        = 10
    | Output1Name = Cement
    | Output1Qty  = 4
    | Output2Name = Exhaust
    | Output2Qty  = 8
  }}
Rotary Kiln.pngCoal
:
12
Limestone.png
72
Plus.png
2
Coal.png
12
10 Clock.png
Transform.png
60 Clock 60s.png
4
Cement.png
24
Plus.png
8
Exhaust.png
48
Example for buildings that "provide" materials (Groundwater Pump, Air Separator, etc.)
Markup Renders as
  {{Recipe
    | Building    = Groundwater Pump
    | Time        = 10
    | Output1Name = Water
    | Output1Qty  = 8
  }}
Groundwater Pump.png
:
PROVIDES
8
Water.png
48
/ 10 Clock.png

/ 60 Clock 60s.png
Example usage for dumping/flaring/venting non-polluting liquids/gasses
Markup Renders as
  {{Recipe
    | Building    = Smoke Stack
    | Input1Name  = Oxygen
    | Input1Qty   = 200
    | Time        = 20
  }}
Smoke Stack.pngSmall
:
ACCEPTS
200
Oxygen.png
600
/ 20 Clock.png

/ 60 Clock 60s.png
Example usage for recipe with pollution
Markup Renders as
  {{Recipe
    | Building    = Liquid Dump
    | Input1Name  = Waste Water
    | Input1Qty   = 2
    | Time        = 2
    | Output1Name = Water Pollution
    | Output1Qty  = 2
  }}
Liquid Dump.png
:
ACCEPTS
2
Waste Water.png
60
/ 2 Clock.png

/ 60 Clock 60s.png
2
Water Pollution.png
60
  {{Recipe
    | Building    = Exhaust Scrubber
    | Input1Name  = Exhaust
    | Input1Qty   = 30
    | Input2Name  = Water
    | Input2Qty   = 4
    | Time        = 10
    | Output1Name = Sulfur
    | Output1Qty  = 1
    | Output2Name = Carbon Dioxide
    | Output2Qty  = 12
    | Output3Name = Steam Lo
    | Output3Qty  = 4
    | Output4Name = Air Pollution
    | Output4Qty  = 4
  }}
Exhaust Scrubber.png
:
30
Exhaust.png
180
Plus.png
4
Water.png
24
10 Clock.png
Transform.png
60 Clock 60s.png
1
Sulfur.png
6
Plus.png
12
Carbon Dioxide.png
72
Plus.png
4
Steam Lo.png
24
4
Air Pollution.png
24
Example usage for Mechanical Power and Electricity recipes with units
Markup Renders as
  {{Recipe
    | Building    = Low-pressure Turbine
    | Input1Name  = Steam Lo
    | Input1Qty   = 4
    | Time        = 5
    | Output1Name = Mechanical Power
    | Output1Qty  = 1
    | Output1Unit = MW
    | Output2Name = Steam Depleted
    | Output2Qty  = 4
  }}
Low-pressure Turbine.pngTier I
:
4
Steam Lo.png
48
Clock.png
Transform.png
60 Clock 60s.png
 
Mechanical Power.png
1 MW
Plus.png
4
Steam Depleted.png
48
Example usage for instantaneous recipes
Markup Renders as
  {{Recipe
    | Building    = Power Generator
    | Input1Name  = Mechanical Power
    | Input1Qty   = 500
    | Input1Unit  = KW
    | Time        = 0
    | Output1Name = Electricity
    | Output1Qty  = 250
    | Output1Unit = KW
  }}
Power Generator.png
:
 
Mechanical Power.png
500 KW
Transform.png
 
Electricity.png
250 KW
Example usage for recipes with variable quantity
Markup Renders as
  {{Recipe
    | Building    = Waste Collection
    | Time        = 60
    | Output1Name = Waste
    | Output1Unit = ?
  }}
Waste Collection.png
:
PROVIDES
?
Waste.png
?
/ 60 Clock.png

/ 60 Clock 60s.png
Example usage for hiding the building (automatically happens on pages using Template:Infobox machine)
Markup Renders as
  {{Recipe
    | Building    = Mixer
    | HideBldg    = yes
    | Input1Name  = Sand
    | Input1Qty   = 18
    | Input2Name  = Limestone
    | Input2Qty   = 4
    | Input3Name  = Salt
    | Input3Qty   = 4
    | Time        = 20
    | Output1Name = Glass Mix
    | Output1Qty  = 14
  }}
18
Sand.png
54
Plus.png
4
Limestone.png
12
Plus.png
4
Salt.png
12
20 Clock.png
Transform.png
60 Clock 60s.png
14
Glass Mix.png
42
Example usage for unreleased recipe
Markup Renders as
  {{Recipe
    | Building    = Crusher
    | Input1Name  = Gravel
    | Input1Qty   = 18
    | Time        = 20
    | Output1Name = Gold
    | Output1Qty  = 14
    | Unreleased  = yes
  }}
Crusher.png
:
20
Gravel.png
60
20 Clock.png
Transform.png
60 Clock 60s.png
1
Gold.png
3
UNRELEASED