Torn Racing Telemetry

Enhanced Torn Racing UI: Telemetry, driver stats, advanced stats panel, history tracking, and race results export.

ئاپتورى
Alx Spiker
بۈگۈن قاچىلانغىنى
9
جەمئىي قاچىلانغىنى
88
باھا نومۇرى
0 0 0
نەشرى
3.1.4
قۇرۇلغان ۋاقتى
2024-12-29
يېڭىلانغان ۋاقتى
2025-04-25
Size
137.0 KB
ئىجازەتنامىسى
MIT
قوللايدىغىنى

Torn Racing Telemetry README

🏎️ Torn Racing Telemetry


Enhance your Torn racing experience with real-time telemetry, an advanced UI, detailed stats analysis with charts, and personal history tracking.


📋 Table of Contents


Overview


Torn Racing Telemetry is a comprehensive userscript designed to significantly enhance the racing feature in Torn. It replaces the standard leaderboard with a dynamic, feature-rich interface, providing real-time telemetry data, detailed driver statistics (including API-fetched stats), advanced race performance analysis with charts, and personal racing skill/points history tracking, also with charts. It integrates seamlessly into the Torn racing page, offering valuable insights without disrupting your experience.


Version: 3.1.0

Author: TheProgrammer [2782979]

Key Features

📊 Enhanced UI & Telemetry📈 Data & Analysis⚙️ Tracking & Configuration
  • Real-time Telemetry: Speed, Acceleration, Est. Lap Times.
  • Customizable Display: Choose units (mph/kmh), data points (Speed, Accel, Both), color-coding, animations.
  • Enhanced Driver List: Optional replacement for Torn's list, sorted by position.
  • Click-to-View Details: Expand driver entries for detailed status, lap progress, calculated metrics, and API stats.
  • Color Indicators: Quickly see driver position, status (racing, finished, crashed), and podium finishes.
  • Driver API Stats: View Racing Skill, Points, Win Rate etc. on click (Requires API Key).
  • Advanced Stats Panel: In-depth analysis of your historical race performance (Requires API Key).
  • Historical Analysis: Overall win/podium/crash rates, performance breakdown by track and car.
  • Track Analysis: View records for the current track/class, analyze top-performing cars and their stats (Requires API Key).
  • Interactive Charts: Visualize performance trends using Chart.js.
  • History Panel: Automatically logs changes in your Racing Skill, Class, and Points over time (API Key recommended for Points).
  • Progression Chart: Visualize your skill and points progression in the History Panel.
  • Configurable Settings: Fine-tune display, API key, history logging, data limits, and UI preferences.
  • Info Panel: Access script version, author contact, and important usage notes.
  • Data Management: Securely manage your API key and clear script data if needed.

Telemetry Display Explained

The script adds a telemetry display next to each driver in the enhanced list during a race. Here's an example:

PosDriverTelemetryProgress
1JohnRacer [12345]95 mph | 0.5 g (~1:15)84%
2SpeedDemon [67890] (You)88 mph | -0.8 g (~1:18)82%
3FastLane [11223]91 mph | 0.2 g (~1:17)81%
4RacerKing [44556]🏁 1:51.24 (~85 mph)Finished
5CrashTest [77889]💥 CRASHEDCrashed

Understanding the Display:

  • Speed: Current calculated speed in your chosen unit (mph or km/h).
  • Acceleration: Calculated g-forces. Positive (green) for acceleration, negative (red) for braking/deceleration, grey for neutral/steady speed (optional color-coding).
  • Est. Lap Time: (Optional) An estimated time remaining for the current lap, shown in parentheses (~X:XX). Based on current speed and track length, smoothed over time.
  • Finished Drivers: Marked with 🏁, showing final time and calculated average speed.
  • Crashed Drivers: Marked with 💥.

Enhanced Driver List


