Console Commands: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
m (→‎In-Game: updated hud commands)
No edit summary
 
(53 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{Version|0.12.0.2}}
{{Version|0.18.12.0|Messed up while figuring out cheat commands. Will need to fix.|nosearch=y}}
''Not to be confused with the in-game installation, "[[Terminal]]"''{{Source|https://github.com/Regalis11/Barotrauma/blob/master/Barotrauma/BarotraumaShared/SharedSource/DebugConsole.cs}}
{{See_also|Permissions}}
The '''console''' is a debugging window usable to alter content and view errors while the game is opened. The console can be opened or closed by pressing F3, though this can be changed in settings.
''This page is about the debugging tool; for the in-game installation, see "[[Terminal]]"''


While its main use is debugging, it can also be used to spawn creatures/items or use moderation commands.
The '''console''' is a debugging tool that can be used to view errors and change certain settings and content while the game is opened.  


In multiplayer, players with the "Console commands" permission are allowed to use specific commands under the "Permitted console commands" section of the permissions menu.
Its main function is debugging, but it can also be used to spawn items and creatures, modify their attributes and afflictions, or use moderation commands.  


The console accepts player-inputted '''commands''' through a text box at the bottom of the console. These commands will be listed below, alphabetically.
In multiplayer, players that have the "ConsoleCommands" [[#Permissions|permission]] can use certain specific commands under the "Permitted console commands" part of the permissions menu. Players can input commands in a text input field at the bottom of the console window.


In-Game help on commands can be accessed with the <code>help</code> command.
The source code related to console commands is available at Github. <ref>https://github.com/Regalis11/Barotrauma/blob/master/Barotrauma/BarotraumaClient/ClientSource/DebugConsole.cs</ref> <ref>https://github.com/Regalis11/Barotrauma/blob/master/Barotrauma/BarotraumaServer/ServerSource/DebugConsole.cs</ref> <ref>https://github.com/Regalis11/Barotrauma/blob/master/Barotrauma/BarotraumaShared/SharedSource/DebugConsole.cs</ref>
== Campaign ==
 
The following commands are available for use in singleplayer/multiplayer campaign.
=Usage=
{| class="wikitable mw-collapsible"
 
!
# '''Press {{key|f3}} to toggle the console (for Mac, press {{key|fn}} and{{key|f3}}).'''
Command
# '''Enter <code>enablecheats</code> to enable cheats and disable achievements for the game session'''
!Description
#* This is only required for cheat commands, marked with a green checkmark in the table below.
|-
# '''Press {{key|TAB}} to autofill and cycle through identifiers'''
|campaigndestination [index]
#*For a list of Item Identifiers, see [[Item IDs]].
|Set the target location in the current campaign.
 
|-
Examples:
|campaigninfo
spawnitem weld
|Display info about the current campaign, such as current money, location and available destinations.
;...then press {{key|TAB}} to cycle between <code>"Welding Tool"</code> and <code>"Welding Fuel"</code>
|-
 
|setlocationreputation [value]
 
|Set your reputation to the current location to the specified value.
setskill mech
|-
;...then press {{key|TAB}} to autofill <code>Mechanical</code>
|togglecampaignteleport
 
|Toggles the ability to teleport to a location on the campaign map by double-clicking. Works only in singleplayer.
 
|-
In-game help with commands can be accessed with the <code>help</code> command. Enter <code>help</code> before a command for help with a specific command (i.e. <code>help spawnitem</code>), or by itself for a list of all commands.
|pause
 
|Pauses the game. Only works in singleplayer.
=Commands=
|}
Arguments are typed without brackets, and with quotation marks around multi-word inputs.<br>Examples: <code>handcuffs</code> and <code>"handheld sonar"</code>
== Moderation ==
{| class="sortable" style="width:100%"
The following commands are available in multiplayer servers for moderation purposes.
! style="width:1%" | <span class="explain" title="Requires cheats to be enabled">Cheat</span>
{| class="wikitable mw-collapsible"
! style="width:24%" | Command
!Command
! style="width:50%" class=unsortable | In-Game Description
!Description
! style="width:25%" class=unsortable | Notes
|-
|- {{Command|copyitemnames|source = Client}}
|ban [character name]
|- {{Command|autohull||Generates Hulls in the Submarine Editor.}}
|Bans the selected character from the server.
|- {{Command|startlidgrenclient [ip address]||Argument 1 is required.}}
|-
|- {{Command|startsteamp2pclient}}
|banendpoint [IP Address/SteamID]
|- {{Command|enablecheats|Enables cheat commands and disables Steam achievements during this play session.}}
|Bans the selected IP Address/SteamID from the server.
|- {{Command|mainmenu/menu|Go to the main menu.}}
|-
|- {{Command|game|Go to the "in-game" view.||Switching directly from the submarine editor to the game view may cause bugs and crashes.}}
|banid [clientID]
|- {{Command|editsubs/subeditor [sub file path]|Switch to the Submarine Editor to create or edit submarines.|cheat = yes}}
|Bans the selected clientID from the server.
|- {{Command|editparticles/particleeditor|Switch to the Particle Editor to edit particle effects.}}
|-
|- {{Command|editlevels/leveleditor|Switch to the Level Editor to edit levels.}}
|bindkey [key] [command]
|- {{Command|editsprites/spriteeditor|Switch to the Sprite Editor to edit the source rects and origins of sprites.}}
|Binds a key to a command.
|- {{Command|editevents/eventeditor|Switch to the Event Editor to edit scripted events.}}
|-
|- {{Command|editcharacters/charactereditor|Switch to the Character Editor to edit/create the ragdolls and animations of characters.|Switching between the character editor and the game view may cause odd behaviour or bugs.}}
|clientlist
|- {{Command|quickstart [sub name] [difficulty] [level gen parameters identifier]|Starts a singleplayer sandbox|Can only be executed from the main menu.<br>Argument 1 is required.}}
|Outputs the character name, clientID and ping of all players in the server to the console.
|- {{Command|steamnetdebug|Toggles Steamworks networking debug logging.}}
|-
|- {{Command|readycheck|Commence a ready check in multiplayer.}}
|givecommandperm [clientID/SteamID/character name/IP Address]
|- {{Command|bindkey [key] [command]|Binds a key to a command.|Arguments 1 and 2 are required.<br>Commands containing double quotes (<code>"</code>) cannot be bound.}}
|Gives the selected player the permission to use the console commands typed in the next entry.
|- {{Command|unbindkey [key]|Unbinds a command.|Argument 1 is required.}}
|-
|- {{Command|savebinds|Writes current keybinds into the config file.|Some keybinds may render the game unusable.}}
|giveperm [clientID/SteamID/character name/IP Address]
|- {{Command|togglegrid|Toggle visual snap grid in sub editor.}}
|Gives the selected player the permission typed in the next entry.
|- {{Command|spreadsheetexport|Export items in format recognized by the spreadsheet importer.}}
|-
|- {{Command|wikiimage_character|Save an image of the currently controlled character with a transparent background.|Image is saved to <code>Barotrauma/wikiimage.png</code>.}}
|giverank [clientID/SteamID/character name/IP Address]
|- {{Command|wikiimage_sub|Save an image of the main submarine with a transparent background.|Image is saved to <code>Barotrauma/wikiimage.png</code>.}}
|Gives the selected player the rank typed in the next entry.
|- {{Command|kick [player name]|Kick a player out of the server.|Argument 1 is required.<br>Can only be executed in Multiplayer.<br>Executer requires the "Kick" permission.}}
|-
|- {{Command|kickid [client id]|Kick the player with the specified client ID out of the server. You can see the IDs of the clients using the command "clientlist".|Argument 1 is required.<br>Can only be executed in Multiplayer.<br>Executer requires the "Kick" permission.}}
|kick [character name]
|- {{Command|ban [player name]|Kick and ban the player from the server.|Argument 1 is required.<br>Can only be executed in Multiplayer.<br>Executer requires the "Ban" permission.}}
|Kicks the selected character from the server.
|- {{Command|banid [client id]|Kick and ban the player with the specified client ID from the server. You can see the IDs of the clients using the command "clientlist".|Argument 1 is required.<br>Can only be executed in Multiplayer.<br>Executer requires the "Ban" permission.}}
|-
|- {{Command|dumpids [amount] [file name]}}
|kickid [clientID]
|- {{Command|dumptofile [file name]|Outputs the contents of the debug console into a text file in the game folder. If the filename argument is omitted, "consoleOutput.txt" is used as the filename.}}
|Kicks the selected clientID from the server.
|- {{Command|findentityids [entity name]}}
|-
|- {{Command|campaigninfo/campaignstatus|Display information about the state of the currently active campaign.|Can only be executed in Campaign mode.}}
|killdisconnecttimer [seconds]
|- {{Command|help [command]||Displays a list of commands and their descriptions.<br>Displays help on a specific command if argument 1 is called.}}
|Set the delay until disconnected players are killed.
|- {{Command|verboselogging|Toggle verbose console logging on/off. When on, additional debug information is written to the debug console.}}
|-
|- {{Command|freecamera/freecam|Detach the camera from the controlled character.|Cannot be executed in the Submarine Editor.|cheat = yes}}
|mute [character name]
|- {{Command|clientlist|List all the clients connected to the server.|Can only be executed in Multiplayer.}}
|Blocks a character from speaking through voice chat.
|- {{Command|say [msg]|Send a global chat message. When issued through the server command line, displays "HOST" as the sender.|Can only be executed in Multiplayer.}}
|-
|- {{Command|msg [msg]|Send a chat message with no sender specified.|Can only be executed in Multiplayer.}}
|resetkarma [clientID]
|- {{Command|setmaxplayers/maxplayers [player count (≤16)]|Sets the maximum player count of the server that's being hosted.|Argument 1 is required.<br>Can only be executed in Multiplayer.}}
|Resets the karma of a client to 100.
|- {{Command|setpassword/setserverpassword/password [password]|Changes the password of the server that's being hosted.|Password is removed if argument 1 is omitted.}}
|-
|- {{Command|traitorlist|List all the traitors and their targets.}}
|revokecommandperm [clientID/SteamID/character name/IP Address]
|- {{Command|money [amount] [character name]|Gives the specified amount of money to the crew when a campaign is active.|Can only be executed in Campaign mode.|Argument 1 is required and accepts negative values.|cheat = yes}}
|Revokes the selected player's permission to use the console commands typed in the next entry.
|- {{Command|showmoney|Shows the amount of money in everyones wallet.|cheat = yes}}
|-
|- {{Command|setskill [all/identifier] [max/level] [character name]|Set your skill level.|Arguments 1 and 2 are required.|cheat = yes}}
|revokeperm [clientID/SteamID/character name/IP Address]
|- {{Command|givetalent [talent name/id] [character name]|give the talent to the specified character. If the character argument is omitted, the talent is given to the controlled character.|Argument 1 is required.|cheat = yes}}
|Revokes the selected player's permission typed in the next entry.
|- {{Command|unlocktalents [all/job name] [character]|give the specified character all the talents of the specified class|Argument 1 is required.|cheat = yes}}
|-
|- {{Command|giveexperience [amount] [character name]|Give experience to character.|Argument 1 is required.|cheat = yes}}
|savebinds
|- {{Command|control [character name]|Start controlling the specified character (client-only).|Argument 1 is required.|cheat = yes}}
|Writes current keybinds into the config file (= keybinds set using the keybind command).
|- {{Command|shake}}
|-
|- {{Command|explosion [range] [force] [damage] [structure damage] [item damage] [emp strength] [ballast flora damage]|Creates an explosion at the position of the cursor.|cheat = yes}}
|setkarma [clientID] [0-100]
|- {{Command|teleportcharacter/teleport [character name]|Teleport the specified character to the position of the cursor. If the name parameter is omitted, the controlled character will be teleported.|cheat = yes}}
|Sets the karma of a client to the specified value.
|- {{Command|spawn/spawncharacter [creature/job name] [near/inside/outside/cursor] [team (0-3)]|Spawn a creature at a random spawnpoint (use the second parameter to only select spawnpoints near/inside/outside the submarine). You can also enter the name of a job (e.g. "Mechanic") to spawn a character with a specific job and the appropriate equipment.|Argument 1 is required.|cheat = yes}}
|-
|- {{Command|los [true/false]|Toggle the line of sight effect on/off (client-only)|cheat = yes}}
|showkarma
|- {{Command|lighting/lights [true/false]|Toggle lighting on/off (client-only).|cheat = yes}}
|Outputs the karma of all players to the console.
|- {{Command|ambientlight [restore/color] [add]|Change the color of the ambient light in the level.|Argument 1 is required.|cheat = yes}}
|-
|- {{Command|multiplylights [value]|Multiplies the colors of all the static lights in the sub with the given Vector4 value (for example, 1,1,1,0.5).|Can only be executed from the Submarine Editor.<br>Argument 1 is required.}}
|showperm [clientID/SteamID/character name/IP Address]
|- {{Command|color/colour [red] [green] [blue] [alpha]|Change color (as bytes from 0 to 255) of the selected item/structure instances. Applied only in the subeditor.|cheat = yes}}
|Outputs the permissions of the selected player to the console.
|- {{Command|listcloudfiles|Lists all of your files on the Steam Cloud.}}
|-
|- {{Command|removefromcloud [file name/index]|Removes a file from Steam Cloud.|Argument 1 is required.}}
|togglecharacternames
|- {{Command|resetall|Reset all items and structures to prefabs. Only applicable in the subeditor.}}
|Toggle visibility of names above players. Client-side only.
|- {{Command|resetentitiesbyidentifier [entity tag/id]|Reset items and structures with the given tag/identifier to prefabs. Only applicable in the subeditor.|Argument 1 is required.}}
|-
|- {{Command|resetselected|Reset selected items and structures to prefabs. Only applicable in the subeditor.}}
|togglekarma
|- {{Command|alpha [value]|Change the alpha (as bytes from 0 to 255) of the selected item/structure instances. Applied only in the subeditor.|Argument 1 is required.|cheat = yes}}
|Toggles the karma system on/off.
|- {{Command|cleansub|cheat = yes}}
|-
|- {{Command|messagebox/guimessagebox [header] [msg] [default/ingame]|Creates a message box.}}
|togglekarmatestmode
|- {{Command|debugdraw [true/false]|Toggle the debug drawing mode on/off (client-only).|cheat = yes}}
|Toggles the karma test mode on/off. When on, notifies players of a karma change and it'sreason, also disables karma bans.
|- {{Command|debugwiring [true/false]|Toggle the wiring debug mode on/off (client-only).|cheat = yes}}
|-
|- {{Command|debugdrawlocalization [true/false]|Toggle the localization debug drawing mode on/off (client-only). Colors all text that hasn't been fetched from a localization file magenta, making it easier to spot hard-coded or missing texts.}}
|unban [character name]
|- {{Command|debugdrawlos [true/false]|Toggle the los debug drawing mode on/off (client-only).|cheat = yes}}
|Unbans the selected character from the server.
|- {{Command|togglevoicechatfilters [true/false]|Toggle the radio/muffle filters in the voice chat (client-only).}}
|-
|- {{Command|fpscounter|Toggle the FPS counter.}}
|unbanip [IP Address]
|- {{Command|showperf|Toggle performance statistics on/off.}}
|Unbans the selected IP Address from the server.
|- {{Command|netstats|Toggles the visibility of the network statistics UI.}}
|-
|- {{Command|hudlayoutdebugdraw/debugdrawhudlayout|Toggle the debug drawing mode of HUD layout areas on/off.}}
|unbindkey [key]
|- {{Command|interactdebugdraw/debugdrawinteract|Toggle the debug drawing mode of item interaction ranges on/off.|cheat = yes}}
|Unbinds a command previously bound using bindkey.
|- {{Command|togglehud/hud|Toggle the character HUD (inventories, icons, buttons, etc) on/off (client-only).}}
|-
|- {{Command|toggleupperhud|Toggle the upper part of the ingame HUD (chatbox, crewmanager) on/off (client-only).}}
|unmute [character name]
|- {{Command|toggleitemhighlights|Toggle the item highlight effect on/off (client-only).}}
|Allows a character to speak through voice chat.
|- {{Command|togglecharacternames|Toggle the names hovering above characters on/off (client-only).}}
|}
|- {{Command|followsub|Toggle whether the camera should follow the nearest submarine (client-only).}}
== Server Settings ==
|- {{Command|toggleaitargets|Toggle the visibility of AI targets (= targets that enemies can detect and attack/escape from) (client-only).|cheat = yes}}
The following commands are available in multiplayer servers to change their settings.
|- {{Command|debugai|Toggle the ai debug mode on/off (works properly only in single player).|cheat = yes}}
{| class="wikitable mw-collapsible"
|- {{Command|devmode|Toggle the dev mode on/off (client-only).|cheat = yes}}
!Command
|- {{Command|showmonsters|Permanently unlocks all the monsters in the character editor. Use "hidemonsters" to undo.|cheat = yes}}
!Description
|- {{Command|hidemonsters|Permanently hides in the character editor all the monsters that haven't been encountered in the game. Use "showmonsters" to undo.|cheat = yes}}
|-
|- {{Command|water/editwater|Toggle water editing. Allows adding water into rooms by holding the left mouse button and removing it by holding the right mouse button.|cheat = yes}}
|autorestart [true/false]
|- {{Command|fire/editfire|Allows putting up fires by left clicking.|cheat = yes}}
|Enables/disables the round autorestart timer.
|- {{Command|mute [player name]|Prevent the client from speaking through the voice chat.|Can only be executed in Multiplayer.}}
|-
|- {{Command|unmute [player name]|Allow the client to speak through the voice chat.|Can only be executed in Multiplayer.}}
|autorestartinterval [seconds]
|- {{Command|checkcrafting|Checks item deconstruction & crafting recipes for inconsistencies.}}
|Sets the delay between rounds, if autorestart is enabled. Setting this to 0 disables autorestart.
|- {{Command|analyzeitem [item name/id]|Analyzes one item for exploits.|Argument 1 is required.}}
|-
|- {{Command|checkcraftingexploits [max allowed cost]|Finds outright item exploits created by buying store-bought ingredients and constructing them into sellable items.}}
|autorestart timer [seconds]
|- {{Command|adjustprice [item name/id] [price] [add/mult]|Recursively prints out expected price adjustments for items derived from this item.|Arguments 1 and 2 are required.}}
|Sets the current autorestart timer to the specified value.
|- {{Command|deconstructvalue [item name/id]|Views and compares deconstructed component prices for this item.|Argument 1 is required.}}
|-
|- {{Command|setentityproperties [property] [value]|Sets the value of some property on all selected items/structures in the sub editor.|Arguments 1 and 2 are required.}}
|botcount [0-16]
|- {{Command|checkmissingloca}}
|Sets the amount of bots on the ship to the specified value.
|- {{Command|checkduplicateloca}}
|-
|- {{Command|comparelocafiles [file 1] [file 2]}}
|botspawnmode [fill/normal]
|- {{Command|eventstats [0-7] [true/false]||Argument 2 determines if the entire log will be displayed instead of a summary.}}
|Set how bots are spawned on the ship.
|- {{Command|setfreecamspeed [speed]|Set the camera movement speed when not controlling a character. Defaults to 1.|Argument 1 is required.}}
|-
|- {{Command|dumptexts [destination path]|Extracts all the texts from the given text xml and writes them into a file (using the same filename, but with the .txt extension). If the filepath is omitted, the EnglishVanilla.xml file is used.}}
|difficulty [0-100]
|- {{Command|loadtexts [source path] [destination path]|Loads all lines of text from a given .txt file and inserts them sequientially into the elements of an xml file. If the file paths are omitted, EnglishVanilla.txt and EnglishVanilla.xml are used.}}
|Sets the difficulty value of the server to the specified value.
|- {{Command|updatetextfile [source path] [destination path]|Inserts all the xml elements that are only present in the source file into the destination file. Can be used to update outdated translation files more easily.}}
|-
|- {{Command|dumpentitytexts [destination path]|gets the names and descriptions of all entity prefabs and writes them into a file along with xml tags that can be used in translation files. If the filepath is omitted, the file is written to Content/Texts/EntityTexts.txt}}
|startwhenclientsready [true/false]
|- {{Command|dumpeventtexts [destination path]|gets the texts from event files and and writes them into a file along with xml tags that can be used in translation files. If the filepath is omitted, the file is written to Content/Texts/EventTexts.txt}}
|Enables/disables autorestart when all players are ready.
|- {{Command|itemcomponentdocumentation [destination path]||Argument 1 defaults to <code>ItemComponentDocumentation.txt</code> if omitted.}}
|}
|- {{Command|cleanbuild}}
== Cheats ==
|- {{Command|reloadcorepackage||Cannot be executed from within a game or from the Submarine Editor.<br>To bypass this, run this command with any argument.}}
The following commands are available to make the game easier.
<!-- |- {{Command|ingamemodswap}} Unimplemented due to modding refactor -->
{| class="wikitable mw-collapsible"
|- {{Command|giveperm [client id/steam id/ip address/player name] [all/permission]|Grants administrative permissions to the specified client.|Argument 1 is required.<br>Can only be executed in Multiplayer.}}
!Command
|- {{Command|revokeperm [client id/steam id/ip address/player name] [all/permission]|Revokes administrative permissions from the specified client.|Argument 1 is required.<br>Can only be executed in Multiplayer.}}
!Description
|- {{Command|giverank [client id/steam id/ip address/player name] [rank]|Assigns a specific rank (= a set of administrative permissions) to the specified client.|Argument 1 is required.<br>Can only be executed in Multiplayer.}}
|-
|- {{Command|givecommandperm [client id/steam id/ip address/player name] [all/command]|Gives the specified client the permission to use the specified console commands.|Argument 1 is required.<br>Can only be executed in Multiplayer.}}
|ballastflora infect
|- {{Command|revokecommandperm [client id/steam id/ip address/player name] [all/command]|Revokes permission to use the specified console commands from the specified client.|Argument 1 is required.<br>Can only be executed in Multiplayer.}}
|Infects random pump (priority those tagged "ballast") with Ballast Flora
|- {{Command|showperm [client id/steam id/ip address/name]|Shows the current administrative permissions of the specified client.|Argument 1 is required.<br>Can only be executed in Multiplayer.}}
|-
|- {{Command|banendpoint/banip [steam id/ip address] [seconds] [reason]|Ban the IP address/SteamID from the server.|Argument 1 is required.<br>Can only be executed in Multiplayer.}}
|ballastflora growthwarp [number]
|- {{Command|unban [player name]|Unban a specific client.|Argument 1 is required.<br>Can only be executed in Multiplayer.}}
|Increases growth speed of Ballast Flora
|- {{Command|unbanip [ip address]|Unban a specific IP.|Argument 1 is required.<br>Can only be executed in Multiplayer.}}
|-
|- {{Command|campaigndestination/setcampaigndestination [destination index]|Set the location to head towards in the currently active campaign.|Can only be executed in Campaign mode.}}
|enablecheats
|- {{Command|limbscale [scale]|Define the limbscale for the controlled character. Provide id or name if you want to target another character. Note: the changes are not saved!|Argument 1 is required.|cheat = yes}}
|Enables cheat commands for the game session. Disables achievements.
|- {{Command|jointscale [scale]|Define the jointscale for the controlled character. Provide id or name if you want to target another character. Note: the changes are not saved!|Argument 1 is required.|cheat = yes}}
|-
|- {{Command|ragdollscale [scale]|Rescale the ragdoll of the controlled character. Provide id or name if you want to target another character. Note: the changes are not saved!|Argument 1 is required.|cheat = yes}}
|explosion [range] [force] [damage] [structural damage] [item damage] [emp strength]
|- {{Command|recreateragdoll [character name]|Recreate the ragdoll of the controlled character. Provide id or name if you want to target another character.|cheat = yes}}
|Creates an explosion at the position of the cursor.
|- {{Command|resetragdoll [character name]|Reset the ragdoll of the controlled character. Provide id or name if you want to target another character.|cheat = yes}}
|-
|- {{Command|reloadwearables [character name]|Reloads the sprites of all limbs and wearable sprites (clothing) of the controlled character. Provide id or name if you want to target another character.|cheat = yes}}
|fire
|- {{Command|loadwearable [variant]|Force select certain variant for the selected character.|Argument 1 is required.|cheat = yes}}
|Creates fire at the position of the cursor.
|- {{Command|reloadsprite/reloadsprites [id/name] [item id/sprite name]|Reloads the sprites of the selected item(s)/structure(s) (hovering over or selecting in the subeditor) or the controlled character. Can also reload sprites by entity id or by the name attribute (sprite element). Example 1: reloadsprite id itemid. Example 2: reloadsprite name "Sprite name"|Cannot be executed from the Sprite Editor.|cheat = yes}}
|-
|- {{Command|flipx|mirror the main submarine horizontally|Cannot be executed in Multiplayer.|cheat = yes}}
|fixwalls/fixhulls
|- {{Command|head [head id] [hair index] [beard index] [moustache index] [face attachment index]|Load the head sprite and the wearables (hair etc). Required argument: head id. Optional arguments: hair index, beard index, moustache index, face attachment index.|Argument 1 is required.|cheat = yes}}
|Fixes all walls on the ship.
|- {{Command|spawnsub [sub name] [true/false]|Spawn a submarine at the position of the cursor|Argument 1 is required.<br>Argument 2 determines if the spawned submarine is a Thalamus.|cheat = yes}}
|-
|- {{Command|pause|Toggles the pause state when playing offline}}
|fixitems
|- {{Command|showseed/showlevelseed|Show the seed of the current level.}}
|Restores all items to max condition.
|- {{Command|botcount [amount]|Set the number of bots in the crew in multiplayer.|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|-
|- {{Command|botspawnmode [fill/normal]|Set how bots are spawned in the multiplayer.|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|freecam
|- {{Command|killdisconnectedtimer [seconds]|Set the time after which disconnect players' characters get automatically killed.|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|Detach the camera from the controlled character. Warning: Cannot disable.
|- {{Command|autorestart [true/false]|Enable or disable round auto-restart.|Can only be executed in Multiplayer.}}
|-
|- {{Command|autorestartinterval [seconds]|Set how long the server waits between rounds before automatically starting a new one. If set to 0, autorestart is disabled.|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|giveaffliction [affliction] [affliction strength] [character name]
|- {{Command|autorestarttimer [seconds]|Set the current autorestart countdown to the specified value.|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|Gives an affliction to the specified character. Affliction added to controlled character if name is omitted.
|- {{Command|startwhenclientsready [true/false]|Enable or disable automatically starting the round when clients are ready to start.|Can only be executed in Multiplayer.}}
|-
|- {{Command|togglekarma|Toggle the karma system on/off.|Can only be executed in Multiplayer.}}
|godmode [character name]
|- {{Command|resetkarma [player name]|Resets the karma value of the specified client to 100.|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|Makes the character invulnerable to damage. Controlled character is selected if name is omitted.
|- {{Command|setkarma [player name] [karma (0-100)]|Sets the karma of the specified client to the specified value.|Arguments 1 and 2 are required<br>Can only be executed in Multiplayer.}}
|-
|- {{Command|showkarma|Show the current karma values of the players.|Can only be executed in Multiplayer.}}
|godmode_mainsub
|- {{Command|togglekarmatestmode/karmatestmode|Toggle the karma test mode on/off. When test mode is enabled, clients get notified when their karma value changes (including the reason for the increase/decrease) and the server doesn't ban clients whose karma decreases below the ban threshold.|Can only be executed in Multiplayer.}}
|Makes the submarine invulnerable to damage.
|- {{Command|setclientcharacter [player name] [character name]|Gives the client control of the specified character.|Arguments 1 and 2 are required}}
|-
|- {{Command|starttraitormissionimmediately|Skip the initial delay of the traitor mission and start one immediately.|Can only be executed in Multiplayer.}}
|growthdelay
|- {{Command|difficulty/leveldifficulty [0-100]|Change the level difficulty setting in the server lobby.|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|Sets how long it takes for planters to attempt to advance a plant's growth.
|- {{Command|restart/reset|Close and restart the server.|Can only be executed in Multiplayer.}}
|-
|- {{Command|servername [name]|Change the name of the server.|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|heal [character name]
|- {{Command|servermsg [msg]|Change the message displayed in the server lobby.|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|Restores the specified character to max health. Controlled character is healed if name is omitted.
|- {{Command|seed/levelseed [seed]|Changes the level seed for the next round.|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|-
|- {{Command|randomizeseed|Toggles level seed randomization on/off.|Can only be executed in Multiplayer.}}
|kill [character]
|- {{Command|gamemode [name/index]|Select the game mode for the next round. The parameter can either be the name or the index number of the game mode (0 {{=}} sandbox, 1 {{=}} mission, etc).|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|Immediately kills the specified character. Controlled character is killed if name is omitted.
|- {{Command|mission [name]|Select the mission type for the next round.|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|-
|- {{Command|sub/submarine [name]|Select the submarine for the next round.|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|killmonsters
|- {{Command|shuttle [name]|Select the specified submarine as the respawn shuttle for the next round.|Argument 1 is required<br>Can only be executed in Multiplayer.}}
|Immediately kills all AI-controlled enemies in the level.  
|- {{Command|respawnnow|Trigger a respawn immediately if there are any clients waiting to respawn.|Can only be executed in Multiplayer.}}
|-
|- {{Command|startgame/startround/start|Start a new round.|Can only be executed in a Multiplayer Campaign.}}
|lighting
|- {{Command|endgame/endround/end|End the current round.|Can only be executed in Multiplayer.}}
|Toggles lighting on/off. Client-side only.
|- {{Command|entitydata [entity id]||Argument 1 is required.}}
|-
|- {{Command|eventmanager|Toggle event manager on/off. No new random events are created when the event manager is disabled.|cheat = yes}}
|los
|- {{Command|spawnitem [item name/id] [cursor/inventory/cargo/random/character name] [amount]|Spawn an item at the position of the cursor, in the inventory of the controlled character, in the inventory of the client with the given name, or at a random spawnpoint if the last parameter is omitted or "random".|Argument 1 is required.|cheat = yes}}
|Toggle line-of-sight occlusion on/off. Client-side only.
|- {{Command|disablecrewai|Disable the AI of the NPCs in the crew.|cheat = yes}}
|-
|- {{Command|enablecrewai|Enable the AI of the NPCs in the crew.|cheat = yes}}
|money [integer value]
|- {{Command|teleportsub [start/end/cursor]|Teleport the submarine to the position of the cursor, or the start or end of the level. WARNING: does not take outposts into account, so often leads to physics glitches. Only use for debugging.|cheat = yes}}
|Adds the specified amount to the current balance in Marks
|- {{Command|togglecampaignteleport|Toggle on/off teleportation between campaign locations by double clicking on the campaign map.|Can only be executed in Campaign mode.|cheat = yes}}
|-
|- {{Command|godmode [character name]|Toggle character godmode. Makes the targeted character invulnerable to damage. If the name parameter is omitted, the controlled character will receive godmode.|cheat = yes}}
|oxygen/air
|- {{Command|godmode_mainsub|Toggle submarine godmode. Makes the main submarine invulnerable to damage.|cheat = yes}}
|Replenishes every room's oxygen levels to 100%
|- {{Command|giveaffliction [affliction name] [strength] [character name] [limb type] [use relative strength (true/false)]|Add an affliction to a character. If the name parameter is omitted, the affliction is added to the controlled character.|Arguments 1 and 2 are required.|cheat = yes}}
|-
|- {{Command|heal [character name] [all]|Restore the specified character to full health. If the name parameter is omitted, the controlled character will be healed. By default only heals common afflictions such as physical damage and blood loss: use the "all" argument to heal everything, including poisonings/addictions/etc.|cheat = yes}}
|power
|- {{Command|revive [character name]|Bring the specified character back from the dead. If the name parameter is omitted, the controlled character will be revived.|cheat = yes}}
|Immediately powers up all nuclear reactors.
|- {{Command|freeze|cheat=yes}}
|-
|- {{Command|ragdoll [character name]|Force-ragdoll the specified character. If the name parameter is omitted, the controlled character will be ragdolled.|cheat = yes}}
|respawnnow
|- {{Command|kill [character name]|Immediately kills the specified character.|cheat = yes}}
|Trigger a respawn if there are clients waiting to respawn.
|- {{Command|tags/taglist|list all the tags used in the game}}
|-
|- {{Command|sendchatmessage [sender] [msg] [type] [red] [green] [blue] [alpha]|Sends a chat message with specified type and color.|Can only be executed in Multiplayer.}}
|revive [character name]
|- {{Command|items/itemlist|List all the item prefabs available for spawning.}}
|Brings the specified character back from the dead. Controlled character is revived if name is omitted.
|- {{Command|itemassemblies|List all the item assemblies available for spawning.}}
|-
|- {{Command|disableenemyai|Disable the AI of the Enemy characters (monsters)|cheat = yes}}
|setclientcharacter [client name] [character name]
|- {{Command|enableenemyai|Enable the AI of the Enemy characters (monsters).|cheat = yes}}
|Give control of the specified character to the specified client.
|- {{Command|growthdelay [delay]|Sets how long it takes for planters to attempt to advance a plant's growth.|Argument 1 is required.|cheat = yes}}
|-
|- {{Command|lock|Lock movement of the main submarine.}}
|setskill [all/indentifier] [max/level] [character name]
|- {{Command|lockx|Lock horizontal movement of the main submarine.}}
|Set specified skills of a specified client to a specified level.
|- {{Command|locky|Lock vertical movement of the main submarine.}}
|-
|- {{Command|triggerevent [event id]|Created a new event.|Argument 1 is required.|cheat = yes}}
|spawn [creaturename/jobname] [near/inside/outside/cursor]
|- {{Command|unlockmission [identifier/tag]|Unlocks a mission in a random adjacent level.|Argument 1 is required.<br>Can only be executed in Campaign mode.|cheat = yes}}
|Spawn a creature or AI-controlled crewmember at the specified location.
|- {{Command|setcampaignmetadata [identifier] [value]|Sets the specified campaign metadata value.|Arguments 1 and 2 are required.<br>Can only be executed in Campaign mode.|cheat = yes}}
|-
|- {{Command|showreputation|List the current reputation values.|Can only be executed in Campaign mode.}}
|spawnitem [item name/identifier] [cursor/inventory/cargo/random/[character name]]
|- {{Command|setlocationreputation [value]|Set the reputation in the current location to the specified value.|Argument 1 is required.<br>Can only be executed in Campaign mode.|cheat = yes}}
|Spawn an item at the specified location. Item is spawned at a random location if location is omitted.
|- {{Command|setreputation [faction] [value]|Set the reputation of a location to the specified value.|Arguments 1 and 2 are required.<br>Can only be executed in Campaign mode.|cheat = yes}}
|-
|- {{Command|fixitems|Repairs all items and restores them to full condition.|cheat = yes}}
|teleportcharacter [character name]
|- {{Command|fixhulls/fixwalls|Fixes all walls.|cheat = yes}}
|Teleports the specified character to the cursor's position.
|- {{Command|upgradeitem [upgrade] [level] [item tag]|Adds an upgrade to the current targeted item.|Arguments 1 and 2 are required.<br>Argument 3 is only required if argument 2 is not a hull upgrade.|cheat = yes}}
|-
|- {{Command|maxupgrades [category] [prefab]|Maxes out all upgrades or only specific one if given arguments.|Can only be executed in Campaign mode.|cheat = yes}}
|teleportsub [start/end/cursor]
|- {{Command|power|Immediately powers up the submarine's nuclear reactor.|cheat = yes}}
|Teleports the sub to a given location. Warning: <u>Very</u> glitchy.
|- {{Command|oxygen/air|Replenishes the oxygen levels in every room to 100%.|cheat = yes}}
|-
|- {{Command|killmonsters|Immediately kills all AI-controlled enemies in the level.|cheat = yes}}
|upgradeitem [upgrade] [level] [items]
|- {{Command|despawnnow [character name]|Immediately despawns the specified dead character. If the character argument is omitted, all dead characters are despawned.|cheat = yes}}
|Adds an upgrade to the targeted item.
|- {{Command|skipeventcooldown|Skips the currently active event cooldown and triggers pending monster spawns immediately.|cheat = yes}}
|-
|- {{Command|ballastflora [infect/growthwarp] [prefab/amount]|Infect ballasts and control its growth.|cheat = yes}}
|water
|- {{Command|setdifficulty/forcedifficulty [0-100]|Leave the parameter empty to disable.|cheat = yes}}
|Toggles water editing. Add water to a room by holding left click, and drain water by holding right click.
|- {{Command|autoitemplacerdebug/outfitdebug|Toggle automatic item placer debug info on/off. The automatically placed items are listed in the debug console at the start of a round.}}
|- {{Command|listtasks|Lists all asynchronous tasks currently in the task pool.}}
|- {{Command|listcoroutines|Lists all coroutines currently running.}}
|- {{Command|calculatehashes [content package]|Show the MD5 hashes of the files in the selected content package. If the name parameter is omitted, the first content package is selected.}}
|- {{Command|simulatedlatency [min latency] [random latency]|applies a simulated latency to network messages. Useful for simulating real network conditions when testing the multiplayer locally.|Arguments 1 and 2 are required.<br>Can only be executed in Multiplayer.}}
|- {{Command|simulatedloss [loss ratio]|applies simulated packet loss to network messages. For example, a value of 0.1 would mean 10% of the packets are dropped. Useful for simulating real network conditions when testing the multiplayer locally.|Argument 1 is required.<br>Can only be executed in Multiplayer.}}
|- {{Command|simulatedduplicateschance [dupe ratio]|simulates packet duplication in network messages. For example, a value of 0.1 would mean there's a 10% chance a packet gets sent twice. Useful for simulating real network conditions when testing the multiplayer locally.|Argument 1 is required.<br>Can only be executed in Multiplayer.}}
|- {{Command|startitems/startitemset [identifier]|start item set identifier|Argument 1 is required.}}
|}
|}


== Submarine Editor ==
== Debug Version Commands ==
The following commands are available for use in the [[Submarine Editor]].
The debug version of ''Barotrauma'' can only be accessed by downloading and compiling the game's [https://github.com/Regalis11/Barotrauma source code], then navigating to one of the "Debug[Windows/Mac/Linux]" folders and launching the ''Barotrauma'' game executable.
{| class="wikitable mw-collapsible"
{| class="sortable" style="width:100%"
!Command
! style="width:1%" | <span class="explain" title="Requires cheats to be enabled">Cheat</span>
!Description
! style="width:24%" | Command
|-
! style="width:50%" class=unsortable | In-Game Description
|alpha [0-255]
! style="width:25%" class=unsortable | Notes
|Set the alpha (transparency) of the selected items/structures.
|- {{Command|crash|Crashes the game.}}
|-
|- {{Command|showballastflorasprite}}
|color [0-255] [0-255] [0-255]
|- {{Command|simulatedlongloadingtime [min time]|forces loading a round to take at least the specified amount of seconds.|Argument 1 is required.<br>Can only be executed in Multiplayer.}}
|Set the RGB values of the selected items/structures.
|- {{Command|resetcharacternetstate [character name]|A debug-only command that resets a character's network state, intended for diagnosing character syncing issues.}}
|-
|- {{Command|storeinfo}}
|load [submarine name]
|- {{Command|setplanthealth [health]|Sets the health of the selected plant in sub editor.}}
|Loads a submarine.
|- {{Command|printreceivertransfers}}
|-
|- {{Command|spamchatmessages [msg count] [msg length]}}
|multiplylights [R,G,B,A]
|- {{Command|getprefabinfo [prefab id]|Argument 1 is required.}}
|Multiplies the colors/alphas of all static lights in the sub using the specified Vector4 value. <nowiki>https://docs.microsoft.com/en-us/dotnet/api/system.numerics.vector4?view=netcore-3.1</nowiki>
|- {{Command|copycharacterinfotoclipboard}}
|-
|- {{Command|spawnallitems}}
|reloadsprite
|- {{Command|camerasettings [default zoom] [zoom smoothness] [move smoothness] [min zoom] [max zoom]|debug command for testing camera settings. The values default to 1.1, 8.0, 8.0, 0.1 and 2.0.}}
|Reloads the sprites of the selected items/structures. Also works in-game on the controlled character.
|- {{Command|waterparams [distortion scale X] [distortion scale Y] [distortion strength X] [distortion strength Y] [blur]|default 0.5 0.5 0.5 0.5 1}}
|-
|- {{Command|refreshrect|Updates the dimensions of the selected items to match the ones defined in the prefab. Applied only in the subeditor.}}
|resetall
|- {{Command|flip|Flip the currently controlled character.}}
|Resets all items/structures to prefab defaults.
|- {{Command|mirror|Mirror the currently controlled character.}}
|-
|- {{Command|forcetimeout|Immediately cause the client to time out if one is running.}}
|resetentitiesbyidentifier [identifier]
|- {{Command|bumpitem [velocity]}}
|Resets all items/structures with the given identifier to prefab defaults.
|- {{Command|playovervc [file name]|Plays a sound over voice chat.}}
|-
|- {{Command|querylobbies|Queries all SteamP2P lobbies}}
|resetselected
|- {{Command|checkduplicates [language id]|Checks the given language for duplicate translation keys and writes to file.}}
|Resets the properties of the selected items/structures to prefab default.
|- {{Command|writetocsv/xmltocsv|Writes the default language (English) to a .csv file.}}
|-
|- {{Command|csvtoxml|Converts .csv localization files in Content/NPCConversations & Content/Texts to .xml for use in-game.}}
|save [submarine name]
|- {{Command|printproperties|Goes through the currently collected property list for missing localizations and writes them to a file.}}
|Saves the currently loaded submarine to ..\Barotrauma\Submarines\[submarine name]. Also works in singleplayer.
|- {{Command|getproperties|Goes through the MapEntity prefabs and checks their serializable properties for localization issues.}}
|-
|- {{Command|setcurrentlocationtype [type]|Change the type of the current location.|Can only be executed in Campaign mode.<br>Argument 1 is required.}}
|setentityproperties [property name] [value]
|- {{Command|forcelocationtypechange [locationname] [locationtype]}}
|Set the specified property of the selected items/structures to the specified value.
|- {{Command|printsendertransfers}}
|-
|- {{Command|eventdata [latest/event id]||Argument 1 is required.}}
|togglegrid
|- {{Command|spamevents|A debug command that creates a ton of entity events.}}
|Toggle visual snap grid in sub editor.
|- {{Command|stallfiletransfers [seconds]|A debug command that stalls each file transfer packet by the specified duration.}}
|- {{Command|fastforward [seconds]|Fast forwards the game by x seconds. Note that large numbers may cause a long freeze.}}
|- {{Command|removecharacter [character name]|Immediately deletes the specified character.|Argument 1 is required.}}
|- {{Command|waterphysicsparams [stiffness] [spread] [damping]|defaults 0.02, 0.05, 0.05}}
|- {{Command|testlevels}}
|}
|}


== Miscellaneous ==
=Permissions=
{| class="wikitable"
{{:Permissions}}
!Command
!Description
|-
|quickstart [submarine name]
|Starts a singleplayer sandbox (can only be executed from the main menu)
|-
|wikiimage_character
|Save an image of the currently controlled character with a transparent background.
|-
|wikiimage_sub
|Save an image of the main submarine with a transparent background.
|}


== Debugging ==
=References=
This category is split into 2 sub-categories: '''Network''', for internet related commands, and '''In-Game''', for non-internet related commands.
<references/>
=== Network ===
The following commands are available to debug network issues.
{| class="wikitable mw-collapsible"
!Command
!Description
|-
|netstats
|Toggle visibility of the Network Statistics UI.
|-
|simulatedduplicateschance [0.00-1.00]
|Simulates packet duplication in network messages. A value of 1 means 100% of packets are duplicated.
|-
|simulatedlatency [min. latency (seconds)] [rand. latency (seconds)]
|Applies a simulated latency to network messages. Useful for testing real network conditions.
|-
|simulatedloss [0.00-1.00]
|Simulates packet loss in network messages. A value of 1 means 100% of packets are lost.
|-
|steamnetdebug
|Toggles Steamworks network debug logging.
|}
=== In-Game ===
The following commands are available to debug In-Game issues.
{| class="wikitable mw-collapsible"
!Command
!Description
|-
|autoitemplacerdebug
|Toggles automatic item placer debug info on/off. Auto-placed items are outputted to the console at round start.
|-
|calculatehashes [content package name]
|Show the MD5 hashes of the files in the specified content package. First content package is selected if name is omitted.
|-
|checkcrafting
|Checks item crafting and deconstruction recipes for inconsistencies.
|-
|debugai
|Toggles AI debug mode on/off. Only works in singleplayer.
|-
|debugdraw
|Toggles the debug drawing mode on/off. Client-side only.
|-
|disablecrewai
|Disables the AI of AI-controlled crewmembers.
|-
|disableenemyai
|Disables the AI of AI-controlled enemies.
|-
|dumpentitytexts [filename.txt]
|Writes the names and descriptions of every entity prefab along with xml translation tags to the specified .txt file. Data is written to Barotrauma\Content\Texts\EntityTexts.txt if file path is omitted.
|-
|dumpeventtexts [filename.txt]
|Writes the text of every event file along with xml translation tags to the specified .txt file. Data is written to Barotrauma\Content\Texts\EventTexts.txt if file path is omitted.
|-
|dumptexts [filename.xml]
|Writes the text of the specified .xml file to a .txt file with the same name. Data is read from EnglishVanilla.xml if file path is omitted.
|-
|editcharacters
|Opens the Character Editor.
|-
|editevents
|Opens the Event Editor.
|-
|editlevels
|Opens the Level Editor
|-
|editparticles
|Opens the Particle Editor.
|-
|editsprites
|Opens the Sprite Editor.
|-
|editsubs
|Open the Submarine Editor.
|-
|enablecrewai
|Enables the AI of AI-controlled crewmembers.
|-
|enableenemyai
|Enables the AI of AI-controlled enemies.
|-
|eventmanager
|Toggles the master event manager on/off. Random events cannot happen if this is turned off.
|-
|findentityids [entity name]
|Outputs the entityID of the specified entity to the console.
|-
|fpscounter
|Toggles the in-game FPS counter on/off.
|-
|game
|Switch to the in-game view.
|-
|gender [Male/Female/None]
|Switches the gender of the controlled character to the specified value.
|-
|head [head id] [hair id] [beard id] [moustache id] [face attachment id]
|Loads a head sprite and wearables to a controlled character. Hair, beard, moustache and face attachment ID's are optional.
|-
|hud/togglehud
|Toggles the visibility of all the HUD elements. Client-side only.
|-
|hudlayoutdebugdraw
|Toggles the debug drawing mode of HUD layout areas on/off.
|-
|interactdebugdraw
|Toggles the debug drawing mode of item interaction ranges on/off.
|-
|itemlist/items
|Outputs all item prefabs available for spawning.
|-
|jointscale [value] [character name]
|Define the joint scaling for the specified character. Joint scaling is changed for the controlled character if name is omitted.
|-
|limbscale [value] [character name]
|Define the limb scaling for the specified character. Limb scaling is changed for the controlled character if name is omitted.
|-
|listtasks
|Outputs all asynchronous tasks currently in the task pool to the console.
|-
|loadtexts [sourcefile.txt] [destinationfile.xml]
|Loads all lines of text from a .txt file to a .xml file sequentially.
|-
|loadwearable [id]
|Force-select a certain job loadout variant for the controlled character.
|-
|lock
|Locks movement of the main submarine.
|-
|lockx
|Locks movement of the main submarine in the X (left-right) direction.
|-
|locky
|Locks movement of the main submarine in the Y (up-down) direction.
|-
|mainmenu/menu
|Switch to the main menu.
|-
|messagebox [header] [message] [default/in-game]
|Create a message box. Client-side only.
|-
|race [White, Black, Asian, None]
|Sets the race of the controlled character to the specified value.
|-
|ragdoll [character name]
|Ragdolls the specified character. Ragdolls controlled character if name is omitted.
|-
|ragdollscale [character name]
|Define the ragdoll scaling for the specified character. Ragdoll scaling is changed for the controlled character if name is omitted.
|-
|recreateragdoll [character name]
|Recreate the ragdoll for the specified character. Ragdoll is recreated for the controlled character if name is omitted.
|-
|reloadwearables [character name]
|Reloads the sprites of all limbs and clothes of the specified character. Sprites are reloaded for the controlled character if name is omitted.
|-
|resetragdoll [character name]
|Resets the ragdoll of the specified character. Sprites are reloaded for the controlled character if name is omitted.
|-
|setfreecamspeed [speed]
|Set the camera movement speed when not controlling a character. Defaults to 1.
|-
|showballastflorasprite
|
|-
|showperf
|Toggles visibility of the Performance Statistics HUD
|-
|showseed
|Outputs the current level's seed to the console.
|-
|spawnsub [submarine name]
|Spawns a submarine at the location of the cursor.
|-
|starttraitormissionimmediately
|Skip the initial delay of the traitor mission and start one immediately.
|-
|toggleaitargets
|Toggles the visiblity of AI targets. Client-side only.
|-
|toggleitemhighlights
|Toggles the item highlight effect on/off. Client-side only.
|-
|toggleupperhud
|Toggles the visibility of the upper HUD elements. Client-side only. (Use "hud" to hide it entirely.)
|-
|triggerevent [id]
|Trigger a random event.
|-
|updatetextfile [sourcefile.txt/.xml] [destinationfile.txt/.xml]
|Inserts absent xml elements from the source file into the destination file. Useful for updating outdated translation files.
|-
|verboselogging
|Toggles verbose logging in the console on/off. When active, additional debug info is writted to the console alongside standard info.
|}


= Gallery =
=Media=
[[File:Console.png|left|frame|The console showing ping info on startup]]
[[File:Console.png|left|frame|The console showing ping info on startup]]
{{Guides nav}}

Latest revision as of 00:54, 25 March 2024

Data is potentially outdated
Last updated for version 0.18.12.0
The current game version is 1.2.8.0
Notes: Messed up while figuring out cheat commands. Will need to fix.
See also: Permissions

This page is about the debugging tool; for the in-game installation, see "Terminal"

The console is a debugging tool that can be used to view errors and change certain settings and content while the game is opened.

Its main function is debugging, but it can also be used to spawn items and creatures, modify their attributes and afflictions, or use moderation commands.

In multiplayer, players that have the "ConsoleCommands" permission can use certain specific commands under the "Permitted console commands" part of the permissions menu. Players can input commands in a text input field at the bottom of the console window.

The source code related to console commands is available at Github. [1] [2] [3]

Usage

  1. Press F3 to toggle the console (for Mac, press Function andF3).
  2. Enter enablecheats to enable cheats and disable achievements for the game session
    • This is only required for cheat commands, marked with a green checkmark in the table below.
  3. Press Tab to autofill and cycle through identifiers
    • For a list of Item Identifiers, see Item IDs.

Examples:

spawnitem weld
...then press Tab to cycle between "Welding Tool" and "Welding Fuel"


setskill mech
...then press Tab to autofill Mechanical


In-game help with commands can be accessed with the help command. Enter help before a command for help with a specific command (i.e. help spawnitem), or by itself for a list of all commands.

Commands

Arguments are typed without brackets, and with quotation marks around multi-word inputs.
Examples: handcuffs and "handheld sonar"

Cheat Command In-Game Description Notes
copyitemnames N/A
autohull N/A Generates Hulls in the Submarine Editor.
startlidgrenclient [ip address] N/A Argument 1 is required.
startsteamp2pclient N/A
enablecheats Enables cheat commands and disables Steam achievements during this play session.
mainmenu/menu Go to the main menu.
game Go to the "in-game" view.
editsubs/subeditor [sub file path] Switch to the Submarine Editor to create or edit submarines.
editparticles/particleeditor Switch to the Particle Editor to edit particle effects.
editlevels/leveleditor Switch to the Level Editor to edit levels.
editsprites/spriteeditor Switch to the Sprite Editor to edit the source rects and origins of sprites.
editevents/eventeditor Switch to the Event Editor to edit scripted events.
editcharacters/charactereditor Switch to the Character Editor to edit/create the ragdolls and animations of characters. Switching between the character editor and the game view may cause odd behaviour or bugs.
quickstart [sub name] [difficulty] [level gen parameters identifier] Starts a singleplayer sandbox Can only be executed from the main menu.
Argument 1 is required.
steamnetdebug Toggles Steamworks networking debug logging.
readycheck Commence a ready check in multiplayer.
bindkey [key] [command] Binds a key to a command. Arguments 1 and 2 are required.
Commands containing double quotes (") cannot be bound.
unbindkey [key] Unbinds a command. Argument 1 is required.
savebinds Writes current keybinds into the config file. Some keybinds may render the game unusable.
togglegrid Toggle visual snap grid in sub editor.
spreadsheetexport Export items in format recognized by the spreadsheet importer.
wikiimage_character Save an image of the currently controlled character with a transparent background. Image is saved to Barotrauma/wikiimage.png.
wikiimage_sub Save an image of the main submarine with a transparent background. Image is saved to Barotrauma/wikiimage.png.
kick [player name] Kick a player out of the server. Argument 1 is required.
Can only be executed in Multiplayer.
Executer requires the "Kick" permission.
kickid [client id] Kick the player with the specified client ID out of the server. You can see the IDs of the clients using the command "clientlist". Argument 1 is required.
Can only be executed in Multiplayer.
Executer requires the "Kick" permission.
ban [player name] Kick and ban the player from the server. Argument 1 is required.
Can only be executed in Multiplayer.
Executer requires the "Ban" permission.
banid [client id] Kick and ban the player with the specified client ID from the server. You can see the IDs of the clients using the command "clientlist". Argument 1 is required.
Can only be executed in Multiplayer.
Executer requires the "Ban" permission.
dumpids [amount] [file name] N/A
dumptofile [file name] Outputs the contents of the debug console into a text file in the game folder. If the filename argument is omitted, "consoleOutput.txt" is used as the filename.
findentityids [entity name] N/A
campaigninfo/campaignstatus Display information about the state of the currently active campaign. Can only be executed in Campaign mode.
help [command] N/A Displays a list of commands and their descriptions.
Displays help on a specific command if argument 1 is called.
verboselogging Toggle verbose console logging on/off. When on, additional debug information is written to the debug console.
freecamera/freecam Detach the camera from the controlled character. Cannot be executed in the Submarine Editor.
clientlist List all the clients connected to the server. Can only be executed in Multiplayer.
say [msg] Send a global chat message. When issued through the server command line, displays "HOST" as the sender. Can only be executed in Multiplayer.
msg [msg] Send a chat message with no sender specified. Can only be executed in Multiplayer.
setmaxplayers/maxplayers [player count (≤16)] Sets the maximum player count of the server that's being hosted. Argument 1 is required.
Can only be executed in Multiplayer.
setpassword/setserverpassword/password [password] Changes the password of the server that's being hosted. Password is removed if argument 1 is omitted.
traitorlist List all the traitors and their targets.
money [amount] [character name] Gives the specified amount of money to the crew when a campaign is active. Can only be executed in Campaign mode.
showmoney Shows the amount of money in everyones wallet.
setskill [all/identifier] [max/level] [character name] Set your skill level. Arguments 1 and 2 are required.
givetalent [talent name/id] [character name] give the talent to the specified character. If the character argument is omitted, the talent is given to the controlled character. Argument 1 is required.
unlocktalents [all/job name] [character] give the specified character all the talents of the specified class Argument 1 is required.
giveexperience [amount] [character name] Give experience to character. Argument 1 is required.
control [character name] Start controlling the specified character (client-only). Argument 1 is required.
shake N/A
explosion [range] [force] [damage] [structure damage] [item damage] [emp strength] [ballast flora damage] Creates an explosion at the position of the cursor.
teleportcharacter/teleport [character name] Teleport the specified character to the position of the cursor. If the name parameter is omitted, the controlled character will be teleported.
spawn/spawncharacter [creature/job name] [near/inside/outside/cursor] [team (0-3)] Spawn a creature at a random spawnpoint (use the second parameter to only select spawnpoints near/inside/outside the submarine). You can also enter the name of a job (e.g. "Mechanic") to spawn a character with a specific job and the appropriate equipment. Argument 1 is required.
los [true/false] Toggle the line of sight effect on/off (client-only)
lighting/lights [true/false] Toggle lighting on/off (client-only).
ambientlight [restore/color] [add] Change the color of the ambient light in the level. Argument 1 is required.
multiplylights [value] Multiplies the colors of all the static lights in the sub with the given Vector4 value (for example, 1,1,1,0.5). Can only be executed from the Submarine Editor.
Argument 1 is required.
color/colour [red] [green] [blue] [alpha] Change color (as bytes from 0 to 255) of the selected item/structure instances. Applied only in the subeditor.
listcloudfiles Lists all of your files on the Steam Cloud.
removefromcloud [file name/index] Removes a file from Steam Cloud. Argument 1 is required.
resetall Reset all items and structures to prefabs. Only applicable in the subeditor.
resetentitiesbyidentifier [entity tag/id] Reset items and structures with the given tag/identifier to prefabs. Only applicable in the subeditor. Argument 1 is required.
resetselected Reset selected items and structures to prefabs. Only applicable in the subeditor.
alpha [value] Change the alpha (as bytes from 0 to 255) of the selected item/structure instances. Applied only in the subeditor. Argument 1 is required.
cleansub N/A
messagebox/guimessagebox [header] [msg] [default/ingame] Creates a message box.
debugdraw [true/false] Toggle the debug drawing mode on/off (client-only).
debugwiring [true/false] Toggle the wiring debug mode on/off (client-only).
debugdrawlocalization [true/false] Toggle the localization debug drawing mode on/off (client-only). Colors all text that hasn't been fetched from a localization file magenta, making it easier to spot hard-coded or missing texts.
debugdrawlos [true/false] Toggle the los debug drawing mode on/off (client-only).
togglevoicechatfilters [true/false] Toggle the radio/muffle filters in the voice chat (client-only).
fpscounter Toggle the FPS counter.
showperf Toggle performance statistics on/off.
netstats Toggles the visibility of the network statistics UI.
hudlayoutdebugdraw/debugdrawhudlayout Toggle the debug drawing mode of HUD layout areas on/off.
interactdebugdraw/debugdrawinteract Toggle the debug drawing mode of item interaction ranges on/off.
togglehud/hud Toggle the character HUD (inventories, icons, buttons, etc) on/off (client-only).
toggleupperhud Toggle the upper part of the ingame HUD (chatbox, crewmanager) on/off (client-only).
toggleitemhighlights Toggle the item highlight effect on/off (client-only).
togglecharacternames Toggle the names hovering above characters on/off (client-only).
followsub Toggle whether the camera should follow the nearest submarine (client-only).
toggleaitargets N/A
debugai Toggle the ai debug mode on/off (works properly only in single player).
devmode Toggle the dev mode on/off (client-only).
showmonsters Permanently unlocks all the monsters in the character editor. Use "hidemonsters" to undo.
hidemonsters Permanently hides in the character editor all the monsters that haven't been encountered in the game. Use "showmonsters" to undo.
water/editwater Toggle water editing. Allows adding water into rooms by holding the left mouse button and removing it by holding the right mouse button.
fire/editfire Allows putting up fires by left clicking.
mute [player name] Prevent the client from speaking through the voice chat. Can only be executed in Multiplayer.
unmute [player name] Allow the client to speak through the voice chat. Can only be executed in Multiplayer.
checkcrafting Checks item deconstruction & crafting recipes for inconsistencies.
analyzeitem [item name/id] Analyzes one item for exploits. Argument 1 is required.
checkcraftingexploits [max allowed cost] Finds outright item exploits created by buying store-bought ingredients and constructing them into sellable items.
adjustprice [item name/id] [price] [add/mult] Recursively prints out expected price adjustments for items derived from this item. Arguments 1 and 2 are required.
deconstructvalue [item name/id] Views and compares deconstructed component prices for this item. Argument 1 is required.
setentityproperties [property] [value] Sets the value of some property on all selected items/structures in the sub editor. Arguments 1 and 2 are required.
checkmissingloca N/A
checkduplicateloca N/A
comparelocafiles [file 1] [file 2] N/A
eventstats [0-7] [true/false] N/A Argument 2 determines if the entire log will be displayed instead of a summary.
setfreecamspeed [speed] Set the camera movement speed when not controlling a character. Defaults to 1. Argument 1 is required.
dumptexts [destination path] Extracts all the texts from the given text xml and writes them into a file (using the same filename, but with the .txt extension). If the filepath is omitted, the EnglishVanilla.xml file is used.
loadtexts [source path] [destination path] Loads all lines of text from a given .txt file and inserts them sequientially into the elements of an xml file. If the file paths are omitted, EnglishVanilla.txt and EnglishVanilla.xml are used.
updatetextfile [source path] [destination path] Inserts all the xml elements that are only present in the source file into the destination file. Can be used to update outdated translation files more easily.
dumpentitytexts [destination path] gets the names and descriptions of all entity prefabs and writes them into a file along with xml tags that can be used in translation files. If the filepath is omitted, the file is written to Content/Texts/EntityTexts.txt
dumpeventtexts [destination path] gets the texts from event files and and writes them into a file along with xml tags that can be used in translation files. If the filepath is omitted, the file is written to Content/Texts/EventTexts.txt
itemcomponentdocumentation [destination path] N/A Argument 1 defaults to ItemComponentDocumentation.txt if omitted.
cleanbuild N/A
reloadcorepackage N/A Cannot be executed from within a game or from the Submarine Editor.
To bypass this, run this command with any argument.
giveperm [client id/steam id/ip address/player name] [all/permission] Grants administrative permissions to the specified client. Argument 1 is required.
Can only be executed in Multiplayer.
revokeperm [client id/steam id/ip address/player name] [all/permission] Revokes administrative permissions from the specified client. Argument 1 is required.
Can only be executed in Multiplayer.
giverank [client id/steam id/ip address/player name] [rank] Argument 1 is required.
Can only be executed in Multiplayer.
givecommandperm [client id/steam id/ip address/player name] [all/command] Gives the specified client the permission to use the specified console commands. Argument 1 is required.
Can only be executed in Multiplayer.
revokecommandperm [client id/steam id/ip address/player name] [all/command] Revokes permission to use the specified console commands from the specified client. Argument 1 is required.
Can only be executed in Multiplayer.
showperm [client id/steam id/ip address/name] Shows the current administrative permissions of the specified client. Argument 1 is required.
Can only be executed in Multiplayer.
banendpoint/banip [steam id/ip address] [seconds] [reason] Ban the IP address/SteamID from the server. Argument 1 is required.
Can only be executed in Multiplayer.
unban [player name] Unban a specific client. Argument 1 is required.
Can only be executed in Multiplayer.
unbanip [ip address] Unban a specific IP. Argument 1 is required.
Can only be executed in Multiplayer.
campaigndestination/setcampaigndestination [destination index] Set the location to head towards in the currently active campaign. Can only be executed in Campaign mode.
limbscale [scale] Define the limbscale for the controlled character. Provide id or name if you want to target another character. Note: the changes are not saved! Argument 1 is required.
jointscale [scale] Define the jointscale for the controlled character. Provide id or name if you want to target another character. Note: the changes are not saved! Argument 1 is required.
ragdollscale [scale] Rescale the ragdoll of the controlled character. Provide id or name if you want to target another character. Note: the changes are not saved! Argument 1 is required.
recreateragdoll [character name] Recreate the ragdoll of the controlled character. Provide id or name if you want to target another character.
resetragdoll [character name] Reset the ragdoll of the controlled character. Provide id or name if you want to target another character.
reloadwearables [character name] Reloads the sprites of all limbs and wearable sprites (clothing) of the controlled character. Provide id or name if you want to target another character.
loadwearable [variant] Force select certain variant for the selected character. Argument 1 is required.
reloadsprite/reloadsprites [id/name] [item id/sprite name] Reloads the sprites of the selected item(s)/structure(s) (hovering over or selecting in the subeditor) or the controlled character. Can also reload sprites by entity id or by the name attribute (sprite element). Example 1: reloadsprite id itemid. Example 2: reloadsprite name "Sprite name" Cannot be executed from the Sprite Editor.
flipx mirror the main submarine horizontally Cannot be executed in Multiplayer.
head [head id] [hair index] [beard index] [moustache index] [face attachment index] Load the head sprite and the wearables (hair etc). Required argument: head id. Optional arguments: hair index, beard index, moustache index, face attachment index. Argument 1 is required.
spawnsub [sub name] [true/false] Spawn a submarine at the position of the cursor Argument 1 is required.
Argument 2 determines if the spawned submarine is a Thalamus.
pause Toggles the pause state when playing offline
showseed/showlevelseed Show the seed of the current level.
botcount [amount] Set the number of bots in the crew in multiplayer. Argument 1 is required
Can only be executed in Multiplayer.
botspawnmode [fill/normal] Set how bots are spawned in the multiplayer. Argument 1 is required
Can only be executed in Multiplayer.
killdisconnectedtimer [seconds] Set the time after which disconnect players' characters get automatically killed. Argument 1 is required
Can only be executed in Multiplayer.
autorestart [true/false] Enable or disable round auto-restart. Can only be executed in Multiplayer.
autorestartinterval [seconds] Set how long the server waits between rounds before automatically starting a new one. If set to 0, autorestart is disabled. Argument 1 is required
Can only be executed in Multiplayer.
autorestarttimer [seconds] Set the current autorestart countdown to the specified value. Argument 1 is required
Can only be executed in Multiplayer.
startwhenclientsready [true/false] Enable or disable automatically starting the round when clients are ready to start. Can only be executed in Multiplayer.
togglekarma Toggle the karma system on/off. Can only be executed in Multiplayer.
resetkarma [player name] Resets the karma value of the specified client to 100. Argument 1 is required
Can only be executed in Multiplayer.
setkarma [player name] [karma (0-100)] Sets the karma of the specified client to the specified value. Arguments 1 and 2 are required
Can only be executed in Multiplayer.
showkarma Show the current karma values of the players. Can only be executed in Multiplayer.
togglekarmatestmode/karmatestmode Toggle the karma test mode on/off. When test mode is enabled, clients get notified when their karma value changes (including the reason for the increase/decrease) and the server doesn't ban clients whose karma decreases below the ban threshold. Can only be executed in Multiplayer.
setclientcharacter [player name] [character name] Gives the client control of the specified character. Arguments 1 and 2 are required
starttraitormissionimmediately Skip the initial delay of the traitor mission and start one immediately. Can only be executed in Multiplayer.
difficulty/leveldifficulty [0-100] Change the level difficulty setting in the server lobby. Argument 1 is required
Can only be executed in Multiplayer.
restart/reset Close and restart the server. Can only be executed in Multiplayer.
servername [name] Change the name of the server. Argument 1 is required
Can only be executed in Multiplayer.
servermsg [msg] Change the message displayed in the server lobby. Argument 1 is required
Can only be executed in Multiplayer.
seed/levelseed [seed] Changes the level seed for the next round. Argument 1 is required
Can only be executed in Multiplayer.
randomizeseed Toggles level seed randomization on/off. Can only be executed in Multiplayer.
gamemode [name/index] Select the game mode for the next round. The parameter can either be the name or the index number of the game mode (0 = sandbox, 1 = mission, etc). Argument 1 is required
Can only be executed in Multiplayer.
mission [name] Select the mission type for the next round. Argument 1 is required
Can only be executed in Multiplayer.
sub/submarine [name] Select the submarine for the next round. Argument 1 is required
Can only be executed in Multiplayer.
shuttle [name] Select the specified submarine as the respawn shuttle for the next round. Argument 1 is required
Can only be executed in Multiplayer.
respawnnow Trigger a respawn immediately if there are any clients waiting to respawn. Can only be executed in Multiplayer.
startgame/startround/start Start a new round. Can only be executed in a Multiplayer Campaign.
endgame/endround/end End the current round. Can only be executed in Multiplayer.
entitydata [entity id] N/A Argument 1 is required.
eventmanager Toggle event manager on/off. No new random events are created when the event manager is disabled.
spawnitem [item name/id] [cursor/inventory/cargo/random/character name] [amount] Spawn an item at the position of the cursor, in the inventory of the controlled character, in the inventory of the client with the given name, or at a random spawnpoint if the last parameter is omitted or "random". Argument 1 is required.
disablecrewai Disable the AI of the NPCs in the crew.
enablecrewai Enable the AI of the NPCs in the crew.
teleportsub [start/end/cursor] Teleport the submarine to the position of the cursor, or the start or end of the level. WARNING: does not take outposts into account, so often leads to physics glitches. Only use for debugging.
togglecampaignteleport Toggle on/off teleportation between campaign locations by double clicking on the campaign map. Can only be executed in Campaign mode.
godmode [character name] Toggle character godmode. Makes the targeted character invulnerable to damage. If the name parameter is omitted, the controlled character will receive godmode.
godmode_mainsub Toggle submarine godmode. Makes the main submarine invulnerable to damage.
giveaffliction [affliction name] [strength] [character name] [limb type] [use relative strength (true/false)] Add an affliction to a character. If the name parameter is omitted, the affliction is added to the controlled character. Arguments 1 and 2 are required.
heal [character name] [all] Restore the specified character to full health. If the name parameter is omitted, the controlled character will be healed. By default only heals common afflictions such as physical damage and blood loss: use the "all" argument to heal everything, including poisonings/addictions/etc.
revive [character name] Bring the specified character back from the dead. If the name parameter is omitted, the controlled character will be revived.
freeze N/A
ragdoll [character name] Force-ragdoll the specified character. If the name parameter is omitted, the controlled character will be ragdolled.
kill [character name] Immediately kills the specified character.
tags/taglist list all the tags used in the game
sendchatmessage [sender] [msg] [type] [red] [green] [blue] [alpha] Sends a chat message with specified type and color. Can only be executed in Multiplayer.
items/itemlist List all the item prefabs available for spawning.
itemassemblies List all the item assemblies available for spawning.
disableenemyai Disable the AI of the Enemy characters (monsters)
enableenemyai Enable the AI of the Enemy characters (monsters).
growthdelay [delay] Sets how long it takes for planters to attempt to advance a plant's growth. Argument 1 is required.
lock Lock movement of the main submarine.
lockx Lock horizontal movement of the main submarine.
locky Lock vertical movement of the main submarine.
triggerevent [event id] Created a new event. Argument 1 is required.
unlockmission [identifier/tag] Unlocks a mission in a random adjacent level. Argument 1 is required.
Can only be executed in Campaign mode.
setcampaignmetadata [identifier] [value] Sets the specified campaign metadata value. Arguments 1 and 2 are required.
Can only be executed in Campaign mode.
showreputation List the current reputation values. Can only be executed in Campaign mode.
setlocationreputation [value] Set the reputation in the current location to the specified value. Argument 1 is required.
Can only be executed in Campaign mode.
setreputation [faction] [value] Set the reputation of a location to the specified value. Arguments 1 and 2 are required.
Can only be executed in Campaign mode.
fixitems Repairs all items and restores them to full condition.
fixhulls/fixwalls Fixes all walls.
upgradeitem [upgrade] [level] [item tag] Adds an upgrade to the current targeted item. Arguments 1 and 2 are required.
Argument 3 is only required if argument 2 is not a hull upgrade.
maxupgrades [category] [prefab] Maxes out all upgrades or only specific one if given arguments. Can only be executed in Campaign mode.
power Immediately powers up the submarine's nuclear reactor.
oxygen/air Replenishes the oxygen levels in every room to 100%.
killmonsters Immediately kills all AI-controlled enemies in the level.
despawnnow [character name] Immediately despawns the specified dead character. If the character argument is omitted, all dead characters are despawned.
skipeventcooldown Skips the currently active event cooldown and triggers pending monster spawns immediately.
ballastflora [infect/growthwarp] [prefab/amount] Infect ballasts and control its growth.
setdifficulty/forcedifficulty [0-100] Leave the parameter empty to disable.
autoitemplacerdebug/outfitdebug Toggle automatic item placer debug info on/off. The automatically placed items are listed in the debug console at the start of a round.
listtasks Lists all asynchronous tasks currently in the task pool.
listcoroutines Lists all coroutines currently running.
calculatehashes [content package] Show the MD5 hashes of the files in the selected content package. If the name parameter is omitted, the first content package is selected.
simulatedlatency [min latency] [random latency] applies a simulated latency to network messages. Useful for simulating real network conditions when testing the multiplayer locally. Arguments 1 and 2 are required.
Can only be executed in Multiplayer.
simulatedloss [loss ratio] applies simulated packet loss to network messages. For example, a value of 0.1 would mean 10% of the packets are dropped. Useful for simulating real network conditions when testing the multiplayer locally. Argument 1 is required.
Can only be executed in Multiplayer.
simulatedduplicateschance [dupe ratio] simulates packet duplication in network messages. For example, a value of 0.1 would mean there's a 10% chance a packet gets sent twice. Useful for simulating real network conditions when testing the multiplayer locally. Argument 1 is required.
Can only be executed in Multiplayer.
startitems/startitemset [identifier] start item set identifier Argument 1 is required.

Debug Version Commands

The debug version of Barotrauma can only be accessed by downloading and compiling the game's source code, then navigating to one of the "Debug[Windows/Mac/Linux]" folders and launching the Barotrauma game executable.

Cheat Command In-Game Description Notes
crash Crashes the game.
showballastflorasprite N/A
simulatedlongloadingtime [min time] forces loading a round to take at least the specified amount of seconds. Argument 1 is required.
Can only be executed in Multiplayer.
resetcharacternetstate [character name] A debug-only command that resets a character's network state, intended for diagnosing character syncing issues.
storeinfo N/A
setplanthealth [health] Sets the health of the selected plant in sub editor.
printreceivertransfers N/A
spamchatmessages [msg count] [msg length] N/A
getprefabinfo [prefab id] Argument 1 is required.
copycharacterinfotoclipboard N/A
spawnallitems N/A
camerasettings [default zoom] [zoom smoothness] [move smoothness] [min zoom] [max zoom] debug command for testing camera settings. The values default to 1.1, 8.0, 8.0, 0.1 and 2.0.
waterparams [distortion scale X] [distortion scale Y] [distortion strength X] [distortion strength Y] [blur] default 0.5 0.5 0.5 0.5 1
refreshrect Updates the dimensions of the selected items to match the ones defined in the prefab. Applied only in the subeditor.
flip Flip the currently controlled character.
mirror Mirror the currently controlled character.
forcetimeout Immediately cause the client to time out if one is running.
bumpitem [velocity] N/A
playovervc [file name] Plays a sound over voice chat.
querylobbies Queries all SteamP2P lobbies
checkduplicates [language id] Checks the given language for duplicate translation keys and writes to file.
writetocsv/xmltocsv Writes the default language (English) to a .csv file.
csvtoxml Converts .csv localization files in Content/NPCConversations & Content/Texts to .xml for use in-game.
printproperties Goes through the currently collected property list for missing localizations and writes them to a file.
getproperties Goes through the MapEntity prefabs and checks their serializable properties for localization issues.
setcurrentlocationtype [type] Change the type of the current location. Can only be executed in Campaign mode.
Argument 1 is required.
forcelocationtypechange [locationname] [locationtype] N/A
printsendertransfers N/A
eventdata [latest/event id] N/A Argument 1 is required.
spamevents A debug command that creates a ton of entity events.
stallfiletransfers [seconds] A debug command that stalls each file transfer packet by the specified duration.
fastforward [seconds] Fast forwards the game by x seconds. Note that large numbers may cause a long freeze.
removecharacter [character name] Immediately deletes the specified character. Argument 1 is required.
waterphysicsparams [stiffness] [spread] [damping] defaults 0.02, 0.05, 0.05
testlevels N/A

Permissions

Permissions are sets of rights to administrate a server. They are used to create ranks or can be attributed individually.

Permission Description
ManageRound Allows players to start and end rounds.
Kick Allows players to kick other players.
Ban Allows players to ban other players.
Unban Allows players to unban other players.
SelectSub Allows players to select the sub when the selection mode is on "Manual".
SelectMode Allows players to select the gamemode.
ManageCampaign Same as giving ManageMoney, SellInventoryItems, SellSubItems, ManageMap, and ManageHires permissions.
ConsoleCommands Allows players to use Console Commands. Permissions for individual console commands are also required.
ServerLog Allows players to read the server logs.
ManageSettings Allows players to change the server's settings.
ManagePermissions Allows players to change the permissions of other clients. Plays can only grant permissions that they already have.
KarmaImmunity Immunizes players against the effects of Karma.
ManageMoney Allows players to take money from the bank without needing a vote, set salaries, and take money from other player's wallets.
SellInventoryItems Allows players to sell items to shops from their inventories.
SellSubItems Allows players to sell items to shops directly from the submarine.
ManageMap Allows players to select missions and destinations on the campaign map.
ManageHires Allows players to hire and fire NPC crewmates.
ManageBotTalents Allows players to select talents for NPC crewmates.
All Grants players all permissions.

References

Media

The console showing ping info on startup
v·d·e·h
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