Downloads | 24 |
---|---|
Updated | 16 days ago |
Released | 16 days ago |
Created | 1 month ago |
Numeric ID | 731 |
Min. Openplanet | 1.26.0 |
(meant as a replacement for the unmaintained: Data Gatherer for Reinforcement Learning
plugin)
A tiny guide for grabbing race + vehicle-state data over sockets.
OBS: Make sure that you enable the plugin in the openplanet settings as this plugin does not come with automatic sending turned on.
Channel | Endpoint | Payload | Rate | Purpose |
---|---|---|---|---|
Race feed | ws://127.0.0.1:{PORT}/feed |
One JSON "snapshot" per interval (map, CPs, players, etc.) | SEND_EVERY_MS |
Live leaderboard / HUDs / data logging |
Vehicle state | ws://127.0.0.1:{PORT}/vstate |
Per-frame car telemetry (pos, speed, slip, RPM ...) | Every frame | Motion rigs, analytics, fancy overlays, training |
Open the General tab in the Openplanet overlay (F3):
Setting | Meaning | Default |
---|---|---|
Send every (ms) (SEND_EVERY_MS ) |
Snapshot | 1 ms (max ≈1 kHz) |
Port (PORT ) |
TCP port used by both channels | 8765 |
Automatic startup on plugin load | Fire up sockets as soon as the script loads | off |
Buttons: connect / reconnect / restart server + connect / disconnect / Reset to defaults – self-explanatory.
# 1 Install deps (once)
pip install websockets
# 2 Run the dual-channel logger
python feed_server.py # or python feed_server.py --mode feed|vstate|both
When the plugin connects you'll see pretty-printed JSON dumps like:
{
"map": "Stadium C-05",
"gameTime": 123450,
"cpCount": 12,
"players": [
{
"name": "Zoop",
"login": "zoop123",
"raceRank": 1,
"bestMs": 56234,
"respawns": 0
}
]
}
Vehicle snapshots contain fields such as spd
, pos
, rpm
, slipFL
, gear
, etc. (see vstate.as
for all fields).
logging.info(...)
lines in feed_server.py
with whatever pipeline you need—DB insert, OSC forwarder, HTTP POST, etc etc etc/feed
and/or /vstate
and parse JSON.client.as
will automatically try again every 3 s if the socket dies.