When enabled (default setting), the script hides Torn's default leaderboard and presents its own dynamic list.

  • Displays driver position, color indicator, car image, name, and real-time telemetry.
  • Highlights your own driver entry.
  • Clicking on any driver entry expands it to show detailed information:
    • User profile link.
    • Car name.
    • Current status (Racing, Finished, Crashed, Ready).
    • Precise progress percentage, current lap, progress within the lap.
    • Calculated metrics (speed, acceleration).
    • Smoothed and raw estimated lap times (if applicable).
    • API-fetched stats (Skill, Points, Races, Win Rate) if API key is configured and 'Load on Click' is enabled.
  • The list updates dynamically as the race progresses.

Advanced Stats Panel

Accessible via the '📊 Stats' button (Requires API Key), this panel provides deep insights into your racing performance based on your recent official race history (up to the configured limit).

  • Overall Performance Summary: Total races analyzed, date range, average position, win rate, podium rate, crash rate.
  • Performance by Track: Table and chart showing your stats (races, avg pos, win/podium/crash rates, best lap) for each track you've raced on recently.
  • Performance by Car: Table and chart breaking down your performance based on the cars you've used.
  • Current Track Analysis:
    • Details of your currently selected car.
    • Top 5 track records for the current track and class.
    • Analysis of the most successful cars on the track (based on record holders), including their base stats and a chart comparing their frequency in the top records.
  • Uses interactive charts (powered by Chart.js) for better visualization.

History Panel

Accessed via the '📜 History' button (if enabled in settings), this panel tracks your long-term racing progression.

  • Logs entries whenever a change in your Racing Skill or Class is detected on the page.
  • If an API key is provided, it also periodically checks and logs your Racing Points.
  • Displays a table of historical entries, showing the date, skill, class, and points at the time of the log entry.
  • Highlights changes (gains or losses) compared to the previous entry.
  • Includes an interactive line chart visualizing your Skill and Points progression over time.
  • Allows clearing the history log.

Example History Entry:

History Log
Date & TimeSkillClassPoints
2024-03-10 14:30:1585.42 (+0.61)A12,482 (+55)
2024-03-09 20:15:0584.81A12,427

Interface Controls

The script adds a control bar above the driver list:

┌─────────────────────────────────────────────────────────────────────────────┐
│                                                                             │
│  ┌─────────┐   ┌───────────┐   ┌─────────┐   ┌──────────┐                  │
│  │ ℹ️ Info  │   │ 📜 History│   │ 📊 Stats│   │ ⚙ Settings│                  │
│  └─────────┘   └───────────┘   └─────────┘   └──────────┘                  │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

  • ℹ️ Info: Opens a panel with script details, version, author contact, and important notes.
  • 📜 History: (Visible if enabled) Opens the History Panel to view your skill/class/points progression.
  • 📊 Stats: (Visible if enabled) Opens the Advanced Stats Panel for detailed performance analysis (Requires API Key).
  • ⚙ Settings: Opens the Settings Panel to configure the script's features and API key.

Settings Panel

Configure the script's behavior and features:

Telemetry & UI Settings ×
Panel Toggles
Enable History Panel & Logging[Toggle Switch]
Enable Stats Panel[Toggle Switch]
Telemetry Display
Telemetry Display[Select: Speed Only / Accel Only / Both]
Speed Unit[Select: mph / km/h]
Color Code Telemetry[Toggle Switch]
Animate Telemetry Changes[Toggle Switch]
Show Est. Lap Time[Toggle Switch]
Lap Est. Smoothing (0.01-1.0)[Number Input: 0.15]
API & Data Features
Load Driver API Stats on Click[Toggle Switch] (Requires API key)
Torn API Key (Limited Access Recommended)[Text Input: Enter API Key]
Advanced Stats: Races to Analyze[Number Input: 100]
History Tracking
History: Check Interval (ms)[Number Input: 15000]
History: Max Log Entries[Number Input: 50]
UI Options
Hide Torn's Leaderboard (Use Enhanced List)[Toggle Switch]

Toggle Telemetry
Save & Close

Clear Script Data
Clear API Key

Note: Your API key and all script data are stored **locally** in your browser's userscript storage. The API key is stored separately and is not removed when clearing general script data.

