TM to OpenBK Bridge

A plugin by fabjoueur2

TM to OpenBK Bridge
Downloads 11
Updated 30 days ago
Released 30 days ago
Numeric ID 845
Min. Openplanet 1.29.0

This plugin was developed using generative AI.

From the developer: Rewrote the script, no AI used there

Game Trackmania

Detailed description

Purpose

The plugin allows players to connect Trackmania to their own local setup (e.g. a Python script and LED hardware). It reads only your local game state and sends it as JSON over HTTP to 127.0.0.1:8001 (localhost). No data is sent to the internet or to any third party.

What the plugin does

  1. Reads local game state
    Using the OpenPlanet/Game API (e.g. CSmArenaClient, CSmPlayer, CSmScriptPlayer), the plugin reads:

    • Whether you are in a race and basic UI sequence (e.g. intro/countdown, playing, finish)
    • Your current speed and a simple speed percentage
    • Checkpoint progress (how many checkpoints passed, current index)
    • Whether the run is finished
    • Whether you are in countdown (before start)
    • Whether you are airborne or sliding/drifting
    • Respawn events (when you respawn)
    • Approximate acceleration (derived from speed over time)
    • Current map UID and name (from the loaded map)
  2. Sends data to localhost only
    About 20 times per second (~50 ms interval), it sends a small JSON payload via HTTP POST to http://127.0.0.1:8001/state.
    The URL is fixed and points only to the local machine. The plugin does not connect to any external server or service.

  3. No game modification
    The plugin does not:

    • Change gameplay, physics, or rules
    • Display overlays or HUD elements in the game
    • Interact with other players, servers, or online services
    • Read or send chat, usernames, or any personal data
    • Access files outside the game except by sending HTTP requests to localhost

Typical use case

You run a separate program on your PC (e.g. a Python script “tm_to_openbk”) that:

  • Listens on port 8001 for the JSON state
  • Optionally forwards or transforms that data to your LED controller (e.g. panel + strip)

The plugin only provides the game state to that local program. All logic for driving the LEDs and any connection to hardware is outside the plugin, on the user’s machine.

Data sent (summary)

  • Booleans: is_racing, race_finished, is_new_pb, is_countdown, is_airborne, is_respawn, is_sliding
  • Numbers: speed, speed_percent, checkpoint_index, checkpoint_count, countdown_seconds, acceleration
  • Strings: map_uid, map_name

All values are derived from the local game API and describe only the current player’s state on their own client.

Privacy and security

  • Local only: All HTTP requests go to 127.0.0.1 (localhost). No internet connection is used for this feature.
  • No telemetry: The plugin does not collect or send analytics, identifiers, or usage data.
  • No impact on others: It does not access other players’ data or affect their game.