Statistics Script for use with B-Spec Grinder Widget

  • Thread starter madcapr
  • 6 comments
  • 1,634 views
45
madcapr
*****UPDATED 11-20-2011*****

PRE-REQUISITES: Enable the RECIPROCATE mode in the "Manage Drivers" section of the widget and check the box to "Save race logs to disk" under the Widget Preferences.

*****UPDATED 11-20-2011*****

EDIT: Scripting Code has been added to export how many times other PSN ID's are racing YOUR drivers. Due to the way the widget shows this information in the log files, this part of the script is less exact. However, it should not over-estimate how often someone has raced your drivers and it will definitely show you if someone you raced has never raced your drivers in return. The new code has been pasted into the google doc link below.

*****UPDATED 11-19-2011*****

I wrote up a quick batch file to determine whose drivers you are racing and how many times you have raced other user's individual drivers with this widget.

EDIT: I added the ability to limit the report from files since a specific date. I also added some code to delete all the temporary files and folders created during the process. When you copy the new code from the link below and run the batch file, you will be asked to enter a date in the format YYYY-MM-DD. Any statistics before the day you enter will be ignored. Everything on the date you specify and all log files after that day up to present time will be included in the results.

PRE-REQUISITES: Enable the RECIPROCATE mode in the "Manage Drivers" section of the widget and check the box to "Save race logs to disk" under the Widget Preferences.

1. Create a file in the same folder where your race logs are stored and call the file race-stat.bat or something similar.

2. Then right click the file and choose edit.

3. Click the link to my google doc below, copy all the code from the google doc and paste it in the race-stat.bat file.

4. Save and close race-stat.bat. Then double click to run it.

5. The batch program will ask you to input a date. Use the format YYYY-MM-DD and then press ENTER

6. Wait until the program says "Press any key to continue"

The results will output to a file called totals.csv in the same folder. Use excel or something to create totals and/or percentages and sort the data however you like.

Copy all the code from the link below.

-----------------------

https://docs.google.com/document/pub?id=1qIl8UODHYN5k8MNXrAin6i5_U6zTcucdrRhEg6JANcE
 
Last edited:
Thanks for this mate it will be a great help.

I've done as you instructed but when I ran the batch file I got a error in the cmd window saying file not found on the line above the "press any key to continue" statement.

When I opened the csv file it only had the ids and occurrences of people I had run and none of the information on how many times they had raced me, those cells were blank.

Just had a thought, do you have to have everybody running under reciprocate for this bit of the script to work ? I actually run everybody under random but that's not a problem for to change.

AH HA that fixed it no more "file not found" error, just had to switch the widget to reciprocate.

Once again thanks for this little beauty
 
Last edited:
Thanks for this mate it will be a great help.

I've done as you instructed but when I ran the batch file I got a error in the cmd window saying file not found on the line above the "press any key to continue" statement.

When I opened the csv file it only had the ids and occurrences of people I had run and none of the information on how many times they had raced me, those cells were blank.

Just had a thought, do you have to have everybody running under reciprocate for this bit of the script to work ? I actually run everybody under random but that's not a problem for to change.

AH HA that fixed it no more "file not found" error, just had to switch the widget to reciprocate.

Once again thanks for this little beauty

Thanks! I actually thought about that after I posted this. I've always run everyone under reciprocate, so never tested it under random. I'll post new instructions up top. Enjoy!
 
Good work madcapr, this will be a great help to our B Spec grinding group.

Actually we could always use more reliable members, especially ones that are active and helpfull. Send me a PM if you are interested.

Edit: Right not working for me, probably because i did it wrong lol. Maybe a stupid question but exactly what kind of file am I supposed to create and dump the google.doc text into?
 
Last edited:
A file with a .bat extension like stat.bat or similar. Make sure windows didn't add a hidden .txt extension. Default setting in windows is to hide known file extensions.
 
Figured it out. I forgot to change file type from .txt to any file.
Now I just need to do some running to try it out, I deleted all my old logs last night lol
 
Back