Running internals plugin on dedicated server

Discussion in 'Plugins' started by Leandros, Aug 10, 2019.

  1. Leandros

    Leandros Registered

    Joined:
    May 8, 2019
    Messages:
    12
    Likes Received:
    3
    I'm trying to get the InternalsPlugin example running on the dedicated server. I updated the JSON to enable it but it doesn't seem to create the output .txt files.

    Any ideas?
     
  2. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    6,249
    Likes Received:
    2,176
    Would be better to get some basics going in single player rather than throwing it straight on a server. What are you compiling it with?
     
  3. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    6,249
    Likes Received:
    2,176
    Note that the example.hpp only enables telemetry updates I believe. You should return true from WantsScoringUpdates() to get scoring updates, for example. Off the top of my head I'm not sure what a dedi server gets in the way of telemetry updates (and obviously WantsTelemetryUpdates() should be something other than 0 too).
     
  4. Leandros

    Leandros Registered

    Joined:
    May 8, 2019
    Messages:
    12
    Likes Received:
    3
    I have it running in the single player. It creates and fills the generated text files successfully, as instructed. I enabled both telemetry and scoring updates. I compiled it using VS2017 (v141) and kept it at 32 bit.

    I'm mainly interested in:

    - `mDentSeverity`, `mLastImpactET`, `mLastImpactMagnitude` and `mLastImpactPos` to detect any colisions
    - `mTrackEdge` to detect off-tracks
    - general scoring after quali & race is over
     
  5. Leandros

    Leandros Registered

    Joined:
    May 8, 2019
    Messages:
    12
    Likes Received:
    3
  6. Leandros

    Leandros Registered

    Joined:
    May 8, 2019
    Messages:
    12
    Likes Received:
    3
    To get it running you need to have the runtime of the VS you've used to compile installed. Once installed, I enabled it in the player config and it was working.
     
  7. Stefan_L_01

    Stefan_L_01 Registered

    Joined:
    Nov 18, 2012
    Messages:
    302
    Likes Received:
    130
    To detect exact offtracks (cut), you would need to know exactly the width of the car, and even if you know there is some deviation from car center to wheels.
    In the scene call there is a link to latest result file afaik. Of course you can track standings youself by the scoring, but as soon as someone leaves you need to implement some logic to track global standing
     
    Leandros likes this.
  8. Leandros

    Leandros Registered

    Joined:
    May 8, 2019
    Messages:
    12
    Likes Received:
    3
    Good to know, thanks!
    Couldn't I estimate offtracks? It doesn't need to be super precise, that'd be too punishing anyway. mTrackEdge will be negative if the car center is outside, right?
     
  9. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    6,249
    Likes Received:
    2,176
    No, trackedge says how far away the edge of the track is from the centre of the track, on the side that the car is on. But if a cut zone is defined it will give you the distance to that cut zone instead.

    The server will also have a less accurate version of that info.
     
  10. Leandros

    Leandros Registered

    Joined:
    May 8, 2019
    Messages:
    12
    Likes Received:
    3
    Ok, looking through the source a little more, I couldn't find out a good solution for detecting offtracks / cuts. Is this even possible?
     
  11. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    6,249
    Likes Received:
    2,176
    In the track :D

    If I were doing it, I'd have a compulsory client plugin communicating with the server directly, with track-specific guidelines on cut areas, and use the telemetry info for the current surface for each tyre.
     
  12. Leandros

    Leandros Registered

    Joined:
    May 8, 2019
    Messages:
    12
    Likes Received:
    3
    I feared I'd have to do it in the track.

    The surface type is a neat trick, though! Usually being on the grass with all four wheels means you're not on the track anymore. ;)
     

Share This Page