Wiring: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
No edit summary
(Removed table section, as most info is available on the pages for the installations anyways.)
Line 1: Line 1:
{{Cleanup}}
{{Stub}}
'''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''', 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.


Line 13: Line 13:
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:
== Gallery ==
 
==== Any Itemcomponent ====
{| 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 ====
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]] ====
The connections in the electrical components are explained [[:Category:Electrical Components|on their separate page]].
 
==== Controller ====
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
!
|-
|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]] ====
{| 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]]
[[Category:Barotrauma]]


{{Universal nav}}
{{Universal nav}}

Revision as of 09:18, 23 October 2020

Template:Stub Wiring, also called electricity, is a central gameplay mechanics 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 (some devices are locked and their connections cannot be edited). The most obvious use of wiring is carrying power from the 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.

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.

Gallery

v·d·e·h
Barotrauma
Creatures
Pets Cthulhu    •   Defense Bot    •   Huskified Storage Container    •   Orange Boy    •   Peanut    •   Petraptor    •   Psilotoad
Small Crawler    •   Crawler Hatchling    •   Fractal Guardian (Steam Cannon Fractal Guardian   •   EMP Fractal Guardian)    •   Hammerhead Spawn    •   Human    •   Husk    •   Husked Crawler    •   Husked Human    •   Leucocyte    •   Moloch Baby    •   Mudraptor (Mudraptor Unarmored)    •   Mudraptor Hatchling    •   Mudraptor Veteran    •   Swarm Feeder    •   Terminal Cells   •   Tiger Thresher    •   Tiger Thresher Hatchling
Large Black Moloch    •   Bone Thresher Crawler Broodmother   •   Giant Spineling    •   Golden Hammerhead    •   Hammerhead (Moping Jack)    •   Hammerhead Matriarch    •   Moloch    •   Spineling   •   Watcher
Abyssal Charybdis    •   Endworm    •   Latcher
Ending
Spoilers

Ancient     •   Cyborg Worm     •   Guardian Repair Bot     •   Jove     •   Portal Guardian

Items
Consumables
Ammo
Handheld Weapons
Tools
Clothing
Headgear
Innerwear
Outerwear
Other
Electrical
Alien
Gardening
Skill Books
Misc
Installations
Submarine Weapons
Small Turrets
Large Turrets
Loaders
Other
Navigation
Machines
Electrical
Structure
Other
Alien
Jobs
Jobs
Jobs
Skills
Skills
Talent Trees
Talents
Captain

Bounty Hunter

Inspirational Leader

Logistics Expert

Prodigy

Travelling Tradesman

Veteran

Camaraderie

Down with the Ship

Emergency Maneuvers

Gunsmith

Sailor with No Name

Steady Tune
Gunslinger Skipper Politician

Quickdraw

Leading By Example

Commendations

Deputy

Lone Wolf

Helmsman

Affiliation

Your Reputation...

Drunken Sailor

Inspiring Presence

Trickle Down

Campaigning

Networking

Big Guns

Family

Figurehead
Security Officer

Buff

First Aid Training

Physical Conditioning

Protect and Serve

Swole

War Stories

Bootcamp

By the Book

Don't Push It

Munitions Expertise

Weaponsmith
Frogman Enforcer Gunner

Boarding Party

Pacification Kit

Rifleman

Scavenger

Slayer

Beat Cop

Stonewall

Commando

Tandem Fire

Daring Dolphin

Easy Turtle

Crusty Seaman

Inordinate Exsanguination

Extra Powder

Gun Runner

Spec-Ops

Implacable

Warlord
Mechanic

Ballast Denizen

Engine Engineer

Machine Maniac

Multifunctional

Safety First

Salvage Crew

Ironman

Modular Repairs

Oiled Machinery

Pump N Dump

Retrofit
Scrapper Machinist Brawler

Miner

Hull Fixer

I Am That Guy

Mass Production

Residual Waste

Quickfixer

Tinkerer

Heavy Lifting

Mudraptor Wrestler

Scrap Savant

Tool Maintenance

Let it Drain

Berserker

Foolhardy

Iron Storm

Robotics

MECHanic
Engineer

Egghead

Grounded

Junction Junkie

Remote Monitor

Station Engineer

Aggressive Engineering

Fun With Fission

Melodic Respite

Sample Collection

Submarine Of Things
Weapons Engineer Electrician Physicist

Military Applications

Grid Maintainer

Unstoppable Curiosity

Arms Race

Heavy Hitter

Pyromaniac

Unlimited Power

Buzzin'

Cruisin'

Weapon Artisan

Better Than New

Danger Zone

Nuclear Option

Lightning Wizard

Ph.D in Nuclear Physics
Medical Doctor

Example of Health

Health Insurance

La Resistance

Nobody Important Dies

Self-care

Stayin' Alive

Blood Donor

Don't Die on Me!

Fireman's Carry

Medical Companion

No Pressure
Xenologist Medic Chemist

Gene Harvester

Medical Expertise

Plague Doctor

Bloody Business

Gene Splicer

Emergency Response

Medical Assistance

Delivery System

Lab Contacts

Blackmarket Genes

Gene Tampering

Dr. Submarine

Vitamin Supplements

Super Soldiers

What a Stench!

Genetic Genius

Miracle Worker

Macrodosing
Assistant

Crew Layabout

Mailman

Mule

Playing Catchup

Skedaddle

Starter Quest

Bag It Up

Indentured Servitude

Inspiring Tunes

Jenga Master

Peer Learning

Revenge Squad
Grayshirt Apprentice Clown

The Waiting List

Apprenticeship

Enroll into Clown College

Non-Threatening

Tasty Target

Journeyman

Logistics System

Water Prankster

An Apple A Day

Insurance Policy

Loyal Assistant

Treacherous Scum

Chonky Honks

Psycho Clown

The Friends We Made

Graduation Ceremony

True Potential
Guides
Gameplay
Hosting
In-Game Dedicated Servers

Campaign Settings

Karma

Permissions

Console Commands

Hosting a Dedicated Server

List of Config Files

Enabling Mods on a Dedicated Server

Tools & Modding
Editors XML Other

Submarine Editor

Official Guide to the Submarine Editor (Diving deeper)

Character Editor

Official Guide to the Character Editor

Creating mods

XML and how Barotrauma uses it

Content packages (Content types)

Overrides

Installing mods

Publishing to Steam Workshop

Troubleshooting