How to Configure Sandbox and PvP Modes on Your Barotrauma Server
Set up Barotrauma for sandbox play, PvP, or traitor-focused sessions. Covers play style flags, karma, respawn modes, traitor probability, and bot settings.
Play Style Overview
The PlayStyle setting in serversettings.xml affects how your server appears in the browser filter and sets some tone expectations for players browsing the list. It doesn't lock you into a specific ruleset — you can override individual settings regardless of play style.
| PlayStyle Value | What it signals |
|---|---|
Casual |
Normal difficulty, respawn on, karma on — good starting point for new crews |
Roleplay |
Same settings as Casual but flags the server in the roleplay browser filter |
Hardcore |
Permadeath, karma off, harsher conditions — for experienced crews |
Sandbox |
Free-form, less structured, admin tools encouraged |
PvP and Hostile Play Configuration
For a PvP-oriented server, start here:
<serversettings
PlayStyle="Sandbox"
KarmaEnabled="false"
TraitorProbability="0.5"
RespawnMode="MidRoundRespawn"
AllowSpectating="true"
BotCount="0"
DisableBotConversations="true"
AllowVoteKick="false"
/>
Why these settings:
KarmaEnabled="false"— Karma restricts hostile actions against teammates. Disable it for PvP or traitor-heavy servers where betrayal is the point.TraitorProbability="0.5"— Half of all rounds will have a traitor. Set to0to disable traitors entirely, or1to guarantee one every round.RespawnMode="MidRoundRespawn"— Dead players respawn after a delay rather than sitting out the entire round.AllowVoteKick="false"— In adversarial play, vote kicks get abused. Disable and let admins handle moderation.
Traitor Settings
TraitorProbability="0.2" <!-- 20% chance of a traitor each round -->
The traitor is assigned randomly each round from connected players. They receive secret objectives to sabotage the submarine or eliminate specific crew members. Traitor missions require at least a certain number of players to trigger — the exact threshold depends on game version but is typically 3+.
Reveal the traitor from the server console at any time:
traitor
Bot Configuration
BotCount="4" <!-- Number of AI crew members -->
DisableBotConversations="false" <!-- Whether bots chat during rounds -->
Bots fill crew roles automatically. For PvP sessions set BotCount="0" — bots can be killed and their role as crew can be confusing in an adversarial context. For sandbox or co-op with a small group, bots help keep a large submarine crewed.
Respawn Modes
| RespawnMode | Behavior |
|---|---|
Permadeath |
Dead players wait until next round |
Disabled |
All players respawn freely (permadeath effectively off) |
MidRoundRespawn |
Players respawn after a configurable delay mid-round |
For competitive play MidRoundRespawn keeps dead players in the game without making death meaningless.
Toggling PvP Mid-Session
If you want to flip PvP on the fly without restarting, use the server console:
togglepvp