| name | subnautica-2-coop-mod-bepinex |
| description | BepInEx-based multiplayer mod for Subnautica 2 enabling synchronized co-op gameplay with shared world state, base building, and inventory management |
| triggers | ["how do I install the Subnautica 2 multiplayer mod","set up BepInEx co-op for Subnautica 2","configure Deep Synergy multiplayer mod","create a co-op session in Subnautica 2","troubleshoot Subnautica 2 mod sync issues","enable multiplayer in Subnautica 2 with BepInEx","join a Subnautica 2 co-op game","configure session settings for Subnautica 2 mod"] |
Subnautica 2 Deep Synergy Multiplayer Mod
Skill by ara.so — Devtools Skills collection.
Overview
The Deep Synergy Multiplayer Mod transforms Subnautica 2 into a synchronized cooperative experience using the BepInEx modding framework. It implements deterministic session synchronization, adaptive difficulty scaling, and peer-to-peer networking to enable multiple players to explore, build bases, and survive together in Subnautica 2's alien oceans.
Key Features:
- Deterministic Session Synchronization (DSS) for conflict-free shared world state
- Adaptive Dynamic Scaling that adjusts difficulty based on player count
- BepInEx IL2CPP-level hooking with hot-reloadable plugin architecture
- Shared inventory using Merkle tree verification
- Cross-platform multiplayer via NAT punch-through and WebRTC
- Session migration on host disconnect with zero data loss
Installation
Prerequisites
- Subnautica 2 installed via Steam or GOG
- BepInEx 6.0.x for Unity IL2CPP games
Step-by-Step Installation
Verify Installation
Launch Subnautica 2. You should see BepInEx console output indicating the mod loaded:
[Info : BepInEx] BepInEx 6.0.0 - Subnautica2
[Info : BepInEx] Running under Unity 2022.3.x
[Info : DeepSynergy] Deep Synergy Multiplayer Mod v1.0.0 loaded
[Info : DeepSynergy] Session Manager initialized
[Info : DeepSynergy] WebRTC transport ready
Configuration
Basic Configuration File
Create or edit BepInEx/config/synergy_profile.json:
{
"session_name": "Ocean Explorers",
"max_players": 4,
"difficulty_scale": "adaptive",
"resource_multiplier": 1.0,
"oxygen_consumption": 1.0,
"creature_spawn_divider": 1,
"enable_pvp": false,
"friendly_fire": false,
"shared_blueprints": true,
"ping_locations_shared": true,
"time_of_day_sync": "all",
"voice_chat_integration": "none",
"locale": "auto",
"api_integration"
Configuration Options Explained
| Option | Type | Default | Description |
|---|
max_players | int | 4 | Maximum players per session (2-8) |
difficulty_scale | string | "adaptive" | "fixed", "adaptive", or "progressive" |
resource_multiplier | float | 1.0 | Resource node spawn rate (0.5-3.0) |
oxygen_consumption | float | 1.0 | Oxygen drain rate (0.5-2.0) |
creature_spawn_divider | int | 1 | Divide creature counts by this value |
shared_blueprints | bool | true | All players unlock blueprints together |
time_of_day_sync | string | "all" | "all", "host", or "independent" |
Advanced Session Configuration
{
"session_name": "Hardcore Survival",
"max_players": 2,
"difficulty_scale": "progressive",
"resource_multiplier": 0.7,
"oxygen_consumption": 1.3,
"creature_spawn_divider": 1,
"enable_pvp": false,
"friendly_fire": true,
"shared_blueprints": false,
"death_penalty": "inventory_drop",
"respawn_delay_seconds": 30,
"shared_storage": {
"enabled": true,
"max_shared_lockers":
Console Commands
Access the BepInEx console (default: F12 in-game) to use these commands:
Session Management
/start_server
/join_session 9B2A-4C7D-E8F1
/synergy_status
/leave_session
/migrate_host Player2
Runtime Configuration
/synergy_scale 1.5
/set_resource_multiplier 1.2
/seed_override 8251
/synergy_debug true
/sync_health
AI Integration Commands (Optional)
/api_narrate "exploring the underwater caves"
/api_lore current_biome
/api_suggest_name base
/api_analyze_creature reaper_leviathan
Core Patterns and Usage
Starting a Co-op Session (Host)
/start_server
/set_max_players 3
/set_difficulty_scale adaptive
Joining a Co-op Session (Client)
/join_session 9B2A-4C7D-E8F1
Shared Base Building
When collaborative_placement is enabled, base building is synchronized:
Inventory Synchronization
The mod uses Merkle tree verification for inventory integrity:
/sync_health
/force_resync inventory
/debug_item titanium
Session Recovery and Migration
If the host disconnects, the mod automatically migrates:
Plugin Development (Advanced)
Creating Custom BepInEx Plugins for the Mod
using BepInEx;
using BepInEx.IL2CPP;
using HarmonyLib;
using DeepSynergy.Core;
using DeepSynergy.Network;
namespace CustomSynergyPlugin
{
[BepInPlugin("com.example.customsynergy", "Custom Synergy Plugin", "1.0.0")]
[BepInDependency("com.deepsynergy.core")]
public class CustomSynergyPlugin : BasePlugin
{
private Harmony harmony;
public override void Load()
{
harmony = new Harmony("com.example.customsynergy");
harmony.PatchAll();
SessionManager.OnPlayerJoined += OnPlayerJoined;
SessionManager.OnPlayerLeft += OnPlayerLeft;
StateSync.OnInventoryChanged += OnInventoryChanged;
Log.LogInfo("Custom Synergy Plugin loaded!");
}
private void OnPlayerJoined(string playerId, string playerName)
{
Log.LogInfo($"Player joined: {playerName} ({playerId})");
NetworkManager.SendMessage(playerId, new WelcomeMessage
{
Text = $"Welcome to the session, {playerName}!",
ShowNotification = true
});
}
{
Log.LogInfo();
}
{
(delta.ItemAdded == && delta.Count >= )
{
Log.LogInfo();
}
}
}
}
Hooking into Base Building Events
using HarmonyLib;
using DeepSynergy.Core;
[HarmonyPatch(typeof(BaseManager), "PlaceBaseComponent")]
public class BaseComponentPatch
{
static void Postfix(BaseComponent component, Vector3 position, Quaternion rotation)
{
Log.LogInfo($"Base component placed: {component.Type} at {position}");
StateSync.BroadcastBaseChange(new BaseChangeEvent
{
ComponentType = component.Type,
Position = position,
Rotation = rotation,
PlayerId = SessionManager.LocalPlayerId,
Timestamp = NetworkTime.CurrentTimestamp()
});
}
}
Troubleshooting
Common Issues
1. "Session Code Invalid" Error
/synergy_status
/net_test <host_ip>
2. Inventory Desynchronization
/sync_health
/force_resync inventory
/restore_backup 0
3. High Latency / Lag
/synergy_status
{
"network": {
"max_latency_ms": 200, // Increase tolerance
"packet_loss_tolerance": 0.1 // Allow more packet loss
}
}
/set_compression true
{
"sync_intervals": {
"position_ms": 50, // Increase from 33ms
"inventory_ms": 500, // Increase from 200ms
"world_state_ms": 2000 // Increase from 1000ms
}
}
4. Base Parts Not Appearing for Other Players
/debug_base
/force_resync base
{
"base_building": {
"collaborative_placement": true, // Must be true
"require_consensus": false
}
}
/base_conflicts
5. Mod Fails to Load
Debug Mode
Enable verbose logging for troubleshooting:
{
"debug": {
"enabled": true,
"log_level": "verbose",
"log_network_traffic": true,
"log_state_changes": true,
"dump_sync_conflicts": true
}
}
/synergy_debug true
/show_sync_log
/net_monitor true
Environment Variables
The mod respects these environment variables:
export OPENAI_API_KEY=sk-your-key-here
export ANTHROPIC_API_KEY=sk-ant-your-key-here
export SYNERGY_CONFIG_PATH=/custom/path/synergy_profile.json
export SYNERGY_LOG_LEVEL=debug
export SYNERGY_PORT=8888
export SYNERGY_NO_UPNP=1
Performance Optimization
For Low-End Systems
{
"performance": {
"sync_intervals": {
"position_ms": 100,
"inventory_ms": 1000,
"world_state_ms": 5000
},
"reduce_creature_ai_sync": true,
"compress_network_traffic": true,
"limit_visual_effects": true
}
}
For High-Performance Sessions (4+ players)
{
"performance": {
"sync_intervals": {
"position_ms": 33,
"inventory_ms": 200,
"world_state_ms": 1000
},
"predictive_sync": true,
"delta_compression": true,
"prioritize_nearby_players": true
}
}
Best Practices
- Always use session codes: Avoid direct IP connections for better NAT traversal
- Configure difficulty scaling: Set
difficulty_scale to "adaptive" for balanced gameplay
- Enable session backups: Set
auto_save_interval_seconds to 60 or less
- Test network before inviting friends: Use
/net_test command
- Coordinate resource gathering: Use
shared_blueprints: true to avoid duplicate research
- Designate a stable host: Player with best connection should host
- Use voice chat integration: Set
voice_chat_integration to "discord_rpc" for proximity audio
Additional Resources
- BepInEx Documentation: https://docs.bepinex.dev/
- Subnautica Modding Wiki: Community-maintained mod compatibility lists
- Discord Server: 24/7 support and troubleshooting assistance
- GitHub Issues: Bug reports and feature requests (if public repository exists)