Not to be confused with the in-game installation, "Terminal"
Source code relating to Console can be found on Barotrauma's official GitHub page. |
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.
While its main use is debugging, it can also be used to spawn creatures/items or use moderation commands.
In multiplayer, players with the "Console commands" permission are allowed to use specific commands under the "Permitted console commands" section of the permissions menu.
The console accepts player-inputted commands through a text box at the bottom of the console. These commands will be listed below, alphabetically.
In-Game help on commands can be accessed with the help
command.
Submarine Editor[]
The following commands are available for use in the Submarine Editor.
Command | Description |
---|---|
alpha [0-255] | Set the alpha (transparency) of the selected items/structures. |
color [0-255] [0-255] [0-255] | Set the RGB values of the selected items/structures. |
load [submarine name] | Loads a submarine. |
multiplylights [R,G,B,A] | Multiplies the colors/alphas of all static lights in the sub using the specified Vector4 value. |
reloadsprite | Reloads the sprites of the selected items/structures. Also works in-game on the controlled character. |
resetall | Resets all items/structures to prefab defaults. |
resetentitiesbyidentifier [identifier] | Resets all items/structures with the given identifier to prefab defaults. |
resetselected | Resets the properties of the selected items/structures to prefab default. |
save [submarine name] | Saves the currently loaded submarine to ..\Barotrauma\Submarines\[submarine name]. Also works in singleplayer. |
setentityproperties [property name] [value] | Set the specified property of the selected items/structures to the specified value. |
Campaign[]
The following commands are available for use in singleplayer/multiplayer campaign.
Command |
Description |
---|---|
campaigndestination [index] | Set the target location in the current campaign. |
campaigninfo | Display info about the current campaign, such as current money, location and available destinations. |
setlocationreputation [value] | Set your reputation to the current location to the specified value. |
togglecampaignteleport | Toggles the ability to teleport to a location on the campaign map by double-clicking. Works only in singleplayer. |
pause | Pauses the game. Only works in singleplayer. |
Moderation[]
The following commands are available in multiplayer servers for moderation purposes.
Command | Description |
---|---|
ban [character name] | Bans the selected character from the server. |
banendpoint [IP Address/SteamID] | Bans the selected IP Address/SteamID from the server. |
banid [clientID] | Bans the selected clientID from the server. |
clientlist | Outputs the character name, clientID and ping of all players in the server to the console. |
givecommandperm [clientID/SteamID/character name/IP Address] | Gives the selected player the permission to use the console commands typed in the next entry. |
giveperm [clientID/SteamID/character name/IP Address] | Gives the selected player the permission typed in the next entry. |
giverank [clientID/SteamID/character name/IP Address] | Gives the selected player the rank typed in the next entry. |
kick [character name] | Kicks the selected character from the server. |
kickid [clientID] | Kicks the selected clientID from the server. |
killdisconnecttimer [seconds] | Set the delay until disconnected players are killed. |
mute [character name] | Blocks a character from speaking through voice chat. |
resetkarma [clientID] | Resets the karma of a client to 100. |
revokecommandperm [clientID/SteamID/character name/IP Address] | Revokes the selected player's permission to use the console commands typed in the next entry. |
revokeperm [clientID/SteamID/character name/IP Address] | Revokes the selected player's permission typed in the next entry. |
setkarma [clientID] [0-100] | Sets the karma of a client to the specified value. |
showkarma | Outputs the karma of all players to the console. |
showperm [clientID/SteamID/character name/IP Address] | Outputs the permissions of the selected player to the console. |
togglecharacternames | Toggle visibility of names above players. Client-side only. |
togglekarma | Toggles the karma system on/off. |
togglekarmatestmode | Toggles the karma test mode on/off. When on, notifies players of a karma change and it'sreason, also disables karma bans. |
unban [character name] | Unbans the selected character from the server. |
unbanip [IP Address] | Unbans the selected IP Address from the server. |
unmute [character name] | Allows a character to speak through voice chat. |
Server Settings[]
The following commands are available in multiplayer servers to change their settings.
Command | Description |
---|---|
autorestart [true/false] | Enables/disables the round autorestart timer. |
autorestartinterval [seconds] | Sets the delay between rounds, if autorestart is enabled. Setting this to 0 disables autorestart. |
autorestart timer [seconds] | Sets the current autorestart timer to the specified value. |
botcount [0-16] | Sets the amount of bots on the ship to the specified value. |
botspawnmode [fill/normal] | Set how bots are spawned on the ship. |
difficulty [0-100] | Sets the difficulty value of the server to the specified value. |
gamemode [number/name] | 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). Use this to also start or load a campaign. |
startwhenclientsready [true/false] | Enables/disables autorestart when all players are ready. |
Cheats[]
The following commands are available to make the game easier.
Command | Description |
---|---|
ballastflora infect | Infects random pump (priority those tagged "ballast") with Ballast Flora |
ballastflora growthwarp [number] | Increases growth speed of Ballast Flora |
enablecheats | Enables cheat commands for the game session. Disables achievements. |
explosion [range] [force] [damage] [structural damage] [item damage] [emp strength] [ballast flora strength] | Creates an explosion at the position of the cursor. |
fire | Creates fire at the position of the cursor. |
fixwalls/fixhulls | Fixes all walls on the ship. |
fixitems | Restores all items to max condition. |
freecam | Detach the camera from the controlled character. Warning: Cannot disable in multiplayer. If in single-player switch to a different character. |
giveaffliction [affliction] [affliction strength] [character name] | Gives an affliction to the specified character. Affliction added to controlled character if name is omitted. |
godmode | Makes the controlled character invulnerable to damage. |
godmode_mainsub | Makes the submarine unable to change current health status. |
heal [character name] | Restores the specified character to max health. Controlled character is healed if name is omitted. |
killmonsters | Immediately kills all AI-controlled enemies in the level. |
lighting | Toggles lighting on/off. Client-side only. |
los | Toggle line-of-sight occlusion on/off. Client-side only. |
oxygen/air | Replenishes every room's oxygen levels to 100% |
power | Immediately powers up all nuclear reactors. |
respawnnow | Trigger a respawn if there are clients waiting to respawn. |
revive [character name] | Brings the specified character back from the dead. Controlled character is revived if name is omitted. |
setclientcharacter [client name] [character name] | Give control of the specified character to the specified client. |
setskill [all/indentifier] [max/level] [character name] | Set specified skills of a specified client to a specified level. |
spawn [creaturename/jobname] [near/inside/outside/cursor] | Spawn a creature or AI-controlled crewmember at the specified location. |
spawnitem [item name/identifier] [cursor/inventory/cargo/random/[character name]] | Spawn an item at the specified location. Item is spawned at a random location if location is omitted. |
teleportcharacter [character name] | Teleports the specified character to the cursor's position. |
teleportsub [start/end/cursor] | Teleports the sub to a given location. Warning: Very glitchy. |
upgradeitem [upgrade] [level] [items] | Adds an upgrade to the targeted item. |
water | Toggles water editing. Add water to a room by holding left click, and drain water by holding right click. |
Debugging[]
This category is split into 2 sub-categories: Network, for internet related commands, and In-Game, for non-internet related commands.
Network[]
The following commands are available to debug network issues.
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.
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. |
control [player/character name] | Let's you switch to playing as that player/npc instead. |
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. |
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. |
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. |
togglehud | Toggles the visibility of the lower HUD elements. Client-side only. |
toggleitemhighlights | Toggles the item highlight effect on/off. Client-side only. |
toggleupperhud | Toggled the visibility of the upper HUD elements. Client-side only. |
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. |