subnautica-ii-coop-deepsynergy-mod

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Subnautica II Co-op Deep Synergy Mod

《深海迷航2》Deep Synergy多人合作模组

Skill by ara.so — Devtools Skills collection.
ara.so开发的技能工具 — 属于Devtools Skills合集。

What It Does

功能介绍

The Deep Synergy Multiplayer Mod transforms Subnautica 2 into a synchronized cooperative experience. Built on BepInEx, it provides:
  • Deterministic Session Synchronization (DSS): Conflict-resolved shared world state across clients
  • Adaptive Dynamic Scaling (ADS): Auto-adjusts creature spawns and resource respawn based on player count
  • Shared Inventory System: Merkle tree-based inventory tracking with peer verification
  • Decentralized P2P Networking: WebRTC-based multiplayer without central servers
  • Cross-Platform Support: Windows, Linux (Steam Deck), macOS compatibility
The mod operates as a BepInEx plugin that hooks into Subnautica 2's Unity runtime at the IL2CPP level without modifying game files.
Deep Synergy多人模组将《深海迷航2》转化为同步协作的游戏体验。基于BepInEx构建,提供以下功能:
  • 确定性会话同步(DSS):解决客户端间冲突的共享世界状态同步
  • 自适应动态缩放(ADS):根据玩家数量自动调整生物生成与资源刷新
  • 共享库存系统:基于默克尔树的库存追踪,支持节点验证
  • 去中心化P2P网络:基于WebRTC的无中心服务器多人联机
  • 跨平台支持:兼容Windows、Linux(Steam Deck)、macOS
该模组作为BepInEx插件运行,在IL2CPP级别接入《深海迷航2》的Unity运行时,无需修改游戏文件。

Installation

安装步骤

Prerequisites

前置条件

  1. Subnautica 2 installed via Steam/GOG
  2. BepInEx 6.0.x for Unity IL2CPP games
  1. 通过Steam/GOG安装**《深海迷航2》**
  2. 适用于Unity IL2CPP游戏的BepInEx 6.0.x版本

Steps

操作步骤

bash
undefined
bash
undefined

1. Install BepInEx 6.0.x for Subnautica 2

1. 为《深海迷航2》安装BepInEx 6.0.x

Extract to Subnautica 2 game directory

解压到《深海迷航2》游戏目录

2. Download Deep Synergy Mod

2. 下载Deep Synergy模组

3. Extract mod files to BepInEx plugins directory

3. 将模组文件解压到BepInEx插件目录

<Game_Directory>/BepInEx/plugins/DeepSynergyMod/

<游戏目录>/BepInEx/plugins/DeepSynergyMod/

4. Verify directory structure

4. 验证目录结构

<Subnautica2_Root>/ ├── BepInEx/ │ ├── plugins/ │ │ └── DeepSynergyMod/ │ │ ├── DeepSynergy.dll │ │ ├── SyncEngine.dll │ │ └── NetworkLayer.dll │ └── config/ │ └── synergy_profile.json
undefined
<Subnautica2_Root>/ ├── BepInEx/ │ ├── plugins/ │ │ └── DeepSynergyMod/ │ │ ├── DeepSynergy.dll │ │ ├── SyncEngine.dll │ │ └── NetworkLayer.dll │ └── config/ │ └── synergy_profile.json
undefined

First Launch

首次启动

bash
undefined
bash
undefined

Launch Subnautica 2 through Steam/GOG

通过Steam/GOG启动《深海迷航2》

BepInEx will initialize and load the mod

BepInEx会初始化并加载模组

Check BepInEx/LogOutput.log for successful plugin loading

查看BepInEx/LogOutput.log确认插件是否加载成功

Expected log output:

预期日志输出:

[Info : BepInEx] Loading [Deep Synergy Multiplayer Mod 1.0.0] [Info : DeepSynergy] Session Manager initialized [Info : DeepSynergy] WebRTC layer ready
undefined
[Info : BepInEx] Loading [Deep Synergy Multiplayer Mod 1.0.0] [Info : DeepSynergy] Session Manager initialized [Info : DeepSynergy] WebRTC layer ready
undefined

Configuration

配置说明

Profile Configuration File

配置文件

