How to extract sector times to send to server using third party application

Discussion in 'Programming' started by [CAMSO] Lurlidon, Oct 7, 2018.

  1. [CAMSO] Lurlidon

    [CAMSO] Lurlidon
    Expand Collapse

    Joined:
    Oct 11, 2017
    Messages:
    5
    Hey team,

    I'm attempting to find a way to pull sector times (times between checkpoints) from BeamNG to then post to a server. I have looked into Beam UI apps, but have found their I/O and HTTP is blocked. I then looked at reading the output log (-console) but BeamNG boots up it's own console instead of writing to standard, so I'm not sure how to read it. Additionally I could watch for writes to the highscores file but I believe this only saves full lap times not sector times?

    The console (from booting with -console) currently doesn't post as much information as I want, but I presume a lua mod that prints times to the standard output when each checkpoint is hit would solve that?

    So what would be the best way to get this info out of beam? If the log is a plausible solution, how can I actually access Beam's standard output using something like C#'s Process()?

    Thanks,
    Isaac
     
    #1 [CAMSO] Lurlidon, Oct 7, 2018
    Last edited: Oct 7, 2018
  2. Nadeox1

    Nadeox1
    Expand Collapse
    BeamNG.Support
    Staff Member

    Joined:
    Aug 5, 2012
    Messages:
    13,139
    This section is fine.
    For security reasons, the game only allows connection to our services.
    If you are trying to use your own server, you will find the connection being blocked.
     
  3. [CAMSO] Lurlidon

    [CAMSO] Lurlidon
    Expand Collapse

    Joined:
    Oct 11, 2017
    Messages:
    5
    Right, that is as I expected and experienced. I did notice you could pull data down from API.Steam though, like you do for the news.

    I presume then, reading the console or a log file will probably be the only way to pull this sort of data out of Beam? If that is the case, has anyone made a similar app in the past?
     
  4. tdev

    tdev
    Expand Collapse
    Developer
    Staff Member

    Joined:
    Aug 3, 2012
    Messages:
    2,831
    Connections to localhost should work, just not to public servers.
     
  5. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,788
    Like tdev mentioned, localhost works, so you would need some program that picks up that localhost and then that program sends data to server, at least that is my understanding how it should work.

    You can't make data to be send directly from BeamNG, but using some C#, java, python, whatever language you know, program you could get around of that limitation.

    Downside is that you would need to have that program running on user's computer and they would need to install that extra program, but it should not be too difficult to make really.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice