SHWotever / SimHub

Multi sim dashboard, bass shaker driver, ....
http://www.simhubdash.com/
722 stars 95 forks source link

Missing "CodemastersDirtRally2.CarNames.csv" and strange CarID's (DC__210503112602) screw up Persistant tracker #812

Closed Shaftoe62 closed 2 years ago

Shaftoe62 commented 3 years ago

Something is terribly wrong with Dirt Rally 2.0.

I have difficulty accessing the Persistant Tracker properties.

What seems to happen that while in a running game the correct CarId is used. In my case 4-84-733 for the Mini Cooper. So during the race everything seems to work as expected.

But as soon as the race is over the CarId is changed into something like DC210503080047 or DC210503112602 (which look like some sort of timestamp) and all persistant tracker properties return a 0 (zero) value.

The timestamp id's remain the same during a Simhub Session and change when Simhub is rebooted. So it seems to be a Simhub issue.

Also: the file "CodemastersDirtRally2.CarNames.csv" is missing in my install. I've added it with the Mini Cooper S id/name but I hope you have it available somewhere?

Thanks,

Jurgen Gardenier

SHWotever commented 3 years ago

Hi !

Concerning the car names it's someting i experimeted for dirt rally 1, but the physics are so "simlplified" there are lot of duplicates in the "2", so i can't add the mapping. Concerning the "timestamp" cars it's expected, once the race is over the data is not sent anymore and simhub disconnects, so car (and other track infos) are not known anymore and the "unknown car" will be replaced by a self generated id, it's intentionnal.

Shaftoe62 commented 3 years ago

Ok, indeed I moticed that after the race not only data is no longer sent but all values revert to zero.

That includes all Persistant Tracker data.

That means I have to find a structural way to keep the 'in-game' (non-zero) values in my own variables if I want to use them outside the game.

I hoped that wouldn't be necessary but if that is how it is...

Thanks for the explanation.

Shaftoe62 commented 3 years ago

By the way, this doesn't answer my question about the missing "CodemastersDirtRally2.CarNames.csv" file...

SHWotever commented 3 years ago