Create or edit
BepInEx/config/synergy_profile.json
:
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": "host",
  "voice_chat_integration": "none",
  "locale": "en-US",
  "api_integration": {
    "openai": {
      "enabled": false,
      "role": "narrator",
      "api_key_env": "OPENAI_API_KEY"
    },
    "claude": {
      "enabled": false,
      "role": "lore_engine",
      "api_key_env": "CLAUDE_API_KEY"
    }
  },
  "network": {
    "port": 7777,
    "nat_punchthrough": true,
    "max_latency_ms": 250,
    "sync_interval_ms": 100
  }
}
创建或编辑
BepInEx/config/synergy_profile.json
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": "host",
  "voice_chat_integration": "none",
  "locale": "en-US",
  "api_integration": {
    "openai": {
      "enabled": false,
      "role": "narrator",
      "api_key_env": "OPENAI_API_KEY"
    },
    "claude": {
      "enabled": false,
      "role": "lore_engine",
      "api_key_env": "CLAUDE_API_KEY"
    }
  },
  "network": {
    "port": 7777,
    "nat_punchthrough": true,
    "max_latency_ms": 250,
    "sync_interval_ms": 100
  }
}

Configuration Fields

配置字段说明

FieldTypeDescription
session_name
stringDisplay name for multiplayer session
max_players
int2-8, maximum concurrent players
difficulty_scale
string
"fixed"
,
"adaptive"
,
"hardcore"
resource_multiplier
floatMultiplies harvestable resource nodes (0.5-3.0)
oxygen_consumption
floatModifies oxygen drain rate (0.5-2.0)
creature_spawn_divider
intDivides creature spawn count (1-4)
shared_blueprints
boolShare blueprint unlocks across all players
time_of_day_sync
string
"host"
,
"all"
,
"independent"
字段类型描述
session_name
string多人会话的显示名称
max_players
int2-8,最大同时在线玩家数
difficulty_scale
string
"fixed"
(固定)、
"adaptive"
(自适应)、
"hardcore"
(硬核)
resource_multiplier
float可采集资源节点的倍数(0.5-3.0)
oxygen_consumption
float氧气消耗速率调整(0.5-2.0)
creature_spawn_divider
int生物生成数量的除数(1-4)
shared_blueprints
bool所有玩家共享蓝图解锁进度
time_of_day_sync
string
"host"
(跟随主机)、
"all"
(全局同步)、
"independent"
(独立时间)

Console Commands

控制台命令

Access via BepInEx console (F5 by default):
bash
undefined
通过BepInEx控制台访问(默认快捷键F5):
bash
undefined

Session Management

会话管理

/start_server # Host a new session /join_session <CODE> # Join existing session /disconnect # Leave current session /session_info # Display session details
/start_server # 开启新会话 /join_session <CODE> # 加入已有会话 /disconnect # 离开当前会话 /session_info # 显示会话详情

Synchronization

同步功能

/synergy_status # Connection status, latency, sync progress /force_sync # Manually trigger state synchronization /inventory_verify # Verify inventory hash across peers
/synergy_status # 连接状态、延迟、同步进度 /force_sync # 手动触发状态同步 /inventory_verify # 跨节点验证库存哈希值

Configuration

配置调整

/synergy_scale <MULTIPLIER> # Adjust difficulty scaling (0.5-3.0) /resource_refresh # Force resource node respawn /creature_reset # Reset creature AI states
/synergy_scale <MULTIPLIER> # 调整难度缩放系数(0.5-3.0) /resource_refresh # 强制刷新资源节点 /creature_reset # 重置生物AI状态

Advanced

高级功能

/seed_override <SEED> # Set world seed for all clients /debug_network # Enable network packet logging /api_narrate "<EVENT>" # Trigger AI narrative generation
/seed_override <SEED> # 为所有客户端设置世界种子 /debug_network # 启用网络数据包日志 /api_narrate "<EVENT>" # 触发AI叙事生成

Example Session Creation

会话创建示例

/start_server [DeepSynergy] Starting host session... [DeepSynergy] Session code: 9B2A-4C7D-E8F1 [DeepSynergy] Listening on port 7777 [DeepSynergy] NAT traversal: ENABLED
/start_server [DeepSynergy] Starting host session... [DeepSynergy] Session code: 9B2A-4C7D-E8F1 [DeepSynergy] Listening on port 7777 [DeepSynergy] NAT traversal: ENABLED

