Template:Installations infobox: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
mNo edit summary
m (cleanup)
Line 1: Line 1:
<noinclude>{{doc}}[[Category:Templates]]
<noinclude>{{doc}}[[Category:Templates]]
{{#cargo_declare:_table=Installations
{{#cargo_declare:_table = Installations
| name        = String
| name        = String
| image      = File
| image      = File
Line 31: Line 31:
| note = Wikitext
| note = Wikitext
}}</noinclude>
}}</noinclude>
<includeonly><onlyinclude>{| class="infobox responsive-table" align=right
<includeonly><onlyinclude>{| class="infobox responsive-table" align="right"
|-
|-
! colspan="2" class="infobox2 responsive-table" | {{{name|{{PAGENAME}}}}}
! colspan="2" class="infobox2 responsive-table" | {{{name|{{PAGENAME}}}}}
|-
|-
| colspan="2" style="padding:0.5em;text-align:center !important" | {{ImageHandler|file={{{image|{{{name|{{PAGENAME}}}}}.png}}}|imagewidth={{{imagewidth|180}}}px}}<!--
| colspan="2" style="padding:0.5em; text-align:center !important" | {{ImageHandler|file={{{image|{{{name|{{PAGENAME}}}}}.png}}}|imagewidth={{{imagewidth|180}}}px}}{{#if:{{{description|}}}|<hr>''{{{description}}}''}}
-->{{#if:{{{identifier|}}}|<br><span style="margin:auto;text-align:center;color:#808080"><small>ID: <code>{{{identifier|}}}</code></small></span>}}<!--
-->{{#if:{{{description|}}}|<div style="margin:0 auto;width:50%;float:center;border-bottom:1px #E2D9A4 dotted"></div>''<small>{{{description}}}</small>''}}
|-
|-
| style="text-align:center" colspan="2" | [[:Category:{{{category|Misc}}}|{{{category|Misc}}}]]{{#if:{{{category2|}}}|, [[:Category:{{{category2}}}|{{{category2}}}]]}}{{#if:{{{subcategory|}}}|<br>[[:Category:{{{subcategory}}}|{{{subcategory}}}]]}}<!--
{{#if:{{{afflictions|}}}{{{weapons|}}}{{{handicap|}}}{{{powerconsumption|}}}{{{reload|}}}{{{itemslots|}}}{{{powercapacity|}}}{{{maxoutput|}}}{{{maxrechargespeed|}}}{{{maxforce|}}}{{{maxflow|}}}{{{o2generatedamount|}}}|
-->{{#if:{{{powerconsumption|}}}{{{reload|}}}{{{itemslots|}}}{{{powercapacity|}}}{{{maxoutput|}}}{{{maxrechargespeed|}}}{{{maxforce|}}}{{{maxflow|}}}{{{o2generatedamount|}}}|&nbsp;
! class="infobox3 responsive-table" colspan="2" {{!}} <span title="Default values. Some values can be changed in the Submarine Editor, and might not exactly match the values for specific submarines.">Statistics*</span>}}
{{!}}-
|-
! class="infobox3 responsive-table" colspan="2" {{!}} <span title="Default values. Some values can be changed in the Submarine Editor, and might not exactly match the values for specific submarines.">Statistics*</span><!--
{{#if:{{{afflictions|}}}|
-->{{#if:{{{afflictions|}}}|&nbsp;
{{!}} style="width:50%; text-align:right" {{!}} '''Afflictions'''
{{!}}-
{{!}} style="width:50%" {{!}} {{{afflictions}}}}}
{{!}} style="width:50%; font-size:105%" {{!}} Afflictions
|-
{{!}} style="width:50%" {{!}} {{{afflictions}}}}}<!--
{{#if:{{{weapons|}}}|
-->{{#if:{{{weapons|}}}|&nbsp;
{{!}} style="width:50%; text-align:right" {{!}} '''Skill Requirement'''
{{!}}-
{{!}} style="width:50%" {{!}} {{hl|Weapons|20|Security Officer Job Icon|Skills#Weapons}}: {{{weapons}}}}}
{{!}} style="width:50%; font-size:105%" {{!}} Skill Requirement
|-
{{!}} style="width:50%" {{!}} {{hl|Weapons|20|Security Officer Job Icon|Skills#Weapons}}: {{{weapons}}}}}<!--
{{#if:{{{handicap|}}}|
-->{{#if:{{{handicap|}}}|&nbsp;
{{!}} style="width:50%; text-align:right" {{!}} '''<abbr title="Penalty applied if the above skill requirements are not met">Handicap</abbr>'''
{{!}}-
{{!}} style="width:50%" {{!}} {{{handicap}}}}}
{{!}} style="width:50%; font-size:105%" {{!}} <abbr title="Penalty applied if the above skill requirements are not met">Handicap</abbr>
|-
{{!}} style="width:50%" {{!}} {{{handicap}}}}}<!--
{{#if:{{{powerconsumption|}}}|
-->{{#if:{{{powerconsumption|}}}|&nbsp;
{{!}} style="width:50%; text-align:right" {{!}} '''Power Consumption'''
{{!}}-
{{!}} style="width:50%" {{!}} {{{powerconsumption}}} kW}}
{{!}} style="width:50%; font-size:105%" {{!}} Power Consumption
|-
{{!}} style="width:50%" {{!}} {{{powerconsumption}}} kW}}<!--
{{#if:{{{reload|}}}|
-->{{#if:{{{reload|}}}|&nbsp;
{{!}} style="width:50%; text-align:right" {{!}} '''Firerate'''
{{!}}-
{{!}} style="width:50%" {{!}} {{#expr:({{{reload}}})^-1}} <span class="explain" title="Rounds per Second">RPS</span>}}
{{!}} style="width:50%; font-size:105%" {{!}} Firerate
|-
{{!}} style="width:50%" {{!}} {{#expr:({{{reload}}})^-1}} <span class="explain" title="Rounds per Second">RPS</span>}}<!--
{{#if:{{{itemslots|}}}|
-->{{#if:{{{itemslots|}}}|&nbsp;
{{!}} style="width:50%; text-align:right" {{!}} '''Item Slots'''
{{!}}-
{{!}} style="width:50%" {{!}} {{{itemslots}}}}}
{{!}} style="width:50%; font-size:105%" {{!}} Item Slots
|-
{{!}} style="width:50%" {{!}} {{{itemslots}}}}}<!--
{{#if:{{{powercapacity|}}}|
-->{{#if:{{{powercapacity|}}}|&nbsp;
{{!}} style="width:50%; text-align:right" {{!}} '''Power Capacity'''
{{!}}-
{{!}} style="width:50%" {{!}} {{{powercapacity}}} kWm}}
{{!}} style="width:50%; font-size:105%" {{!}} Power Capacity
|-
{{!}} style="width:50%" {{!}} {{{powercapacity}}} kWm}}<!--
{{#if:{{{maxoutput|}}}|
-->{{#if:{{{maxoutput|}}}|&nbsp;
{{!}} style="width:50%; text-align:right" {{!}} '''Max Power Output'''
{{!}}-
{{!}} style="width:50%" {{!}} {{{maxoutput}}} kW}}
{{!}} style="width:50%; font-size:105%" {{!}} Max Power Output
|-
{{!}} style="width:50%" {{!}} {{{maxoutput}}} kW}}<!--
{{#if:{{{maxrechargespeed|}}}|
-->{{#if:{{{maxrechargespeed|}}}|&nbsp;
{{!}} style="width:50%; text-align:right" {{!}} '''Max Recharge Speed'''
{{!}}-
{{!}} style="width:50%" {{!}} {{{maxrechargespeed}}} kW}}
{{!}} style="width:50%; font-size:105%" {{!}} Max Recharge Speed
|-
{{!}} style="width:50%" {{!}} {{{maxrechargespeed}}} kW}}<!--
{{#if:{{{maxforce|}}}|
-->{{#if:{{{maxforce|}}}|&nbsp;
{{!}} style="width:50%; text-align:right" {{!}} '''Max Force'''
{{!}}-
{{!}} style="width:50%" {{!}} {{{maxforce}}}}}
{{!}} style="width:50%; font-size:105%" {{!}} Max Force
|-
{{!}} style="width:50%" {{!}} {{{maxforce}}}}}<!--
{{#if:{{{maxflow|}}}|
-->{{#if:{{{maxflow|}}}|&nbsp;
{{!}} style="width:50%; text-align:right" {{!}} '''Max Pumping Speed'''
{{!}}-
{{!}} style="width:50%" {{!}} {{{maxflow}}}}}
{{!}} style="width:50%; font-size:105%" {{!}} Max Pumping Speed
|-
{{!}} style="width:50%" {{!}} {{{maxflow}}}}}<!--
{{#if:{{{o2generatedamount|}}}|
-->{{#if:{{{o2generatedamount|}}}|&nbsp;
{{!}} style="width:50%; text-align:right" {{!}} '''Generated Oxygen'''
{{!}}-
{{!}} style="width:50%" {{!}} {{{o2generatedamount}}}}}
{{!}} style="width:50%; font-size:105%" {{!}} Generated Oxygen
|-
{{!}} style="width:50%" {{!}} {{{o2generatedamount}}}}}}}<!--
{{#if:{{{repairtype|}}}|
-->{{#if:{{{repairtype|}}}|&nbsp;
! class="infobox3 responsive-table" colspan="2" {{!}} Repairable}}
{{!}}-
|-
! class="infobox3 responsive-table" colspan="2" {{!}} Repairable
{{#if:{{{repairtype|}}}|
{{!}}-
{{!}} style="width:50%; text-align:right" {{!}} '''Required Skill'''
{{!}} style="width:50%; font-size:105%" {{!}} Required Skill
{{!}} style="width:50%" {{!}} {{#switch:{{lc:{{{repairtype}}}}}|mechanical=[[Skills#Mechanical_Engineering|Mechanical Engineering]]|electrical=[[Skills#Electrical Engineering|Electrical Engineering]]}} {{{repairskill}}}}}
{{!}} style="width:50%" {{!}} {{#switch:{{lc:{{{repairtype}}}}}|mechanical=[[Skills#Mechanical_Engineering|Mechanical Engineering]]|electrical=[[Skills#Electrical Engineering|Electrical Engineering]]}} {{{repairskill}}}
|-
{{!}}-
{{#if:{{{repairtype|}}}|
{{!}} style="width:50%; font-size:105%" {{!}} Required Item
{{!}} style="width:50%; text-align:right" {{!}} '''Required Item'''
{{!}} style="width:50%" {{!}} {{#switch:{{lc:{{{repairtype}}}}}|mechanical={{hl|Wrench|x16}}|electrical={{hl|Screwdriver|x16}}}}}}
{{!}} style="width:50%" {{!}} {{#switch:{{lc:{{{repairtype}}}}}|mechanical={{hl|Wrench|x16}}|electrical={{hl|Screwdriver|x16}}}}}}
|}{{TEX|2={{#if:{{{nocat|}}}||[[Category:Installations]][[Category:{{{category|Misc}}}|{{{category|Misc}}}]]{{#if:{{{category2|}}}|[[Category:{{{category2}}}|{{{category2}}}]]}}{{#if:{{{subcategory|}}}|[[Category:{{{subcategory}}}]]}}}}<!--
|-
-->{{#cargo_store:_table=Installations
| colspan="3" style="padding:0px" |
{| class="responsive-table mw-collapsible mw-collapsed" style="width:100%"
! colspan="2" class="infobox3 responsive-table" | Technical
|-
| style="width:50%; text-align:right" | '''Identifier'''
| width="50%" | {{{identifier}}}
|-
| style="width:50%; text-align:right" | '''Categories'''
| width="50%" | [[:Category:{{{category|Misc}}}|{{{category|Misc}}}]]{{#if:{{{category|}}}|{{#if:{{{category2|}}}|, [[:Category:{{{category2}}}|{{{category2}}}]]}}}}{{#if:{{{subcategory|}}}|, [[:Category:{{{subcategory}}}|{{{subcategory}}}]]}}
|-
{{#if:{{{tags|}}}|
{{!}} style="width:50%; text-align:right" {{!}} '''Tags'''
{{!}} width="50%" {{!}} {{{tags}}}}}
|}
|}{{#if:{{NAMESPACE}}||{{#if:{{{nocat|}}}||[[Category:Installations]][[Category:{{{category|Misc}}}|{{{category|Misc}}}]]{{#if:{{{category2|}}}|[[Category:{{{category2}}}|{{{category2}}}]]}}{{#if:{{{subcategory|}}}|[[Category:{{{subcategory}}}]]}}}}<!--
-->{{#cargo_store:table = Installations
| name        = {{{name|{{PAGENAME}}}}}
| name        = {{{name|{{PAGENAME}}}}}
| image      = {{{image|{{{name|{{PAGENAME}}}}}.png}}}
| image      = {{{image|{{{name|{{PAGENAME}}}}}.png}}}
Line 120: Line 133:
| o2generatedamount = {{{o2generatedamount|}}}
| o2generatedamount = {{{o2generatedamount|}}}


| weapons = {{{weapons|}}}
| weapons = {{{weapons|}}}
| handicap = {{{handicap|}}}
| handicap = {{{handicap|}}}


Line 126: Line 139:
| repairskill = {{{repairskill|}}}
| repairskill = {{{repairskill|}}}


| weapontype = {{{weapontype|}}}
| weapontype = {{{weapontype|}}}
| loader = {{{loader|}}}
| loader     = {{{loader|}}}
| ammo = {{{ammo|}}}
| ammo       = {{{ammo|}}}
| afflictions = {{{afflictions|}}}
| afflictions = {{{afflictions|}}}
| note = {{{note|}}}
| note       = {{{note|}}}
}}}}</onlyinclude></includeonly>
}}}}</onlyinclude></includeonly>

Revision as of 03:00, 21 March 2023

Documentation

Basic

Field Note Example Expected Default
name The name of the installation. Fabricator {{PAGENAME}}
image An image of the installation. Fabricator.png {{{name|{{PAGENAME}}}}}.png
imagewidth Forces the width of the image to the specified value. 250 180
identifier Internal identifier of the item from game files (optional). fabricator
description In-game description. A machine capable of manufacturing a wide range of items out of basic raw materials.
category The category of the item, as defined in XML. Machine Structure, Decorative, Machine, Medical, Weapon, Diving, Equipment, Fuel, Electrical, Material, Alien, Wrecked, Legacy, Misc Misc
category2 The second category of the item, if applicable. Weapon Structure, Decorative, Machine, Medical, Weapon, Diving, Equipment, Fuel, Electrical, Material, Alien, Wrecked, Legacy, Misc
subcategory The subcategory of the item, as defined in XML. Labels Thalamus, Abandoned Outposts, Abandoned Outpost (Human), Abandoned Outpost (Monster), Exterior submarine walls, Exterior shuttle pieces, Labels, Background wall, Outpost
tags The tags of the item, as defined in XML. fabricator,donttakeitems,dontsellitems CSV list of the item's tags
nocat Removes page categories. yes yes

Statistics

Field Note Example Expected Default
powerconsumption The power consumption of the installation (in kW). 510 Numeric value
reload The reload time of the turret, as defined in XML. 5 Numeric value
itemslots The number of item slots the installation has. 6 Numeric value
powercapacity The amount of power that can be stored in the installation (in kWm). 100 Numeric value
maxoutput The maximum amount of power that the installation can output (in kW). 50 Numeric value
maxrechargespeed The maximum recharge speed of the installation (in kW). 50 Numeric value
maxforce The maximum amount of thrust that the installation can produce. 1000 Numeric value
maxflow The maximum rate of water intake/outtake that the installation can provide. 250 Numeric value
o2generatedamount The amount of oxygen generated by the installation. 5000 Numeric value

Repairable

Field Note Example Expected Default
repairtype The type of repair the installation requires. mechanical Mechanical, Electrical
repairskill The level of skill required for repairs. 40 Numeric value
Fabricator

A machine capable of manufacturing a wide range of items out of basic raw materials.
Statistics*
Power Consumption 10 + 500 kW
Item Slots 5 input slots and 1 output slot
Repairable
Required Skill Mechanical Engineering 55
Required Item Wrench
Technical
Identifier fabricator
Categories Machine
Tags fabricator,donttakeitems,dontsellitems

The example seen to the right is defined as follows:

{{Installations infobox
| name        = Fabricator
| imagewidth  = 100
| identifier  = fabricator
| description = A machine capable of manufacturing a wide range of items out of basic raw materials.
| category    = Machine
| tags        = fabricator,donttakeitems,dontsellitems
| nocat       = yes

| powerconsumption = <span class="explain" title="Lights">10</span> + <span class="explain" title="Fabrication">500</span>
| itemslots        = 5 input slots and 1 output slot

| repairtype  = Mechanical
| repairskill = 55
}}

This template defines the table "Installations". View table.