Your Cart

Hydrofoil Telemetry Points Tracker (Automatic Server Points System with Leaderboard)

On Sale
$0.00
Pay what you want:
$
Added to cart

Hydrofoil Telemetry Points Tracker

(Automatic Server Points System & Leaderboard)

Race Results Processing Script - User Manual

Overview

This script is designed to process race results from various files, accumulating scores based on a time differential points system. It organizes the results into distinct tables for different boat models (JX40, JX50, and F50) and outputs the data to a Google Sheet.

Key Features

  1. File Processing: The script processes .kl files and plain text files, extracting relevant data for each player.
  2. Points Calculation: Points are calculated based on the race time relative to a base time, allowing for adjustments based on performance.
  3. Accumulation of Scores: The script accumulates scores across multiple race files, ensuring that player points reflect their total performance.
  4. Distinct Tables for Each Boat Model: Results are organized into separate tables for JX40, JX50, and F50 models, with spacing between them for clarity.
  5. File Renaming: Processed files are renamed to avoid duplication and ensure smooth future executions.
  6. Dynamic Google Sheet Update: The script automatically clears previous results in the Google Sheet and updates it with the latest data.

How It Works

  1. Setup:
  • Ensure you have a Google Drive folder containing the race result files.
  • Specify the folder ID and the Google Sheet ID in the script.
  1. Points Calculation:
  • The base time is set to 5 minutes (300 seconds) by default, and it can be adjusted as needed.
  • Points are calculated using the formula:
  • If race time < base time: Points = Base points + (Base time - Race time) * 0.02
  • If race time >= base time: Points = Base points - (Race time - Base time) * 0.02
  • The base points can also be adjusted within the script.
  1. Accumulation of Scores:
  • The script retrieves existing data from the Google Sheet to accumulate scores from previous runs.
  • It ensures that if a player appears in multiple files, their points are combined.
  1. Data Organization:
  • Players are organized by their boat model, and results are sorted by points in descending order.
  • Separate tables for each boat model are created, with headers indicating the model and a few empty rows in between for readability.
  1. Execution:
  • Run the script from the Google Apps Script editor, and it will process the files in the specified folder.
  • Processed files will be renamed with a "processed_" prefix to prevent reprocessing.

Installation and Setup

  1. Open Google Apps Script:
  • Go to your Google Drive, create a new Google Apps Script project, or open an existing one.
  1. Copy the Script:
  • Paste the provided script into the Apps Script editor.
  1. Adjust Parameters:
  • Set the folderId and sheetId variables to match your Google Drive folder and Google Sheet.
  1. Run the Script:
  • Click on the run button in the Apps Script editor to execute the script.

Important Considerations

  • Ensure that the race result files adhere to the expected format, with the necessary parameters (boat name, boat model, nation, and time) clearly defined.
  • Regularly monitor the Google Sheet to ensure data is correctly populated and points are accurately accumulated.
  • If adjusting the base time or base points, make sure to consider the impact on the overall scoring system.

BAT File Integration

A BAT file is used to automate the process of moving race result files from the server results folder to the designated Google Drive folder. This ensures that all files are readily available for processing by the script.

BAT File Example:

bat

Copy code

@echo off

setlocal


:: Define paths

set SOURCE_FOLDER=C:\path\to\results

set DESTINATION_FOLDER=G:\My Drive\RaceResults


:: Move files to Google Drive

move "%SOURCE_FOLDER%\*.kl" "%DESTINATION_FOLDER%"

move "%SOURCE_FOLDER%\*.txt" "%DESTINATION_FOLDER%"


  • This script moves all .kl and .txt files from the source folder to the destination Google Drive folder.

Time Differential Points System

  • The points system is based on a time differential relative to the set base time, allowing for fair scoring across different race conditions and player performances. This dynamic calculation can be adjusted to accommodate changes in competition structure or scoring requirements.


The system also comes with an HTML file that can be embedded into any website or blog which allows public viewing of the race results.


Conclusion

This script is a comprehensive solution for processing race results, ensuring accurate and organized data management. With features designed to handle multiple boat models and accumulated scores, it facilitates easy tracking and analysis of player performances.



You will get a ZIP (4KB) file

Customer Reviews

There are no reviews yet.