RenCloud / scs-sdk-plugin

ETS2 (Euro Truck Simulator 2) & ATS (American Truck Simulator) SDK plug-in. Telemetry data is shared via SharedMemory/Memory Mapped Files.
MIT License
185 stars 35 forks source link

Job Cancelled not being fired when cancelling a World Of Trucks Job #106

Closed MJRLegends closed 4 months ago

MJRLegends commented 1 year ago

Describe the bug Job Cancelled not being fired when cancelling a World Of Trucks Job

To Reproduce Steps to reproduce the behavior:

  1. Go to Load up ETS2 in single player
  2. Start a World of Trucks job
  3. Cancel job via F6
  4. Unable to obtain any event firing for Job Cancelled

Tested SCS Sdk Plugins v1.11 & v1.11.1 Tested Game Version 1.45

dowmeister commented 1 year ago

Unfortunately, it's an SCS SDK fault. No event on Telemetry.

MJRLegends commented 1 year ago

I wonder if theres any sort of detection i could do with the Telemetry we do have.

N95JPL commented 1 year ago

I wonder if theres any sort of detection i could do with the Telemetry we do have.

You could always keep an eye on cargo weight etc and if that changes without an event firing first then assume it's been cancelled?

RenCloud commented 1 year ago

Probably with the help of some other values. However, there could be some cases which you can detect more easily than others.

Maybe with the job values. They should be set empty or change after the simulation starts again when a job was finished before. Not 100% sure about that, when the event is not fired.

dowmeister commented 1 year ago

the problem with jobs removed suddenly if canceled in WOTR is that the result of this removal is the same in other gameplay moments, like profile change and save reload.

The same happens when the user suspend a WOTR job.

At telemetry level, the job simply disappear, the configuration event sends an empty job.

RenCloud commented 1 year ago

Correct, that was just for detection in theory, not a foolproof way for this kind of events.

You could in addition save the data and compare different values to check if it's another job or not. Based on the amount of fields checked against (Truck data, position etc.), you could lower the wrongly canceled jobs in your data due to leaving game, change profile, etc. But this will have its quirks, for probably a high effort. Never tried, but I know similar situation where this is annoying.

Sadly that there are no information about current profile, profiler changes and save loads. I think that would help a lot for different kind of situations.

dowmeister commented 1 year ago

Believe me, we at Trucky tried to go over this problem but unfortunately the SCS Telemetry, without any particular reason, in this case is really missing something.

So the most reliable thing to do is consider the job "in progress" until is restored or reloaded.