Installation


  1. Install a Userscript Manager: If you don't have one, install a browser extension like:
    • Tampermonkey (Chrome, Firefox, Edge, Opera)
    • Violentmonkey (Chrome, Firefox, Edge, Opera)
    • Greasemonkey (Firefox - older versions might have compatibility issues)

  2. Install the Script: Click the link below and your userscript manager should prompt you to install:


    Install Torn Racing Telemetry

    (Direct Link: https://greasyfork.org/en/scripts/522245-torn-racing-telemetry)


  3. Configure (Optional but Recommended):
    • Navigate to the Torn racing page (https://www.torn.com/page.php?sid=racing).
    • Click the '⚙ Settings' button added by the script.
    • Enter your Torn API Key (Limited Access recommended) to enable the Advanced Stats and History points tracking features.
    • Adjust other settings to your preference and click 'Save & Close'.

Usage Guide

  • During a Race: Observe the real-time telemetry on the enhanced driver list. Click any driver to expand their details and see more granular data or API stats (if configured). Use the telemetry (speed, acceleration, est. lap times) to inform your driving.
  • Analyzing Performance: Click '📊 Stats' to open the Advanced Stats Panel. Review your overall performance, track/car specific stats, and analyze the current track records/top cars (Requires API Key).
  • Tracking Progress: Click '📜 History' to see how your Skill, Class, and Points have changed over time. Use the chart to visualize trends.
  • Customization: Click '⚙ Settings' to adjust telemetry display, enable/disable panels, manage your API key, and control data logging.
  • Information: Click 'ℹ️ Info' for script version, contact details, and important notes about data privacy and usage.

FAQ

Does this script violate Torn's rules?
No. The script enhances the user interface and uses the official Torn API for data retrieval as intended. It does not automate gameplay, interfere with game mechanics, or provide unfair advantages prohibited by the rules.
Is my API key safe?
Yes. Your API key is stored locally in your browser's secure userscript storage. It is ONLY sent directly to the official Torn API (api.torn.com) when fetching data for the Stats/History panels or driver details. It is never transmitted to any other server or third party.
Why do I need an API key? Which features require it?
An API key is needed to fetch data specific to your account or detailed game information not available directly on the race page. Features requiring an API key include:
  • The Advanced Stats Panel (fetching historical races, track records, car stats).
  • Fetching Racing Points for the History Panel.
  • Displaying specific user stats (Skill, Points, Races, Win Rate) when clicking a driver in the list (if 'Load on Click' is enabled).
The core telemetry display and basic driver list enhancements work without an API key. A Limited Access key is sufficient and recommended.
How accurate is the telemetry data (speed, acceleration, lap estimate)?
The telemetry is calculated based on the progress percentage updates provided by the game interface over time. It's a sophisticated estimation and generally provides a good relative comparison between drivers and indication of changes. However, it's not based on the game's internal physics engine, so minor discrepancies with actual game values might exist. Lap estimates are further smoothed and depend heavily on maintaining current speed.
Why did my API key disappear after clearing data?
Since version 3.1.0, the API key is stored separately. Use the "Clear Script Data" button to reset settings and history *without* removing the key. Use the dedicated "Clear API Key" button if you specifically want to remove the key.
The script isn't working or looks broken after an update. What should I do?
Try these steps:
  1. Hard refresh the racing page (Ctrl+Shift+R or Cmd+Shift+R).
  2. Check the script manager (e.g., Tampermonkey dashboard) to ensure the script is enabled and updated.
  3. Try clearing script data via the Settings panel (this keeps your API key).
  4. Check GreasyFork for any known issues or newer versions.
  5. If problems persist, contact the author (TheProgrammer [2782979]) via Torn mail with details about the issue and your browser/userscript manager.


Torn Racing Telemetry

Provided under the MIT License. This script is not affiliated with or endorsed by Torn Ltd.

For updates, bug reports, or feature requests, please visit the script's page on Greasy Fork or contact the author.