rFactor 2

rFactor 2

152 ratings
rFactor2 Log Analyzer Guide
By Nibo
After every session rFactor2 saves report xml file with various per driver/per lap data (positions, lap and sector times, fuel, tire wear, etc). rFactor2 Log Analyzer (or r2la) is the tool to read and manage these xml files. It creates database of your session logs, represents them as session reports, records your best times, allows you to manage offline or online championships, export session reports to static html files.
4
   
Award
Favorite
Favorited
Unfavorite
Introduction
After every session rFactor2 saves report xml file with various per driver/per lap data (positions, lap and sector times, fuel, tire wear, etc).

rFactor2 Log Analyzer (or r2la) is the tool to read and manage these xml files. It creates database of your session logs, represents them as session reports, records your best times, allows you to manage offline or online championships, export session reports to static html files.

You can edit results: change driver name, position, finish time/status, laps completed, disqualify driver, add time penalty. See "Editing results" section for more info.

There is also DEDI mode which lets you host r2la on your rFactor2 dedicated server for your community. Among other things DEDI mode allows to setup hotlap competitions.

r2la also supports rFactor1 and Automobilista logs.

Since v2.058, rFactor2 Log Analyzer has Live Timing.
Downloading
You can download latest version of rFactor2 Log Analyzer from this thread[forum.studio-397.com] at Studio 397 forum.
Screenshots
Most of the buttons in UI are self explanatory. Here are some screenshots:
Installation/Setup for r2la non-DEDI mode
rFactor2 Log Analyzer does not require installation. You run a bat file, which starts webserver on localhost and you access application in your browser.

How to run rFactor2 Log Analyzer for the first time, step by step:
1. Unzip "rF2 Log Analyzer ver. 2.x" folder somewhere on your hard drive.
2. Run r2la.bat. Small cmd window will pop-up, local web server will start.
3. Open address http://127.0.0.1:8000/ in your favorite browser (IE is not supported).
4. When running app for the first time, enter a full path to your rfactor2 folder in the form provided.
5. When you finished working with r2la, you can close local web server window.
Note: Some actions, like importing log files for the first time or deleting log files may take about 10-20 seconds (depends on number of logs in directory). Please wait.

Please note:
- you need to press "Refresh" button in r2la for it to rescan Results directory and pick-up new log files
- r2la only reads/shows xml log files and data which exist in your rFactor2\UserData\Log\Results directory at present time, it does not store them. If you want to back-up your data, then you need to back-up actual xml log files.
- when you remove some logs with r2la, it does not actually remove log files, but moves them to rFactor2\UserData\Log\Results\temp directory. You can move/restore them back if you need.
- try to keep number of log files to a minimum for best performance. Remove "empty" and old irrelevant log files.
Installation/Setup for r2la DEDI mode
Instructions for league and server admins. How to run rFactor2 Log Analyzer in DEDI mode for the first time, step by step:

1. Unzip "rF2 Log Analyzer ver. 2.x" folder somewhere on your dedicated server.
2. First we need to start web2py server in localhost mode to set admin account and rF2 path.
3. Start rF2 Log Analyzer ver. 2.x\web2py\web2py.exe. Select "Local" server IP. Press "Start server".
4. Go to address http://127.0.0.1:8000/ in a browser on dedicated server.
5. Fill out the form. Set rFactor2 path on this dedicated server or path to your log files directly, check "DEDI mode", fill out administrator Nick/Name and password fields. Press "Start r2la" button.
6. If r2la DEDI finds your rF2 dir and starts, you can close web2py server (web2py.exe).
7. Start rF2 Log Analyzer ver. 2.x\web2py\web2py.exe again.
8. Now select "Public" server IP (choose option with your dedicated server IP).
9. As long as web2py.exe will be running other people will be able access r2la DEDI at chosen IP and port.
10. Admin (or admins) of your community must login to r2la DEDI with Nick/Name and password entered in step 5.
11. When logged in, admin will see all the buttons to manage r2la DEDI.

