Hey,
i have a task for you programmers out there :-) As you might have seen i am working on the tool
mprEdit. Currently i am preparing the next release which has a major change: Instead of collecting all "important" replay events and playing them back in the beginning of the replay i am creating a completely new replay header, resulting (theoretically) in a replay that looks and feels exactly the same like it had been recorded with lfs.
Now i have still one big challenge left: Coping with car body damage. The replay header has a section containing the damage for each car at replay start. To create this header i simply have to collect all "damage packets" that occur in the replay and put the in the header.
BUT
My analysis so far shows a discrepancy between the damage packets that are contained in the replay and in the damage data that is contained in the replay header. And i have no clue how the damage packets are combined/converted/whatever into the header!
Here is an example. XF GTi, crashing several times into walls.
Damage data from the header that contains all damage (The replay was started after all crashes had already happened):
052F FEBC
072D FEBC
0D1D FEBC
041D BE5D
0F20 3EB5
0B1B FEB2
091C C0B2
091F 80EB
0B1D 80EB
041B 3E55
0523 FEBC
071F FEBC
1125 00BB
1327 00BB
042A 7EFC
0630 7EFC
Damage data from the running replay (replay starting with an undamaged car):
[COLOR="Lime"]052F FEBC
072D FEBC
0D1D FEBC[/COLOR]
[COLOR="Red"]0F12 FEBC[/COLOR]
[COLOR="Lime"]041D BE5D[/COLOR]
[COLOR="Red"]0615 BE5D
0C17 BE5D
0E0C BE5D
0D19 3EB5[/COLOR]
[COLOR="Lime"]0F20 3EB5[/COLOR]
[COLOR="Red"]050E 3EB5
070C 3EB5
0C11 3E6E
0E11 3E6E
0506 7ED4
0706 7ED4
0410 7ED4
0609 7EDC[/COLOR]
[COLOR="Lime"]0B1B FEB2
091C C0B2[/COLOR]
[COLOR="Red"]040F C03C
0619 C03C[/COLOR]
[COLOR="Lime"]091F 80EB
0B1D 80EB
041B 3E55
0523 FEBC
071F FEBC
1125 00BB
1327 00BB[/COLOR]
[COLOR="Red"]0C1A 3E6E[/COLOR]
[COLOR="Lime"]042A 7EFC
0630 7EFC[/COLOR]
I would have expected that all information from the running replay is included in the header. But only the green parts are contained, the red parts are not.
I spent already a few hours trying to understand what is removed and why, but so far i found no clue.
So here is your task: Find out the correlation between the in-replay damage data and the header damage data! How can i recreate the header data from the existing in-replay data?
Notes:
The data comes from the exact same situation. One lfs instance was recording from the beginning, another instance joined the server at a later stage.
From my understanding each line (4 Bytes) represents force on the body, containing point where force is applied and direction and/or strength.
PS: Scawen, if you happen to read this - It would be awesome if you could explain this :-) But i am not expecting or demanding any help from you. I understand well if you don't want to support undocumented formats and unofficial add-ons.
Thanks very much for your effort