View Full Version : UDP data packets - matching driver names to timing data

30-10-2017, 08:34
Ayup chaps,

I'm working through the UDP format updating The Chief, and have run into a problem that I don't seem able to solve. I hope I'm missing something here - perhaps one of you clever folks has already worked out the solution and can share it? Here goes....

The UDP data is split into different packet types. One packet contains timing data for race participants. There are 32 slots in this packet, and each slot contains stuff like race position, current lap time etc. Another packet contains driver names - there are 16 names in this packet. If there are <= 16 drivers in the session I can match the names to the timing data simply by matching the array indices. But when there are more than 16 drivers, at some point (I assume...) the game is going to send the names packet for drivers 16 to 31 (or whatever).

I can't see any way to tell that a name packet is for drivers 16 - 31 (instead of drivers 0 - 15). The old UDP data had a driversOffset int in the names packet (or the pcars1 equivalent of this). So when I got names for drivers 0-15, the offset would be 0. When I got names for 16-31 the offset would be 16.

There's one more piece of data in the names packet - a participantsChangedTimeStamp. This is also in the timings packet. Perhaps I'm being thick here, but I can't see how to use this time stamp to reconcile the 2 sets of data.

Anyone got any pearls of wisdom?



30-10-2017, 08:59
Just had a very helpful response from one of the devs:

In case of 17+ participants two packets with names are sent one containing 1-16, second one with the rest.
The header of the packed holds the ordering
(see packet base definition, mPartialPacketIndex + mPartialPacketNumber).

So it is possible to match them up :)

02-11-2017, 23:30
Sure it will change gradually. I also confirmed.

03-11-2017, 05:21
When I checked all the data, there were two things that (mPartialPacketIndex + mPartialPacketNumber) could not be solved.
that is,
Unlike other data, mPartialPacketNumber is fixed at 2, and when mPartialPacketIndex is only 1, it remains 2.

...What shall we do?

03-11-2017, 05:33
Excuse me. The only thing weird was sParticipantVehicleNamesData. The mPartialPacketIndex of this seems to be only the value of mPartialPacketNumber - 1.

10-11-2017, 21:22
Are you actually getting names in your ParticipantsPackets? I'm never getting anything... just blanks. Wondering if it's a bug on the PS4 end or on my end.