Template:Installations infobox: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
mNo edit summary
mNo edit summary
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>{{doc}}[[Category:Templates]]
<noinclude>{{doc}}[[Category:Templates]][[Category:Cargo Declaration Templates]][[Category:Cargo Storage Templates]][[Category:Infobox Templates]]
{{#cargo_declare:_table=Installations
{{#cargo_declare:_table = Installations
| name        = String
| name        = String
| image      = File
| image      = File
| identifier  = String
| identifier  = String
| description = String
| description = String
| categories  = List (,) of String (allowed values=Structure,Decorative,Machine,Medical,Weapon,Diving,Equipment,Fuel,Electrical,Material,Alien,Wrecked,Legacy,Misc)
| subcategory = String (allowed values=Thalamus,Abandoned Outposts,Abandoned Outpost (Human),Abandoned Outpost (Monster),Exterior submarine walls,Exterior shuttle pieces,Labels,Background wall,Outpost)
| tags        = List (,) of String


| categories        = List (,) of String (allowed values=Structure,Decorative,Machine,Medical,Weapon,Diving,Equipment,Fuel,Electrical,Material,Alien,Wrecked,Legacy,Misc)
| subcategory      = String (allowed values=Thalamus, Abandoned Outposts, Abandoned Outpost (Human), Abandoned Outpost (Monster), Exterior submarine walls, Exterior shuttle pieces, Labels, Background wall, Outpost)
| tags              = List (,) of String
| powerconsumption  = Integer
| powerconsumption  = Integer
| reload            = Float
| reload            = Float
| itemslots        = Integer
| itemslots        = Wikitext
| powercapacity    = Integer
| powercapacity    = Integer
| maxoutput        = Integer
| maxoutput        = Integer
Line 18: Line 18:
| maxflow          = Integer
| maxflow          = Integer
| o2generatedamount = Integer
| o2generatedamount = Integer
| weapons = Integer
| handicap = Wikitext


| repairtype  = String (allowed values=Mechanical, Electrical)
| repairtype  = String (allowed values=Mechanical, Electrical)
| repairskill = Integer
| repairskill = Integer
| weapontype = String
| loader = String
| ammo = Wikitext
| ammocount = Integer
| afflictions = Wikitext
| note = Wikitext
}}</noinclude>
}}</noinclude>
<includeonly>{| 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>''}}
{{#if:{{{afflictions|}}}{{{weapons|}}}{{{handicap|}}}{{{powerconsumption|}}}{{{reload|}}}{{{itemslots|}}}{{{powercapacity|}}}{{{maxoutput|}}}{{{maxrechargespeed|}}}{{{maxforce|}}}{{{maxflow|}}}{{{o2generatedamount|}}}|
{{!}}-
! 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|}}}|
{{!}} style="width:45%; font-size:105%" {{!}} Categor{{#if:{{{category2|}}}{{{subcategory|}}}|ies|y}}
{{!}} style="width:50%; text-align:right" {{!}} '''Afflictions'''
{{!}} style="width:55%" {{!}} [[:Category:{{{category|Misc}}}|{{{category|Misc}}}]]{{#if:{{{category2|}}}|,&nbsp;[[:Category:{{{category2}}}|{{{category2}}}]]}}{{#if:{{{subcategory|}}}|<br>[[:Category:{{{subcategory}}}|{{{subcategory}}}]]}}<!--
{{!}} style="width:50%" {{!}} {{AfflictionParser|afflictions={{{afflictions|}}}}}}}
-->{{#if:{{{powerconsumption|}}}|&nbsp;
|-
{{!}}-
{{#if:{{{weapons|}}}|
{{!}} style="width:45%; font-size:105%" {{!}} Power Consumption
{{!}} style="width:50%; text-align:right" {{!}} '''Skill Requirement'''
{{!}} style="width:55%" {{!}} {{{powerconsumption}}} kW}}<!--
{{!}} style="width:50%" {{!}} {{hl|Weapons|20|Security Officer Job Icon|Skills#Weapons}}: {{{weapons}}}}}
-->{{#if:{{{reload|}}}|&nbsp;
|-
{{!}}-
{{#if:{{{handicap|}}}|
{{!}} style="width:45%; font-size:105%" {{!}} Firerate
{{!}} style="width:50%; text-align:right" {{!}} '''<abbr title="Penalty applied if the above skill requirements are not met">Handicap</abbr>'''
{{!}} style="width:55%" {{!}} {{#expr:({{{reload}}})^-1}} <span class="explain" title="Rounds per Second">RPS</span>}}<!--
{{!}} style="width:50%" {{!}} {{{handicap}}}}}
-->{{#if:{{{itemslots|}}}|&nbsp;
|-
{{!}}-
{{#if:{{{powerconsumption|}}}|
{{!}} style="width:45%; font-size:105%" {{!}} Item Slots
{{!}} style="width:50%; text-align:right" {{!}} '''Power Consumption'''
{{!}} style="width:55%" {{!}} {{{itemslots}}}}}<!--
{{!}} style="width:50%" {{!}} {{{powerconsumption}}} kW}}
-->{{#if:{{{powercapacity|}}}|&nbsp;
|-
{{!}}-
{{#if:{{{reload|}}}|
{{!}} style="width:45%; font-size:105%" {{!}} Power Capacity
{{!}} style="width:50%; text-align:right" {{!}} '''Firerate'''
{{!}} style="width:55%" {{!}} {{{powercapacity}}} kWm}}<!--
{{!}} style="width:50%" {{!}} {{#expr:({{{reload}}})^-1}} <span class="explain" title="Rounds per Second">RPS</span>}}
-->{{#if:{{{maxoutput|}}}|&nbsp;
|-
{{!}}-
{{#if:{{{itemslots|}}}|
{{!}} style="width:45%; font-size:105%" {{!}} Max Power Output
{{!}} style="width:50%; text-align:right" {{!}} '''Item Slots'''
{{!}} style="width:55%" {{!}} {{{maxoutput}}} kW}}<!--
{{!}} style="width:50%" {{!}} {{{itemslots}}}}}
-->{{#if:{{{maxrechargespeed|}}}|&nbsp;
|-
{{!}}-
{{#if:{{{powercapacity|}}}|
{{!}} style="width:45%; font-size:105%" {{!}} Max Recharge Speed
{{!}} style="width:50%; text-align:right" {{!}} '''Power Capacity'''
{{!}} style="width:55%" {{!}} {{{maxrechargespeed}}} kW}}<!--
{{!}} style="width:50%" {{!}} {{{powercapacity}}} kWm}}
-->{{#if:{{{maxforce|}}}|&nbsp;
|-
{{!}}-
{{#if:{{{maxoutput|}}}|
{{!}} style="width:45%; font-size:105%" {{!}} Max Force
{{!}} style="width:50%; text-align:right" {{!}} '''Max Power Output'''
{{!}} style="width:55%" {{!}} {{{maxforce}}}}}<!--
{{!}} style="width:50%" {{!}} {{{maxoutput}}} kW}}
-->{{#if:{{{maxflow|}}}|&nbsp;
|-
{{!}}-
{{#if:{{{maxrechargespeed|}}}|
{{!}} style="width:45%; font-size:105%" {{!}} Max Pumping Speed
{{!}} style="width:50%; text-align:right" {{!}} '''Max Recharge Speed'''
{{!}} style="width:55%" {{!}} {{{maxflow}}}}}<!--
{{!}} style="width:50%" {{!}} {{{maxrechargespeed}}} kW}}
-->{{#if:{{{o2generatedamount|}}}|&nbsp;
|-
{{!}}-
{{#if:{{{maxforce|}}}|
{{!}} style="width:45%; font-size:105%" {{!}} Generated Oxygen
{{!}} style="width:50%; text-align:right" {{!}} '''Max Force'''
{{!}} style="width:55%" {{!}} {{{o2generatedamount}}}}}<!--
{{!}} style="width:50%" {{!}} {{{maxforce}}}}}
-->{{#if:{{{repairtype|}}}|&nbsp;
|-
{{!}}-
{{#if:{{{maxflow|}}}|
! class="infobox3 responsive-table" colspan="2" {{!}} Repairable
{{!}} style="width:50%; text-align:right" {{!}} '''Max Pumping Speed'''
{{!}}-
{{!}} style="width:50%" {{!}} {{{maxflow}}}}}
{{!}} style="width:55%; font-size:105%" {{!}} Required Skill
|-
{{!}} style="width:45%" {{!}} {{#switch:{{lc:{{{repairtype}}}}}|mechanical=[[Skills#Mechanical_Engineering|Mechanical Engineering]]|electrical=[[Skills#Electrical Engineering|Electrical Engineering]]}} {{{repairskill}}}
{{#if:{{{o2generatedamount|}}}|
{{!}}-
{{!}} style="width:50%; text-align:right" {{!}} '''Generated Oxygen'''
{{!}} style="width:55%; font-size:105%" {{!}} Required Item
{{!}} style="width:50%" {{!}} {{{o2generatedamount}}}}}
{{!}} style="width:45%" {{!}} {{#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}}}]]}}}}<!--
{{#if:{{{repairtype|}}}|
-->{{#cargo_store:_table=Items
! class="infobox3 responsive-table" colspan="2" {{!}} Repairable}}
|-
{{#if:{{{repairtype|}}}|
{{!}} style="width:50%; text-align:right" {{!}} '''Required Skill'''
{{!}} style="width:50%" {{!}} {{#switch:{{lc:{{{repairtype}}}}}|mechanical=[[Skills#Mechanical_Engineering|Mechanical Engineering]]|electrical=[[Skills#Electrical Engineering|Electrical Engineering]]}} {{{repairskill}}}}}
|-
{{#if:{{{repairtype|}}}|
{{!}} style="width:50%; text-align:right" {{!}} '''Required Item'''
{{!}} style="width:50%" {{!}} {{#switch:{{lc:{{{repairtype}}}}}|mechanical={{hl|Wrench|x16}}|electrical={{hl|Screwdriver|x16}}}}}}
|-
| 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}}}
| identifier  = {{{identifier|}}}
| identifier  = {{{identifier|}}}
| description = {{{description|}}}
| description = {{{description|}}}
| categories  = {{{category|Misc}}}{{#if:{{{category2|}}}|,{{{category2}}}}}
| subcategory = {{{subcategory|}}}
| tags        = {{{tags|}}}


| categories = {{{category|Misc}}}{{#if:{{{category2|}}}|,{{{category2}}}}}
| subcategory = {{{subcategory|}}}
| tags = {{{tags|}}}
| powerconsumption = {{{powerconsumption|}}}
| powerconsumption = {{{powerconsumption|}}}
| reload = {{{reload|}}}
| reload           = {{{reload|}}}
| itemslots = {{{itemslots|}}}
| itemslots         = {{{itemslots|}}}
| powercapacity = {{{powercapacity|}}}
| powercapacity     = {{{powercapacity|}}}
| maxoutput = {{{maxoutput|}}}
| maxoutput         = {{{maxoutput|}}}
| maxrechargespeed = {{{maxrechargespeed|}}}
| maxrechargespeed = {{{maxrechargespeed|}}}
| maxforce = {{{maxforce|}}}
| maxforce         = {{{maxforce|}}}
| maxflow = {{{maxflow|}}}
| maxflow           = {{{maxflow|}}}
| o2generatedamount = {{{o2generatedamount|}}}
| o2generatedamount = {{{o2generatedamount|}}}


| repairtype = {{{repairtype|}}}
| weapons  = {{{weapons|}}}
| handicap = {{{handicap|}}}
 
| repairtype = {{{repairtype|}}}
| repairskill = {{{repairskill|}}}
| repairskill = {{{repairskill|}}}
}}}}</includeonly>
 
| weapontype  = {{{weapontype|}}}
| loader      = {{{loader|}}}
| ammo        = {{{ammo|}}}
| ammocount  = {{{ammocount|}}}
| afflictions = {{{afflictions|}}}
| note        = {{{note|}}}
}}}}</onlyinclude></includeonly>

Revision as of 23:38, 3 January 2024

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.