Template:Installations infobox: Difference between revisions
From Official Barotrauma Wiki
mNo edit summary |
m (Rounding RPS to two decimals) |
||
(12 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 | ||
Line 11: | Line 11: | ||
| powerconsumption = Integer | | powerconsumption = Integer | ||
| reload = Float | | reload = Float | ||
| itemslots = | | itemslots = Wikitext | ||
| powercapacity = Integer | | powercapacity = Integer | ||
| maxoutput = Integer | | maxoutput = Integer | ||
Line 28: | Line 28: | ||
| loader = String | | loader = String | ||
| ammo = Wikitext | | ammo = Wikitext | ||
| ammocount = Integer | |||
| afflictions = Wikitext | | afflictions = 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:{{{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:50%; text-align:right" {{!}} '''Afflictions''' | |||
{{!}} style="width:50%" {{!}} {{AfflictionParser|afflictions={{{afflictions|}}}}}}} | |||
{{!}} style="width:50%; | |- | ||
{{!}} style="width:50%" {{!}} {{{afflictions}}}}} | {{#if:{{{weapons|}}}| | ||
{{!}} style="width:50%; text-align:right" {{!}} '''Skill Requirement''' | |||
{{!}} style="width:50%" {{!}} {{hl|Weapons|20|Security Officer Job Icon|Skills#Weapons}}: {{{weapons}}}}} | |||
{{!}} style="width:50%; | |- | ||
{{!}} style="width:50%" {{!}} {{hl|Weapons|20|Security Officer Job Icon|Skills#Weapons}}: {{{weapons}}}}} | {{#if:{{{handicap|}}}| | ||
{{!}} 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%; | |- | ||
{{!}} style="width:50%" {{!}} {{{handicap}}}}} | {{#if:{{{powerconsumption|}}}| | ||
{{!}} style="width:50%; text-align:right" {{!}} '''Power Consumption''' | |||
{{!}} style="width:50%" {{!}} {{{powerconsumption}}} kW}} | |||
{{!}} style="width:50%; | |- | ||
{{!}} style="width:50%" {{!}} {{{powerconsumption}}} kW}} | {{#if:{{{reload|}}}| | ||
{{!}} style="width:50%; text-align:right" {{!}} '''Firerate''' | |||
{{!}} style="width:50%" {{!}} {{#expr:({{{reload}}})^-1 round 2}} <span class="explain" title="Rounds per Second">RPS</span>}} | |||
{{!}} style="width:50%; | |- | ||
{{!}} style="width:50%" {{!}} {{#expr:({{{reload}}})^-1}} <span class="explain" title="Rounds per Second">RPS</span>}} | {{#if:{{{itemslots|}}}| | ||
{{!}} style="width:50%; text-align:right" {{!}} '''Item Slots''' | |||
{{!}} style="width:50%" {{!}} {{{itemslots}}}}} | |||
{{!}} style="width:50%; | |- | ||
{{!}} style="width:50%" {{!}} {{{itemslots}}}}} | {{#if:{{{powercapacity|}}}| | ||
{{!}} style="width:50%; text-align:right" {{!}} '''Power Capacity''' | |||
{{!}} style="width:50%" {{!}} {{{powercapacity}}} kWm}} | |||
{{!}} style="width:50%; | |- | ||
{{!}} style="width:50%" {{!}} {{{powercapacity}}} kWm}} | {{#if:{{{maxoutput|}}}| | ||
{{!}} style="width:50%; text-align:right" {{!}} '''Max Power Output''' | |||
{{!}} style="width:50%" {{!}} {{{maxoutput}}} kW}} | |||
{{!}} style="width:50%; | |- | ||
{{!}} style="width:50%" {{!}} {{{maxoutput}}} kW}} | {{#if:{{{maxrechargespeed|}}}| | ||
{{!}} style="width:50%; text-align:right" {{!}} '''Max Recharge Speed''' | |||
{{!}} style="width:50%" {{!}} {{{maxrechargespeed}}} kW}} | |||
{{!}} style="width:50%; | |- | ||
{{!}} style="width:50%" {{!}} {{{maxrechargespeed}}} kW}} | {{#if:{{{maxforce|}}}| | ||
{{!}} style="width:50%; text-align:right" {{!}} '''Max Force''' | |||
{{!}} style="width:50%" {{!}} {{{maxforce}}}}} | |||
{{!}} style="width:50%; | |- | ||
{{!}} style="width:50%" {{!}} {{{maxforce}}}}} | {{#if:{{{maxflow|}}}| | ||
{{!}} style="width:50%; text-align:right" {{!}} '''Max Pumping Speed''' | |||
{{!}} style="width:50%" {{!}} {{{maxflow}}}}} | |||
{{!}} style="width:50%; | |- | ||
{{!}} style="width:50%" {{!}} {{{maxflow}}}}} | {{#if:{{{o2generatedamount|}}}| | ||
{{!}} style="width:50%; text-align:right" {{!}} '''Generated Oxygen''' | |||
{{!}} style="width:50%" {{!}} {{{o2generatedamount}}}}} | |||
{{!}} style="width:50%; | |- | ||
{{!}} style="width:50%" {{!}} {{{o2generatedamount}}}}} | {{#if:{{{repairtype|}}}| | ||
! 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%; | {{!}} 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%; | {{!}} 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}}}}}} | ||
|}{{ | |- | ||
-->{{#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 119: | Line 134: | ||
| o2generatedamount = {{{o2generatedamount|}}} | | o2generatedamount = {{{o2generatedamount|}}} | ||
| weapons = {{{weapons|}}} | | weapons = {{{weapons|}}} | ||
| handicap = {{{handicap|}}} | | handicap = {{{handicap|}}} | ||
Line 125: | Line 140: | ||
| repairskill = {{{repairskill|}}} | | repairskill = {{{repairskill|}}} | ||
| weapontype = {{{weapontype|}}} | | weapontype = {{{weapontype|}}} | ||
| loader = {{{loader|}}} | | loader = {{{loader|}}} | ||
| ammo = {{{ammo|}}} | | ammo = {{{ammo|}}} | ||
| ammocount = {{{ammocount|}}} | |||
| afflictions = {{{afflictions|}}} | |||
| note = {{{note|}}} | |||
}}}}</onlyinclude></includeonly> | }}}}</onlyinclude></includeonly> |
Latest revision as of 18:14, 24 April 2024
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 | |||||||||
|
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 }}
The above documentation is transcluded from Template:Installations infobox/doc. (edit | history)
This template defines the table "Installations". View table.