beatsaber-overlay/README.md

41 lines
2.0 KiB
Markdown

# Beat Saber Overlay
Beat Saber stream overlay, originally based on [twitch.tv/iza_k](https://github.com/ibillingsley/BeatSaber-Overlay) but rewritten in Deno TypeScript. Requires [BeatSaberPlus](https://github.com/hardcpp/BeatSaberPlus)
### Preview
![](images/screenshots/preview.png)
## Setup
* Clone the repo
* Configure `overlay.toml`
* Install [Deno](https://docs.deno.com/runtime/getting_started/installation/) (`winget install Denoland.Deno`)
* Maybe run `deno task build`
* Run `deno task serve`
* In OBS add a Browser source and set the url to the served address (`http://127.0.0.1:8080/index.html`)
## Configuration
Configuration is `overlay.toml` in the repo root (copy from `overlay.toml.example`; the real file is gitignored). It can set:
- `chat_request_database` — absolute path to Beat Saber Plus `ChatRequest/Database.json`. The server serves that file as `ChatRequest.json` over HTTP (no symlink).
- `beatleader_player_id` — default BeatLeader id for friend scores (the server logs a warning if this is missing).
- Overlay UI defaults — optional toggles and layout matching the settings dialog: `cover`, `map_info`, `time`, `score`, `friends`, `friend_mode` (`mutual` \| `following` \| `followers`), `bsr`, `right`, `bottom`, `scale`, `fade`.
Mutual friend mode shows scores from players that you follow and that follow you back on Beatleader. Or in other words, users that are in both your following and follower list.
## Usage
Clone the repo and run `deno task serve` as above.
### Development tasks
- `deno task build` - bundle/check `src/client/index.ts` for browser output (`index.js`)
- `deno task serve` - build, then serve `index.html` and JSON files
- `deno task dev` - watch and rebuild `index.js` when client TS changes
## Testing in a browser
Click anywhere on the page (outside the settings dialog) to toggle preview mode. The song overlay appears with the built-in placeholder labels so you can check layout, toggles, scale, and fade without a game connection.