Barotrauma

Barotrauma

162 ratings
FakeFish guide: Modding reference
By FakeFish and 3 collaborators
UPDATE: As of May 2022, we have collected all Barotrauma modding documentation in one place, and this guide will no longer be updated. Please see the new documentation on GitHub[regalis11.github.io]!

This is the first edition of a general-purpose modding reference guide. It will hopefully be of assistance to anyone who mods, or would like to mod Barotrauma, even in its current, largely work-in-progress state. Please use the comments section to let us know what kind of documentation should be added in the future!
4
   
Award
Favorite
Favorited
Unfavorite
Hello and welcome to modding Barotrauma!
We want to make Barotrauma as modder-friendly as we can. To that end, the game comes with a couple of editors, and we have separate, more in-depth guides for the Submarine and Character editors.

This guide you're reading now is intended to cover what happens outside the editors. We hope you find it helpful, and we'd be happy to hear what you think should be added to it in the future!
Content packages
Content packages are essentially files that tell the game which content files to use and where they are located. This includes items, structures, monsters, random events, level generation parameters, jobs and so on. By default the game uses a content package called “Vanilla 0.9”, which you can find in Content/Data/ContentPackages/Vanilla 0.9.xml. Any other content package can be considered a modification of the game content, that is, a "mod".

The content packages are in a format called XML[en.wikipedia.org], as almost all other moddable content in Barotrauma. If you have no prior experience with the XML format, don’t worry – even though it may look intimidating at first, the format is pretty simple. Please see the “XML” section later in this guide for further details.

Note that if you just want to publish a custom submarine in the workshop, you don't need to worry about content packages – you can just select the submarine from the "Publish item" tab in the Workshop menu, and the game automatically creates a folder and content package for your mod.

If you use the built-in character editor for creating a new character, you will have to select or create a content package for it. You cannot use the vanilla content package, because modifying the vanilla content package would make your game incompatible with the other players.

When playing in multiplayer mode, the players generally need to have the same mods installed as the server, or they will be unable to join. However, this does not apply to all types of content: for example, the clients can use mods that modify the UI or sounds without causing incompatibility with servers. See the "Content types" section for more info on which types of content cause compatibility issues.

Example:

A very simple content package could be configured as follows:
<contentpackage name="BestModEver" path="Mods/PotatoGun/filelist.xml" gameversion="0.9.1.0" corepackage="false"> <Item file="Mods/PotatoGun/potatogun.xml" /> </contentpackage>


This mod would simply add an extra item to the game (or items if there are multiple ones configured in the potatogun.xml file).

Core content packages

Most mods are usually not core content packages, but instead add things to or modify things in the Vanilla content package (= the default content of the game).

Core packages are packages that contain all the necessary files to make the game run, instead of just adding some extra files on top of another content package. There can only be one core package selected at a time.

Here's an example of a simple core package:

<contentpackage name="BestModEver" path="Mods/BestModEver/filelist.xml" gameversion="0.9.1.0" corepackage="true"> <Item file="Mods/BestModEver/items.xml" /> <Character file="Mods/BestModEver/Human/Human.xml" /> <Character file="Mods/BestModEver/Cthulhu/Cthulhu.xml" /> <Character file="Content/Characters/Crawler/Crawler.xml" /> <Structure file="Content/Map/StructurePrefabs.xml" /> <Jobs file="Content/Jobs.xml" /> <RandomEvents file="Mods/BestModEver/randomevents.xml" /> <Executable file="Barotrauma.exe" /> </contentpackage>

This content package would replace all the items in the game with whatever items are configured in the "Mods/BestModEver/items.xml" file. It would also use a modified version of the human characters and have all the monsters in the game replaced with Crawlers and Cthulhus. The random events have also been changed - perhaps by adding a new event that spawns Cthulhu and removing the events that spawn monsters/items which aren't included in the mod.

Note that the content package should be saved with the file name "filelist.xml" in the Mods folder, in this case "Mods/BestModEver/filelist.xml".
XML
Most of Barotrauma’s content (monsters, items, structures, random events, jobs, etc) is defined in XML files[en.wikipedia.org]. These code files may seem daunting if you’ve never used them before, but they’re actually quite simple to understand even if you’ve never done any sort of programming.

The XML files can be edited with almost any text editor, even notepad, but we recommend using a text editor that supports code highlighting and is able to point out mistakes in the file. For example, Notepad++[notepad-plus-plus.org] is a free, easy to use software that supports XML code highlighting. Other good options are Sublime Text[www.sublimetext.com] and Visual Studio Code/Community[visualstudio.microsoft.com].

XML files consist of elements, which in Barotrauma’s case could be for example an item. The elements are defined as follows:

<Item />

An element can also have attributes, which usually give some additional information about the element. For example:

<Item name=”Wrench” />

Elements can also have child elements. Barotrauma’s item elements for example have a child element called “Sprite” which determines what the item looks like.

<Item name=”Wrench”> <Sprite /> </Item>

Note that the Item element now looks a little different. The previous examples defined the element on a single line, and the “/>” symbols marked where the element ends. Now when we needed to add a child element inside the Item element, the Item had to be split into multiple lines, </Item> marking where the element ends.
Overriding content
Usually you are not creating a total conversion mod, but you might still want to override parts of the original content. This can be done by using the "override" elements in the xml configuration files.

Overriding is based on identifiers (where applicable), meaning that the identifier of the new item must match the identifier of the old item. If you try to override an item that is not found in the game, you will get an error in the console.

For example, the content of the potatogun.xml file included in the previous content package example could be something like this:

<Override> <Item name="Potato Gun" identifier="harpoongun" tags="mediumitem,weapon,gun"> [...content here…] </Item> </Override>

This mod would replace the vanilla "Harpoon Gun" with a "Potato Gun". The behavior of the gun is omitted in the example, but we would probably want to change the texture of the gun. In that case, we would replace the original "Sprite" element with a custom, like so:

