Console: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
m (Things seem to have been fixed)
m (Redirected page to Console Commands)
Tag: New redirect
 
(30 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{Source|https://github.com/Regalis11/Barotrauma/blob/master/Barotrauma/BarotraumaShared/Source/DebugConsole.cs}}
#redirect [[Console Commands]]
{{Stub|There are countless commands not yet documented. See the GitHub page above for a list.}}
The '''console''' is a debugging window usable to alter content while in-game; it can be opened or closed by pressing F3. While its main use is to get around bugs, it can also be used to cheat or set up interesting situations.
 
In multiplayer, only the person hosting the game can use the console.
 
The console only recognize specific inputs called '''console commands''', which are listed hereafter. Note that the console is not case-sensitive: it doesn't matter if any letter (or all, or any) is in uppercase.
 
{| class="wikitable"
!Command
!Description
|-
|control [name]
|Assume control of a character/creature. The name must be the same as the name of the folder where the characters configuration file is located ("human"/"[[Tiger Thresher|tigerthresher]]"/"[[Moloch|moloch]]" etc). Some creatures can attack by pressing the R key. Additionally, the [[Husk]] has a fully usable inventory and can interact with the [[Submarine]] as if it were a player.
|-
|debugdraw
|Toggles the "debug draw" mode.
|-
|disablecrewai
|Deactivates the crew AI in single player, making the crew inactive unless directly controlled. See "enablecrewai".
|-
|editmap, edit
|Switches to map editing mode.
|-
|enablecrewai
|Activates or reactivates the crew AI in single player. See "disablecrewai".
|-
|editwater, water
|Allows adding water into rooms or removing it by holding the left or right mouse buttons.
|-
|fixitems
|Sets the condition of all items in the map to 100.0.
|-
|fixwalls
|Fixes all damaged or broken walls.
|-
|fire
|Allows creation of fires by left clicking.
|-
|freecamera, freecam
|Stops the camera from being locked to the controlled character and allows it to be moved freely.
|-
|gamescreen, game
|Switches to the game screen.
|-
|godmode
|Makes the submarine invulnerable.
|-
|heal
|Fully restores the specified character (or the controlled character if none is specified) to full health.
|-
|kick [name]
|Kicks a player with the specified name from the server (can only by used by the admin of a server).
|-
|killcreatures
|Instantly kills all creatures in the map.
|-
|lightingenabled, lights, light
|Toggles lighting effects on/off.
|-
|loadmap [name]
|Loads the specified map.
|-
|losenabled, los
|Toggles the line of sight effect on/off. This can be used to reduce lag.
|-
|mainmenu, menu
|Switches to main menu.
|-
|oxygen
|Replenishes oxygen in all rooms to 100.0.
|-
|revive [name]
|Resurrect the specified character (or the controlled character if none is specified), bringing them back from the dead.
|-
|savemap [name]
|Saves the map that is currently loaded with the specified filename.
|-
|spawnitem [itemname] [cursor/inventory]
|Spawns an item at either the cursor or the inventory, or at a random spawnpoint if parameter 2 is blank.
|-
|spawn [creaturename] [near/inside/outside/cursor]
|Spawns a character/creature near, inside or outside the sub (or at a random spawnpoint if parameter 2 is blank). The name must be the same as the name of the folder where the characters configuration file is located ("human"/"[[Tiger Thresher|tigerthresher]]"/"[[Moloch|moloch]]" etc).
|-
|teleport [charactername]
|Teleports the specified character (or the currently controlled character if parameter 1 is blank) to the position of the cursor.
|}
 
== Server Commands ==
Servers have their own list of commands available to administrators. These commands are usable through the dedicated server command prompt. The commands, along with their descriptions provided by the "''help"'' command, can be found below.
 
In brackets are the parameters that the command may take. Forward slashes indicate alternative spellings of a command.
{| class="wikitable"
!Command
!Description
|-
|autorestart [true/false]
|Enable or disable round auto-restart.
|-
|autorestartinterval [seconds]
|Set how long the server waits between rounds before automatically starting a new one. If set to 0, autorestart is disabled.
|-
|autorestarttimer [seconds]
|Set the current autorestart countdown to the specified value.
|-
|ban [name]
|Kick and ban the player from the server.
|-
|banid [id]
|Kick and ban the player with the specified client ID from the server.
|-
|banip [ip]
|Ban the IP address from the server.
|-
|campaigndestination [index]
|Set the location to head towards in the currently active campaign.
|-
|campaigninfo
|Display information about the state of the currently active campaign.
|-
|clientlist
|List all the clients connected to the server.
|-
|disablecrewai
|Disable the AI of the NPCs in the crew.
|-
|enablecrewai
|Enable the AI of the NPCs in the crew.
|-
|end / endgame / endround
|End the current round.
|-
|exit / quit / close
|Exit the application.
|-
|explosion [range] [force] [damage] [structuredamage]
|Creates an explosion at the position of the cursor.
|-
|fire / editfire
|Allows putting up fires by left clicking.
|-
|fixwalls / fixhulls
|Fixes all walls.
|-
|fixitems
|Repairs all items and restores them to full condition.
|-
|freecam
|Detach the camera from the controlled character.
|-
|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).
|-
|giveperm [id]
|Grants administrative permissions to the player with the specified client ID.
 
''NOTE: This command appears to be broken. Upon giving the ID, the console will ask you what permission you would like to grant the specific user.''
 
''However, it never seems to allow the client user to use those commands via the console.''
|-
|giverank [id]
|Assigns a specific rank (set of administrative permissions) to the player with the specified client ID.
 
''NOTE: Default ranks include: Admin, Moderator and None, more can be added in the "permissionpresets.xml"''
|-
|godmode
|Toggle submarine godmode. Makes the main submarine invulnerable to damage.
|-
|heal [character name]
|Restore the specified character to full health. If the name parameter is omitted, the controlled character will be healed.
|-
|help
|Lists the server commands and their descriptions.
|-
|kick [name]
|Kick a player out of the server.
|-
|kickid [id]
|Kick the player with the specified client ID out of the server.
|-
|killmonsters
|Immediately kills all AI-controlled enemies in the level.
|-
|lockx
|Lock horizontal movement of the main submarine.
|-
|locky
|Lock vertical movement of the main submarine.
|-
|mission [name]/[index]
|Select the mission type for the next round. The parameter can either be the name or the index number of the mission type (0 = first mission type, 1 = second mission type, etc).
|-
|msg [message]
|Send a chat message with no sender specified.
|-
|netstats
|Toggles the visibility of the network statistics UI.
|-
|oxygen / air
|Replenishes the oxygen levels in every room to 100%.
|-
|power [temperature]
|Immediately sets the temperature of the nuclear reactor to the specified value.
|-
|restart / reset
|Close and restart the server.
|-
|revive [character name]
|Bring the specified character back from the dead. If the name parameter is omitted, the controlled character will be revived.
|-
|revokeperm [id]
|Revokes administrative permissions to the player with the specified client ID.
|-
|say [message]
|Send a chat message that displays "HOST" as the sender.
|-
|seed / levelseed
|Changes the level seed for the next round.
|-
|servermsg [message]
|Change the message displayed in the server lobby.
|-
|servername [name]
|Change the name of the server.
|-
|setclientcharacter [client name] ; [character name]
|Gives the client control of the specified character.
|-
|shuttle [name]
|Select the specified submarine as the respawn shuttle for the next round.
|-
|spawn [creaturename] [near/inside/outside/cursor]
|Spawn a creature at a random spawnpoint (use the second parameter to only select spawnpoints near/inside/outside the submarine).
|-
|spawnitem [itemname] [cursor/inventory]
|Spawn an item at the position of the cursor, in the inventory of the controlled character or at a random spawnpoint if the last parameter is omitted.
|-
|start / startgame / startround
|Start a new round.
|-
|submarine [name]
|Select the submarine for the next round.
|-
|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.
|-
|togglekarma
|Toggles the karma system.
|-
|traitorlist
|List all the traitors and their targets.
|-
|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.
|}
 
[[File:Console.png|left|frame|The console when opened]]

Latest revision as of 18:05, 10 February 2021

Redirect to: