Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 38 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,61 +40,59 @@ Every bit of feedback helps improve multiplayer support for **Dead Cells**.

## 🧰 Requirements

- **Dead Cells (PC)**
- **Dead Cells (PC)** (Update 35 / "The End is Near")
- **Dead Cells Core Modding API (DCCM)**
- **[.NET 10 Runtime (x64)](https://dotnet.microsoft.com/download/dotnet/10.0)**
- **[Microsoft Visual C++ Redistributable 2015–2022 (x64)](https://aka.ms/vs/17/release/vc_redist.x64.exe)**
- Local network, Steam, or virtual LAN software (for online play)

---

## 📦 Installation

### 1️⃣ Install Dead Cells Core Modding API (DCCM)
### Method A: Steam Workshop Users
1. Subscribe to **[DCCM Core Modding API](https://steamcommunity.com/sharedfiles/filedetails/?id=3633185550)**.
2. Subscribe to **[DeadCellsMultiplayerMod](https://steamcommunity.com/sharedfiles/filedetails/?id=3657857836)**.
3. Steam downloads workshop files to your workshop cache folder (`steamapps/workshop/content/588650/`). To activate DCCM:
- Navigate to your game folder (`steamapps/common/Dead Cells/`).
- Copy `core`, `plugins`, and `ModCoreVersion.txt` from `<Steam>/steamapps/workshop/content/588650/3633185550/win-x64/content/` into a folder named **`coremod`** in your game root.
- Copy all files from `<Steam>/steamapps/workshop/content/588650/3657857836/` into `<DeadCellsGameRoot>/coremod/mods/DeadCellsMultiplayerMod/`.
4. Launch the game using `<DeadCellsGameRoot>/coremod/core/host/startup/DeadCellsModding.exe`.

If you are using the **Steam version** of the game, follow the official installation guide:
### Method B: Manual / Non-Steam Setup
1. Extract DCCM into your Dead Cells root folder so that `<DeadCellsGameRoot>/coremod/` exists.
2. Create the folder `<DeadCellsGameRoot>/coremod/mods/DeadCellsMultiplayerMod/` if it does not exist.
3. Extract the mod release contents into that folder (ensuring `modinfo.json` is directly inside).
4. Launch via `<DeadCellsGameRoot>/coremod/core/host/startup/DeadCellsModding.exe`.

👉 [https://dead-cells-core-modding.github.io/docs/docs/tutorial/install-workshop/](https://dead-cells-core-modding.github.io/docs/docs/tutorial/install-workshop/)
> ⚠️ **Important Folder Rule:** The directory must be strictly named **`coremod`** (singular, lowercase). Naming it `coremods` will cause the launcher to exit immediately without an error.

This method will automatically install and keep DCCM up to date.

### 2️⃣ Install DeadCellsMultiplayerMod

If you are using the **Steam version** of the game:
1. Open [https://steamcommunity.com/sharedfiles/filedetails/?id=3657857836](https://steamcommunity.com/sharedfiles/filedetails/?id=3657857836)
2. Install the mod in one click.

If you are using a **non-Steam version** of Dead Cells (DCCM required):
1. Navigate to your **DCCM directory**
2. Create a folder named `mods` (if it doesn't exist)
3. Extract the **DeadCellsMultiplayerMod** folder into the `mods` directory

Example:
```
Your game path/
└──coremod/
└── mods/
└── DeadCellsMultiplayerMod/
```

### 3️⃣ Run the game via DCCM

Start **Dead Cells** using **DCCM**.
On the first launch, required configuration files will be generated automatically.
*Having issues? See our comprehensive [Troubleshooting Guide](docs/TROUBLESHOOTING.md).*

---

## 🕹️ How to Play (Multiplayer)

1. Launch the game via **DCCM**
2. Click **Play Multiplayer**
3. Choose **Host** or **Join**
4. Enter **IP address** and **port** (TCP) or connect via Steam
5. When the host starts the game, the client will automatically join the session

🌐 **For online play**, use one of the following:
- Hamachi
- Radmin VPN
- ZeroTier
- Steam P2P (built-in)
### Steam P2P (Easiest)
1. Both players launch Dead Cells via `DeadCellsModding.exe`.
2. The Host clicks **Play Multiplayer** → **Host (Steam P2P)**.
3. Once the lobby screen appears with your lobby code:
- Open the **Steam Overlay** (`Shift + Tab`).
- Right-click your friend in the Steam friend list and select **Invite to Game** (or copy and share the lobby code).
4. The joining player accepts the invite via Steam chat or Steam profile.
5. When both players appear in the lobby:
- The host selects a multiplayer save slot.
- Click **Start Game** — both players will spawn together in the Prisoner's Quarters!

### Local Network / Direct TCP
1. Connect to the same local network or virtual LAN (e.g., **Radmin VPN**, **ZeroTier**, **Hamachi**).
2. Host clicks **Play Multiplayer** → **Host (TCP)** (default port: `1234`).
3. Client clicks **Play Multiplayer** → **Join (TCP)**:
- Enter the Host's **Virtual LAN IP** (do not use `127.0.0.1` unless testing two clients on the same PC).
- Enter port `1234` and click Connect.
4. Select a save slot and start the game.

> 💡 **Tip:** Ensure Windows Defender Firewall allows incoming connections on port `1234` for `DeadCellsModding.exe` and `deadcells_gl.exe`.

---

Expand Down
82 changes: 40 additions & 42 deletions README_ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,61 +35,59 @@

## 🧰 Требования

- **Dead Cells (PC)**
- **Dead Cells Core Modding API (DCCM)**
- Локальная сеть, Steam или виртуальная LAN (для игры по интернету)
- **Dead Cells (PC)** (Обновление 35 / "The End is Near")
- **Dead Cells Core Modding API (DCCM)**
- **[.NET 10 Runtime (x64)](https://dotnet.microsoft.com/download/dotnet/10.0)**
- **[Microsoft Visual C++ Redistributable 2015–2022 (x64)](https://aka.ms/vs/17/release/vc_redist.x64.exe)**
- Локальная сеть, Steam или виртуальная LAN (для игры по интернету)

---

## 📦 Установка

### 1️⃣ Установите Dead Cells Core Modding API (DCCM)

Если у вас **Steam-версия** игры, следуйте официальной инструкции:

👉 [https://dead-cells-core-modding.github.io/docs/docs/tutorial/install-workshop/](https://dead-cells-core-modding.github.io/docs/docs/tutorial/install-workshop/)

Так DCCM установится и будет обновляться автоматически.

### 2️⃣ Установите DeadCellsMultiplayerMod

Если у вас **Steam-версия** игры:
1. Откройте [https://steamcommunity.com/sharedfiles/filedetails/?id=3657857836](https://steamcommunity.com/sharedfiles/filedetails/?id=3657857836)
2. Установите мод в один клик.

Если у вас **не-Steam версия** Dead Cells (требуется DCCM):
1. Перейдите в **каталог DCCM**
2. Создайте папку `mods` (если её нет)
3. Распакуйте папку **DeadCellsMultiplayerMod** в каталог `mods`
### Вариант A: Пользователи Steam Workshop
1. Подпишитесь на **[DCCM Core Modding API](https://steamcommunity.com/sharedfiles/filedetails/?id=3633185550)**.
2. Подпишитесь на **[DeadCellsMultiplayerMod](https://steamcommunity.com/sharedfiles/filedetails/?id=3657857836)**.
3. Steam скачивает файлы мастерской в папку кэша (`steamapps/workshop/content/588650/`). Чтобы активировать DCCM:
- Перейдите в папку с игрой (`steamapps/common/Dead Cells/`).
- Скопируйте `core`, `plugins` и `ModCoreVersion.txt` из `<Steam>/steamapps/workshop/content/588650/3633185550/win-x64/content/` в папку с именем **`coremod`** в корне игры.
- Скопируйте файлы из `<Steam>/steamapps/workshop/content/588650/3657857836/` в `<DeadCellsGameRoot>/coremod/mods/DeadCellsMultiplayerMod/`.
4. Запустите игру через `<DeadCellsGameRoot>/coremod/core/host/startup/DeadCellsModding.exe`.

Пример:
```
Путь к игре/
└──coremod/
└── mods/
└── DeadCellsMultiplayerMod/
```
### Вариант B: Ручная установка / Не-Steam версия
1. Распакуйте DCCM в корневую папку Dead Cells, чтобы появилась папка `<DeadCellsGameRoot>/coremod/`.
2. Создайте папку `<DeadCellsGameRoot>/coremod/mods/DeadCellsMultiplayerMod/` (если её нет).
3. Распакуйте файлы мода в эту папку (убедитесь, что файл `modinfo.json` находится внутри).
4. Запустите игру через `<DeadCellsGameRoot>/coremod/core/host/startup/DeadCellsModding.exe`.

### 3️⃣ Запуск игры через DCCM
> ⚠️ **Важное замечание по названию папки:** Папка должна называться строго **`coremod`** (в единственном числе, строчными буквами). Если назвать её `coremods`, лаунчер мгновенно закроется без вывода ошибок.

Запустите **Dead Cells** через **DCCM**.
При первом запуске нужные конфигурационные файлы создадутся автоматически.
*Возникли трудности? Ознакомьтесь с [Руководством по устранению неполадок](docs/TROUBLESHOOTING.md) (на английском).*

---

## 🕹️ Как играть (мультиплеер)

1. Запустите игру через **DCCM**
2. Нажмите **Play Multiplayer**
3. Выберите **Host** или **Join**
4. Введите **IP-адрес** и **порт** (TCP) или подключитесь через Steam
5. Когда хост начнёт игру, клиент автоматически подключится к сессии

🌐 **Для игры по интернету** можно использовать:
- Hamachi
- Radmin VPN
- ZeroTier
- Steam P2P (встроено)
### Steam P2P (Самый простой способ)
1. Оба игрока запускают игру через `DeadCellsModding.exe`.
2. Хост нажимает **Play Multiplayer** → **Host (Steam P2P)**.
3. На экране лобби отобразится код комнаты:
- Откройте **Steam Overlay** (`Shift + Tab`).
- Нажмите правой кнопкой мыши по другу в списке Steam и выберите **Пригласить в игру** (или отправьте код лобби).
4. Второй игрок принимает приглашение через чат или профиль Steam.
5. Когда оба игрока появятся в лобби:
- Хост выбирает слот сохранения мультиплеера.
- Нажмите **Start Game** — оба игрока появятся вместе в тюремных камерах!

### Локальная сеть / Прямой TCP
1. Подключитесь к одной локальной сети или виртуальной LAN (**Radmin VPN**, **ZeroTier**, **Hamachi**).
2. Хост нажимает **Play Multiplayer** → **Host (TCP)** (порт по умолчанию: `1234`).
3. Клиент нажимает **Play Multiplayer** → **Join (TCP)**:
- Введите **IP-адрес виртуальной сети хоста** (не используйте `127.0.0.1`, если играете на разных ПК).
- Введите порт `1234` и нажмите Connect.
4. Выберите слот сохранения и начните игру.

> 💡 **Совет:** Убедитесь, что Брандмауэр Windows (Firewall) разрешает входящие подключения по порту `1234` для `DeadCellsModding.exe` и `deadcells_gl.exe`.

---

Expand Down
64 changes: 64 additions & 0 deletions docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 🔧 DeadCellsMultiplayerMod Troubleshooting & FAQ

This guide addresses common setup issues, launcher behaviors, network questions, and console messages encountered when running **DeadCellsMultiplayerMod**.

---

### 1. `DeadCellsModding.exe` closes or crashes immediately upon launch

* **Cause:** The folder in your Dead Cells directory is named `coremods` instead of `coremod`.
* **Technical Details:** DCCM's bootstrapper hardcodes a lookup for `coremod/core/host/DCCMShell.dll`. If the folder has an `s` at the end (`coremods`), the executable cannot locate the assembly and terminates silently without displaying an error dialog or log.
* **Fix:** Open your Dead Cells game directory (`steamapps/common/Dead Cells/`) and ensure the folder is named strictly **`coremod`** (singular, all lowercase).

---

### 2. "FATAL : SysError(Can't read save/MSave/user_*.dat)" in the Console

* **Symptom:** When opening the Save Selection menu or starting a multiplayer session, the debug console prints:
```text
[Game] src/tool/File.hx:91: FATAL : Could not read save file.
[Game] src/tool/File.hx:91: FATAL : SysError(Can't read save/MSave/user_1.dat)
```
* **Status:** **THIS IS NORMAL AND NOT A CRASH.**
* **Explanation:** Dead Cells is written in Haxe/HashLink. When querying save slots, the game attempts to read each slot file (`user_1.dat` through `user_6.dat`). If a slot does not exist on disk yet (because you haven't started a run in that slot), Haxe's file loader logs a fatal read error to the console. The game internally handles this exception and properly displays the slot as an "Empty Slot / New Game". You can safely ignore this message and continue.

---

### 3. Subscribed on Steam Workshop, but "Play Multiplayer" does not appear

* **Cause:** Clicking "Play" inside Steam executes the vanilla `deadcells.exe`. Vanilla Dead Cells only loads basic graphic/pak mods and does not load custom C# .NET runtimes or DCCM.
* **Fix:** You must start the game through the DCCM launcher:
1. Make sure you copied the files from Steam Workshop cache into `<DeadCellsGameRoot>/coremod/` as described in the [README](../README.md#📦-installation).
2. Launch `<DeadCellsGameRoot>/coremod/core/host/startup/DeadCellsModding.exe`.
*(Optional: If you want Steam to launch the mod automatically when pressing Play, backup your original `deadcells.exe` and replace it with the launcher stub located in `coremod/core/host/startup/steam/deadcells.exe`).*

---

### 4. How to Host and Connect via Steam P2P

1. Both players must launch the game using `DeadCellsModding.exe`.
2. The **Host** clicks **Play Multiplayer** → **Host (Steam P2P)**.
3. Once in the lobby, the host opens the **Steam Overlay** (`Shift + Tab`).
4. Right-click your friend in your Steam Friend List and select **Invite to Game** (or copy and send the generated lobby code).
5. The joining player accepts the invite via Steam chat.
6. When both players appear in the lobby:
- The host selects a multiplayer save slot.
- Click **Start Game** — both players will spawn together in the Prisoner's Quarters.

---

### 5. Client Connection Timeout over Direct TCP

* **Incorrect IP:** When playing over the internet via a Virtual LAN (such as **Radmin VPN**, **ZeroTier**, or **Hamachi**), the joining client must enter the host's **Virtual LAN IP**, **NOT** `127.0.0.1` (which is localhost loopback).
* **Firewall Blocking:** Ensure that Windows Defender Firewall allows incoming connections on port `1234` for:
- `DeadCellsModding.exe`
- `deadcells_gl.exe`
- `deadcells.exe`

---

### 6. Game crashes on startup with a .NET or VC++ error

* Make sure you have installed the **x64** versions of both prerequisites:
- [.NET 10 Runtime (x64)](https://dotnet.microsoft.com/download/dotnet/10.0) *(Desktop or Console runtime)*
- [Microsoft Visual C++ Redistributable 2015–2022 (x64)](https://aka.ms/vs/17/release/vc_redist.x64.exe)