FomoWebSocket
FomoWebSocket: WebSocket relay add-on for the Fomo mod. Use /fomohelp and look for /fomowebsocket commands
模組介紹 作者原文
FomoWebSocket
A Fomo add-on for On Together that exposes in-game chat as a WebSocket server, enabling real-time external integrations.
Requirements
- Fomo (hard dependency)
Features
- WebSocket chat server — Forwards all in-game chat messages and notifications to connected WebSocket clients in real time
- Bidirectional relay — Messages sent from a WebSocket client are injected into the in-game chat input; Fomo commands are supported too
- Configurable format — Separate format strings for chat messages and notifications
- Server starts automatically on launch when EnableFeature is true
In-Game Commands
Type any command into the in-game chat. Commands start with / and are not sent to other players.
- /fomowebsockettoggle (/fwst) — Toggle the WebSocket server on/off
- /fomowebsocketport [port] (/fwsp) — Get or set the WebSocket server port (default: 8765)
- /fomowebsocketmessageformat [format] (/fwsmf) — Get or set the chat message format string
- /fomowebsocketnotificationformat [format] (/fwsnf) — Get or set the notification format string
Examples
/fomowebsockettoggle
/fomowebsocketport 9000
/fomowebsocketmessageformat [{timestamp:HH:mm} {channel:short}] {username}: {message}
Configuration
Located in BepInEx/config/com.andrewlin.ontogether.fomo.websocket.cfg
- General
- EnableFeature (default: true) — Start the WebSocket server automatically when the game launches
- WebSocket
- WebSocketChatPort (default: 8765) — Port the WebSocket server listens on
- Formatting
- MessageFormat (default: [{timestamp:HH:mm} {channel:short}] {username}: {message}) — Format string for chat messages sent to clients
- NotificationFormat (default: [{timestamp:HH:mm}] {message}) — Format string for notifications sent to clients
Format Placeholders
The MessageFormat and NotificationFormat settings accept the following placeholders:
- {timestamp} — message time; accepts a C# DateTime format specifier (e.g. {timestamp:HH:mm})
- {channel} — full channel label use {channel:short} for just the first character (G / L)
- {username} — display name of the sender
- {message} — message body
- {distance} — distance in metres for local messages, empty for global/notifications
- {source} — internal message source identifier
- {playerid} — sender's player ID
Usage
- Install Fomo and FomoWebSocket via r2modman or
- Launch the game — the server starts automatically if EnableFeature is true
- Connect any WebSocket client to ws://localhost:8765
- Use /fomowebsockettoggle in chat to start or stop the server at runtime
Receiving messages
Each chat message arrives as a plain text string formatted according to MessageFormat. Notifications use NotificationFormat.
Sending messages
Send any plain text string to the WebSocket server. It will be injected into the in-game chat input. Fomo commands (e.g. /fomohelp) are also supported.
Installation
Use r2modman or the app for the simplest install. Fomo must be installed first.
Manual:
- Install Fomo first
- Copy AndrewLin.FomoWebSocket.dll into BepInEx/plugins/
- Launch the game — the server starts automatically
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
- 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
- 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。
不同模組的安裝位置差異較大,包內說明是最可靠的依據。
下面這些內容需要先安裝,否則該模組不會生效: