BoTP2P
A simple mod that brings back the capability to play multiplayer but as peer-to-peer including a toggleable chatting system.
模組介紹 作者原文
The pitch of the mod, everything you need to know!
Contents of this mod:
Book of Travels used to be a beautiful multiplayer RPG game, unfortunately of which the servers got shut down. With this mod I aim to bring it back to some extent so that certain players can enjoy co-op experience without the hassle of setting up a dedicated server.
What new does this mod offer:
Apart from some minor networking bug fixes which caused trouble in trying to reboot the multiplayer (which I will explain below) this mod comes with a toggle-able chatting feature. This can be controlled by the HOST and other client instances will have to follow that.
What you need to know in order to play:
From the main menu you hit HOST and their game starts listening for connections. Others hit JOIN, types in the HOST IP address, and lands in the same world. The address works over LAN, or over the internet if you all run something like Tailscale or ZeroTier. (I used Radmin VPN for my tests. Any virtual LAN service works.). If you have port forwarding, that would work too.
How this mod works:
The mod loads through BepInEx and sets up its own connection system that runs alongside the game's code. It doesn't interfere with your saves or the game files. If no one connects to your instance, it plays like usual "Play Offline" would.
It opens its own lightweight connection session next to the game, a small UDP server on a port a version handshake so mismatched mod builds refuse to connect and a relay that limits how fast anyone can send chat. Then it starts reconstructing everything the other player does inside your instance of the world. For now, the amount of player that can play the game in total are 32.
The game didn't lose its multiplayer code, the Play Offline instances run a local Mirror host, and all the client sided work, PlayerBase.UpdateClient, animator, weather, ui, emotes, etc, are all produced, what was removed was the transport to ship these instances. I used Harmony to read and write into its systems.
The main relay server and the headless server I made (not published) uses LiteNetLib UDP session on 27015. Unity 2022.3 temporarily stores the native PlayerLoop, so a MonoBehaviour added at runtime never gets Update() Harmony then acts on PlayerBase.UpdateClient (in world) and LobbyUI.Update (menus) push BoTP2PManager.OnUpdate() which is the network tick, from inside the game's own frame.
Spawning the player was simple, whe reciving the PlayerState, a new puppet is assembled from CharacterVariationsManager.GetPlayerForm, it is from the game, which is a real traveller body. The handling and transporting of animations and blah blah blah, lot of other stuff that I won't bore you with.
How to Install This Mod:
Manual Installation:
- You can download BepInEx 5 from their github page.
- Extract ALL the files from the BepInEx 5 zip to the game's root directory (where the executable is present).
- Run the game. It will initialize the plugins folder at./BepInEx/plugins
- Download the BoT-P2P mod manually page, extract the contents.
- Inside the extracted contents there would be a folder named BoTP2P inside./BepInEx/plugins
- Copy that from the manually downloaded mod's folder to the game's./BepInEx/plugins folder.
- Run the game and enjoy!
For feedback, suggestions and questions:
- Reddit Profile: https\://www\.reddit.com/user/mondoryink
- Discord Tag: rootpyie
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
- 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
- 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。
不同模組的安裝位置差異較大,包內說明是最可靠的依據。
下面這些內容需要先安裝,否則該模組不會生效: