phyrobyte/totk-multiplayer

GitHub: phyrobyte/totk-multiplayer

为《塞尔达传说:王国之泪》开发的网络协议多人合作 Mod,通过读写主机内存实现玩家状态的跨机同步。

Stars: 0 | Forks: 0

# 🗡️ TOTK 多人模式 **一款针对在已破解 Switch 硬件上运行的《塞尔达传说:王国之泪》开发的网络协议合作 mod。** 实时看到彼此在海拉鲁大陆漫游——由轻量级的主机内存管道和权威的 PC 服务器提供支持。
[![Downloads](https://img.shields.io/github/downloads/phyrobyte/totk-multiplayer/total?style=for-the-badge&logo=github&label=downloads&color=4fc3f7)](https://github.com/phyrobyte/totk-multiplayer/releases) [![Release](https://img.shields.io/github/v/release/phyrobyte/totk-multiplayer?style=for-the-badge&logo=github&color=7fd6ff&include_prereleases)](https://github.com/phyrobyte/totk-multiplayer/releases) [![Stars](https://img.shields.io/github/stars/phyrobyte/totk-multiplayer?style=for-the-badge&logo=github&color=ffb300)](https://github.com/phyrobyte/totk-multiplayer/stargazers) [![License](https://img.shields.io/github/license/phyrobyte/totk-multiplayer?style=for-the-badge&color=4caf50)](LICENSE) [![Forks](https://img.shields.io/github/forks/phyrobyte/totk-multiplayer?style=flat-square&logo=github)](https://github.com/phyrobyte/totk-multiplayer/network/members) [![Issues](https://img.shields.io/github/issues/phyrobyte/totk-multiplayer?style=flat-square&logo=github)](https://github.com/phyrobyte/totk-multiplayer/issues) [![Last commit](https://img.shields.io/github/last-commit/phyrobyte/totk-multiplayer?style=flat-square&logo=github)](https://github.com/phyrobyte/totk-multiplayer/commits) [![Repo size](https://img.shields.io/github/repo-size/phyrobyte/totk-multiplayer?style=flat-square)](https://github.com/phyrobyte/totk-multiplayer) [![Python](https://img.shields.io/badge/PC%20tools-Python%203.9%2B-3776AB?style=flat-square&logo=python&logoColor=white)](pc-tools) [![Switch](https://img.shields.io/badge/console-Atmosph%C3%A8re%20CFW-E60012?style=flat-square&logo=nintendoswitch&logoColor=white)](sysmodule)
## 这是什么 TOTK 没有任何网络代码。本项目通过**从游戏的 RAM 中读取玩家状态、通过网络进行中继,并将其写回为一个可见的“幻影”**,从而同步两台(或多台)主机——这与《旷野之息》多人 mod 所使用的技术相同。实际的 v1 目标是**幻影合作**:你和你的兄弟可以在各自的世界中看到彼此的移动、转向和动画,而共享 HP 和简单的战斗互动则作为拓展目标。(完全同步的敌人 AI/物理效果明确不在范围之内——请参阅 [`ROADMAP.md`](ROADMAP.md)。) ### 架构 ``` ┌──────────── AUTHORITATIVE PC SERVER ────────────┐ │ validates state · relays · interpolation · │ │ address config · hosts Switch-only clients │ └───────▲──────────────────────────────▲──────────┘ │ UDP (wire-protocol v0) │ ┌─────┴──────┐ ┌─────┴──────┐ │ Switch A │ │ Switch B │ │ thin sysmod│ │ thin sysmod│ │ read/write │ │ read/write │ │ game RAM │ │ game RAM │ └────────────┘ └────────────┘ ``` Switch 仅作为哑终端(只负责传输字节);所有的逻辑都运行在 PC 上,以便于快速迭代。一台 PC 同时充当**服务器**,因此你的朋友只需要一台已破解的 Switch——不需要他们自己的 PC。后续多个服务器可以实现**联邦化**(服务器互连)。 ## 仓库布局 ``` totk-multiplayer/ ├── ROADMAP.md # the full phased, robustness-first plan ├── config/ # version pin, wire protocol, address-map schemas ├── pc-tools/ # Phase 0 pipeline — runnable NOW against a fake console │ ├── protocol.py shared wire-protocol v0 │ ├── fake_switch.py synthetic console (streams fake telemetry) │ ├── recorder.py capture stream -> session file │ ├── analyzer.py offline address hunter │ └── visualizer.py live top-down map ├── sysmodule/ # thin Atmosphère memory-pipe (C/libnx skeleton) └── pc-server/ # authoritative server (Phase 4+) ``` ## 立即尝试——无需主机 目前,整个 PC pipeline 可以直接针对一个带有已知真实数据的**模拟 Switch** 运行,因此可以在硬件实机操作之前进行构建*和*验证: ``` cd pc-tools # 在 map 上实时观看一个 fake Link 移动 python3 fake_switch.py & python3 visualizer.py # 或者:record 一个 session 并 offline hunt 其地址 python3 recorder.py --label demo & python3 fake_switch.py --duration 60 python3 analyzer.py --verify ../config/sim_layout.json ``` 详情请参阅 [`pc-tools/README.md`](pc-tools/README.md)。 ## 状态 阶段 0(基础设施 / PC pipeline)——**进行中**。依赖主机的阶段(真实内存地址、幻影 actor、双人同步)将在硬件破解完成后开始。目标游戏版本锁定为 **1.4.2**。 ## 环境要求 - **PC 工具:** Python 3.9+(仅使用标准库;可视化工具需使用 `tkinter`)。 - **主机(后期):** 一台运行 **Atmosphère** CFW 的可破解 Switch,游戏版本为 TOTK **1.4.2**,EdiZon-SE,以及用于构建 sysmodule 的 devkitPro/libnx。 ## ⚠️ 法律 / 免责声明 本仓库**仅包含原创的工具和代码**——不包含任何 Nintendo 资产、游戏 dump 或密钥。它要求你拥有并 dump 你自己的游戏副本。这是一个用于教育和个人用途的自制程序 / 逆向工程项目,与 Nintendo 没有任何隶属关系,也未获得其认可。Nintendo、《塞尔达传说》以及《王国之泪》均为 Nintendo 的商标。使用风险自负。 ## 许可证 [MIT](LICENSE) © 2026 phyrobyte
标签:任天堂Switch, 内核驱动, 塞尔达传说, 多人联机, 游戏Mod, 游戏服务器, 网络协议, 逆向工具