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?
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?
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).
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
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.
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
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?
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.
Ok, looking through the source a little more, I couldn't find out a good solution for detecting offtracks / cuts. Is this even possible?
In the track 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.
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.