• You don't get fast in order to take part in club races, you take part in club races to get fast!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dear Guest. Follow RaceDepartment on Twitter, Facebook, Instagram, Twitch, Steam and YouTube.

For those waiting for SP championship

Discussion in 'RaceRoom Racing Experience' started by pixeljetstream, Jan 4, 2015.

  1. pixeljetstream

    pixeljetstream

    Messages:
    46
    Ratings:
    +38
    Hi all,
    am happily enjoying the game but the lack of DTM 92 (or others) singleplayer championship bugged me, so I ended up coding something that gives you something similar, based on the current game, no mods required.

    The open-source project can be found here https://github.com/pixeljetstream/r3e-open-championship

    As you do multiple "singlerace" events their results are tracked as championship. A HTML report like the one below is generated (imagine it would append more and more races as you keep racing).

    http://htmlpreview.github.io/?https...open-championship/blob/master/doc/sample.html


    [​IMG]
    It works as follows
    • A small program tracks edits to "My Games/SimBin.../Results/raceresults.txt" which contains the results of the last race (no matter what kind of race it was). If a race was too short (say < 5 minutes) it is discarded.
    • Based on the content of the file a unique "championship" is created (hash based on starter-field). That means if you choose always the same starter-field config (vehilce class and number of opponents) in your single player race, it shall treat it as a single championship
    • For every completed race, the results are appended to the championship file (a simple text file storing the results for every race) and a HTML file is generated with the current standings, see image above

    The championship is open, as none of the settings are really frozen, you can keep going and mix tracks however you want, change AI... It really is just pseudo championship based on your sp races, but it's better than nothing or doing it by paper ;)

    A few caveats:
    Simply do not run the app if you do races you don't want to track (or toggle the tracker off). If something is accidentally added somewhere you can always manually edit the files and remove the last entry.
    Since the tracknames are not stored in the result file (only track lengths), we need a mapping of track lengths to track names, I didn't do this yet (don't own all tracks either), but it shouldn't take long to gather the mapping as community.
    The generated html is quite simply so far, no team standings. Just a single "point rule set" is applied to all, so purists who would want dtm 92 to have not the current FIA scoring, would have to edit that part.
    Which actually leads me to the next topic, the whole thing is scripted via Lua, so it only takes a text editor to make changes to how it works. Don't like the html generated, easy to change...

    I hope it's useful to some of you as we wait for proper championships, and in some points it might be better than the current championships.

    Be aware I haven't done thorough testing, especially on the auto tracking bit, but it should be good enough to get things going, looking for feedback.

    -Christoph
     
    Last edited: Jan 10, 2015
    • Like Like x 14
    • Winner Winner x 7
  2. Rodger Davies

    Rodger Davies

    Messages:
    148
    Ratings:
    +56
    It's a pity I can only press 'like' once. Cheers.
     
    • Agree Agree x 1
  3. James Cook

    James Cook
    Marcas fan

    Messages:
    1,092
    Ratings:
    +385
    Very impressive. Great work!
     
  4. Glen Kabis

    Glen Kabis

    Messages:
    417
    Ratings:
    +235
    Very cool, thanks for sharing.
     
  5. Galin Dimov

    Galin Dimov
    SimDrive

    Messages:
    567
    Ratings:
    +192
    Thank you sir!

    Galin
     
  6. pixeljetstream

    pixeljetstream

    Messages:
    46
    Ratings:
    +38
    thanks, upgraded the ui a bit to be more verbose

    [​IMG]
     
  7. William Wester

    William Wester
    Premium

    Messages:
    1,140
    Ratings:
    +384
    Wow, very creative.
     
  8. pixeljetstream

    pixeljetstream

    Messages:
    46
    Ratings:
    +38
    thx to a steam user, a few more tracknames are now detected properly
     
  9. Paul Jeffrey

    Paul Jeffrey
    RaceDepartment Editor-in-Chief Staff Premium

    Messages:
    6,666
    Ratings:
    +10,966
    Good man! Thank you very much indeed! :)
     
  10. Cedric Lagneau

    Cedric Lagneau

    Messages:
    137
    Ratings:
    +4
    ;)
     
  11. Heppsan

    Heppsan

    Messages:
    351
    Ratings:
    +116
    Thanks a lot for this!! :thumbsup::thumbsup::thumbsup:

    Here are the rest of the tracks:
    ["3797.2512"]="RaceroomRaceway",
    ["4623.4604"]="Portimao",
    ["6191.8174"]="Bathurst",
    ["3992.8533"]="Zolder",
    ["4069.3682"]="Indianapolis",
    ["3585.5344"]="LagunaSeca",
    ["3809.4441"]="MidOhio",
    ["5783.3423"]="Monza",
    ["5801.7275"]="Suzuka",
     
    Last edited: Jan 9, 2015
  12. Rodger Davies

    Rodger Davies

    Messages:
    148
    Ratings:
    +56
    Barthurst or Bathurst?
     
    • Like Like x 1
  13. Heppsan

    Heppsan

    Messages:
    351
    Ratings:
    +116
    Sorry, my bad.. Must have been thirsty when I wrote this! :D
    Edited, thanks!! :thumbsup:
     
  14. pixeljetstream

    pixeljetstream

    Messages:
    46
    Ratings:
    +38
    • Haha Haha x 3
  15. pixeljetstream

    pixeljetstream

    Messages:
    46
    Ratings:
    +38
    • Winner Winner x 7
  16. pixeljetstream

    pixeljetstream

    Messages:
    46
    Ratings:
    +38
    small change in behavior, the app no longer automatically adds the current results at app start to the databases. If you want that, press "check now". Motivation is that some member on this forum was worried about "fun races" being added to the championship accidentally (which would be the case if your last race at the time you start the app was a fun race).
    Even if a race was accidently added removal from the database lua file only needs a texteditor and the fileformat is rather "simple".
    Independent of this change, the app does prevent adding the same race twice to a database already.
     
    • Like Like x 1
  17. pixeljetstream

    pixeljetstream

    Messages:
    46
    Ratings:
    +38
    • Like Like x 1
  18. pixeljetstream

    pixeljetstream

    Messages:
    46
    Ratings:
    +38
    And one can now add a description to the championship shown in the html as well, again suggestion by tAz.

    I guess multi-season career mode is next (half-joking) ;)
     
    • Like Like x 1
  19. Shovas

    Shovas
    Premium

    Messages:
    241
    Ratings:
    +53
    hah brilliant good job
     
  20. nikh

    nikh

    Messages:
    155
    Ratings:
    +31
    This also works in Multiplayer.
     
    • Beer Beer x 1