Template:Recipe: Difference between revisions

From Subnautica Wiki
(Undo revision 115926 by Yayieali (talk))
Tag: sourceedit
No edit summary
Tag: sourceedit
Line 1: Line 1:
<div style="height:{{#ifeq:{{{small|}}}|yes|36|72}}px;"><!--
<div style="height:{{#ifeq:{{{small|}}}|yes|36|72}}px;"><!--


-->{{#if: {{{item1|{{{item|}}}}}} | {{repeat | 1={{{count1|{{{count|1}}}}}} | 2=<span style="position: relative; display: inline-block; margin: 3px;">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;">[[File:{{{item1|{{{item|}}}}}}.png{{#ifeq:{{{small|}}}|yes|{{!}}32px|{{!}}54px}}|link={{{item1|{{{item|}}}}}}]]</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count1|{{{count|1}}}}}}'''</span> }} }}<!--
-->{{#if: {{{item1|{{{item|}}}}}} | {{repeat | 1={{{count1|{{{count|1}}}}}} | 2=<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;" class="inventory">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span class="recipe-icon" style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count1|{{{count|1}}}}}}'''</span></span>| 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count1|{{{count|1}}}}}}'''</span> }} }}<!--


-->{{#if: {{{item2|}}} | {{repeat | 1={{{count2|1}}} | 2=<span style="position: relative; display: inline-block; margin: 3px;">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;">[[File:{{{item2|}}}.png{{#ifeq:{{{small|}}}|yes|{{!}}32px|{{!}}54px}}|link={{{item2|}}}]]</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count2|1}}}'''</span> }} }}<!--
-->{{#if: {{{item2|}}} | {{repeat | 1={{{count2|1}}} | 2=<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;" class="inventory">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span class="recipe-icon" style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count1|{{{count|1}}}}}}'''</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count2|1}}}'''</span> }} }}<!--


-->{{#if: {{{item3|}}} | {{repeat | 1={{{count3|1}}} | 2=<span style="position: relative; display: inline-block; margin: 3px;">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;">[[File:{{{item3|}}}.png{{#ifeq:{{{small|}}}|yes|{{!}}32px|{{!}}54px}}|link={{{item3|}}}]]</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count3|1}}}'''</span> }} }}<!--
-->{{#if: {{{item3|}}} | {{repeat | 1={{{count3|1}}} | 2=<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;" class="inventory">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span class="recipe-icon" style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count1|{{{count|1}}}}}}'''</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count3|1}}}'''</span> }} }}<!--


-->{{#if: {{{item4|}}} | {{repeat | 1={{{count4|1}}} | 2=<span style="position: relative; display: inline-block; margin: 3px;">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;">[[File:{{{item4|}}}.png{{#ifeq:{{{small|}}}|yes|{{!}}32px|{{!}}54px}}|link={{{item4|}}}]]</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count4|1}}}'''</span> }} }}<!--
-->{{#if: {{{item4|}}} | {{repeat | 1={{{count4|1}}} | 2=<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;" class="inventory">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span class="recipe-icon" style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count1|{{{count|1}}}}}}'''</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count4|1}}}'''</span> }} }}<!--


-->{{#if: {{{item5|}}} | {{repeat | 1={{{count5|1}}} | 2=<span style="position: relative; display: inline-block; margin: 3px;">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;">[[File:{{{item5|}}}.png{{#ifeq:{{{small|}}}|yes|{{!}}32px|{{!}}54px}}|link={{{item5|}}}]]</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count4|1}}}'''</span> }} }}<!--
-->{{#if: {{{item5|}}} | {{repeat | 1={{{count5|1}}} | 2=<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;" class="inventory">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span class="recipe-icon" style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count1|{{{count|1}}}}}}'''</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count4|1}}}'''</span> }} }}<!--


-->{{#if: {{{item6|}}} | {{repeat | 1={{{count6|1}}} | 2=<span style="position: relative; display: inline-block; margin: 3px;">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;">[[File:{{{item6|}}}.png{{#ifeq:{{{small|}}}|yes|{{!}}32px|{{!}}54px}}|link={{{item6|}}}]]</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count4|1}}}'''</span> }} }}<!--
-->{{#if: {{{item6|}}} | {{repeat | 1={{{count6|1}}} | 2=<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;" class="inventory">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span class="recipe-icon" style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count1|{{{count|1}}}}}}'''</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count4|1}}}'''</span> }} }}<!--


-->{{#if: {{{item7|}}} | {{repeat | 1={{{count7|1}}} | 2=<span style="position: relative; display: inline-block; margin: 3px;">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;">[[File:{{{item7|}}}.png{{#ifeq:{{{small|}}}|yes|{{!}}32px|{{!}}54px}}|link={{{item7|}}}]]</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count4|1}}}'''</span> }} }}<!--
-->{{#if: {{{item7|}}} | {{repeat | 1={{{count7|1}}} | 2=<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;" class="inventory">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span class="recipe-icon" style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count1|{{{count|1}}}}}}'''</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count4|1}}}'''</span> }} }}<!--


-->{{#if: {{{item8|}}} | {{repeat | 1={{{count8|1}}} | 2=<span style="position: relative; display: inline-block; margin: 3px;">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;">[[File:{{{item8|}}}.png{{#ifeq:{{{small|}}}|yes|{{!}}32px|{{!}}54px}}|link={{{item8|}}}]]</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count4|1}}}'''</span> }} }}<!--
-->{{#if: {{{item8|}}} | {{repeat | 1={{{count8|1}}} | 2=<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;" class="inventory">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span class="recipe-icon" style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count1|{{{count|1}}}}}}'''</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count4|1}}}'''</span> }} }}<!--


--><span style="display: inline-block; margin: 3px; vertical-align:middle;">[[File:Arrow-right_(1).png|center]]</span><!--
--><span class="arrows" style="display: inline-block; margin: 3px; vertical-align:middle;">[[File:Arrow-right_(1).png|center]]</span><!--


-->{{#if: {{{machine|}}} | <span style="position: relative; display: inline-block; margin: 3px;">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;">[[File:{{{machine|}}}.png{{#ifeq:{{{small|}}}|yes|{{!}}32px|{{!}}54px}}|link={{{machine|}}}]]</span></span> }}<!--
-->{{#if: {{{machine|}}} | <span class="inventory" style="position: relative; display: inline-block; margin: 3px;">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span class="recipe-icon" style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;">[[File:{{{machine|}}}.png{{#ifeq:{{{small|}}}|yes|{{!}}32px|{{!}}54px}}|link={{{machine|}}}]]</span></span> }}<!--


--><span style="display: inline-block; margin: 3px; vertical-align:middle;">[[File:Arrow-right_(1).png|center]]</span><!--
--><span class="arrows" style="display: inline-block; margin: 3px; vertical-align:middle;">[[File:Arrow-right_(1).png|center]]</span><!--


-->{{#if: {{{result|}}} | {{repeat | 1={{{resultcount|1}}} | 2=<span style="position: relative; display: inline-block; margin: 3px;">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;">[[File:{{{result|}}}.png{{#ifeq:{{{small|}}}|yes|{{!}}32px|{{!}}54px}}|link={{{result|}}}]]</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{resultcount|1}}}'''</span> }} }}<!--
-->{{#if: {{{result|}}} | {{repeat | 1={{{resultcount|1}}} | 2=<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;" class="inventory">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span class="recipe-icon" style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count1|{{{count|1}}}}}}'''</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{resultcount|1}}}'''</span> }} }}<!--


-->{{#if: {{{result2|}}} | {{repeat | 1={{{resultcount2|1}}} | 2=<span style="position: relative; display: inline-block; margin: 3px;">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;">[[File:{{{result2|}}}.png{{#ifeq:{{{small|}}}|yes|{{!}}32px|{{!}}54px}}|link={{{result2|}}}]]</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{resultcount2|1}}}'''</span> }} }}<!--
-->{{#if: {{{result2|}}} | {{repeat | 1={{{resultcount2|1}}} | 2=<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;" class="inventory">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span class="recipe-icon" style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count1|{{{count|1}}}}}}'''</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{resultcount2|1}}}'''</span> }} }}<!--


-->{{#if: {{{result3|}}} | {{repeat | 1={{{resultcount3|1}}} | 2=<span style="position: relative; display: inline-block; margin: 3px;">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;">[[File:{{{result3|}}}.png{{#ifeq:{{{small|}}}|yes|{{!}}32px|{{!}}54px}}|link={{{result3|}}}]]</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{resultcount3|1}}}'''</span> }} }}<!--
-->{{#if: {{{result3|}}} | {{repeat | 1={{{resultcount3|1}}} | 2=<span style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding:{{#ifeq:{{{small|}}}|yes|2|7}}px;" class="inventory">[[File:Inventory background.png{{#ifeq:{{{small|}}}|yes|{{!}}36px}}|link=]]<span class="recipe-icon" style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{count1|{{{count|1}}}}}}'''</span></span> | 3=<span style="font-size:150%;vertical-align:middle;margin: 3px;">&times;'''{{{resultcount3|1}}}'''</span> }} }}<!--


-->{{#if: {{{note|}}} | <span style="display: inline-block; margin: 3px 3px 3px 10px; vertical-align: middle;">{{{note|}}}</span>}}<!--
-->{{#if: {{{note|}}} | <span style="display: inline-block; margin: 3px 3px 3px 10px; vertical-align: middle;">{{{note|}}}</span>}}<!--

Revision as of 17:45, 22 August 2016

Arrow-right (1).png
Arrow-right (1).png

[Purge]

Overview

This template is used to make an organized, standardized recipe layout with automatic links/icons and add the necessary Crafted with categories. Full in-game item names should be used, as this will select the corresponding article and image. The "item" text corresponds to the ingredients text, the "machine" text corresponds to the method of crafting, and the "result" text corresponds to the products. While the typical order is "item", "machine, then "result" any order will work as long as there is proper separation. This is also true for the "count" text. The "item=" and "item1=" texts are interchangeable and the same goes for "result1" and "count1". If no count is provided for an item or result then a single count is assumed. Therefore "count=1" is unnecessary but will still work.

Note: in most cases, it is easier and simpler to use {{Recipe2}}, which will add the proper recipe for the topic automatically. However, if the recipe must be written out manually, then the following should be noted.

Usage
  • Full syntax: {{Recipe|Main=|item1=|count1=|item2=|count2=|item3=|count3=|item4=|count4=|item5=|count5=|item6=|count6=|item7=|count7=|item8=|count8=|machine=|result1=|resultcount1=|result2=|resultcount2=|result3=|resultcount3=}}
  • Basic usage is as follows:
{{Recipe|item=Bladderfish|machine=Fabricator|result=Filtered Water}}
Inventory background.png×1
Arrow-right (1).png
Inventory background.pngFabricator.png
Arrow-right (1).png
Inventory background.png×1
  • If the recipe is for how to craft the topic of the article (e.g., the recipe for Bladderfish on the Bladderfish page), add Main= to the recipe code:
{{Recipe|item=Bladderfish|machine=Fabricator|result=Filtered Water}} would not add the Crafted with Bladderfish or Crafted with Fabricator categories; however,
{{Recipe|Main=|item=Bladderfish|machine=Fabricator|result=Filtered Water}} would add the categories.
  • Typically, more than 1 of an item is needed:
{{Recipe|item=Creepvine Sample|count=2|machine=Fabricator|result=Fiber Mesh}}
Inventory background.png×2Inventory background.png×2
Arrow-right (1).png
Inventory background.pngFabricator.png
Arrow-right (1).png
Inventory background.png×2
  • Multiple results of the same item are possible, too:
{{Recipe|item=Creepvine Seed Cluster|machine=Fabricator|result=Silicone Rubber|resultcount=2}}
Inventory background.png×1
Arrow-right (1).png
Inventory background.pngFabricator.png
Arrow-right (1).png
Inventory background.png×1Inventory background.png×1
  • This will also show a multiplier if a lot of an item (i.e. more than three units) is needed:
{{Recipe|item=Titanium|count=10|machine=Fabricator|result=Titanium Ingot}}
Inventory background.png×10×10
Arrow-right (1).png
Inventory background.pngFabricator.png
Arrow-right (1).png
Inventory background.png×10
  • Most recipes need several different items:
{{Recipe|item1=Plasteel Ingot|count1 = 3|item2=Enameled Glass|count2 = 3|item3=Lubricant|item4=Advanced Wiring Kit|item5=Lead|count5=3|machine=Mobile Vehicle Bay|result=Cyclops}}
Inventory background.png×3Inventory background.png×3Inventory background.png×3Inventory background.png×3Inventory background.png×3Inventory background.png×3Inventory background.png×3Inventory background.png×3Inventory background.png×3Inventory background.png×3Inventory background.png×3
Arrow-right (1).png
Inventory background.pngMobile Vehicle Bay.png
Arrow-right (1).png
Inventory background.png×3
  • While it hasn't been utilized on the wiki there is a small syntax:
{{Recipe|item1=Salt Deposit|item2=Spadefish|machine=Fabricator|result=Cooked Spadefish|small=yes}}
Inventory background.png×1Inventory background.png×1
Arrow-right (1).png
Inventory background.pngFabricator.png
Arrow-right (1).png
Inventory background.png×1
  • If the recipe is known but cannot be used in the game the "machine" is set to "stop":
{{Recipe|item = Titanium|count=2|item2 = Wiring Kit|item3=Computer Chip|item4=Workbench Blueprint|machine=stop|result = Modification Station}}
Inventory background.png×2Inventory background.png×2Inventory background.png×2Inventory background.png×2Inventory background.png×2
Arrow-right (1).png
Inventory background.pngStop.png
Arrow-right (1).png
Inventory background.png×2

Lastly, credit where credit is due: Big thanks to the Don't Starve Wikia for the base code. It has been modified to (hopefully) be more resilient.