Example Join

加入会话示例

/join_session 9B2A-4C7D-E8F1 [DeepSynergy] Connecting to session... [DeepSynergy] Peer handshake successful [DeepSynergy] Synchronizing world state (0%)... [DeepSynergy] Sync complete (100%) - 2 players connected
undefined
/join_session 9B2A-4C7D-E8F1 [DeepSynergy] Connecting to session... [DeepSynergy] Peer handshake successful [DeepSynergy] Synchronizing world state (0%)... [DeepSynergy] Sync complete (100%) - 2 players connected
undefined

Code Examples

代码示例

Custom Mod Plugin (C# BepInEx)

自定义模组插件(C# BepInEx)

Extend Deep Synergy functionality with custom plugins:
csharp
using BepInEx;
using BepInEx.IL2CPP;
using DeepSynergy.API;
using UnityEngine;

namespace CustomSynergyExtension
{
    [BepInPlugin(GUID, NAME, VERSION)]
    [BepInDependency("com.deepsynergy.core")]
    public class CustomSyncPlugin : BasePlugin
    {
        const string GUID = "com.custom.synergyplugin";
        const string NAME = "Custom Synergy Extension";
        const string VERSION = "1.0.0";

        private ISynergySessionManager sessionManager;
        private ISynergyStateSync stateSync;

        public override void Load()
        {
            // Get Deep Synergy API references
            sessionManager = DeepSynergyAPI.GetSessionManager();
            stateSync = DeepSynergyAPI.GetStateSync();

            // Subscribe to session events
            sessionManager.OnPlayerJoined += OnPlayerJoined;
            sessionManager.OnPlayerLeft += OnPlayerLeft;

            // Register custom state synchronization
            stateSync.RegisterCustomState("custom_data", SyncCustomData);

            Log.LogInfo($"{NAME} loaded successfully");
        }

        private void OnPlayerJoined(PlayerInfo player)
        {
            Log.LogInfo($"Player joined: {player.Username} (ID: {player.PeerID})");
            
            // Send welcome message to all players
            sessionManager.BroadcastMessage($"{player.Username} joined the session");
        }

        private void OnPlayerLeft(PlayerInfo player)
        {
            Log.LogInfo($"Player left: {player.Username}");
        }

        private byte[] SyncCustomData()
        {
            // Serialize custom game state data
            var customData = new CustomGameData
            {
                timestamp = Time.time,
                customValue = 42
            };
            
            return MessagePackSerializer.Serialize(customData);
        }
    }

    public struct CustomGameData
    {
        public float timestamp;
        public int customValue;
    }
}
通过自定义插件扩展Deep Synergy功能:
csharp
using BepInEx;
using BepInEx.IL2CPP;
using DeepSynergy.API;
using UnityEngine;

namespace CustomSynergyExtension
{
    [BepInPlugin(GUID, NAME, VERSION)]
    [BepInDependency("com.deepsynergy.core")]
    public class CustomSyncPlugin : BasePlugin
    {
        const string GUID = "com.custom.synergyplugin";
        const string NAME = "Custom Synergy Extension";
        const string VERSION = "1.0.0";

        private ISynergySessionManager sessionManager;
        private ISynergyStateSync stateSync;

        public override void Load()
        {
            // 获取Deep Synergy API引用
            sessionManager = DeepSynergyAPI.GetSessionManager();
            stateSync = DeepSynergyAPI.GetStateSync();

            // 订阅会话事件
            sessionManager.OnPlayerJoined += OnPlayerJoined;
            sessionManager.OnPlayerLeft += OnPlayerLeft;

            // 注册自定义状态同步
            stateSync.RegisterCustomState("custom_data", SyncCustomData);

            Log.LogInfo($"{NAME} loaded successfully");
        }

        private void OnPlayerJoined(PlayerInfo player)
        {
            Log.LogInfo($"Player joined: {player.Username} (ID: {player.PeerID})");
            
            // 向所有玩家发送欢迎消息
            sessionManager.BroadcastMessage($"{player.Username} joined the session");
        }

        private void OnPlayerLeft(PlayerInfo player)
        {
            Log.LogInfo($"Player left: {player.Username}");
        }

        private byte[] SyncCustomData()
        {
            // 序列化自定义游戏状态数据
            var customData = new CustomGameData
            {
                timestamp = Time.time,
                customValue = 42
            };
            
            return MessagePackSerializer.Serialize(customData);
        }
    }

    public struct CustomGameData
    {
        public float timestamp;
        public int customValue;
    }
}

Programmatic Session Control

程序化会话控制

csharp
using DeepSynergy.API;
using System.Threading.Tasks;

public class SessionController
{
    private ISynergySessionManager sessionManager;
    private SessionConfig config;

    public async Task<string> CreateCustomSession()
    {
        // Load configuration
        config = new SessionConfig
        {
            SessionName = "Custom Session",
            MaxPlayers = 4,
            DifficultyScale = DifficultyScaleMode.Adaptive,
            ResourceMultiplier = 1.5f,
            SharedBlueprints = true,
            NetworkConfig = new NetworkConfig
            {
                Port = 7777,
                MaxLatency = 250,
                SyncInterval = 100
            }
        };

        // Initialize session
        sessionManager = DeepSynergyAPI.GetSessionManager();
        string sessionCode = await sessionManager.CreateSessionAsync(config);

        // Register event handlers
        sessionManager.OnStateConflict += HandleStateConflict;
        sessionManager.OnSyncCompleted += OnSyncCompleted;

        return sessionCode;
    }

    private void HandleStateConflict(StateConflictEvent evt)
    {
        // Custom conflict resolution logic
        if (evt.ConflictType == ConflictType.InventoryDesync)
        {
            // Use timestamp authority
            evt.ResolveWithTimestamp();
        }
        else if (evt.ConflictType == ConflictType.BaseStructure)
        {
            // Use host authority
            evt.ResolveWithHostAuthority();
        }
    }

    private void OnSyncCompleted(SyncCompletedEvent evt)
    {
        Logger.LogInfo($"Sync complete: {evt.ItemsSynced} items, {evt.DurationMs}ms");
    }
}
csharp
using DeepSynergy.API;
using System.Threading.Tasks;

public class SessionController
{
    private ISynergySessionManager sessionManager;
    private SessionConfig config;

    public async Task<string> CreateCustomSession()
    {
        // 加载配置
        config = new SessionConfig
        {
            SessionName = "Custom Session",
            MaxPlayers = 4,
            DifficultyScale = DifficultyScaleMode.Adaptive,
            ResourceMultiplier = 1.5f,
            SharedBlueprints = true,
            NetworkConfig = new NetworkConfig
            {
                Port = 7777,
                MaxLatency = 250,
                SyncInterval = 100
            }
        };

        // 初始化会话
        sessionManager = DeepSynergyAPI.GetSessionManager();
        string sessionCode = await sessionManager.CreateSessionAsync(config);

        // 注册事件处理器
        sessionManager.OnStateConflict += HandleStateConflict;
        sessionManager.OnSyncCompleted += OnSyncCompleted;

        return sessionCode;
    }

    private void HandleStateConflict(StateConflictEvent evt)
    {
        // 自定义冲突解决逻辑
        if (evt.ConflictType == ConflictType.InventoryDesync)
        {
            // 使用时间戳权威
            evt.ResolveWithTimestamp();
        }
        else if (evt.ConflictType == ConflictType.BaseStructure)
        {
            // 使用主机权威
            evt.ResolveWithHostAuthority();
        }
    }

    private void OnSyncCompleted(SyncCompletedEvent evt)
    {
        Logger.LogInfo($"Sync complete: {evt.ItemsSynced} items, {evt.DurationMs}ms");
    }
}

Inventory Synchronization Hook

库存同步钩子

csharp
using DeepSynergy.Inventory;
using Subnautica.Items;

public class InventorySyncHook
{
    private IInventorySync inventorySync;

    public void Initialize()
    {
        inventorySync = DeepSynergyAPI.GetInventorySync();

        // Hook into game inventory events
        InventoryController.OnItemAdded += OnItemAdded;
        InventoryController.OnItemRemoved += OnItemRemoved;
    }

    private void OnItemAdded(Item item, int quantity)
    {
        // Synchronize item addition across all clients
        var syncData = new InventoryChangeData
        {
            ItemID = item.ID,
            Quantity = quantity,
            Action = InventoryAction.Add,
            Timestamp = NetworkTime.GetTimestamp()
        };

        inventorySync.BroadcastInventoryChange(syncData);
    }

    private void OnItemRemoved(Item item, int quantity)
    {
        var syncData = new InventoryChangeData
        {
            ItemID = item.ID,
            Quantity = quantity,
            Action = InventoryAction.Remove,
            Timestamp = NetworkTime.GetTimestamp()
        };

        inventorySync.BroadcastInventoryChange(syncData);
    }
}
csharp
using DeepSynergy.Inventory;
using Subnautica.Items;

public class InventorySyncHook
{
    private IInventorySync inventorySync;

    public void Initialize()
    {
        inventorySync = DeepSynergyAPI.GetInventorySync();

        钩子到游戏库存事件
        InventoryController.OnItemAdded += OnItemAdded;
        InventoryController.OnItemRemoved += OnItemRemoved;
    }

    private void OnItemAdded(Item item, int quantity)
    {
        // 同步物品添加到所有客户端
        var syncData = new InventoryChangeData
        {
            ItemID = item.ID,
            Quantity = quantity,
            Action = InventoryAction.Add,
            Timestamp = NetworkTime.GetTimestamp()
        };

        inventorySync.BroadcastInventoryChange(syncData);
    }

    private void OnItemRemoved(Item item, int quantity)
    {
        var syncData = new InventoryChangeData
        {
            ItemID = item.ID,
            Quantity = quantity,
            Action = InventoryAction.Remove,
            Timestamp = NetworkTime.GetTimestamp()
        };

        inventorySync.BroadcastInventoryChange(syncData);
    }
}

Common Patterns

常见配置模式

Pattern 1: Adaptive Difficulty Scaling

模式1:自适应难度缩放

json
{
  "difficulty_scale": "adaptive",
  "resource_multiplier": 1.2,
  "creature_spawn_divider": 1,
  "oxygen_consumption": 0.9
}
With 2 players: Resources +20%, oxygen -10% drain, normal creature spawns With 4 players: Resources +40%, oxygen -20% drain, creatures ÷2
json
{
  "difficulty_scale": "adaptive",
  "resource_multiplier": 1.2,
  "creature_spawn_divider": 1,
  "oxygen_consumption": 0.9
}
2名玩家时:资源+20%,氧气消耗-10%,生物生成正常 4名玩家时:资源+40%,氧气消耗-20%,生物数量÷2

Pattern 2: Hardcore Co-op

模式2:硬核合作

json
{
  "difficulty_scale": "hardcore",
  "resource_multiplier": 0.8,
  "creature_spawn_divider": 0.5,
  "oxygen_consumption": 1.5,
  "friendly_fire": true,
  "shared_blueprints": false
}
json
{
  "difficulty_scale": "hardcore",
  "resource_multiplier": 0.8,
  "creature_spawn_divider": 0.5,
  "oxygen_consumption": 1.5,
  "friendly_fire": true,
  "shared_blueprints": false
}

Pattern 3: Casual Exploration

模式3:休闲探索

json
{
  "difficulty_scale": "fixed",
  "resource_multiplier": 2.0,
  "creature_spawn_divider": 2,
  "oxygen_consumption": 0.5,
  "enable_pvp": false,
  "shared_blueprints": true
}
json
{
  "difficulty_scale": "fixed",
  "resource_multiplier": 2.0,
  "creature_spawn_divider": 2,
  "oxygen_consumption": 0.5,
  "enable_pvp": false,
  "shared_blueprints": true
}

Pattern 4: AI-Enhanced Narrative

模式4:AI增强叙事

json
{
  "api_integration": {
    "openai": {
      "enabled": true,
      "role": "narrator",
      "api_key_env": "OPENAI_API_KEY"
    },
    "claude": {
      "enabled": true,
      "role": "lore_engine",
      "api_key_env": "CLAUDE_API_KEY"
    }
  }
}
Console usage:
bash
/api_narrate "discovered alien artifact in lost river"
json
{
  "api_integration": {
    "openai": {
      "enabled": true,
      "role": "narrator",
      "api_key_env": "OPENAI_API_KEY"
    },
    "claude": {
      "enabled": true,
      "role": "lore_engine",
      "api_key_env": "CLAUDE_API_KEY"
    }
  }
}
控制台使用示例:
bash
/api_narrate "discovered alien artifact in lost river"

Returns: "The artifact pulses with an otherworldly rhythm. Thermal readings suggest it predates the last extinction event..."

返回:"The artifact pulses with an otherworldly rhythm. Thermal readings suggest it predates the last extinction event..."

undefined
undefined

Troubleshooting

故障排查

Session Connection Fails

会话连接失败

Symptom: Cannot join session with valid code
bash
undefined
症状:使用有效代码无法加入会话
bash
undefined

Check network configuration

检查网络配置

/debug_network
/debug_network

Verify port forwarding (if not using NAT punchthrough)

验证端口转发(未使用NAT穿透时)

Ensure UDP port 7777 is open

确保UDP端口7777已开放

Check firewall rules

检查防火墙规则

Windows: Allow BepInEx/Subnautica2.exe through Windows Firewall

Windows:允许BepInEx/Subnautica2.exe通过Windows防火墙

Linux: sudo ufw allow 7777/udp

Linux:sudo ufw allow 7777/udp


**Solution**: Enable NAT punchthrough in config:
```json
{
  "network": {
    "nat_punchthrough": true,
    "port": 7777
  }
}

**解决方案**:在配置中启用NAT穿透:
```json
{
  "network": {
    "nat_punchthrough": true,
    "port": 7777
  }
}

Inventory Desynchronization

库存不同步

Symptom: Items appear/disappear inconsistently between players
bash
undefined
症状:物品在不同玩家间出现/消失不一致
bash
undefined

Force inventory verification

强制验证库存

/inventory_verify
/inventory_verify

Check output for hash mismatch

检查输出中的哈希值不匹配

[DeepSynergy] Inventory hash: Local=0xFA342B1E, Peer1=0xFA342B1E, Peer2=0x00000000
[DeepSynergy] Inventory hash: Local=0xFA342B1E, Peer1=0xFA342B1E, Peer2=0x00000000

Force full state sync

强制全状态同步

/force_sync

**Solution**: Enable stricter sync intervals:
```json
{
  "network": {
    "sync_interval_ms": 50
  }
}
/force_sync

**解决方案**:启用更严格的同步间隔:
```json
{
  "network": {
    "sync_interval_ms": 50
  }
}

High Latency / Lag

高延迟/卡顿

Symptom: Actions delayed, creatures rubber-banding
bash
undefined
症状:操作延迟,生物出现瞬移
bash
undefined

Check connection status

检查连接状态

/synergy_status
/synergy_status

Output:

输出:

Connected peers: 3 Average latency: 450ms (WARNING: High latency) Packet loss: 8%

**Solution**: Reduce max players or increase latency tolerance:
```json
{
  "max_players": 2,
  "network": {
    "max_latency_ms": 500,
    "sync_interval_ms": 200
  }
}
Connected peers: 3 Average latency: 450ms (WARNING: High latency) Packet loss: 8%

**解决方案**:减少最大玩家数或提高延迟容忍度:
```json
{
  "max_players": 2,
  "network": {
    "max_latency_ms": 500,
    "sync_interval_ms": 200
  }
}

Blueprint Unlock Not Shared

蓝图解锁未共享

Symptom: One player unlocks blueprint, others don't receive it
Check configuration:
json
{
  "shared_blueprints": true
}
Force blueprint sync:
bash
/force_sync
症状:一名玩家解锁蓝图,其他玩家无法获取
检查配置
json
{
  "shared_blueprints": true
}
强制蓝图同步
bash
/force_sync

Mod Not Loading

模组未加载

Check BepInEx log (
BepInEx/LogOutput.log
):
[Error  :   BepInEx] Could not load [DeepSynergy.dll]
[Error  :   BepInEx] System.IO.FileNotFoundException: Missing dependency
Solution: Ensure all mod files are in correct directory:
BepInEx/plugins/DeepSynergyMod/
├── DeepSynergy.dll
├── SyncEngine.dll
├── NetworkLayer.dll
└── 0Harmony.dll (BepInEx dependency)
检查BepInEx日志
BepInEx/LogOutput.log
):
[Error  :   BepInEx] Could not load [DeepSynergy.dll]
[Error  :   BepInEx] System.IO.FileNotFoundException: Missing dependency
解决方案:确保所有模组文件位于正确目录:
BepInEx/plugins/DeepSynergyMod/
├── DeepSynergy.dll
├── SyncEngine.dll
├── NetworkLayer.dll
└── 0Harmony.dll (BepInEx dependency)

Creature AI Desync

生物AI不同步

Symptom: Leviathans appear in different locations for each player
bash
undefined
症状:利维坦在不同玩家处出现位置不同
bash
undefined

Reset creature AI states

重置生物AI状态

/creature_reset
/creature_reset

Force synchronize all creature positions

强制同步所有生物位置

/force_sync

**Prevention**: Lower creature spawn divider to reduce AI state complexity:
```json
{
  "creature_spawn_divider": 2
}
/force_sync

**预防措施**:降低生物生成除数以减少AI状态复杂度:
```json
{
  "creature_spawn_divider": 2
}

Session Code Not Generating

会话代码未生成

Check console output:
bash
> /start_server
[Error] Port 7777 already in use
Solution: Change port or kill conflicting process:
json
{
  "network": {
    "port": 7778
  }
}
Or on Linux:
bash
sudo lsof -i :7777
kill <PID>
检查控制台输出
bash
> /start_server
[Error] Port 7777 already in use
解决方案:修改端口或终止冲突进程:
json
{
  "network": {
    "port": 7778
  }
}
Linux系统可执行:
bash
sudo lsof -i :7777
kill <PID>

Environment Variables

环境变量

For API integrations (optional):
bash
undefined
用于API集成(可选):
bash
undefined

OpenAI API key for narrative generation

OpenAI API密钥,用于叙事生成

export OPENAI_API_KEY="sk-proj-..."
export OPENAI_API_KEY="sk-proj-..."

Anthropic Claude API key for lore engine

Anthropic Claude API密钥,用于背景故事引擎

export CLAUDE_API_KEY="sk-ant-..."

Reference in configuration:
```json
{
  "api_integration": {
    "openai": {
      "api_key_env": "OPENAI_API_KEY"
    }
  }
}
export CLAUDE_API_KEY="sk-ant-..."

在配置中引用:
```json
{
  "api_integration": {
    "openai": {
      "api_key_env": "OPENAI_API_KEY"
    }
  }
}

Performance Optimization

性能优化

For Low-End Systems

低配系统优化

json
{
  "max_players": 2,
  "resource_multiplier": 1.0,
  "creature_spawn_divider": 2,
  "network": {
    "sync_interval_ms": 200,
    "max_latency_ms": 500
  }
}
json
{
  "max_players": 2,
  "resource_multiplier": 1.0,
  "creature_spawn_divider": 2,
  "network": {
    "sync_interval_ms": 200,
    "max_latency_ms": 500
  }
}

For High-End Systems / LAN

高配系统/局域网优化

json
{
  "max_players": 8,
  "network": {
    "sync_interval_ms": 50,
    "max_latency_ms": 100
  }
}
json
{
  "max_players": 8,
  "network": {
    "sync_interval_ms": 50,
    "max_latency_ms": 100
  }
}

Key Files

关键文件

  • BepInEx/config/synergy_profile.json
    - Main configuration
  • BepInEx/LogOutput.log
    - BepInEx and mod logs
  • BepInEx/plugins/DeepSynergyMod/
    - Mod DLL files
  • Subnautica2_Data/Managed/
    - Game assemblies (do not modify)
  • BepInEx/config/synergy_profile.json
    - 主配置文件
  • BepInEx/LogOutput.log
    - BepInEx与模组日志
  • BepInEx/plugins/DeepSynergyMod/
    - 模组DLL文件
  • Subnautica2_Data/Managed/
    - 游戏程序集(请勿修改)

Resources

参考资源