<Override> <Item name="Potato Gun" identifier="harpoongun" tags="mediumitem,weapon,gun"> [...content…] <Sprite texture="potatogun.png" sourcerect="0,64,282,60" depth="0.55" origin="0.5,0.5"/> [...more content…] </Item> </Override>

In order to get the new item to function like the vanilla counterpart, make sure to include all the tags of the original item. You can add tags, but don't remove them (unless you really know what you are doing), or the item might not work as it should.

Note that for some content types, like items, you can override multiple definitions by simply adding the override element as the parent of the main element, like this:

<Override> <Items> <Item identifier="firstitem"/> <Item identifier="seconditem"/> </Items> </Override>

Overriding is already implemented for most content types, but not every single one of them. In the future, you will be able to modify all the content types. Next, let's have a look at the various content types we have.
Content types
In the previous examples the content packages included a couple of different types of content files: items, characters, structures, jobs, random events and the game executable. Here’s the full list of all supported content types. Unfortunately we don’t yet have a full documentation available for modifying all of the content types, but you can use the Vanilla content files as a reference to see how they work; most of them are pretty straight-forward.

Some types of content prevent players from joining servers if both the player and the server don't have the same content installed, while some can be freely installed without compatibility issues.
The ones that cause multiplayer incompatibility are Jobs, Item, Character, Structure, LocationTypes, MapGenerationParameters, LevelGenerationParameters, Missions, LevelObjectPrefabs, RuinConfig, Outpost, Afflictions and Orders.

Some of the content files are mandatory in core content packages. For example, you cannot have a core content package that does not include any items, characters or a game executable. The required types are Jobs, Item, Character, Structure, Outpost, Text, Executable, ServerExecutable, LocationTypes, MapGenerationParameters, LevelGenerationParameters, RandomEvents, Missions, RuinConfig, Afflictions, UIStyle, EventManagerSettings and Orders.

Submarine
A submarine file. Even though the game automatically loads all submarine files from the Submarines folder, if you publish a submarine in the Steam workshop, a content package containing only that submarine will be generated to tell the game where to find the submarine file.

Jobs
The character’s jobs; Captain, Engineer, Mechanic and so on.

Item
An item file that may contain one or more items.

ItemAssembly
A group of multiple items that may be pre-wired or pre-configured. Item assemblies can be created in the submarine editor.

Character
A character configuration file defines visual things like sounds and particle effects as well as functional things, like how the character acts, how much health does it have, and whether or not it can walk. A character configuration file also contains references to the ragdoll and animation files.

Note that, at least for now, the character configuration file must match the species name. So the character configuration file for a character with the species name "Mygreatcharacter", for example, should be Mygreatcharacter.xml. The species name is used like the identifier for items, so it has to be unique.

Editing characters in xml can be difficult, unless you really know what you do. Fortunately, we have a built-in editor for creating and editing the characters. There still is a few things you cannot adjust in the editor, but in general, you don't have to manually edit the .xml files anymore to edit the characters. For further information about creating and editing characters, see the character editor guide.

Structure
A structure configuration file; decorative background walls, solid wall pieces, etc.

Outpost
An outpost used in the campaign mode. The outposts are technically static, immovable submarines and can be created using the submarine editor.

Text
A file that defines in-game texts, which can be anything from texts you see in the menus to item names, and from error messages to loading screen texts. Mods don’t usually need to define new text files, but if you for example are creating a mod that adds new items and want the item names and descriptions to be translatable to multiple languages, you need to create text files for all the languages you want to support and define the names and descriptions there.

Executable
Where the game executable itself is stored. Only for advanced users: this may be useful if you’ve compiled a custom version of the game and want to create a mod that uses the custom executable instead of the normal Barotrauma.exe.

ServerExecutable
Similar to Executable; defines the path of the dedicated server executable.

LocationTypes
Defines the types of locations that can appear on the campaign map (City, Outpost, Military, Research...)

MapGenerationParameters
Defines how the campaign map is generated. This includes the size, the amount and placement of locations, how the map looks and the number of difficulty zones, among other things.

LevelGenerationParameters
Defines how the in-game levels are generated. This includes the size and shape, how the level looks like, the amount of smaller caves and ruins and many other things. You can create and test your own level generation parameters in the in-game level editor which can be accessed using the console command “editlevels”.

LevelObjectPrefabs
Defines the environmental objects such as plants, decorative rock formations, water currents, hydrothermal vents. These can also be edited in the level editor.

RandomEvents
Defines the random events that can occur during rounds.

Missions
Defines the missions that are available in the campaign and the mission mode.

BackgroundCreaturePrefabs
Defines the decorative, non-interactable background creatures that wander around the levels.

Sounds
Defines music and sound files. Do note that item-specific and character-specific sounds are defined in the item and character configuration files - the sound configuration files only define “global” sounds such as music, ambient, fire and water that aren’t related to some specific item/character.

RuinConfig
Defines how alien ruins are generated, including their layout, which structures they are made of and how items are laid out inside them.

Particles
Defines particle effects such as explosions, fire, splashes, etc. These can be edited using the in-game particle editor which can be accessed using the console command “editparticles”.

Decals
Defines decals such as blood spatters, explosion damage and burnt walls.

NPCConversations
Defines the random NPC conversations and dialog lines.

Afflictions
Defines afflictions such as blood loss, internal damage, addictions, infections, etc.

Tutorials
Defines the tutorial configurations. Do note that modifying the tutorials or creating your own ones will most likely require changes to the game’s source code and recompiling the game.

UIStyle
Defines UI style files which determine how UI elements look. These can be used to, for example, modify how the in-game menus or device interfaces look.

TraitorMissions
Defines traitor missions.
Items
Items consist of one or more “item components” that determine the functionality of the item. For example, an item could have a “Holdable” component that makes it possible to pick it up and hold it in your hands and an “ItemContainer” component that lets you contain other items inside it.

If you are familiar with Unity, you can think of items as Unity's GameObjects, and item components as the Components attached to the GameObjects.

In the following sections we will go over all the available item components and their editable properties.

Let's start with the properties shared by all the item components.

ItemComponent

