Skip to content

soong-construction/dirt-rally-time-recorder

 
 

Repository files navigation

CI

Goal

This tool allows you to track your stage times in DiRT Rally and DiRT Rally 2.0 and browse them, which the game itself does not allow.

Time tracking works for stage rallies and the Pikes Peak events of the original DiRT Rally.

First time set up

You can choose to download dirt-rally-time-recorder as a ready-to-use bundle (tested to work on Windows 10 x64, read about signing issues here). You can also set it up from scratch.

Ready-to-use bundle

  • Download the latest release for either the original DiRT Rally or 2.0
    • Unzip the installation folder somewhere
  • Start time tracking
    • in your installation folder, start timerecord.exe
    • It should tell you to be Waiting for data..., otherwise take a look at Troubleshooting

Updating

To update to a new version, simply download the new release or create a new bundle as instructed above. To be safe, backup your dirtrally-laptimes.db. You can overwrite your existing installation folder with the new one.

Make sure to start dirt-rally-time-recorder once to allow to migrate the database and config.

Configuration

Before starting DiRT Rally [2.0] you need to enable UDP telemetry like so:

  • Navigate to the settings directory of DiRT Rally or DiRT Rally 2.0 (e.g. %USERPROFILE%\Documents\My Games\DiRT Rally 2.0\hardwaresettings\)
  • Open hardware_settings_config.xml with a text editor
  • Enable telemetry and request extradata by adapting the appropriate line as follows: <udp enabled="true" extradata="3" ...
  • Note for VR users: For the VR mode, the above setting has to be adapted in hardware_settings_config_vr.xml as well

There are further configurations and optional features that can be configured in config.yml. Please refer to the documentation here.

Record stage times

  • Start DiRT Rally [2.0] and finish a stage
    • dirt-rally-time-recorder runs in the background, reporting the car and the track it identifies from the telemetry
    • for cars, it will display control interface information such as the transmission type (based on this discussion)
    • it will look something like this:
TRACK: Sweet Lamb
CAR: Volkswagen Golf GTI 16V
Volkswagen Golf GTI 16V: H-PATTERN shifting, 5 speed, with manual CLUTCH, with HANDBRAKE
  • On stage completion, it reports your top speed and time and saves it to the database
    • to dump the database into a CSV file consumable by your favorite spreadsheet editor, run export-laptimes.bat
    • to quickly view your recorded times like below, run list-laptimes.bat
┌───────────────────────────────────────┬────────────────────────────────┬─────────────────────┬───────────┬──────────┐
│                 Track                 │              Car               │        Date         │   Time    │ Topspeed │
├───────────────────────────────────────┼────────────────────────────────┼─────────────────────┼───────────┼──────────┤
│ Annbank Station                       │ Peugeot 205 GTI                │ 2020-07-30 12:47:48 │ 05:32.953 │ 158.4    │
│ Anodou Farmakas                       │ Lancia Stratos                 │ 2020-04-26 11:26:44 │ 07:59.897 │ 129.6    │
│ Anodou Farmakas                       │ Porsche 911 SC RS              │ 2020-04-14 18:28:20 │ 08:08.114 │ 136.8    │

Limitations

Since DiRT Rally [2.0] telemetry data doesn't allow to clearly identify every available car and track, this tool will sometimes ask you to resolve this after completing a stage. You can enable heuristics to somewhat alleviate this limitation.

In order to consolidate the database, the tool prepares update scripts for you, e.g. 1573403766_ElRodeo_PoloGTIR5.bat

  • open your installation folder
  • run the update script that matches the car and track you chose (e.g. double-click it)
  • you will barely notice a window opening and closing, and that's it
  • each time you start dirt-rally-time-recorder, it automatically removes update scripts older than a week

Be aware that this tool cannot know the car or track conditions when recording. In order to beat your best time, choose an undamaged car with proper setup, and ideal track and weather conditions.

Troubleshooting

Starting:

  • to understand MS Defender SmartScreen warnings for dirt-rally-time-recorder, read this
  • if you encounter an error message about sockets, understand that this tool cannot run in parallel, but only in a single instance at the same time
  • unless you downloaded the bundled version, have a look at resources/migrate.sql to find instructions how to update to new releases
  • if you encounter errors at start-up, see if renaming the file dirtrally-laptimes.db helps (which will create a new database)

Configuring the tool:

  • Steam updates of the game sometimes reset hardware_settings_config.xml. Then, repeat the configuration steps to enable UDP telemetry again
  • in case you modified the telemetry host or port in hardware_settings_config.xml, adapt config.yml accordingly

Recording:

  • if the game has been updated with new cars or tracks, recognition can fail ("Unmapped telemetry"). You can continue to record further stages, but you're welcome to report this shortcoming (see below)
  • if your installation is too old, recognition can fail as well. Then, check if you can update to a new version of dirt-rally-time-recorder

Exporting:

  • when you export your stage times, be sure to avoid corrupt characters and import the CSV file in a spreadsheet editor with UTF-8 encoding. In MS Excel, use the query tool

In any case, feel free to open an issue and attach the timerecord.log from your installation folder. You can also contact the author through Steam.

Platform notes

UDP telemetry is available only on PC, not consoles.
Linux users refer to this issue for set up and usage instructions.

Resources

UDP telemetry documentation (cf. DiRT 4 for DiRT Rally 2.0):
[https://docs.google.com/spreadsheets/d/1Xsv5E9jwgJsiXCZQlM5Ae2hH5mUnjdHlTtEadnSnaeI/edit?usp=sharing]

Contributors cf. to docs/develop.md.

Remainder

Tested with

  • DiRT Rally (v1.22)
  • DiRT Rally 2.0 (v1.18)

Ships with SQLite 3.39.4.

UDP data recognition in collaboration with ErlerPhilipp: https://github.com/ErlerPhilipp/dr2_logger.

Thanks to Slocan for the initial version: https://github.com/Slocan/timerecord.

Credits to Billiam for the core code: https://github.com/Billiam/pygauge.

See LICENSE and THIRD_PARTY_LICENSES.txt for works used under license.