Please note:
- there is "Auto refresh" mode, which you can turn on when you start app for the first time, or later in options.
- if "Auto refresh" mode is OFF, admin must press "Refresh" button for r2la DEDI to pick-up new xml logs.
Championships manager
Championship manager features:
- manage your online league championships or offline championships with AI
- support for teams and classes
- teams and classes can be automatically selected from Category, CarType, CarClass, TeamName, VehName tags or created and assigned manually
- support for drivers moving between teams and classes at different races during championship
- customizable points system for 50 places, points-for-all option, plus bonuses for pole position, fastest lap, one lap led and max laps led
- points presets for all major racing series included
- driver statistics for championship
- car statistics selectable by Category, CarType, CarClass, TeamName, VehName tags
- customizable minimum distance for classification, number of team cars that awarded points, number of worst driver results in championship that won`t be counted
- support for manual race points override, in case of penalties, disqualifications, custom bonuses, etc.
- export of championship tables to static html files

Please note:
- you can assign a country to championship race by selecting race and pressing "Edit race" -> "Edit more race settings". Country flag will appear in championship standings tables.
- you can transfer your championships between r2la versions by importing r2la_settings file
- if racing with AI, you have to ensure by yourself consistent driver names and performances at every race during championship
- do not delete .xml logs that you assigned as results for races in championship, they are accessed every time you browse championship
Editing results
  • To edit log results, you first need to create an editable copy of this log.
  • Press "Clone to edit" button, that will create a copy of selected log file. Copy will have the same name, but with "E" added to the end. Copied file will be highlighted with the blue color in log selector.
  • Only cloned/copied file will be available for edit. Original file will remain intact.
  • Select cloned file and press "Edit" button.
  • You can Edit drivers result directly or Disqualify driver or add Time Penalty. Time Penalty option is only available for drivers that are on the same lap and have finished the race. You can move any driver to any position manually by pressing "Edit" button, if Time Penalty option is not enough for you.
  • For races with driver swaps you can change driver name to one from the list of swapped drivers for this car with drop-down selector helper. Its useful when you need to select the same driver name for all championship races with swaps.
  • If you change drivers name in race log, do not forget to change this name in Qualy log also and vice versa.
  • Trailing whitespaces in driver names are marked with exclamation-circle icons on editor pages.
Upgrading to newer version of r2la
You can not just rewrite old r2la files with new ones because every new version can have different database structure. You need to start new version "from scratch". You can import your championships/DEDI competitions from older version into new one.

How to start using new version of r2la:
1. Good rule is - do not remove your old version of r2la until your are sure
that you imported your data to new version and its running correctly.
2. For DEDI mode - go to Options page in your old version and export your
competitions database (if you run competitions). Press "Export hotlap competitions" button,
it will create r2la_competitions.json file in r2la folder.
3. Download new version of r2la.
4. Unzip new version "rF2 Log Analyzer ver. 2.x" folder somewhere on your PC or dedicated server.
5. Copy r2la_settings.json (and r2la_competitions.json for DEDI) from old version folder to a new version folder you just unzipped.
6. Run new version of r2la and make sure it found rFactor2 and started OK.
7. Go to Options page and press "Import track associations and championships" (and
"Import hotlap competitions" for DEDI mode).
r2la DEDI Hotlap Competitions
If you host r2la DEDI, you can create a Hotlap Competitions for your friends/community. Users will be able to submit their times to your competitions by creating a Connection to your server in their local r2la apps. Connection consists of your r2la DEDI server IP address+port or server name, and a password if your r2la DEDI is in private mode.
Private mode for r2la DEDI
You can run DEDI version in "Private mode". If activated it will require users to enter a password to see r2la DEDI pages. Qualy and Race Chat is visible only to admin in Private mode.
Live Timing
For server to output data - you need to download rF2 Shared Memory Tools for Developers[forum.studio-397.com], extract rFactor2SharedMemoryMapPlugin64.dll into your rFactor 2\Bin64\Plugins directory, start rF2, go into Options/Plugins and turn ON rFactor2SharedMemoryMapPlugin64.

For LiveTiming to work you need to start r2la on server machine by r2la_live_timing.bat file. For LiveTiming to work properly always start r2la_live_timing.bat before you start rF2 session.

Clients don`t need to do anything new, just go to server`s r2la Live page. LiveTiming also works if you use rF2 offline, just install Shared Memory plugin and start r2la by r2la_live_timing.bat.

Using r2la in Linux with WINE
User FuNK! posted a guide for this on S397 forum[forum.studio-397.com].
< >
81 Comments
Sim Experience SA Feb 25 @ 6:55am 
Thanks so much for the software, love it so much. A question...can I change the Admin password that I created?
ezecanova Jan 17 @ 1:28pm 
That happened when i try to see the récords page.

I installed rfactor2 in a new pc
ezecanova Jan 17 @ 1:02pm 
hi nibo, i nedd help.

Traceback (most recent call last):
File "E:/old_disk_d/web2py_2.14.6/applications/r2la\compiled\controllers.tracks.index.py", line 27, in index
AttributeError: 'NoneType' object has no attribute 'id'

what can i do??
Nibo  [author] Dec 9, 2021 @ 5:23am 
Then they've changed it from AMS1, it will not work.
[NRT] Andy Bonar Dec 8, 2021 @ 4:01pm 
AMS 2 uses JSON file type for results
Nibo  [author] Dec 6, 2021 @ 9:46am 
Probably not. I don't have AMS2 and don't know what log format it uses if any.
[NRT] Andy Bonar Dec 6, 2021 @ 2:36am 
Can this be used with AMS2?
crazyeyeskilla Aug 25, 2021 @ 11:02pm 
Why isn't something like this built into the game?!?!
Nibo  [author] Jan 13, 2021 @ 6:30am 
Start r2la, open Help page, look for "Live Timing troubleshooting" and check all steps as described there.
Scholli Ulz Jan 12, 2021 @ 3:24pm 
Nice! Thanks a lot!

But one thing i don´t understand: How can i use / activate the livetiming at a dedicated server? It simply says "polling..." all the time.