[REL] Timed server control (race session every x hours like iRacing)

Discussion in 'Other' started by cubbi, Jun 24, 2014.

  1. cubbi

    cubbi Registered

    Joined:
    Jul 8, 2013
    Messages:
    90
    Likes Received:
    0
    Tool to (re-)start an rFactor2 server at a specified date and time.

    For example this allows you to run your public server similiar to iRacing, where a race session would start every full hour (every 2h, 3h, etc.)

    [​IMG]

    Download v1.3
    Source code (feel free to contribute)

    Tested with:
    Windows 8 64bit
    Windows Server 2008 32bit

    Usage:
    1. Set a start date and start time: This is when the server will be restarted for the first time.
    2. Then set a restart time: The server will be restarted every x hours y minutes after the start time or last restart.
    3. Then select the rF2 server window to control by clicking on it.
    If you want to run your server on autopilot, make sure to disable session voting.
    Also make sure that the restart time is not too close to the end of a race, as there is always some delay between switching sessions. A safe value should be 15-20min.

    Don't forget to mention when a race takes places in your server name, like: "ServerX.com - Race session every full hour"

    All feedback is welcome!
     
    Last edited by a moderator: Jun 25, 2014
  2. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    32
    That's a clever idea. I feel like rF2 would have more online activity if public servers were more structured with something like you have created here. I think that if public servers made proper use of GetMod so joining is simple but also have some sort of set schedule like iRacing that it would be much more popular. You could have a calendar that says what car and track will be active for the week and only change cars and tracks once a week and like you said are saying, start a race session on some sort of regular interval that people can plan around.

    Do people remember the old days where RFC used to have organized public servers where they would stick to one set of cars and tracks for a week at a time? Remember how we could join at just about any time of the day and race with resonable fields? Also, you had to register on their site and your stats were tracked so there was more accountability. Still not the quality of racing you find in a league, but it wasn't as bad as a disorganized public server. rF2 needs just a few more APIs and we could get really creative with this concept. We really need a way to connect to a server via command line. Even if it is a command line option on the actual launcher which then validates your licence before passing the command line on to rFactor2.exe. I would love to see a website like iRacing where you could hold a spot in a session and others would see a list of drivers who have committed to a session and join in if they wanted. Just think how amazing rF2 would be if it combined the openness of rF2 with the organization of iRacing.
     
    DA likes this.
  3. V.A.

    V.A. Registered

    Joined:
    Jun 24, 2014
    Messages:
    23
    Likes Received:
    0
    Soon. Very soon, Noel. Tracks, Cars, Servers... Races for a new era.
     
  4. cubbi

    cubbi Registered

    Joined:
    Jul 8, 2013
    Messages:
    90
    Likes Received:
    0
    Yes exactly! I hope ISI will provide more APIs in the future (like they did for mas extraction recently).
    As you said the community can improve the game experience quite a bit by adding such tools, not only by adding in-game content :)
     
  5. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    15
    Don't you think it is already achievable, by creating an application that make the same think than a human do (take reference to the window and simulate click on UI - it is what is used by this tool), and create functionalities/rules (website, rule engine, etc...)

    I'm ok to work on this king of things, if i have clear needs (as i not very familiar of all PC sim racing needs/possibilities)
     
  6. V.A.

    V.A. Registered

    Joined:
    Jun 24, 2014
    Messages:
    23
    Likes Received:
    0
    There is software to control unattended servers. With access control drivers (registry, banned, etc.). Sanctions management, automatic commissioners, grills, telemetry, anti-cheat ... Operating 24 x 7 without overload on the server. Installed in high performance dedicated server and databases with high capacity.

    Over 500 simultaneous races could be managed without problems.
     
  7. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    32
    Yeah you could do some UI automation but then it's dependent on what UI people have installed and stuff like that. It would be better to have some reliable command line options and stuff like that.
     
  8. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    32
    This sounds very exciting. Can't wait to hear more details about this.
     
  9. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    15
    Sure, it will be better, but i don't know if it will be allowed some day.
     
  10. DocJones

    DocJones Registered

    Joined:
    Jan 26, 2011
    Messages:
    403
    Likes Received:
    5
    This is a very nice tool, thanks cubbi!
     
  11. Emery

    Emery Registered

    Joined:
    Oct 24, 2010
    Messages:
    2,785
    Likes Received:
    1,380
    Definitely a cool tool... can see how it would promote longer race sessions. I really dislike the "practice for 30 minutes and race for 15 minutes" format that most public servers have.
     
  12. The Great Apt

    The Great Apt Registered

    Joined:
    May 3, 2020
    Messages:
    65
    Likes Received:
    35
    Does this still work?
     
  13. trichens

    trichens Registered

    Joined:
    Nov 2, 2020
    Messages:
    19
    Likes Received:
    3
    A bit late to respond, but yes it seems to be working OK.
    Basically you tell it when to start, when to restart and which is the rFactor2 server dialog it has to interact with.

    When the elapsed time is up it "clicks" the "Restart Weekend" so kicking off the server again.

    In theory it should work with multiple instances.
    However if you try that with the downloaded exe file then you get the warning...
    "An older version of this script is already running. Replace it with this instance?
    Note: To avoid this message, see #SingleInstance in the help file"

    However there is no help file with TSC and this message is actually coming from AutoHotKey which is the tool used to create this utility. If you download the source file and AutoHotKey you can run multiple copies - note that the exe file displays v1.3 but the source code is v1.31

    As far as I can tell Cubbi who first posted this hasn't been active in the forum for around two and a half years. I can provide a new compiled version if anyone wants it.
    Cubbi has suggested that others can contibute, does this need any other features?
    It could write to a log file for instance so that if multiple instances are being run it can record when the "Restart Weekend" process was clicked.
     
  14. trichens

    trichens Registered

    Joined:
    Nov 2, 2020
    Messages:
    19
    Likes Received:
    3
    Perhaps also handle multiple rFactor2 servers though one programme with a tabbed interface?
     
  15. trichens

    trichens Registered

    Joined:
    Nov 2, 2020
    Messages:
    19
    Likes Received:
    3
    New version available for download.
    No changes apart recompiled to latest version v1.31 which allows multiple copies to be run.
    Also some minor cosmetic changes


    upload_2020-12-29_18-13-39.png
     
    Last edited: Dec 31, 2020
    Corti likes this.
  16. trichens

    trichens Registered

    Joined:
    Nov 2, 2020
    Messages:
    19
    Likes Received:
    3
    Revised version v1.32
    Changed so that the start date/time can't be in the past

    Download v1.32
     
    atomed likes this.

Share This Page