v1.3.1 — OBS Lua script for race-event automation
Adds obs-script/autocam_obs.lua — an OBS Lua script that reads status.json
from the plugin and fires configurable OBS actions (scene switch, source show/hide,
media playback) whenever race events occur.
Setup
- In OBS: Tools → Scripts → + → select
autocam_obs.lua
- Set
status.json path in the script settings
- Same-PC:
C:\...\rF2stream\status.json
- Two-PC (network share):
\\game-pc\rF2stream\status.json
- Configure actions per trigger — all settings are optional, leave blank to skip
Triggers
| Trigger |
Fires when… |
| Replay started / ended |
on_replay changes |
| Battle started / ended |
in_battle changes |
| Side-by-side started / ended |
sbs_active changes |
| Leader changed |
leader field changes |
| Formation lap |
game_phase → formation |
| Green flag |
game_phase → green |
| Safety car / FCY |
game_phase → yellow |
| Red flag |
game_phase → stopped |
| Race finished |
game_phase → finished |
Per-trigger actions
| Setting |
Description |
| Switch scene |
OBS scene to activate |
| Show sources |
Comma-separated source names to make visible |
| Hide sources |
Comma-separated source names to hide |
| Trigger media source |
Media Source to restart/play |
| Auto-restore after N sec |
Reverses show↔hide automatically (0 = off) |
Example: replay scene with auto-return
- Replay started → Switch scene:
Replay, Show: Replay Overlay
- Replay ended → Switch scene:
Live, Hide: Replay Overlay
Example: leader-change banner (auto-hide after 5 s)
- Leader changed → Show:
Leader Banner, Auto-restore: 5
Notes
- First poll establishes a silent baseline — no triggers fire on OBS startup
- Two-PC setups: UNC paths (
\\game-pc\rF2stream\status.json) work natively
- No extra software required beyond OBS itself
- Requires rf2-autocam v1.3.0 or later for
in_battle, sbs_active, leader, and game_phase fields