| name | subnautica-ii-coop-multiplayer-mod |
| description | BepInEx-based multiplayer mod for Subnautica 2 enabling synchronized cooperative gameplay with shared inventory, base building, and AI integration |
| triggers | ["how do I install the Subnautica 2 co-op mod","configure Deep Synergy multiplayer session","set up BepInEx for Subnautica 2 multiplayer","create a co-op session in Subnautica 2","sync inventory in Subnautica multiplayer mod","troubleshoot Subnautica 2 mod connection issues","enable AI narration in Subnautica co-op","adjust difficulty scaling for multiplayer Subnautica"] |
Subnautica II Deep Synergy Multiplayer Mod
Skill by ara.so — Devtools Skills collection.
Overview
The Deep Synergy Multiplayer Mod transforms Subnautica 2 into a cooperative survival experience using BepInEx's IL2CPP modding framework. It implements deterministic session synchronization, peer-to-peer networking via WebRTC, and optional AI integration for narrative generation.
Key Capabilities:
- Synchronized multiplayer sessions (2-8 players)
- Shared inventory and base building with conflict resolution
- Adaptive difficulty scaling based on player count
- Cross-platform support (Windows, Linux, macOS)
- BepInEx plugin architecture (no game file modification)
- Optional OpenAI/Claude API integration for dynamic narration
Installation
Prerequisites
- Subnautica 2 installed via Steam/GOG
- BepInEx 6.0.x for Unity IL2CPP games
Step-by-Step Installation
cd "C:\Program Files (x86)\Steam\steamapps\common\Subnautica2"
BepInEx/
├── plugins/
│ └── DeepSynergy.dll
├── config/
│ └── synergy_profile.json (created on first run)
└── core/
└── (BepInEx core files)
Configuration
Basic Session Profile
Create BepInEx/config/synergy_profile.json:
{
"session_name": "MyCoopSession",
"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": "host",
"voice_chat_integration": "none",
"api_integration": {
"openai":
Configuration Fields
| Field | Type | Description | Valid Values |
|---|
session_name | string | Display name for session | Any string |
max_players | int | Player limit | 2-8 |
difficulty_scale | string | How difficulty adjusts | adaptive, static, manual |
resource_multiplier | float | Resource spawn multiplier | 0.5-3.0 |
oxygen_consumption | float | Oxygen drain rate modifier | 0.5-2.0 |
creature_spawn_divider | int | Reduces creature spawns | 1-4 |
shared_blueprints | bool | Share discovered blueprints | true/false |
time_of_day_sync | string | Time sync strategy | host, all, independent |
AI Integration Configuration
To enable AI narration (optional):
{
"api_integration": {
"openai": {
"enabled": true,
"role": "narrator",
"api_key_env": "OPENAI_API_KEY",
"model": "gpt-4",
"temperature": 0.7,
"max_tokens": 150
},
"claude": {
"enabled": true,
"role": "lore_engine",
"api_key_env": "ANTHROPIC_API_KEY",
"model": "claude-3-sonnet-20240229",
"max_tokens": 200
}
}
Set environment variables before launching:
set OPENAI_API_KEY=your_key_here
set ANTHROPIC_API_KEY=your_key_here
export OPENAI_API_KEY=your_key_here
export ANTHROPIC_API_KEY=your_key_here
Console Commands
Access via BepInEx terminal (F12 in-game by default):
Session Management
/start_server
/join_session 9B2A-4C7D-E8F1
/disconnect
/synergy_status
Gameplay Modifiers
/synergy_scale 1.5
/seed_override 8251
/sync_inventory
/tp_to_player PlayerName
AI Narration
/api_narrate "exploring the kelp forest"
/api_lore generate_species_log
/api_hint
Key Patterns
Starting a Co-op Session
Host workflow:
/start_server
/synergy_status
Client workflow:
/join_session 9B2A-4C7D-E8F1
Shared Inventory Management
The mod uses Merkle trees for inventory verification:
{
"connected_peers": 3,
"latency_avg_ms": 45,
"inventory_hash": "0xFA342B1E",
"sync_progress": "100%",
"conflicts_resolved": 2
}
Conflict resolution: If two players pick up the same item simultaneously, the mod uses timestamps to determine ownership. The "losing" player's action is rolled back.
Dynamic Difficulty Scaling
Example scaling for a 4-player session with "difficulty_scale": "adaptive":
{
"base_creature_spawn_rate": 1.0,
"adjusted_spawn_rate": 0.75,
"resource_nodes": 1.3,
"oxygen_efficiency": 1.1,
"damage_multiplier": 1.2
}
Formula: adjusted_value = base_value * (1 + (player_count - 1) * scaling_factor)
BepInEx Plugin Integration
For developers extending the mod:
using BepInEx;
using BepInEx.IL2CPP;
using DeepSynergy.Core;
namespace MyCustomExtension
{
[BepInPlugin(GUID, Name, Version)]
[BepInDependency("com.deepsynergy.mod", BepInDependency.DependencyFlags.HardDependency)]
public class CustomExtension : BasePlugin
{
public const string GUID = "com.myname.customextension";
public const string Name = "Custom Extension";
public const string Version = "1.0.0";
public override void Load()
{
SessionManager.OnPlayerJoined += HandlePlayerJoined;
InventorySync.OnItemPickup += HandleItemPickup;
}
private void HandlePlayerJoined(PlayerData player)
{
Log.LogInfo($"Player {player.Name} joined. ID: {player.Id}");
}
private void HandleItemPickup(ItemPickupEvent evt)
{
Log.LogInfo($"Item {evt.ItemId} picked up by {evt.PlayerId}");
}
}
}
Troubleshooting
Connection Issues
Problem: "Failed to establish peer connection"
netsh advfirewall firewall add rule name="Subnautica2 Coop" dir=in action=allow protocol=UDP localport=7777-7787
/synergy_status
{
"network": {
"force_relay": true,
"relay_server": "turn:relay.example.com:3478"
}
}
Problem: "Inventory desync detected"
/sync_inventory --full
/synergy_status
Performance Issues
Problem: Low FPS in multiplayer vs single-player
{
"performance": {
"creature_ai_sync_rate_ms": 500, // Default: 250
"position_sync_rate_ms": 100, // Default: 50
"inventory_sync_rate_ms": 1000 // Default: 500
}
}
{
"api_integration": {
"openai": {"enabled": false},
"claude": {"enabled": false}
}
}
Session Code Not Working
Problem: "Invalid session code"
/synergy_status
/restart_server
Mod Not Loading
Problem: Mod doesn't appear in BepInEx console
[Logging.Console]
Enabled = true
LogLevels = All
BepInEx/plugins/DeepSynergy.dll
Advanced Usage
Custom Event Hooks
Monitor mod events via BepInEx logging:
using DeepSynergy.Events;
EventBus.Subscribe<BasePartPlacedEvent>(evt =>
{
Log.LogInfo($"Base part placed: {evt.PartType} at {evt.Position}");
});
EventBus.Subscribe<CreatureSpawnEvent>(evt =>
{
if (evt.CreatureType == "Leviathan")
{
Log.LogWarning("Leviathan spawned nearby!");
}
});
Dedicated Server Mode
For 24/7 hosting (experimental):
{
"server_mode": {
"enabled": true,
"headless": true,
"auto_save_interval_minutes": 15,
"max_idle_time_minutes": 30,
"restart_on_empty": true
}
}
Run with:
./Subnautica2.x86_64 -batchmode -nographics
Subnautica2.exe -batchmode -nographics
Localization
Override UI language:
{
"locale": "ja_JP",
"locale_fallback": "en_US"
}
Supported locales: en_US, zh_CN, ja_JP, de_DE, fr_FR, pt_BR, ru_RU, es_ES, ko_KR
API Reference
Environment Variables
OPENAI_API_KEY - OpenAI API key for narration features
ANTHROPIC_API_KEY - Anthropic API key for lore generation
SYNERGY_DEBUG - Set to 1 for verbose debug logging
SYNERGY_RELAY_SERVER - Override default TURN server URL
Configuration File Locations
- Windows:
%USERPROFILE%\AppData\Roaming\Subnautica2\BepInEx\config\
- Linux:
~/.config/unity3d/UnknownWorlds/Subnautica2/BepInEx/config/
- macOS:
~/Library/Application Support/UnknownWorlds/Subnautica2/BepInEx/config/