This article is a stub.

Difference between revisions of "Wiring"

From Official Barotrauma Wiki
Jump to: navigation, search
m
 
(7 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Cleanup}}
+
{{Version|stub=yes}}
'''Wiring''', also called '''electricity''', is a central gameplay mechanics used for supplying power to various systems throughout the [[:Category:Submarines|submarine]] and for creating complex devices.
+
'''Wiring''' is a central gameplay mechanic used for supplying power to various systems throughout the [[Submarines|submarine]] and for creating complex devices.
  
==Usage==
+
== Usage ==
Some items and devices can be connected to each other using [[Wire|wires]] (some devices are locked and their connections cannot be edited). The most obvious use of wiring is carrying power from the [[Nuclear Reactor|reactor]] to various devices, but wires can also carry various types of signals which can be used to build a wide range of complex systems. Think redstone in Minecraft.
+
 
 +
Some [[items]] and [[Installations|devices]] can be connected to each other using [[Wire|wires]] (it is possible to lock wiring of an installation or item, preventing wiring, in the [[Submarine Editor]]). The most obvious use of wiring is carrying power from the [[Nuclear Reactor|reactor]] to various devices, but through usage of [[Wiring Components|wiring components]] more advanced circuits can be built which can be used to build a wide range of complex systems.
 +
 
 +
* The color of wires has no effect on function, the various colors are used only for organization.
  
 
Items that can be connected via wires have a connection panel, which can be accessed by selecting the item while holding a [[Screwdriver|screwdriver]] in either hand. The connection panels can have several different connectors, each of which is marked with a label that describes what it does.  
 
Items that can be connected via wires have a connection panel, which can be accessed by selecting the item while holding a [[Screwdriver|screwdriver]] in either hand. The connection panels can have several different connectors, each of which is marked with a label that describes what it does.  
Line 11: Line 14:
 
New wiring can be laid out by selecting an item while holding a screwdriver and a wire. The wire will be shown at the bottom of the connection panel, and it can be dragged to any of the connectors in the panel. After the wire is plugged in, the other end needs to be connected to some other item. This is done the same way as the first connection: when selecting another item, the other end of the wire will be shown at the bottom of the connection panel where it can be plugged in to the desired connection.
 
New wiring can be laid out by selecting an item while holding a screwdriver and a wire. The wire will be shown at the bottom of the connection panel, and it can be dragged to any of the connectors in the panel. After the wire is plugged in, the other end needs to be connected to some other item. This is done the same way as the first connection: when selecting another item, the other end of the wire will be shown at the bottom of the connection panel where it can be plugged in to the desired connection.
  