Name
Type
Default value
Description
AllowUIOverlap
True/False
False
Can the UI elements of the item's interface overlap, or are they automatically repositioned so that they don't overlap
HudPriority
Integer
0
If the item has multiple components with a HUD of some sort, this value determines which of them should be drawn if there are multiple ones open. For example, connection panels have a high priority, meaning that when you start rewiring devices the connection panel interface takes precedence over the item's other interfaces.
PickingTime
Float
0
How long it takes to pick up the item (in seconds).
CanBePicked
True/False
False
Can the item be picked up (or interacted with, if the pick action does something else than picking up the item).
DrawHudWhenEquipped
True/False
False
Should the interface of the item (if it has one) be drawn when the item is equipped.
CanBeSelected
True/False
False
Can the item be selected by interacting with it.
CanBeCombined
True/False
False
Can the item be combined with other items of the same type.
RemoveOnCombined
True/False
False
Should the item be removed if combining it with an other item causes the condition of this item to drop to 0.
CharacterUsable
True/False
False
Can the "Use" action of the item be triggered by characters or just other items/StatusEffects.
AllowInGameEditing
True/False
True
Can the properties of the component be edited in-game (only applicable if the component has in-game editable properties).
DeleteOnUse
True/False
False
Should the item be deleted when it's used.
Msg
Text
A text displayed next to the item when it's highlighted (generally instructs how to interact with the item, e.g. "[Mouse1] Pick up").
CombatPriority
Float
0
How useful the item is in combat? Used by AI to decide which item it should use as a weapon. For the sake of clarity, use a value between 0 and 100 (not enforced).
Item component reference (A–D)
AdderComponent

Name
Type
Default value
Description
ClampMax
Float
999999
The output of the item is restricted below this value.
ClampMin
Float
-999999
The output of the item is restricted above this value.
TimeFrame
Float
0
The item must have received signals to both inputs within this timeframe to output the sum of the signals. If set to 0, the inputs must be received at the same time.

AndComponent

Name
Type
Default value
Description
TimeFrame
Float
0
The item sends the output if both inputs have received a non-zero signal within the timeframe. If set to 0, the inputs must receive a signal at the same time.
Output
Text
1
The signal sent when both inputs have received a non-zero signal.
FalseOutput
Text
The signal sent when both inputs have not received a non-zero signal (if empty, no signal is sent).

ColorComponent

No editable properties.

ConnectionPanel

Name
Type
Default value
Description
Locked
True/False
False
Locked connection panels cannot be rewired in-game.

Controller

Name
Type
Default value
Description
IsToggle
True/False
False
When enabled, the item will continuously send out a 0/1 signal and interacting with it will flip the signal (making the item behave like a switch). When disabled, the item will simply send out 1 when interacted with.

CustomInterface

Name
Type
Default value
Description
Labels
Text
The texts displayed on the buttons/tickboxes, separated by commas.
Signals
Text
The signals sent when the buttons are pressed or the tickboxes checked, separated by commas.

Deconstructor

Name
Type
Default value
Description
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.

DelayComponent

Name
Type
Default value
Description
Delay
Float
1
How long the item delays the signals (in seconds).
ResetWhenSignalReceived
True/False
False
Should the component discard previously received signals when a new one is received.
ResetWhenDifferentSignalReceived
True/False
False
Should the component discard previously received signals when the incoming signal changes.

DivideComponent

Name
Type
Default value
Description
ClampMax
Float
999999
The output of the item is restricted below this value.
ClampMin
Float
-999999
The output of the item is restricted above this value.
TimeFrame
Float
0
The item must have received signals to both inputs within this timeframe to output the sum of the signals. If set to 0, the inputs must be received at the same time.

DockingPort

Name
Type
Default value
Description
DistanceTolerance
Vector2
32.0,32.0
How close the docking port has to be to another port to dock.
DockedDistance
Float
32
How close together the docking ports are forced when docked.
IsHorizontal
True/False
True
Is the port horizontal.

Door

Name
Type
Default value
Description
ShadowScale
Vector2
1,1
The scale of the shadow-casting area of the door (relative to the actual size of the door).
Stuck
Float
0
How badly stuck the door is (in percentages). If the percentage reaches 100, the door needs to be cut open to make it usable again.
OpeningSpeed
Float
3
How quickly the door opens.
ClosingSpeed
Float
3
How quickly the door closes.
Window
Rectangle
0.0,0.0,0.0,0.0
Position and size of the window on the door. The upper left corner is 0,0. Set the width and height to 0 if you don't want the door to have a window.
IsOpen
True/False
False
Is the door currently open.
HasIntegratedButtons
True/False
False
If the door has integrated buttons, it can be opened by interacting with it directly (instead of using buttons wired to it).
Impassable
True/False
False
Characters and items cannot pass through impassable doors. Useful for things such as ducts that should only let water and air through.
Item component reference (E–G)
ElectricalDischarger

Name
Type
Default value
Description
Range
Float
100
How far the discharge can travel from the item.
RangeMultiplierInWalls
Float
10
How much further can the discharge be carried when moving across walls.
Duration
Float
0,25
The duration of an individual discharge (in seconds).
OutdoorsOnly
True/False
False
If set to true, the discharge cannot travel inside the submarine nor shock anyone inside.
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.

Engine

Name
Type
Default value
Description
MaxForce
Float
2000
The amount of force exerted on the submarine when the engine is operating at full power.
PropellerPos
Vector2
0.0,0.0
The position of the propeller as an offset from the item's center (in pixels). Determines where the particles spawn and the position that causes characters to take damage from the engine if the PropellerDamage is defined.
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.

EqualsComponent

Name
Type
Default value
Description
Output
Text
1
The signal this item outputs when the received signals are equal.
FalseOutput
Text
The signal this item outputs when the received signals are not equal.
TimeFrame
Float
0
The maximum amount of time between the received signals. If set to 0, the signals must be received at the same time.

Fabricator

Name
Type
Default value
Description
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.

FunctionComponent

