40 lines
1.7 KiB
Markdown
40 lines
1.7 KiB
Markdown
# Beat Saber Overlay
|
|
|
|
Simple Beat Saber stream overlay for [twitch.tv/iza_k](https://www.twitch.tv/iza_k)
|
|
Requires [BeatSaberPlus](https://github.com/hardcpp/BeatSaberPlus)
|
|
|
|
### Preview
|
|
|
|

|
|
|
|
## Setup
|
|
|
|
Install [Deno](https://docs.deno.com/runtime/getting_started/installation/) and serve the overlay over HTTP (see below).
|
|
|
|
The browser overlay source is now TypeScript (`src/client/index.ts`) and is bundled to `index.js` with `deno task build` (run automatically by `deno task serve`).
|
|
|
|
The server must know where Beat Saber Plus stores **`ChatRequest/Database.json`**. It then serves that file as `ChatRequest.json` and `database.json` (same data) over HTTP—no symlink.
|
|
|
|
**Easiest:** copy `chat-request-database.path.example` to **`chat-request-database.path`** in this repo and put **one line**: the absolute path to `Database.json` (gitignored, so it stays on your machine).
|
|
|
|
**Or** set the environment variable (overrides the path file):
|
|
|
|
```powershell
|
|
$env:CHAT_REQUEST_DATABASE = "C:\Users\pleb\BSManager\BSInstances\1.40.8\UserData\BeatSaberPlus\ChatRequest\Database.json"
|
|
deno task serve
|
|
```
|
|
|
|
Then open **`http://127.0.0.1:8080/index.html`** (use the same host and port the terminal prints). Set `PORT` if needed. In OBS, use that URL for the browser source.
|
|
|
|
If neither the path file nor `CHAT_REQUEST_DATABASE` is set, the overlay only finds a queue if you place a `ChatRequest.json` copy in the repo folder.
|
|
|
|
### 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
|