rFactor2 Log Analyzer

Discussion in 'Other' started by Nibo, Oct 6, 2012.

  1. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    ************************************
    There is now new version 2 of this analyzer
    See here -> http://isiforums.net/f/showthread.php/24421-rFactor2-Log-Analyzer-ver-2
    ************************************

    Since there is interest in my analyzer in other thread, I decided to open separate topic for it.

    Features:
    - detailed statistics for all sessions
    - export race results and statistics to HTML report (Position and Gaps graphs will work only with online connection present, since they use Google Charts)
    - fuel calculation tool with UI that enables easy analyzing and calculating strategy based on any session
    - Extra GUI widget, for GUI representation and editing of most useful Multiplayer.ini, Controller.ini, player.PLR parameters that do not exist in ISI GUIs

    Warning! For fuel calculation to work properly you have to manually enter fuel tank capacity for a car you used in this session. For example, if you drove Megane you must enter 40, if you drove EVE F1 DFV 1968 you must enter 190. Go to setup screen ingame and find fuel tank capacity there.
    You only need to enter this number once per unique vehicle. It is binded to a string from "Vehicle" column and saved to .ini file, on next start of a program it gets restored. If you somehow delete rla.ini you must reenter this numbers. Be careful and double check you fuel calculations. I highlighted a field to enter fuel tank capacity on this sceenshot (default value is 100):
    View attachment 4174

    Download: version 1.22 mediafire
    Visit r2la Homepage

    Unpack archive anywhere you want (also check that there is no no-ASCII symbols in the path to r2la.exe). Start r2la.exe, press "select directory" button and point it to a folder with you rfactor2 log files (rFactor2\UserData\Log\Results) or any other directory where your log files are.

    Program also works for rF1 for now, since xml logs did not change much.

    Change log:
    1.22:
    - support for rF2 Build 424
    1.21:
    - support for rF2 Build 382
    1.20:
    - tire compounds added to Race Results, Qual Laps, Race Laps and Pit Summary tables (rF2 only)
    - first 6 tire compounds color-coded similar to F1 tires: yellow, orange, red, silver, green, blue
    - restyling of HTML report using kube.css
    - much better graphs in HTML report using flot.js
    - added "User Vehicle Data" to Extra GUI
    1.10:
    - added Extra GUI widget, for GUI representation and editing of most useful Multiplayer.ini, Controller.ini, player.PLR parameters that do not exist in ISI GUIs. Looks like this:
    View attachment 9980
    Warning! rF2 and rF2 server must not be running if you making changes to .ini files with Extra GUI. Use Extra GUI before or after you use rF2, not simultaneously.
    - after clicking on race log, focus now always sets to Race Results tab
    - added Server Name and Mod Name info to GUI and to html log
    - added Ballast info to Qual Results (will be shown if at least 1 car has ballast)
    - added Pit Stops Summary table. It includes info on every pitstop made by every player: pit stop time (sum of last sector of pit-in lap and first sector of pit-out lap), percentage amount of fuel added (if any), pit stop lap number and distance percentage.
    - Race Laps and Qual Laps tables now show overall session best sector and lap times in purple color
    - lap and sector time representation improved, supports times > 9 minutes now.
    - Race Incidents table now shows Vehicle Contacts and Other Contacts separately

    1.07:
    - fixed error in average fuel consumption calculation, when last lap of a stint ended with a pitstop adding fuel
    - stopped displaying fastest lap with 0 seconds (in "By lap" table) if there is no lap time info in log
    1.06:
    - fixed parsing of race logs where leader didn`t complete 1 lap and had no lap time info
    1.05:
    - fixed export to file, now utf-8
    1.04:
    - improved finding right Qual log for selected Race log
    1.03:
    - fixed bug when Qual Logs that ended with "..SQ.xml" was not displayed automatically in full race report.
    - fixed problem with local characters like "ä", "ü", etc present in logs. Now they should be replaced with � and no longer cause crash.
    - added possibility to use comma as separator for floats in "fuel per lap" and "avg. lap time" fields.
    1.02:
    - Fixed error when no players or AI connected to session. Now such empty logs will be clickable, but nothing will be displayed.
     
    Last edited by a moderator: Apr 20, 2015
    2 people like this.
  2. TestDriver

    TestDriver Registered

    Joined:
    Dec 29, 2011
    Messages:
    31
    Likes Received:
    0
    Wow, pretty detailed!
    Love it, well done...
     
  3. Mauro

    Mauro Registered

    Joined:
    Oct 14, 2011
    Messages:
    2,128
    Likes Received:
    3,973
    best external utility for rF2's online community :)

    example of race report: Link
     
    Last edited by a moderator: Oct 6, 2012
  4. SLuisHamilton

    SLuisHamilton Banned

    Joined:
    Jan 22, 2012
    Messages:
    860
    Likes Received:
    20
    Great tool.
     
  5. Jeepy

    Jeepy Registered

    Joined:
    Dec 25, 2011
    Messages:
    97
    Likes Received:
    0
    Thank you, very good job ! I really appreciate this tool.
    But I need your help. Your tool works fine with my rF2 desktop install. But I can't get it working with my dedicated server running on my laptop. The utility crashes with an error everytime. I tried to open the files in the "rFactor2\UserData\Log\Results" directory with my working desktop version with no success.
    See picture for error message.

    View attachment 4453

    Thank you for your help.
     
  6. Mauro

    Mauro Registered

    Joined:
    Oct 14, 2011
    Messages:
    2,128
    Likes Received:
    3,973
    try deleting log/result/ dir.

    it works for me
     
  7. Jeepy

    Jeepy Registered

    Joined:
    Dec 25, 2011
    Messages:
    97
    Likes Received:
    0
    Well, it works for sure while the corrupted files are deleted. But as soon as another directory is created, problem is back.
    But, I think I just found what is the problem.
    My dedicated server resets the week-end when there's no human connected ("Pause while zero players=1" in Multiplayer.ini). If one quits the session before the end and the server pauses, the log file gets sort of corrupted and the rF2 log Analyser crashes when trying to read it.
    If the session goes to its end, then the log file can be read by the utility.
    Would it be possible to correct this issue ?
    Thanks in advance.

    PS: would it also be possible to export the results of the practice and/or qualify alone ? (in case we do just a practice and/or qualify whitout doing a race the same day)
     
    Last edited by a moderator: Oct 26, 2012
  8. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    Jeepy, can you please upload somewhere one such "corrupted" log file for me, because I never seen this problem before. Because I never point it to dedicated sever`s log dir. I copy Qual and Race logs to a directory on my local machine and open them from there.
    Upd. Never-mind, I think I found a problem.

    As for exporting non-race sessions alone, now I have no time to work on it, but I might do it later.
     
    Last edited by a moderator: Oct 27, 2012
  9. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    Updated to Verson 1.02, links in first post. Fixed error when no players or AI connected to session. Now such empty logs will be clickable, but nothing will be displayed.

    Try it, post here if problem still exists.
     
  10. Jeepy

    Jeepy Registered

    Joined:
    Dec 25, 2011
    Messages:
    97
    Likes Received:
    0
    Great thank you, it's not crashing anymore.
    I also found out that if I want to have session results without going to the end of the session, I just have to jump to next session before exiting the server. For example, my server is set to 2h practice session by default, but sometimes we leave before the end. Then, in order to have a session results, we just have to vote for next session before quitting, else the log analyser will remain empty.
    It's ok like that. Most important is it doesn't crash anymore.
    Thanks again for this great tool.
     
  11. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    I think thats not in my control. As I understand it, rFactor generates log file that way, only when you exit the session as you describe it. I have not seen such logs (when all leave before session ends), but if such .xml file has no data, then there is nothing I can do. If such .xml file contains data, but its rearranged not typically, then I might extract it. Send me such file if you see that it is not empty, contains data for drivers, laps, etc.
     
  12. Jeepy

    Jeepy Registered

    Joined:
    Dec 25, 2011
    Messages:
    97
    Likes Received:
    0
  13. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    Ok, so there is only "stream" data available, not detailed per driver data. I may only get driver name, his lap and sector times and nothing more. I need to rewrite my parser for this. When I find time I will try to do this.

    If you want more detailed data, you should do it like you described, vote/switch to next session.
     
  14. Mauro

    Mauro Registered

    Joined:
    Oct 14, 2011
    Messages:
    2,128
    Likes Received:
    3,973
    thanks a lot nibo! :)
     
  15. Jeepy

    Jeepy Registered

    Joined:
    Dec 25, 2011
    Messages:
    97
    Likes Received:
    0
    No need to rewrite your parser because of me or some occasional situation :).
    It works just perfect as it is and I thank you again for that.
    There is a solution for my special situation and it's just perfect to me.
    Thank you so much.
     
  16. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    Ok, I`ll keep it in mind then. When and if rF2 log format will change to JSON or in another way, I will need to rewrite it anyway.
     
  17. hoser70

    hoser70 Registered

    Joined:
    Jan 14, 2012
    Messages:
    716
    Likes Received:
    7
    First off, thanks for offering such a useful tool.

    Now if I could only get it to work... ;-) Every time I select the results directory the program crashes with a message about a file not appearing to be an XML file...
     
  18. sugarfoot

    sugarfoot Registered

    Joined:
    Jan 3, 2012
    Messages:
    60
    Likes Received:
    3
    Nice tool

    Thanks Nibo

    Tony
     
  19. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    hoser70, can you provide more details? What is the path you providing exactly? Can you upload somewhere for me one or several .xml files from this directory?

    Does this happen with rF1 also? It must work for both.
     
  20. hoser70

    hoser70 Registered

    Joined:
    Jan 14, 2012
    Messages:
    716
    Likes Received:
    7
    I forgot to mention, I got it working by deleting everything in the log file, then placing my backup copy of the race I was trying to view. Thanks for the help. Awesome program by the way, thanks for sharing!
     

Share This Page