Name
Type
Default value
Description
Function
Round/Ceil/Floor/Factorial
Round
Which kind of function to run the input through.

GreaterComponent

Name
Type
Default value
Description
Output
Text
1
The signal this item outputs when the received signals are equal.
FalseOutput
Text
The signal this item outputs when the received signals are not equal.
TimeFrame
Float
0
The maximum amount of time between the received signals. If set to 0, the signals must be received at the same time.
Item component reference (H–I)
Holdable

Name
Type
Default value
Description
Attached
True/False
False
Is the item currently attached to a wall (only valid if Attachable is set to true).
Aimable
True/False
True
Can the item be pointed to a specific direction or do the characters always hold it in a static pose.
ControlPose
True/False
False
Should the character adjust its pose when aiming with the item. Most noticeable underwater, where the character will rotate its entire body to face the direction the item is aimed at.
Attachable
True/False
False
Can the item be attached to walls.
Reattachable
True/False
True
Can the item be reattached to walls after it has been deattached (only valid if Attachable is set to true).
AttachedByDefault
True/False
False
Should the item be attached to a wall by default when it's placed in the submarine editor.
HoldPos
Vector2
0.0,0.0
The position the character holds the item at (in pixels, as an offset from the character's shoulder). For example, a value of 10,-100 would make the character hold the item 100 pixels below the shoulder and 10 pixels forwards.
AimPos
Vector2
0.0,0.0
The position the character holds the item at when aiming (in pixels, as an offset from the character's shoulder). Works similarly as HoldPos, except that the position is rotated according to the direction the player is aiming at. For example, a value of 10,-100 would make the character hold the item 100 pixels below the shoulder and 10 pixels forwards when aiming directly to the right.
HoldAngle
Float
0
The rotation at which the character holds the item (in degrees, relative to the rotation of the character's hand).
SwingAmount
Vector2
0.0,0.0
How much the item swings around when aiming/holding it (in pixels, as an offset from AimPos/HoldPos).
SwingSpeed
Float
0
How fast the item swings around when aiming/holding it (only valid if SwingAmount is set).
SwingWhenHolding
True/False
False
Should the item swing around when it's being held.
SwingWhenAiming
True/False
False
Should the item swing around when it's being aimed.
SwingWhenUsing
True/False
False
Should the item swing around when it's being used (for example, when firing a weapon or a welding tool).

ItemContainer

Name
Type
Default value
Description
ItemPos
Vector2
0.0,0.0
The position where the contained items get drawn at (offset from the upper left corner of the sprite in pixels).
ItemInterval
Vector2
0.0,0.0
The interval at which the contained items are spaced apart from each other (in pixels).
ItemsPerRow
Integer
100
How many items are placed in a row before starting a new row.
ContainedSpriteDepth
Float
-1
Depth at which the contained sprites are drawn. If not set, the original depth of the item sprites is used.
ItemRotation
Float
0
The rotation in which the contained sprites are drawn (in degrees).
UILabel
Text
An optional text displayed above the item's inventory.
ShowContainedStateIndicator
True/False
True
Should an indicator displaying the state of the contained items be displayed on this item's inventory slot. If this item can only contain one item, the indicator will display the condition of the contained item, otherwise it will indicate how full the item is.
ShowConditionInContainedStateIndicator
True/False
False
If enabled, the condition of this item is displayed in the indicator that would normally show the state of the contained items. May be useful for items such as ammo boxes and magazines that spawn projectiles as needed, and use the condition to determine how many projectiles can be spawned in total.
KeepOpenWhenEquipped
True/False
False
Should the inventory of this item be kept open when the item is equipped by a character.
MovableFrame
True/False
False
Can the inventory of this item be moved around on the screen by the player.
Capacity
Integer
5
How many items can be contained inside this item.
HideItems
True/False
True
Should the items contained inside this item be hidden. If set to false, you should use the ItemPos and ItemInterval properties to determine where the items get rendered.
DrawInventory
True/False
True
Should the inventory of this item be visible when the item is selected.
AutoInteractWithContained
True/False
False
If set to true, interacting with this item will make the character interact with the contained item(s), automatically picking them up if they can be picked up.
SlotsPerRow
Integer
5
How many inventory slots the inventory has per row.
ContainableRestrictions
Text
Define items (by identifiers or tags) that bots should place inside this container. If empty, no restrictions are applied.

ItemLabel

Name
Type
Default value
Description
Padding
Vector4
0,0,0,0
The amount of padding around the text in pixels (left,top,right,bottom).
Text
Text
The text displayed in the label.
TextColor
Color
0,0,0,255
The color of the text displayed on the label (R,G,B,A).
TextScale
Float
1
The scale of the text displayed on the label.
Scrollable
True/False
False
Should the text scroll horizontally across the item if it's too long to be displayed all at once.
ScrollSpeed
Float
20
How fast the text scrolls across the item (only valid if Scrollable is set to true).
Item component reference (L)
Ladder

No editable properties.

LevelResource

Name
Type
Default value
Description
DeattachDuration
Float
1
How long it takes to deattach the item from the level walls (in seconds).
DeattachTimer
Float
0
How far along the item is to being deattached. When the timer goes above DeattachDuration, the item is deattached.

LightComponent

Name
Type
Default value
Description
Range
Float
100
The range of the emitted light. Higher values are more performance-intensive.
CastShadows
True/False
True
Should structures cast shadows when light from this light source hits them. Disabling shadows increases the performance of the game, and is recommended for lights with a short range.
DrawBehindSubs
True/False
False
Lights drawn behind submarines don't cast any shadows and are much faster to draw than shadow-casting lights. It's recommended to enable this on decorative lights outside the submarine's hull.
IsOn
True/False
False
Is the light currently on.
Flicker
Float
0
How heavily the light flickers. 0 = no flickering, 1 = the light will alternate between completely dark and full brightness.
BlinkFrequency
Float
0
How rapidly the light blinks on and off (in Hz). 0 = no blinking.
LightColor
Color
255,255,255,255
The color of the emitted light (R,G,B,A).
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.
Item component reference (M–Mo)
MeleeWeapon

Name
Type
Default value
Description
Range
Float
0
An estimation of how close the item has to be to the target for it to hit. Used by AI characters to determine when they're close enough to hit a target.
Reload
Float
0,5
How long the user has to wait before they can hit with the weapon again (in seconds).
AllowHitMultiple
True/False
False
Can the weapon hit multiple targets per swing.
Attached
True/False
False
Is the item currently attached to a wall (only valid if Attachable is set to true).
Aimable
True/False
True
Can the item be pointed to a specific direction or do the characters always hold it in a static pose.
ControlPose
True/False
False
Should the character adjust its pose when aiming with the item. Most noticeable underwater, where the character will rotate its entire body to face the direction the item is aimed at.
Attachable
True/False
False
Can the item be attached to walls.
Reattachable
True/False
True
Can the item be reattached to walls after it has been deattached (only valid if Attachable is set to true).
AttachedByDefault
True/False
False
Should the item be attached to a wall by default when it's placed in the submarine editor.
HoldPos
Vector2
0.0,0.0
The position the character holds the item at (in pixels, as an offset from the character's shoulder). For example, a value of 10,-100 would make the character hold the item 100 pixels below the shoulder and 10 pixels forwards.
AimPos
Vector2
0.0,0.0
The position the character holds the item at when aiming (in pixels, as an offset from the character's shoulder). Works similarly as HoldPos, except that the position is rotated according to the direction the player is aiming at. For example, a value of 10,-100 would make the character hold the item 100 pixels below the shoulder and 10 pixels forwards when aiming directly to the right.
HoldAngle
Float
0
The rotation at which the character holds the item (in degrees, relative to the rotation of the character's hand).
SwingAmount
Vector2
0.0,0.0
How much the item swings around when aiming/holding it (in pixels, as an offset from AimPos/HoldPos).
SwingSpeed
Float
0
How fast the item swings around when aiming/holding it (only valid if SwingAmount is set).
SwingWhenHolding
True/False
False
Should the item swing around when it's being held.
SwingWhenAiming
True/False
False
Should the item swing around when it's being aimed.
SwingWhenUsing
True/False
False
Should the item swing around when it's being used (for example, when firing a weapon or a welding tool).

MemoryComponent

Name
Type
Default value
Description
Value
Text
The currently stored signal the item outputs.

MiniMap

Name
Type
Default value
Description
RequireWaterDetectors
True/False
False
Does the machine require inputs from water detectors in order to show the water levels inside rooms.
RequireOxygenDetectors
True/False
True
Does the machine require inputs from oxygen detectors in order to show the oxygen levels inside rooms.
ShowHullIntegrity
True/False
True
Should damaged walls be displayed by the machine.
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.

ModuloComponent

Name
Type
Default value
Description
Modulus
Float
1
The modulus of the operation. Must be non-zero.

MotionSensor

Name
Type
Default value
Description
MotionDetected
True/False
False
Has the item currently detected movement. Intended to be used by StatusEffect conditionals (setting this value in XML has no effect).
OnlyHumans
True/False
False
Should the sensor only detect the movement of humans?
IgnoreDead
True/False
False
Should the sensor ignore the bodies of dead characters?
RangeX
Float
0
Horizontal detection range.
RangeY
Float
0
Vertical movement detection range.
DetectOffset
Vector2
0,0
The position to detect the movement at relative to the item. For example, 0,100 would detect movement 100 units above the item.
Output
Text
1
The signal the item outputs when it has detected movement.
FalseOutput
Text
The signal the item outputs when it has not detected movement.
MinimumVelocity
Float
0,01
How fast the objects within the detector's range have to be moving (in m/s).
Item component reference (Mu–O)
MultiplyComponent

Name
Type
Default value
Description
ClampMax
Float
999999
The output of the item is restricted below this value.
ClampMin
Float
-999999
The output of the item is restricted above this value.
TimeFrame
Float
0
The item must have received signals to both inputs within this timeframe to output the sum of the signals. If set to 0, the inputs must be received at the same time.

NotComponent

No editable properties.

OrComponent

Name
Type
Default value
Description
TimeFrame
Float
0
The item sends the output if both inputs have received a non-zero signal within the timeframe. If set to 0, the inputs must receive a signal at the same time.
Output
Text
1
The signal sent when both inputs have received a non-zero signal.
FalseOutput
Text
The signal sent when both inputs have not received a non-zero signal (if empty, no signal is sent).

OscillatorComponent

Name
Type
Default value
Description
OutputType
Pulse/Sine/Square
Pulse
What kind of a signal the item outputs. Pulse: periodically sends out a signal of 1. Sine: sends out a sine wave oscillating between -1 and 1. Square: sends out a signal that alternates between 0 and 1.
Frequency
Float
1
How fast the signal oscillates, or how fast the pulses are sent (in Hz).

OxygenDetector

No editable properties.

OxygenGenerator

Name
Type
Default value
Description
GeneratedAmount
Float
400
How much oxygen the machine generates when operating at full power.
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.
Item component reference (P–Pow)
Pickable

No editable properties.

PowerContainer

Name
Type
Default value
Description
IndicatorPosition
Vector2
0,0
The position of the progress bar indicating the charge of the item. In pixels as an offset from the upper left corner of the sprite.
IndicatorSize
Vector2
0,0
The size of the progress bar indicating the charge of the item (in pixels).
IsHorizontal
True/False
False
Should the progress bar indicating the charge of the item fill up horizontally or vertically.
MaxOutPut
Float
10
Maximum output of the device when fully charged (kW).
Capacity
Float
10
The maximum capacity of the device (kW * min). For example, a value of 1000 means the device can output 100 kilowatts of power for 10 minutes, or 1000 kilowatts for 1 minute.
Charge
Float
0
The current charge of the device.
MaxRechargeSpeed
Float
10
How fast the device can be recharged. For example, a recharge speed of 100 kW and a capacity of 1000 kW*min would mean it takes 10 minutes to fully charge the device.
RechargeSpeed
Float
10
The current recharge speed of the device.
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.

Powered

Name
Type
Default value
Description
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.

PowerTransfer

Name
Type
Default value
Description
CanBeOverloaded
True/False
True
Can the item be damaged if too much power is supplied to the power grid.
OverloadVoltage
Float
2
How much power has to be supplied to the grid relative to the load before item starts taking damage. E.g. a value of 2 means that the grid has to be receiving twice as much power as the devices in the grid are consuming.
FireProbability
Float
0,15
The probability for a fire to start when the item breaks.
Overload
True/False
False
Is the item currently overloaded. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.
Item component reference (Pr–Pu)
Projectile

Name
Type
Default value
Description
LaunchImpulse
Float
10
The impulse applied to the physics body of the item when it's launched. Higher values make the projectile faster.
LaunchRotation
Float
0
The rotation of the item relative to the rotation of the weapon when launched (in degrees).
DoesStick
True/False
False
When set to true, the item can stick to any target it hits.
StickToCharacters
True/False
False
Can the item stick to the character it hits.
StickToStructures
True/False
False
Can the item stick to the structure it hits.
StickToItems
True/False
False
Can the item stick to the item it hits.
Hitscan
True/False
False
Hitscan projectiles cast a ray forwards and immediately hit whatever the ray hits. It is recommended to use hitscans for very fast-moving projectiles such as bullets, because using extremely fast launch velocities may cause physics glitches.
HitScanCount
Integer
1
How many hitscans should be done when the projectile is launched. Multiple hitscans can be used to simulate weapons that fire multiple projectiles at the same time without having to actually use multiple projectile items, for example shotguns.
RemoveOnHit
True/False
False
Should the item be deleted when it hits something.
Spread
Float
0
Random spread applied to the launch angle of the projectile (in degrees).

Propulsion

Name
Type
Default value
Description
UsableIn
Air/Water/Both
Both
Can the item be used in air, underwater or both.
Force
Float
0
The force to apply to the user's body.
Particles
Text
The name of the particle prefab the item emits when used.

Pump

Name
Type
Default value
Description
FlowPercentage
Float
0
How fast the item is currently pumping water (-100 = full speed out, 100 = full speed in). Intended to be used by StatusEffect conditionals (setting this value in XML has no effect).
MaxFlow
Float
80
How fast the item pumps water in/out when operating at 100%.
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.
Item component reference (R–Rel)
RangedWeapon

Name
Type
Default value
Description
BarrelPos
Text
0.0,0.0
The position of the barrel as an offset from the item's center (in pixels). Determines where the projectiles spawn.
Reload
Float
1
How long the user has to wait before they can fire the weapon again (in seconds).
Spread
Float
0
Random spread applied to the firing angle of the projectiles when used by a character with sufficient skills to use the weapon (in degrees).
UnskilledSpread
Float
0
Random spread applied to the firing angle of the projectiles when used by a character with insufficient skills to use the weapon (in degrees).

Reactor

Name
Type
Default value
Description
MaxPowerOutput
Float
10000
How much power (kW) the reactor generates when operating at full capacity.
MeltdownDelay
Float
120
How long the temperature has to stay critical until a meltdown occurs.
FireDelay
Float
30
How long the temperature has to stay critical until the reactor catches fire.
Temperature
Float
0
Current temperature of the reactor (0% - 100%). Indended to be used by StatusEffect conditionals.
FissionRate
Float
0
Current fission rate of the reactor (0% - 100%). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
TurbineOutput
Float
0
Current turbine output of the reactor (0% - 100%). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
FuelConsumptionRate
Float
0,2
How fast the condition of the contained fuel rods deteriorates per second.
TemperatureCritical
True/False
False
Is the temperature currently critical. Intended to be used by StatusEffect conditionals (setting the value from XML has no effect).
AutoTemp
True/False
False
Is the automatic temperature control currently on. Indended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.

RegExFindComponent

Name
Type
Default value
Description
Output
Text
1
The signal this item outputs when the received signal matches the regular expression.
FalseOutput
Text
0
The signal this item outputs when the received signal does not match the regular expression.
ContinuousOutput
True/False
True
Should the component keep sending the output even after it stops receiving a signal, or only send an output when it receives a signal.
Expression
Text
The regular expression used to check the incoming signals.

RelayComponent

Name
Type
Default value
Description
MaxPower
Float
1000
The maximum amount of power that can pass through the item.
IsOn
True/False
False
Can the relay currently pass power and signals through it.
CanBeOverloaded
True/False
True
Can the item be damaged if too much power is supplied to the power grid.
OverloadVoltage
Float
2
How much power has to be supplied to the grid relative to the load before item starts taking damage. E.g. a value of 2 means that the grid has to be receiving twice as much power as the devices in the grid are consuming.
FireProbability
Float
0,15
The probability for a fire to start when the item breaks.
Overload
True/False
False
Is the item currently overloaded. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.
Item component reference (Rep–Sm)
Repairable

Name
Type
Default value
Description
Description
Text
An optional description of the needed repairs displayed in the repair interface.
DeteriorationSpeed
Float
0
How fast the condition of the item deteriorates per second.
MinDeteriorationDelay
Float
0
Minimum initial delay before the item starts to deteriorate.
MaxDeteriorationDelay
Float
0
Maximum initial delay before the item starts to deteriorate.
MinDeteriorationCondition
Float
50
The item won't deteriorate spontaneously if the condition is below this value. For example, if set to 10, the condition will spontaneously drop to 10 and then stop dropping (unless the item is damaged further by external factors). Percentages of max condition.
MinSabotageCondition
Float
0
How low a traitor must get the item's condition for it to start breaking down.
ShowRepairUIThreshold
Float
80
The condition of the item has to be below this before the repair UI becomes usable. Percentages of max condition.
FixDurationLowSkill
Float
100
The amount of time it takes to fix the item with insufficient skill levels.
FixDurationHighSkill
Float
10
The amount of time it takes to fix the item with sufficient skill levels.
DeteriorateAlways
True/False
False
If set to true, the deterioration timer will always run regardless if the item is being used or not.

RepairTool

Name
Type
Default value
Description
UsableIn
Air/Water/Both/None
Both
Can the item be used in air, water or both.
Range
Float
0
The distance at which the item can repair targets.
Spread
Float
0
Random spread applied to the firing angle when used by a character with sufficient skills to use the tool (in degrees).
UnskilledSpread
Float
0
Random spread applied to the firing angle when used by a character with insufficient skills to use the tool (in degrees).
StructureFixAmount
Float
0
How many units of damage the item removes from structures per second.
ExtinguishAmount
Float
0
How much the item decreases the size of fires per second.
BarrelPos
Vector2
0.0,0.0
The position of the barrel as an offset from the item's center (in pixels).
RepairThroughWalls
True/False
False
Can the item repair things through walls.
RepairMultiple
True/False
False
Can the item repair multiple things at once, or will it only affect the first thing the ray from the barrel hits.
RepairThroughHoles
True/False
False
Can the item repair things through holes in walls.
FireProbability
Float
0
The probability of starting a fire somewhere along the ray fired from the barrel (for example, 0.1 = 10% chance to start a fire during a second of use).
TargetForce
Float
0
Force applied to the entity the ray hits.

SignalCheckComponent

Name
Type
Default value
Description
Output
Text
1
The signal this item outputs when the received signal matches the target signal.
FalseOutput
Text
0
The signal this item outputs when the received signal does not match the target signal.
TargetSignal
Text
The value to compare the received signals against.

SmokeDetector

Name
Type
Default value
Description
FireSizeThreshold
Float
50
How large the fire has to be for the detector to react to it.
Item component reference (So–Su)
Sonar

Name
Type
Default value
Description
Range
Float
10000
The maximum range of the sonar.
DetectSubmarineWalls
True/False
False
Should the sonar display the walls of the submarine it is inside.
UseTransducers
True/False
False
Does the sonar have to be connected to external transducers to work.
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.

SonarTransducer

Name
Type
Default value
Description
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.

StatusHUD

Name
Type
Default value
Description
Range
Float
500
How close to a target the user must be to see their health data (in pixels).
FadeOutRange
Float
50
The range within which the health info texts fades out.

Steering

Name
Type
Default value
Description
NeutralBallastLevel
Float
0,5
How full the ballast tanks should be when the submarine is not being steered upwards/downwards. Can be used to compensate if the ballast tanks are too large/small relative to the size of the submarine.
DockingAssistThreshold
Float
1000
How close the docking port has to be to another docking port for the docking mode to become active.
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.

SubtractComponent

Name
Type
Default value
Description
ClampMax
Float
999999
The output of the item is restricted below this value.
ClampMin
Float
-999999
The output of the item is restricted above this value.
TimeFrame
Float
0
The item must have received signals to both inputs within this timeframe to output the sum of the signals. If set to 0, the inputs must be received at the same time.
Item component reference (T–Tri)
Throwable

Name
Type
Default value
Description
ThrowForce
Float
1
The impulse applied to the physics body of the item when thrown. Higher values make the item be thrown faster.
Attached
True/False
False
Is the item currently attached to a wall (only valid if Attachable is set to true).
Aimable
True/False
True
Can the item be pointed to a specific direction or do the characters always hold it in a static pose.
ControlPose
True/False
False
Should the character adjust its pose when aiming with the item. Most noticeable underwater, where the character will rotate its entire body to face the direction the item is aimed at.
Attachable
True/False
False
Can the item be attached to walls.
Reattachable
True/False
True
Can the item be reattached to walls after it has been deattached (only valid if Attachable is set to true).
AttachedByDefault
True/False
False
Should the item be attached to a wall by default when it's placed in the submarine editor.
HoldPos
Vector2
0.0,0.0
The position the character holds the item at (in pixels, as an offset from the character's shoulder). For example, a value of 10,-100 would make the character hold the item 100 pixels below the shoulder and 10 pixels forwards.
AimPos
Vector2
0.0,0.0
The position the character holds the item at when aiming (in pixels, as an offset from the character's shoulder). Works similarly as HoldPos, except that the position is rotated according to the direction the player is aiming at. For example, a value of 10,-100 would make the character hold the item 100 pixels below the shoulder and 10 pixels forwards when aiming directly to the right.
HoldAngle
Float
0
The rotation at which the character holds the item (in degrees, relative to the rotation of the character's hand).
SwingAmount
Vector2
0.0,0.0
How much the item swings around when aiming/holding it (in pixels, as an offset from AimPos/HoldPos).
SwingSpeed
Float
0
How fast the item swings around when aiming/holding it (only valid if SwingAmount is set).
SwingWhenHolding
True/False
False
Should the item swing around when it's being held.
SwingWhenAiming
True/False
False
Should the item swing around when it's being aimed.
SwingWhenUsing
True/False
False
Should the item swing around when it's being used (for example, when firing a weapon or a welding tool).

TrigonometricFunctionComponent

Name
Type
Default value
Description
Function
Sin/Cos/Tan/Asin/Acos/Atan
Sin
Which kind of function to run the input through.
UseRadians
True/False
False
If set to true, the trigonometric function uses radians instead of degrees.
Item component reference (Tur–X)
Turret

Name
Type
Default value
Description
HudTint
Color
0,0,0,0
Optional screen tint color when the item is being operated (R,G,B,A).
ShowChargeIndicator
True/False
False
Should the charge of the connected batteries/supercapacitors be shown at the top of the screen when operating the item.
ShowProjectileIndicator
True/False
False
Should the available ammunition be shown at the top of the screen when operating the item.
RecoilDistance
Float
0
How far the barrel "recoils back" when the turret is fired (in pixels).
BarrelPos
Vector2
0,0
The position of the barrel relative to the upper left corner of the base sprite (in pixels).
LaunchImpulse
Float
0
The impulse applied to the physics body of the projectile (the higher the impulse, the faster the projectiles are launched).
Reload
Float
5
The period of time the user has to wait between shots.
RotationLimits
Vector2
0.0,0.0
The range at which the barrel can rotate. TODO
SpringStiffnessLowSkill
Float
5
How much torque is applied to rotate the barrel when the item is used by a character with insufficient skills to operate it. Higher values make the barrel rotate faster.
SpringStiffnessHighSkill
Float
2
How much torque is applied to rotate the barrel when the item is used by a character with sufficient skills to operate it. Higher values make the barrel rotate faster.
SpringDampingLowSkill
Float
50
How much torque is applied to resist the movement of the barrel when the item is used by a character with insufficient skills to operate it. Higher values make the aiming more "snappy", stopping the barrel from swinging around the direction it's being aimed at.
SpringDampingHighSkill
Float
10
How much torque is applied to resist the movement of the barrel when the item is used by a character with sufficient skills to operate it. Higher values make the aiming more "snappy", stopping the barrel from swinging around the direction it's being aimed at.
RotationSpeedLowSkill
Float
1
Maximum angular velocity of the barrel when used by a character with insufficient skills to operate it.
RotationSpeedHighSkill
Float
5
Maximum angular velocity of the barrel when used by a character with sufficient skills to operate it.
BaseRotation
Float
0
The angle of the turret's base in degrees.
MinVoltage
Float
0,5
The minimum voltage required for the device to function. The voltage is calculated as power / powerconsumption, meaning that a device with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.
PowerConsumption
Float
0
How much power the device draws (or attempts to draw) from the electrical grid when active.
IsActive
True/False
False
Is the device currently active. Inactive devices don't consume power.
CurrPowerConsumption
Float
0
The current power consumption of the device. Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
Voltage
Float
0
The current voltage of the item (calculated as power consumption / available power). Intended to be used by StatusEffect conditionals (setting the value from XML is not recommended).
VulnerableToEMP
True/False
True
Can the item be damaged by electomagnetic pulses.

Vent

No editable properties.

WaterDetector

Name
Type
Default value
Description
Output
Text
1
The signal the item sends out when it's underwater.
FalseOutput
Text
0
The signal the item sends out when it's not underwater.

Wearable

No editable properties.

WifiComponent

Name
Type
Default value
Description
TeamID
None/Team1/Team2/FriendlyNPC
None
WiFi components can only communicate with components that have the same Team ID.
Range
Float
20000
How close the recipient has to be to receive a signal from this WiFi component.
Channel
Integer
1
WiFi components can only communicate with components that use the same channel.
LinkToChat
True/False
False
If enabled, any signals received from another chat-linked wifi component are displayed as chat messages in the chatbox of the player holding the item.
MinChatMessageInterval
Float
1
How many seconds have to pass between signals for a message to be displayed in the chatbox. Setting this to a very low value is not recommended, because it may cause an excessive amount of chat messages to be created if there are chat-linked wifi components that transmit a continuous signal.
DiscardDuplicateChatMessages
True/False
False
If set to true, the component will only create chat messages when the received signal changes.

Wire

Name
Type
Default value
Description
MaxLength
Float
5000
The maximum distance the wire can extend (in pixels).

XorComponent

Name
Type
Default value
Description
TimeFrame
Float
0
The item sends the output if both inputs have received a non-zero signal within the timeframe. If set to 0, the inputs must receive a signal at the same time.
Output
Text
1
The signal sent when both inputs have received a non-zero signal.
FalseOutput
Text
The signal sent when both inputs have not received a non-zero signal (if empty, no signal is sent).
Publishing your mod
Mods need to be shared with other players so that you can play together with them in multiplayer mode.

Fortunately, publishing a mod is fairly simple: first you need to go the the "Publish" tab in the Steam Workshop menu and select your newly created content package. The folder where the content package resides (for example, "Mods/MyMod/") and all its contents will be uploaded to the Workshop.


Make sure all the files required for your mod are present inside the folder: textures, audio, xml files and so on. Your content package can also reference content outside the mod's folder, but this content will not be uploaded into workshop — generally you would only do this if you want to make a core package that uses some of the vanilla files without having to bundle the vanilla files with your mod.

Once everything is ready, simply click 'Publish item'. The mod should now be found in Steam workshop, where others can find and download it.
Thanks for reading!
Hopefully you found this guide helpful. It is still pretty bare-bones – please let us know which features you would like more guidance on to give us an idea of what we should prioritize when working on this guide. If you have any questions, please use the #baro-modding channel of our Discord[discord.gg] or the Workshop Discussions subforum here on Steam.
23 Comments
Destrino Dec 18, 2022 @ 9:30pm 
i am making an accordion audio override using another override mod as a reference, but i constantly get a hash error
Destrino Dec 18, 2022 @ 9:26pm 
i also have an expected hash issue everytime i test the mod
and audio seems to not be valid data or "cannot determine storage container!"
Destrino Dec 18, 2022 @ 9:05pm 
ogg. file (invaliddata) [not a determined storage container
Destrino Dec 18, 2022 @ 7:17pm 
anyone have a filelist.xml template?
Deltλ Dec 10, 2022 @ 2:46am 
<Items>
<Item>
[your content]
</Item>
</Items>

Something similar to that
Friendly ape Aug 12, 2022 @ 12:44am 
What if you want to add content instead of overriding it? For instance: new items
Shiro Dec 14, 2021 @ 2:56am 
Guide might use a little updating, several patches were issued since the last guide update. Majority of things are the same, but some new ones were added, such as EnemySubmarine
AM Nov 16, 2021 @ 10:34am 
yo can i get sum item identifiers or is just the name of the object no spaces (for modded crafting recipes)?
ten.tin Jul 11, 2021 @ 11:16pm 
I'm trying to make this mod and it involves an Inmate Job. My problem is

Text "JobName.Inmate" not found.
Tom Apr 6, 2021 @ 9:52am 
To whom it may concern, I want to make a Localization Mod to put the game in italian, do you know how can start? I mean, i checke the TEXT folders with all the file, but how to do that? do you have any specific guide online? thank you