Oh sorry I was unclear, when i started to map cars to their genereted ids (it's a combication of the idle rpm/max rpm/maxgears of the car in order to try to make a car "signature" (it would be way easier if the game would report at least a car id :( ) i faced instantly some duplicates which reduces strongly the interrest (there were only 2 or 3 in the first dirt rally) so I did not add it as it was not "meaningful". I can add it empty, but i fear it's not really accurate.

Here is the first pass I started : 4-84-733 Mini Cooper S 4-105-628 Citroen DS 21 4-99-681 Lancia Fulvia HF 5-94-785 Volkswagen Golf GTI 16V 5-126-733 Peugeot 205 GTI 5-126-995 Ford Escort Mk II 5-168-838 Alpine Renault A110 1600 S 5-178-838 Fiat 131 Abarth Rally 5-157-942 Opel Kadett C GT/E 6-115-932 BMW E30 M3 Evo Rally 5-136-785 Opel Ascona 400 5-105-890 Lancia Stratos 5-80-780 Datsun 240Z 5-152-838 Renault 5 Turbo 5-115-785 Ford Sierra Cosworth RS500 5-126-890 Lancia 037 Evo 2 5-147-817 Opel Manta 400 5-157-969 BMW M1 Procar Rally 5-136-838 Porsche 911 SC RS 5-136-942 Audi S1 EKS RX quattro 5-209-838 Peugeot 205 T16 Evo 2 5-168-890 Lancia Delta S4 5-126-942 Ford RS200 Evolution 5-110-995 MG Metro 6R4 5-157-817 Ford Fiesta R2 5-178-906 Opel Adam R2

I started to enconter duplicates up to this point and i stopped the mapping. In the first release of dirt rally 2 there where 58 cars and having duplicates in the middle was not a good sign.

SHWotever commented 3 years ago

CodemastersDirtRally2.CarNames.zip

Shaftoe62 commented 3 years ago

Aha. But if you have duplicate car id's by using maxGears/IdleRPM/MaxRPM, you will also have duplicate Persistant Tracker recordings...

That's not good.

By the way, did you see I added a spreadsheet with more (all) track id's in issue #813?

There a similar problem occurs with track id duplicates.

To identify map recordings you added the track-length but that is not enough in all cases to have unique id's. Check the cloud map 5175.91-5175.91015625.shtl, It's a bunch of spaghetti because it's actually two tracks: Gordolon - Courte Montée and Col de Turini - Descente. These are exactly the same length as well.

SHWotever commented 3 years ago

Exactly, it's still better than having an autogenerated car id which would make all sessions absolutely unique

Indeed codemasters telemetry is not helpful here, I did not spotted that mixed track i will look if I can split it in two, you talked about starting elevation, I will look what i can do, most of the reverse tracks have a very slightly different lengh (with full precision) , this will be tricky to split.

Shaftoe62 commented 3 years ago

Unforunately those two tracks are exactly the same lenght.

I use the Z-coordinate but I think what would work best is to make it something like this for the maps:

track_id + track_length (as you do now)

but also add:

(abs(gamerawdata_X / 10)).toFixed() (if you understand what I mean)

and

(abs(gamerawdata_Y / 10)).toFixed()

Of the first reported udp data.

I recommend ABS to avoid negative numbers.

And / 10 to have a bit of a margin. So you get something like this:

5175.91-5175.91015625-200-37.shtl for Gordolon - Courte Montée

and

5175.91-5175.91015625-25-12.shtl for Col de Turini - Descente

That will make them truly unique and is repeatable.

Shaftoe62 commented 3 years ago

I'm looking at the properties now to see if I can find a similar solution to the car id duplicates but that's less easy. Do you have a (up to date) source for the UDP data for Dirt Rally 2.0 from Codemasters?

SHWotever commented 3 years ago

I took a look for the maps, unfortunately, the starting elevation is only known at start so I can't have that information at any time (in case of pause for instance the data would be lost after the game stops sending data) or if the user starts simhub in a middle of a race, for now I just filtrered data to retain only one direction, except sectors colors being reversed it will be show a clean map, I've browsed all the other generated maps manually i could not see other issues like this particular one. The new map is already publicily available you just need to refresh the cache in dash studio settings or delete the file, ar simply wait 24hours, so the local version will be downloaded again,

You have access to all the properties here : image Unfortunately I hurted myself for a long time, and i can't see any significant fixed information which could help.

Shaftoe62 commented 3 years ago

Ok, that will work for the map exept for the sector colors (no big deal). DR1 had/has the same problem with exactly the same tracks.

You are right about the starting coordinates. I store these in separate variables at the start of a race to use them later if needed. But that won't work if you restart simhub or reload a dashboard of course.

Shaftoe62 commented 3 years ago

Are the "Available Properties" extracted form the UDP data in a generic way? Or do you have a 'manual' lookup-table to select the various properties?

I mean, are you 100% sure you have all available UDP variables as properties in SimHub?

SHWotever commented 3 years ago

Yes yes it's full automated, it exposes all the upd structure values automatically ;)

Shaftoe62 commented 3 years ago

Ok, that is what I was hoping on one side but it doesn't help with the car-id problem, unfortunately.

It means there is no other way to identify car models than the ones you are allready using (maxGears/IdleRPM/MaxRPM).

Alas...

SHWotever commented 3 years ago

I've made the full list, and as I feared lot of duplicates, I even tried to use the high precision bits of the maxrpm and idle rpm , but it does not improve the situation :

// Duplicates 5-178.023590087891-837.758056640625 Subaru WRX STI NR4/Fiat 131 Abarth Rally/Renault Sport Megane R.S. RX 5-178.023590087891-837.758056640625 Subaru WRX STI NR4 5-178.023590087891-837.758056640625 Fiat 131 Abarth Rally 5-178.023590087891-837.758056640625 Renault Sport Megane R.S. RX

// Duplicates 5-167.551605224609-890.117980957031 Lancia Delta S4/Peugeot 208 R2 5-167.551605224609-890.117980957031 Lancia Delta S4 5-167.551605224609-890.117980957031 Lancia Delta S4 Rallycross 5-167.551605224609-890.117980957031 Peugeot 208 R2

// Duplicates 5-178.023590087891-785.398193359375 Mitsubishi Lancer Evolution X/Peugeot 208 R5 T16 5-178.023590087891-785.398193359375 Mitsubishi Lancer Evolution X 5-178.023590087891-785.398193359375 Peugeot 208 R5 T16

// Duplicates 5-178.023590087891-774.926208496094 Skoda Fabia R5 / Volkswagen Polo GTI R5 5-178.023590087891-774.926208496094 Skoda Fabia R5 5-178.023590087891-774.926208496094 Volkswagen Polo GTI R5

// Duplicates 6-188.495559692383-811.578125 Ford Fiesta Rallycross 6-188.495559692383-811.578125 Ford Fiesta Rallycross (MK8) 6-188.495559692383-811.578125 Ford Fiesta Rallycross MK7 6-188.495559692383-811.578125 Ford Fiesta RXS EVO 5

// Duplicates 6-146.607666015625-733.038269042969 Mitsubishi Lancer Evolution VI/BMW M2 Competition 6-146.607666015625-733.038269042969 Mitsubishi Lancer Evolution VI 6-146.607666015625-733.038269042969 BMW M2 Competition

// Duplicates 6-178.023590087891-785.398193359375 Ford Focus RS Rally 2001/Seat Ibiza RX 6-178.023590087891-785.398193359375 Ford Focus RS Rally 2001 6-178.023590087891-785.398193359375 Seat Ibiza RX

// Duplicates 6-178.023590087891-837.758056640625 Renault Sport Clio R.S. RX/Peugeot 208 WRX 6-178.023590087891-837.758056640625 Renault Sport Clio R.S. RX 6-178.023590087891-837.758056640625 Peugeot 208 WRX

// Duplicates 6-178.023590087891-774.926208496094 Skoda Fabia Rally/Subaru WRX STX Rallycross 6-178.023590087891-774.926208496094 Skoda Fabia Rally 6-178.023590087891-774.926208496094 Subaru WRX STX Rallycross

// Duplicates 5-209.439514160156-837.758056640625 Peugeot 205 T16 5-209.439514160156-837.758056640625 Peugeot 205 T16 Evo 2 5-209.439514160156-837.758056640625 Peugeot 205 T16 Rallycross

// Duplicates 6-209.439514160156-874.409973144531 Audi S1 EKS RX Quattro/Volkswagen Polo R4 Supercar 6-209.439514160156-874.409973144531 Audi S1 EKS RX Quattro 6-209.439514160156-874.409973144531 Volkswagen Polo R4 Supercar

// Duplicates 6-188.495559692383-837.758056640625 Ford Fiesta Rallycross 6-188.495559692383-837.758056640625 Ford Fiesta Rallycross (Stard) 6-188.495559692383-837.758056640625 Ford Fiesta RXS EVO 5

4-83.7758026123047-733.038269042969 Mini Cooper S 4-104.719757080078-628.318542480469 DS 21 4-99.483772277832-680.678466796875 Lancia Fulvia HF 5-94.2477798461914-785.398193359375 Volkswagen Golf GTI 16V 5-125.663711547852-733.038269042969 Peugeot 205 GTI 5-125.663711547852-994.837707519531 Ford Escort Mk II 5-167.551605224609-837.758056640625 Alpine Renault A110 1600 S 5-178.023590087891-837.758056640625 Subaru WRX STI NR4 5-157.079635620117-942.477783203125 Opel Kadett C GT/E 6-115.191734313965-932.005859375 BMW E30 M3 Evo Rally 5-136.135681152344-785.398193359375 Opel Ascona 400 5-104.719757080078-890.117980957031 Lancia Stratos 5-80.4247741699219-779.743286132813 Datsun 240Z 5-151.843658447266-837.758056640625 Renault 5 Turbo 5-115.191734313965-785.398193359375 Ford Sierra Cosworth RS500 6-198.967544555664-1151.91735839844 Peugeot 306 Maxi 6-136.135681152344-942.477783203125 Seat Ibiza Kit Car 6-125.663711547852-942.477783203125 Volkswagen Golf Kitcar 5-125.663711547852-890.117980957031 Lancia 037 Evo 2 5-146.607666015625-816.814147949219 Opel Manta 400 5-157.079635620117-968.657775878906 BMW M1 Procar Rally 5-136.135681152344-837.758056640625 Porsche 911 SC RS 5-136.135681152344-942.477783203125 Audi Sport Quattro S1 E2 5-125.663711547852-942.477783203125 Ford RS200 5-109.955741882324-994.837707519531 MG Metro 6R4 5-157.079635620117-816.814147949219 Ford Fiesta R2 5-178.023590087891-905.825927734375 Opel Adam R2 6-115.191734313965-733.038269042969 Subaru Impreza 1995 6-202.423294067383-791.157775878906 Subaru Legacy RS 6-104.719757080078-785.398193359375 Lancia Delta HF Integrale 7-146.607666015625-733.038269042969 Ford Escort RS Cosworth 6-188.495559692383-774.926208496094 Citroën C4 Rally 6-207.345123291016-816.814147949219 Subaru Impreza S4 Rally 6-204.203536987305-837.758056640625 Subaru Impreza (2001) 5-186.924774169922-769.690246582031 Ford Focus RS Rally 2007 6-219.911483764648-785.398193359375 Subaru Impreza 5-157.079635620117-680.678466796875 Peugeot 206 Rally 5-188.495559692383-774.926208496094 Ford Fiesta R5 5-219.911483764648-837.758056640625 Mitsubishi Space Star R5 5-185.877578735352-743.510314941406 Citroën C3 R5 5-183.259567260742-774.926208496094 Ford Fiesta R5 MKII 6-178.023590087891-759.218200683594 Chevrolet Camaro GT4.R 6-188.495559692383-942.477783203125 Porsche 911 RGT Rally Spec 6-146.607666015625-863.938049316406 Ford Mustang GT4 6-104.719757080078-733.038269042969 Aston Martin V8 Vantage GT4 6-261.799407958984-785.398193359375 Mini Cooper SX1 6-172.78759765625-785.398193359375 Ford Fiesta Rallycross MK7 6-188.495559692383-994.837707519531 Volkswagen Polo S1600 6-198.967544555664-968.657775878906 Renault Sport Clio R.S. S1600 6-198.967544555664-994.837707519531 Opel Corsa Super 1600 6-161.268417358398-1598.54711914063 Speedcar Xtrem 5-167.551605224609-942.477783203125 Ford RS200 Evolution 5-115.191734313965-994.837707519531 MG Metro 6R4 Rallycross 6-167.551605224609-837.758056640625 Ford Fiesta Omse Supercar Lites 5-172.78759765625-816.814147949219 Renault Sport Megane RS RX

Shaftoe62 commented 3 years ago

Aie, that's really bad. But, it's better than nothing!

Does the high precision remove ANY duplicates at all?

And can I use this list for a "CodemastersDirtRally2.CarNames.csv"? Or do I need the 'old' id's?

I'd rework it a bit because I rather have all 2 or 3 car names at once than only one wrong one. I'd use this:

5-178.023590087891-837.758056640625 Subaru WRX STI NR4, Fiat 131 Abarth Rally or Renault Sport Megane R.S. RX

I appreciate the effort, thanks!

SHWotever commented 3 years ago

In the old version it's still using the old IDs (rounded) Since I'm already doing the breaking change for the trackids I joined this car id rework too just in case(better safe than sorry), unfortunately it does help here, but since it's the maximum precision possible it will avoid breaking it once again in case it would help for cars too. The car names will work as you shown but with a / instead of comma , only the first line will be taken into account (I just kept all of them for reference)

Shaftoe62 commented 3 years ago

Ah, ok.

What do you mean by the 'old version'? I have SimHub 7.3.13 running now.

SHWotever commented 3 years ago

My bad I'm going a bit too fast : I should have said "current" instead of "old", I'm always preparing the next one when it comes to fixes and evolutions that's why i tend to consider as "old" the latest public :D The beta links and changelogs are available on discord, here is the latest beta link : https://www.simhubdash.com/unofficial/SimHub.7.04.0b2.zip

Shaftoe62 commented 3 years ago

Ok, no problem.

And thanks but I think I will wait untill the next full release, as you are currently working on all those ID issues.

I'll spend my time on preparing for that big change as a lot my stuff depends on those ID's.

I'm gathering more and more data on the (real life) tracks of Dirt Rally 1 & 2. Including logitude/latitude and I'm busy making satellite maps for the DR2 tracks.

So I have plenty to do untill then...

For example:

image

Shaftoe62 commented 3 years ago

For which I'm also using the generated SVG files (based on the cloud maps) I send you an example of in another post :-)

Cloud maps become SVG's SVG's become PNG's PNG's become Google Earth Overlays Google Earth images become satellite maps.

Shaftoe62 commented 3 years ago

End result:

satellite_track 4860 19 Greece