Template:Recipes: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
(excluded fabricator items from deconstructor table when allowfab is defined)
(Made deconstructor table show craftable items by default.)
Line 2: Line 2:
{| class="responsive-table sortable mw-collapsible" style="max-width:{{#ifeq: {{{1}}}|deconstructor|{{{width|40}}}|{{{width|65}}}}}%;"  
{| class="responsive-table sortable mw-collapsible" style="max-width:{{#ifeq: {{{1}}}|deconstructor|{{{width|40}}}|{{{width|65}}}}}%;"  
|+{{#switch: {{{1}}}|medicalfabricator='''<big>Medical Fabricator Items</big>'''|fabricator='''<big>Fabricator Items</big>'''|deconstructor='''<big>Deconstructor Items</big>'''}}
|+{{#switch: {{{1}}}|medicalfabricator='''<big>Medical Fabricator Items</big>'''|fabricator='''<big>Fabricator Items</big>'''|deconstructor='''<big>Deconstructor Items</big>'''}}
{{#ifeq: {{{1}}}|deconstructor|{{#if:{{{allowfab|}}}|
! class="unsortable" {{!}} Crafting Materials
! class="unsortable" {{!}} Crafting Materials
! style="width:15%;" {{!}} Crafting Talent, Skill, Time|}}|
! style="width:15%;" {{!}} Crafting Talent, Skill, Time
! class="unsortable" {{!}} Crafting Materials
! style="width:15%;" {{!}} Crafting Talent, Skill, Time}}
! Item
! Item
! class="unsortable" style="width:12%;" | Deconstruction Time
! class="unsortable" style="width:12%;" | Deconstruction Time
Line 28: Line 25:


if {{{1}}} = deconstructor, list non-craftable decons recipes for PAGENAME/material
if {{{1}}} = deconstructor, list non-craftable decons recipes for PAGENAME/material
-->|deconstructor={{#if:{{{allowfab|}}}|(Items.fabricatormaterials NOT LIKE "%{{{material|{{PAGENAME}}}}}%" OR Items.fabricatormaterials IS NULL) AND|Items.fabricator {{=}} "0" AND Items.medicalfabricator {{=}} "0" AND}} Items.deconstructormaterials LIKE "%{{{material|{{PAGENAME}}}}}%" {{#if:{{{exclude|}}}|AND Items.deconstructormaterials NOT LIKE "%{{{exclude}}}%" {{#if:{{{exclude2|}}}|AND Items.deconstructormaterials NOT LIKE "%{{{exclude2}}}%"|}}|}}<!--  
-->|deconstructor=(Items.fabricatormaterials NOT LIKE "%{{{material|{{PAGENAME}}}}}%" OR Items.fabricatormaterials IS NULL) AND Items.deconstructormaterials LIKE "%{{{material|{{PAGENAME}}}}}%" {{#if:{{{exclude|}}}|AND Items.deconstructormaterials NOT LIKE "%{{{exclude}}}%" {{#if:{{{exclude2|}}}|AND Items.deconstructormaterials NOT LIKE "%{{{exclude2}}}%"|}}|}}<!--  
-->|#default= }}<!--
-->|#default= }}<!--
-->}}
-->}}
| format = template
| format = template
| order by = Items.fabricatormaterials DESC, Items.deconstructormaterials
| order by = Items.fabricatormaterials DESC, Items.deconstructormaterials
| template = {{#if:{{{allowfab|}}}|Recipes/rowallowfab|Recipes/row}}<!-- ######### TODO: make a separate subtemplate for single material displays (to hide deconstructor columns) #########-->
| template = {{#ifeq:{{{1|}}}|deconstructor|Recipes/rowallowfab|Recipes/row}}<!-- ######### TODO: make a separate subtemplate for single material displays (to hide deconstructor columns) #########-->
| delimiter = \n
| delimiter = \n
| named args = yes
| named args = yes

Revision as of 15:03, 6 March 2023

Documentation

This template is used to display a list of items, and their crafting requirements / deconstruction yields.

Syntax

{{ Recipes | fabricator OR medicalfabricator OR deconstructor | width = <customwidth> (default 70) | everything = yes | material = <Custom Material> | exclude = <Term to exclude>}}

everything If this is set to yes (or any non-null value), then all the items are displayed. This is meant to be used on the main fabricator/deconstructor pages for example. For individual pages, this parameter shouldn't be specified.
fabricator displays the list of items that can be fabricated in the standard fabricator with the current item.
  • Shows fabricator recipes for all items if "everything=yes" is defined.
medicalfabricator displays the list of items that can be fabricated in the medical fabricator with the current item.
  • Shows medical fabricator recipes for all items if "everything=yes" is defined.
deconstructor displays the list of items that can be deconstructed into the current item, but can't be crafted using the current item.
  • Shows deconstructor recipes for all items if "everything=yes" is defined.
material sets a custom material to be listed. If omitted, it will default to the page name. Note that all items which have this term in their name will be listed, so the "exclude" parameter may be necessary as well.
exclude excludes a string from the query. This is useful in case the current item's name is also contained in another item's name, such as "Diving Suit" is contained in "Combat Diving Suit".
exclude2 same as above, useful if one exclusion isn't enough.

Examples

In the following examples, "material" is always specified because it would otherwise default to the page name. On an item's page, it can be omitted.

{{Recipes|fabricator|material=Diving Suit}}
gives:

Fabricator Items
Crafting Materials Crafting Talent, Skill, Time Item Deconstruction Time Deconstruction Yield
Diving Suit
Titanium-Aluminum Alloy (x2)
Rubber
Mechanical 60
  45

[[{{{_pageName}}}|Abyss Diving Suit]]
30 Titanium-Aluminum Alloy (x3)
Rubber
Diving Suit
Ballistic Fiber
Titanium-Aluminum Alloy
Rubber
(produces 1 items)
Mechanical 60
  45

[[{{{_pageName}}}|Combat Diving Suit]]
30 Ballistic Fiber
Titanium-Aluminum Alloy x2
Rubber x2
(for 1 deconstructed item)


{{Recipes|deconstructor|material=Plastic|width=40}}
gives:

         
Deconstructor Items
Crafting Materials Crafting Talent, Skill, Time Item Deconstruction Time Deconstruction Yield
Iron (x2)
Sonar Beacon
Weapons 25
  20

[[{{{_pageName}}}|Depth Decoy Shell]]
10 Iron
Copper
Plastic (x2)
FPGA Circuit
Tin
Silicon
Electrical 50
  30

[[{{{_pageName}}}|Text Display]]
10 Copper
Tin
Silicon
Plastic
FPGA Circuit
Tin
Silicon
Electrical 50
  30

[[{{{_pageName}}}|Terminal]]
10 Plastic
Copper
Tin
Silicon
FPGA Circuit
Tin
Electrical 30
  10

[[{{{_pageName}}}|Alarm Buzzer]]
10 Plastic
Copper
Tin
FPGA Circuit
Steel Bar
Electrical 30
  10

[[{{{_pageName}}}|Emergency Siren]]
10 Plastic
Copper
Steel Bar
FPGA Circuit
Silicon
Electrical 30
  10

[[{{{_pageName}}}|Smoke Detector]]
10 Plastic
Copper
Silicon
FPGA Circuit
Silicon
Electrical 30
  10

[[{{{_pageName}}}|Water Detector]]
10 Plastic
Copper
Silicon
FPGA Circuit
Silicon
Electrical 30
  10

[[{{{_pageName}}}|Oxygen Detector]]
10 Plastic
Copper
Silicon
FPGA Circuit
Silicon
Electrical 30
  10

[[{{{_pageName}}}|Motion Detector]]
10 Plastic
Copper
Silicon
FPGA Circuit
Lead (x2)
Titanium-Aluminum Alloy (x3)
Mechanical 65
Talent: Iron Storm
70

[[{{{_pageName}}}|Scrap Cannon]]
10 Copper
Plastic
Lead
Titanium-Aluminum Alloy (x2)
FPGA Circuit
Lead (x2)
Titanium-Aluminum Alloy (x2)
Fulgurium Chunk (x2)
Electrical 65
Talent: Nuclear Option
70

[[{{{_pageName}}}|Rapid Fissile Accelerator]]
10 Copper
Plastic
Lead
Titanium-Aluminum Alloy
Fulgurium Chunk
Dementonite Cluster x2
Steel Bar x2
FPGA Circuit
Mechanical 50
Talent: Let it Drain
30

[[{{{_pageName}}}|Portable Pump]]
20 Copper
Plastic
Dementonite Cluster
Steel Bar
Aluminum x2
FPGA Circuit
Tin x2
Mechanical 30
  30

[[{{{_pageName}}}|Underwater Scooter]]
20 Aluminum
Copper
Tin
Plastic

[[{{{_pageName}}}|Radio Jammer]]
15 Copper (x2)
Plastic (x2)

[[{{{_pageName}}}|Alien Flare]]
10 Flash Powder (>90%)
Plastic (>90%)

[[{{{_pageName}}}|Deadeye Carbine]]
10 Steel Bar
Plastic

[[{{{_pageName}}}|Prototype Steam Cannon]]
10 Steel Bar
Plastic

[[{{{_pageName}}}|Machine Pistol]]
10 Steel Bar
Plastic


{{Recipes|deconstructor|material=Titanium|width=40}}
gives:

           
Deconstructor Items
Crafting Materials Crafting Talent, Skill, Time Item Deconstruction Time Deconstruction Yield
Combat Diving Suit
Rubber
(produces 1 items)
Mechanical 20
Talent: Boarding Party
45

[[{{{_pageName}}}|Slipsuit]]
30 Ballistic Fiber
Titanium-Aluminum Alloy (x2)
Rubber (x2)
(for 1 deconstructed item)
Combat Diving Suit
Lead
Physicorium Bar
(produces 1 items)
Electrical 60
Talent: Ph.D in Nuclear Physics
80

[[{{{_pageName}}}|PUCS]]
45 Titanium-Aluminum Alloy (x2)
Rubber
Lead
Physicorium Bar
(for 1 deconstructed item)

[[{{{_pageName}}}|Boom Stick]]
10 Steel Bar
Titanium-Aluminum Alloy

[[{{{_pageName}}}|Grenade Launcher]]
10 Steel Bar
Titanium-Aluminum Alloy

[[{{{_pageName}}}|Ilmenite]]
5 1 Titanium

[[{{{_pageName}}}|Titanite]]
5 3 Titanium
1 Iron

[[{{{_pageName}}}|Broken Diving Suit]]
15 One of the following:
Titanium
Rubber
Aluminum
Titanium-Aluminum Alloy

[[{{{_pageName}}}|Scrap]]
10 Two of the following:
Iron
Copper
Lead
Steel Bar
Aluminum
Carbon
Rubber
Titanium-Aluminum Alloy
Thorium


{{Recipes|deconstructor|material=Titanium|exclude=Alloy|width=40}}
gives:

   
Deconstructor Items
Crafting Materials Crafting Talent, Skill, Time Item Deconstruction Time Deconstruction Yield

[[{{{_pageName}}}|Ilmenite]]
5 1 Titanium

[[{{{_pageName}}}|Titanite]]
5 3 Titanium
1 Iron


{{Recipes|deconstructor|material=Sodium|allowfab=1|width=40}}
gives:

         
Deconstructor Items
Crafting Materials Crafting Talent, Skill, Time Item Deconstruction Time Deconstruction Yield
Saline (x2)
Alien Blood (x2)
Stabilozine
(produces 2 items)
Medical 31
  25

[[{{{_pageName}}}|Blood Pack]]
20 Sodium
Stabilozine
(for 1 deconstructed item)
Iron
UEX
Weapons 60
  20

[[{{{_pageName}}}|Frag Grenade]]
10 Iron
Sodium
Iron
UEX
Weapons 30
  10

[[{{{_pageName}}}|40mm Grenade]]
5 Iron
Sodium
C-4 Block
Zinc (x2) or Copper (x2)
Aluminum
Weapons 50
  20

[[{{{_pageName}}}|Exploding Ammunition Box]]
10 Sodium (≥95%)
Aluminum 
Alternate recipe:
C-4 Block
Zinc (x2) or Copper (x2)
Exploding Ammunition Box (≤10%)
Weapons 40
15

[[{{{_pageName}}}|40mm Mini Nuke]]
5 Iron
Sodium

[[{{{_pageName}}}|Amblygonite]]
5 1 Lithium
1 Aluminum
1 Sodium

[[{{{_pageName}}}|Sylvite]]
5 1 Sodium
2 Potassium

[[{{{_pageName}}}|Salt Bulb]]
35 1 Sodium
1 Salt Vine Seed

[[{{{_pageName}}}|Cryolite]]
5 2 Sodium