[REL] rFactor2 Log Analyzer ver. 2. With offline and league Championship Manager

Discussion in 'Other' started by Nibo, Apr 15, 2015.

  1. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    ChazmR, added jsonp call at championships/export_standings_jsonp?cid=*championship id*. Re-uploaded new archive to same link without version change.
    • Added jsonp call at championships/export_standings_jsonp?cid=*championship id* to get Championship Standings and Stats tables data with cross-domain ajax request from your other server. cid should be defined as championship ID. You can find championship ID in a query string when you open championship page.
    Example call:
    Code:
    $.ajax({
        url: 'http://your-r2la-address:port/championships/export_standings_jsonp',
        type: 'GET',
        dataType: 'jsonp',
        crossDomain: true,
        data: {'cid': 1},
        success: function (data, textStatus, xhr) {
            console.log(data);
        },
        error: function (xhr, textStatus, errorThrown) {
            console.log(errorThrown);
        }
    });
     
  2. _KrustY_

    _KrustY_ Registered

    Joined:
    Mar 27, 2012
    Messages:
    37
    Likes Received:
    3
    Hello Nibo
    I have a problem with the export link of the Championship if I try to access in HTTPS, in HTTP it works very well.
    In HTTPS I get the error:
    net :: ERR_SSL_PROTOCOL_ERROR
    can it be solved?
    Thank you
     
  3. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    To host r2la server on https you will need to have valid ssl certificate (server.crt and server.key files). Run web2py.exe with this parameters:
    Code:
    web2py.exe -c server.crt -k server.key
    For LiveTiming, add that parameters to third line in r2la_live_timing.bat:
    Code:
    start web2py.exe -c server.crt -k server.key
     
  4. _KrustY_

    _KrustY_ Registered

    Joined:
    Mar 27, 2012
    Messages:
    37
    Likes Received:
    3
    Thank you
    I have the valid server.crt and server.key files, where should I copy them?
    Thank you
     
  5. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    rF2 Log Analyzer ver. 2.058.20\web2py directory.
     
  6. _KrustY_

    _KrustY_ Registered

    Joined:
    Mar 27, 2012
    Messages:
    37
    Likes Received:
    3
    perfect works
    thank you
     
  7. RoWo

    RoWo Member

    Joined:
    Jul 16, 2014
    Messages:
    570
    Likes Received:
    625
    @Nibo
    Are the penalty points calculated in the drivers/teams standings? Seems like not.
     
  8. Alek

    Alek Registered

    Joined:
    Oct 6, 2010
    Messages:
    156
    Likes Received:
    8
    Hello,

    i'm try to youse RF2LA Live but without succes. This is what I've done

    - copied rFfactor2SharedMemoryMapPlugin64.dll in proper folder
    - started server from Livetiming .bat file and compiled the form on 1st start (in DEDI mode)
    - Cheked Public (0.0.0.0) button and started server

    Opening the file CustomPluginVariables.JSON in player directory I can't find the call to the plugin.

    What I can do to fix this issue? Thanks!!
     
  9. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    Alek, you need to start rFactor2 at least once with plugin in folder and turn it on in game menu ("Options/Plugins"), then its entry will appear in json. If it will not, you can add this lines manually:
    Code:
      "rFactor2SharedMemoryMapPlugin64.dll":{
        " Enabled":1,
        "DebugISIInternals":0,
        "DebugOutputLevel":0,
        "DedicatedServerMapGlobally":0,
        "EnableDirectMemoryAccess":0,
        "EnableStockCarRulesPlugin":0
      }
    If it is still not working, maybe try re-installing runtimes from rFactor 2\Support\Runtimes folder.

    RoWo, penalty points should be visible in all driver standings tables like this:
    MaxthonSnap20190420092807.png
     
  10. RoWo

    RoWo Member

    Joined:
    Jul 16, 2014
    Messages:
    570
    Likes Received:
    625
    Yes, they are visible. But would be fine, if they would be calculated also in the standings. So that I see final points with penalty points subtracted.
     
  11. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    I will add this as an option in next update.
     
    RoWo likes this.
  12. Alek

    Alek Registered

    Joined:
    Oct 6, 2010
    Messages:
    156
    Likes Received:
    8
    @Nibo I use LA in a dedicated server, without full game installed, but with Steamcmd. The file where I must add the script is "CustomPluginVariable"? I see that the file is generated from RF2 on close. How I can activate plugin without the game installed?

    Thanks a lot again!
     
    Last edited: Apr 20, 2019
  13. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    Alek, open rFactor 2\UserData\player\CustomPluginVariables.JSON in any text editor and paste this lines at the end, but before last "}":
    Code:
      "rFactor2SharedMemoryMapPlugin64.dll":{
        " Enabled":1,
        "DebugISIInternals":0,
        "DebugOutputLevel":0,
        "DedicatedServerMapGlobally":0,
        "EnableDirectMemoryAccess":0,
        "EnableStockCarRulesPlugin":0
      }
    Whole CustomPluginVariables.JSON file should look like this:
    Code:
    {
      "KnockoutQualifying.dll":{
        " Enabled":0,
        "FixedNumberScored":0,
        "NumQualSessions":0,
        "TimedLapRequired":1,
        "Total1Session1Minutes":0,
        "Total1Session1Scored":43,
        "Total2Session1Minutes":0,
        "Total2Session1Scored":43,
        "Total2Session2Minutes":0,
        "Total2Session2Scored":12,
        "Total3Session1Minutes":0,
        "Total3Session1Scored":43,
        "Total3Session2Minutes":0,
        "Total3Session2Scored":24,
        "Total3Session3Minutes":0,
        "Total3Session3Scored":12,
        "Total4Session1Minutes":0,
        "Total4Session1Scored":43,
        "Total4Session2Minutes":0,
        "Total4Session2Scored":36,
        "Total4Session3Minutes":0,
        "Total4Session3Scored":24,
        "Total4Session4Minutes":0,
        "Total4Session4Scored":12
      },
      "SteamPlugin.dll":{
        " Enabled":1
      },
      "StockCarRules.dll":{
        " Enabled":0,
        "AdjustFrozenOrder":25,
        "AdjustUntilYellowFlagState":4,
        "AllowFrozenAdjustments":1,
        "DoubleFileType":2,
        "Logging":0,
        "LuckyDogFreePass":1,
        "WaveArounds":1,
        "YellowLapsMinimum":6,
        "YellowLapsRandom":0
      },
      "TrackIR_rF2_Plugin.dll":{
        " Enabled":0
      },
      "rFactor2SharedMemoryMapPlugin64.dll":{
        " Enabled":1,
        "DebugISIInternals":0,
        "DebugOutputLevel":0,
        "DedicatedServerMapGlobally":0,
        "EnableDirectMemoryAccess":0,
        "EnableStockCarRulesPlugin":0
      }
    }
     
  14. Alek

    Alek Registered

    Joined:
    Oct 6, 2010
    Messages:
    156
    Likes Received:
    8
    Ok, very well. I Tried without succes. Stil present message "No live session found, Polling…"
    If can be usefull, on server there're multiple session of dedicated, I update only one dedicated with the script you have write obove. I attach the file used. There's some port to open on the router? o_O
     

    Attached Files:

  15. Goanna

    Goanna Registered

    Joined:
    Jan 19, 2012
    Messages:
    1,405
    Likes Received:
    953
    @Alek check your syntax in the json file, you have;
    }
    "rFactor2SharedMemoryMapPlugin64.dll":{
    It should be; (note the , after the } )
    },
    "rFactor2SharedMemoryMapPlugin64.dll":{
     
  16. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    Yes, there is no comma on the line before "rFactor2SharedMemoryMapPlugin64.dll" in your file. Try fixing that. Also make sure that CustomPluginVariables.JSON file that you are editing is in the folder with the same player name that is the name of the player with which you start rF2 dedicated server (if you have multiple rF player profiles).

    If it is still not working, try re-installing runtimes from rFactor 2\Support\Runtimes folder.
     
  17. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    I was only able to do automatic penalty points subtraction like described below.

    Updated to v2.058.21
    • Added championship option to automatically subtract penalty points from driver points sum in standings table. Look for "Subtract penalty points from driver points sum" option on "Create/Edit Championship" page (default "Off"). Team standings are unaffected by this. If you need to subtract penalty points also from team standings, leave new option on Off and subtract points from driver results with manual correction.
     
  18. Nobkins

    Nobkins Registered

    Joined:
    Jan 23, 2019
    Messages:
    36
    Likes Received:
    1
    Hi Nibo.

    I had this with V2.058.20 and just updated to V2.058.21.

    When I try to use the export championship to JSON I get this:

    invalid view (championships/export_standings_json.json)

    I get an internal error when I try to access the jsonp version also in a browser
    championships/export_standings_jsonp

    Any ideas?
     
    Last edited: Apr 23, 2019
  19. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,251
    Likes Received:
    965
    Export to json is working fine for me with latest version. Maybe you didn't update in correct way? I don't know if its first time you doing update with r2la. Make sure you did all steps like described here - https://steamcommunity.com/sharedfiles/filedetails/?id=553607744 - "Upgrading to newer version of r2la". Never delete your previous version if you updating, in case something goes wrong you can use old version.

    Try unziping new version of 2.058.21. Start it and create some simple championship with 1 race result, then try export, will it work?

    Oh, wait, do you mean export never worked even in 2.058.20?
     
  20. Nobkins

    Nobkins Registered

    Joined:
    Jan 23, 2019
    Messages:
    36
    Likes Received:
    1
    Yes it has not worked in either version.

    I can do the test you suggested later on.

    I upgrade regularly and am familiar with the process
     

Share This Page