Some items and devices have a connection panel where wires can be plugged in. The panels can have several different inputs and outputs, some sending signals out depending on the state of the item and some controlling the item in one way or another.  
+
Some items and devices have a connection panel where wires can be plugged in. The panels can have several different inputs and outputs, some sending signals out depending on the state of the item and some controlling the item in one way or another.
 
 
Here is a list of the inputs and outputs of some installations and components:
 
  
==== Any Itemcomponent ====
+
Rewiring devices that use power can shock users if their [[Skills#Electrical_Engineering|Electrical Engineering skill]] is too low, dealing damage.
{| class="wikitable"
 
!Label
 
!Type
 
!Description
 
!
 
|-
 
|activate, use
 
|input
 
|Uses the item whenever a signal is received. The effect is dependent on which type of itemcomponent it is and what kind of effects are assigned to the connection in the configuration file of the item.
 
|
 
|}
 
  
==== Powered ====
+
== Controls in-game ==
All items that require power either have the "powered" item component or some subclass of it (OxygenGenerator, Pump, Engine...)
 
{| class="wikitable"
 
!Label
 
!Type
 
!Description
 
!
 
|-
 
|power_in, power
 
|input
 
|Delivers power to the item, or in case of items with the PowerContainer or PowerTransfer component (Batteries, Junction Boxes), distributes it to other connected items. Power connections don't work with signal connections: connecting a power connection to a signal connection or vice versa does nothing.
 
|
 
|}
 
  
==== [[:Category:Electrical Components|Electrical Components]] ====
+
While holding a wire in one hand and a screwdriver in the other, pointing to an installation to highlight it and pressing {{Key|E}} allows attaching the wire to it through the connection panel.
The connections in the electrical components are explained [[:Category:Electrical Components|on their separate page]].
+
In the connection panel, the new wire is shown at the bottom, still loose. Connecting it to an outlet is done by {{Key|mouse|left}}drag-and-dropping it on the outlet. The connection panel can then be safely closed, and the same procedure must be performed on the second installation. Unplugging a wire from an outlet is done the same way.
 +
While drawing wire through the submarine between two installations, {{Key|mouse|left}}left-click allows attaching the wire to the wall and {{Key|mouse|right}}right-click cancels the last of such actions.
  
==== Controller ====
+
* When the wire is not connected on either end, drag-and-dropping it in the inventory collects the wire.
Controller is a component that can make an item control other items. The most common use of the controller component are buttons.
+
* While holding a connected wire, it is still possible to use buttons, doors, and hatches. This can be used to drag a wire very long distances or even outside the submarine.
{| class="wikitable"
 
!Label
 
!Type
 
!Description
 
!
 
|-
 
|signal_out
 
|output
 
|Sends out "1" when the item is selected
 
|
 
|-
 
|trigger_out
 
|output
 
|Sends out "1" if the item is selected and the user left clicks. Used in railgun controllers for example: when the user wants to fire, the the component sends out a signal to the railgun
 
|
 
|-
 
|position_out
 
|output
 
|Sends out the cursor position of the user and focuses the camera on the connected item if the FocusOnSelected attribute of the item is set to true. Used in railgun controllers for aiming the railgun.
 
|
 
|}
 
  
==== [[Doors|Door]] ====
+
== Gallery ==
{| class="wikitable"
 
!Label
 
!Type
 
!Description
 
!
 
|-
 
|toggle
 
|input
 
|Closes/opens the door when any signal is received
 
|
 
|-
 
|set_state
 
|input
 
|Closes the door when a signal "0" is received and opens it whenever any other signal is received
 
|
 
|-
 
|state_out
 
|output
 
|Sends out "0" if the door is closed and "1" if it is open
 
|
 
|}
 
  
==== [[Pump]] ====
 
{| class="wikitable"
 
!Label
 
!Type
 
!Description
 
!
 
|-
 
|toggle
 
|input
 
|Turns the pump on/off whenever a signal is received
 
|
 
|-
 
|set_active
 
|input
 
|Turns the pump off when a signal "0" is received, and opens it when any other signal is received
 
|
 
|-
 
|set_speed
 
|input
 
|Sets the speed of the pump to the received value. The value is clamped between -100.0 and 100.0
 
|
 
|-
 
|set_targetlevel
 
|input
 
|Sets the target water level in the room to the received value. 0.0 means that the pump will try to empty the room completely, 50 means that it will try to fill the room half way and 100.0 means that it will try to fill the entire room with water. The value is clamped between 0.0 and 100.0
 
|
 
|}
 
 
==== '''Steering''' ====
 
{| class="wikitable"
 
!Label
 
!Type
 
!Description
 
!
 
|-
 
|velocity_x_out
 
|output
 
|Sends out the amount of steering along the x-axis. Clamped between -100.0 and 100.0 For example, if the submarine is being steered at full speed to the right, the output signal is 100.0. The most common use is to send the signal to the engine the move the submarine forwards and backwards.
 
|
 
|-
 
|velocity_y_out
 
|output
 
|Sends out the amount of steering along the y-axis, where down is the positive direction. Clamped between -100.0 and 100.0. For example, if the submarine is being steered straight down, the output signal is 100.0. The most common use is to send the signal to the set_targetlevel inputs of some pumps, making them fill up ballast tanks when diving and empty them when moving upwards.
 
|
 
|-
 
|velocity_in
 
|input
 
|Sets the steering velocity to the received value. The signal must contain the x-speed and y-speed separated with a comma, e.g. "-50,10".
 
|
 
|}
 
 
==== Engine ====
 
Controller is a component that can make an item control other items. The most common use of the controller component are buttons.
 
{| class="wikitable"
 
!Label
 
!Type
 
!Description
 
!
 
|-
 
|set_force
 
|input
 
|Sets the direction and power at which the engine tries to push the submarine. Clamped between -100.0 and 100.0. A signal of "100.0" would make the engine push the submarine forwards at full speed (assuming there is enough power) and "-100.0" backwards.
 
|
 
|}
 
 
==== Gallery ====
 
Gallery of wiring interfaces and panels
 
 
<gallery mode="nolines">
 
<gallery mode="nolines">
File:Reactor Wiring Interface.png|Reactor wiring interface
+
File:Wiring Interface Door.png|thumb|A wiring interface for a door.
File:Wiring Interface Door.png|thumb|Windowed Door with Buttons wiring interface.
 
 
</gallery>
 
</gallery>
[[Category:Barotrauma]]
 
  
 
{{Universal nav}}
 
{{Universal nav}}
 +
 +
[[Category:Game Mechanics]]

Latest revision as of 02:35, 5 April 2022

Version Checkmark False.png Data is potentially outdated
Last updated for an unknown version
The current game version is 0.18.12.0

Wiring is a central gameplay mechanic used for supplying power to various systems throughout the submarine and for creating complex devices.

Usage

Some items and devices can be connected to each other using wires (it is possible to lock wiring of an installation or item, preventing wiring, in the Submarine Editor). The most obvious use of wiring is carrying power from the reactor to various devices, but through usage of wiring components more advanced circuits can be built which can be used to build a wide range of complex systems.

  • The color of wires has no effect on function, the various colors are used only for organization.

Items that can be connected via wires have a connection panel, which can be accessed by selecting the item while holding a screwdriver in either hand. The connection panels can have several different connectors, each of which is marked with a label that describes what it does.

For example, doors have three connectors: toggle, set_state and state_out. If the "toggle"-connector receives a signal, the door closes/opens. If "set_state" receives a signal "0", the door closes, and if it receives "1", the door opens. "State_out" simply sends out "1" or "0", depending on whether the door is open or closed.

New wiring can be laid out by selecting an item while holding a screwdriver and a wire. The wire will be shown at the bottom of the connection panel, and it can be dragged to any of the connectors in the panel. After the wire is plugged in, the other end needs to be connected to some other item. This is done the same way as the first connection: when selecting another item, the other end of the wire will be shown at the bottom of the connection panel where it can be plugged in to the desired connection.

Some items and devices have a connection panel where wires can be plugged in. The panels can have several different inputs and outputs, some sending signals out depending on the state of the item and some controlling the item in one way or another.

Rewiring devices that use power can shock users if their Electrical Engineering skill is too low, dealing damage.

Controls in-game

While holding a wire in one hand and a screwdriver in the other, pointing to an installation to highlight it and pressing E allows attaching the wire to it through the connection panel. In the connection panel, the new wire is shown at the bottom, still loose. Connecting it to an outlet is done by Leftdrag-and-dropping it on the outlet. The connection panel can then be safely closed, and the same procedure must be performed on the second installation. Unplugging a wire from an outlet is done the same way. While drawing wire through the submarine between two installations, Leftleft-click allows attaching the wire to the wall and Rightright-click cancels the last of such actions.

  • When the wire is not connected on either end, drag-and-dropping it in the inventory collects the wire.
  • While holding a connected wire, it is still possible to use buttons, doors, and hatches. This can be used to drag a wire very long distances or even outside the submarine.

Gallery

v·d·e·h
Barotrauma
Creatures
Very Large
Large
Medium
Small
Very Small
Pets
Items
Consumables
Ammo
Handheld Weapons
Tools
Clothing
Headgear
Innerwear
Outerwear
Other
Electrical
Alien
Gardening
Books
Misc
Installations
Submarine Weapons
Turrets
Loaders
Other
Navigation
Machines
Electrical
Structure
Other
Alien
Guides
Gameplay & Tips
Servers & Hosting
Modding, Editing, & Publishing