The online racing simulator
Searching in All forums
(183 results)
MikeB
S2 licensed
Release 0.4.0 is available! See first post for info
MikeB
S2 licensed
Quote from MaKaKaZo :From the reference that info must be at the beginning here:
[FONT=FIXED SYS]num unit offset description
--- ---- ------ -----------

6 char 0 LFSMPR : do not read file if no match
1 byte 6 game version : ignore
1 byte 7 game revision : ignore
1 byte 8 MPR version : ignore
1 byte 9 immediate start : joined already running game
[COLOR=Red][B]1 byte 10 reserved : -
1 byte 11 reserved : -
1 int 12 rules : -
1 int 16 flags : -[/B][/COLOR]
1 byte 20 laps byte : laps / hours (see notes)
1 byte 21 skill : skill level (0,1,2,3,4)
1 byte 22 wind : 0=off 1=weak 2=strong
1 byte 23 num players : players at start of race
8 char 24 LFS version : text, ends 0
4 char 32 short track name : e.g. BL2R
1 int 36 start time (UTC) : seconds from 00:00 1/1/1970
32 char 40 track name : text, ends 0
1 byte 72 config : 1,2,3.. (first config is 1)
1 byte 73 reversed : 0=no 1=yes
1 byte 74 weather : 0,1,2.. (first weather is 0)
1 byte 75 num finished (NF) : players in results table
1 int 76 0 : -
NF result 80 RESULT INFO : (see below)[/FONT]

In my opinion it should one of those fields.

Thats what I also think...
Quote from MaKaKaZo :Maybe the best thing would be to generate a handful of mpr files and check those values with an hex editor.

Yeah, but i hoped that someone already did this and knows the meaning so I can save the time to try to figure it out myself
mpr header - "rules" and "flags"
MikeB
S2 licensed
I want mprEdit to support different session types (currently only race works well, qualy and practice sessions have some issues with regard to extracting length of replay and time of certain events...). To my surprise the info about session type is not documented in the mpr header info.
There are only two flags mentioned:
1 int 12 rules : -
1 int 16 flags : -

So, does anybody here know where the session type is stored and/or what's the meaning of these two flags? Or do i have to find out myself again

Or did i just miss the obvious somewhere?

Thanks and regards
Michael
MikeB
S2 licensed
Quote from Pablo.CZ :After several minutes in nKP I returned to LFS and I thought my force feedback is broken I started to investigate whats happened and realized that in low speeds there is almost no FF. Take for example XRR and turn with steering wheel from side to side in 40km/h, neutral. Do the same in 10km/h, 5km/h, 0km/h. IRL resistance from steering wheel is smaller in higher speed, in LFS bigger (I mean rolling, not agressive driving).

Maybe this is related to the setup. There is a HUGE difference in steering resistance at lowspeed/standstill depending on setup geometry, diff settings, tire pressure etc.
Changing helmet skin during session not working
MikeB
S2 licensed
(Observed and tested with patch Y)

1. Join a server
2. Join race
3. go to Options->player and change model and helmet skin
4. Observe that the driver model is updated immediately, but the helmet skin remains the old one.

Having a look at the mpr data i recognize there actually is a package describing the new model and the new helmet skin. But the new helmet skin is just not applied:
750F FC01 1E00 04[COLOR="Orange"]08 2719 00[/COLOR]18 3727 0000 18C4 BD0C [COLOR="YellowGreen"]496E 6A65 7874 5F50 524F 5F42[/COLOR] 0000 0000

The Orange part is the changed driver model, the greenish part is the new helmet skin (hex for "Injext_PRO_B").

I admit that it is questionable if changing model and helmet while in-car should be possible at all. But the current implementation is inconsequent - Either none should work or both

Replay is attached. Just use Shift-U to watch the driver - The model changes from male to female, but the helmet skin stays the same, although the new skin is "Injext_PRO_B".

Btw: When the driver of a car is changed in-game (using the "T"-Button) the model AND the helmet skin are changed correctly
MikeB
S2 licensed
Quote from MaKaKaZo :I don't know how this is going to work, but if all damage events are going to be showing in a drop list or similar it should possible to disable damage events as in some combinations there are damage events every single lap. For example with the BF1 your suspensions usually get damaged every 2 or 3 corners, and that would be a lot of damage events for a 30 laps race.

You are right, but luckily(?) it is only about damage to the car body, not suspension or any other type of damage. But still you have quite a long list of damage events in case of e.g. a crash with multiple roll-overs. For now i will not add a filter option but that might come in handy for later releases
MikeB
S2 licensed
In case you wonder whats going on with mprEdit: I am still working happily on this tool. Of course i know that the next patch will support replay rewinding etc, but i still think mprEdit is a useful tool. Besides of that - it is fun to develop And besides of that - I still have lfsTV reviving thoughts circling in my head, and to be able to do this i definitely need 100% understanding of mpr files.

I am already quite far with the next version (see below for list of important changes), but i will definitely wait for the Patch Z before the next release to make sure that mprEdit is 100% compatible with patch Z replays.

Major changes so far:
  • I finished the transition to generate the header on-the-fly. This has the nice effect that i do not need to include all important events in the beginning of the replay. Instead the replay will look and feel exactly like it has been recorded with LFS. (this is the biggest change since it required a lot of changes under the hood and much time to demystify the mpr format. But for my future lfsTV plans this is needed and is definitely a cleaner solution than the previous workaround)
  • Support separate Driver/Car selection for start- and end-event
  • Add detection of Body damage as replay event (thanks to Scawen for providing some internal info about damage calculation !)
  • combine event- and time-based splitting. If you select an event this will just set the startTime or end-time accordingly. So you can easily set the time to few secs before till after an event.
  • Added an icon (thanks to [ZT] Orion !)
Some new things you will be able to do:
  • Split a replay starting few seconds befor a BODY_DAMAGE event to see the crash again
  • Just use mprEdit for replay analysis - It gives you the exact time of an event. Combine this with the patch Z replay functionalities to directly jump to that time.
MikeB
S2 licensed
Thats great, thanks Orion :-)
Of course you will get credits for the icon
LFS icon usage question
MikeB
S2 licensed
Short question:

Is it okay if i use the lfs icon (http://www.lfsforum.net/favicon.ico) as the application icon for mprEdit? Who should i ask?

Thanks
MikeB
S2 licensed
Quote from Scawen :The second byte in a damage node is the severity of the damage. Only the 16 most severe damage nodes are retained.

When a new damage node arrives, if it is greater in severity than any existing damage node, the least severe node is removed and the others are shunted down so the new node can be added to the end of the list.

Is it just me or does that green text on a light blue background make your eyes go funny?

Great Scawen, big thanks for the answer! You just made me another happy customer

PS: And yeah, the colors are a bit disturbing
mpr damage - help needed
MikeB
S2 licensed
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
Last edited by MikeB, .
MikeB
S2 licensed
Quote from Scawen :
EDIT : Although, for MPRs an easier thing could in fact be done, than a perfect game state save suitable for an SPR, using something like an MPR header. In short I imagine that will be done at some point but not in Patch Z.

EDIT 2 : You have got me thinking... anyway, it's on my notes now but I don't know when it will be done as I do have quite a lot of urgent things to do.

Hey, on-demand mpr-header creation is what i am currently working on for the next major release of mprEdit
Scawen, I'll let you know when I'm finished so you can take over my code (lol, just kidding :tilt
MikeB
S2 licensed
Bug fixed and version 0.3.3 released - see first post for updates.
MikeB
S2 licensed
Thanks for the info, i can reproduce the issue here. The problem is that some driverchanges are not recognized by mprEdit, resulting in cars being removed from the replay when the driver leaves the server (because mprEdit still thinks he is "owner" of the car).
Now i need to find out why the driver change is not recognized
MikeB
S2 licensed
Quote from MaKaKaZo :I have a couple of suggestions. I think I (or somebody else) already made them but now that the basic stuff is working reliably I guess you could start thinking about a workraound for this:

1) Fixing race positions/number of laps.

When the replay starts everybody's position and lap are messed up. Everybody's lap is 1 until they cross the start line and then their lap number gets fixed. With race positions I'm not sure how they are generated but they are incorrect and they don't get fixed when racers cross the start line.

It would be nice that mpredit could automatically fix these two things so that at the moment that the replay starts everybody's position and lap are correct and you know tha actual situation of the race.

Yeah, I know that this is very annoying. But there are some things that need to be changed in the way mprEdit works before i can really fix these issues. I need to implement proper setting of initial car & driver status, instead of just putting all "important" events to the beginning of the replay. This still needs some research and will definitely take few more weeks. But when that is done a cutted replay should be exactly the same like a replay saved by lfs

Quote from MaKaKaZo :2) Possibility to choose what driver is the focus (camera) on when the replay starts. I don't know if this is even possible, but would be nice.

I THINK that at a replay start always the first position is in the focus. (Can you confirm?) If that is the case this will "automatically" fix with the change for the correct lap and position info described above. But this also means it will not be possible to freely select any player for the initial focus.

Quote from DeadWolfBones :If I tried to cut a small replay of the last few laps of the race, it appeared to work correctly but when I'd go in-game to view it, it would only show one car on-track (where there should have been 21 or so).

The full replay is here: http://www.spdoracing.com/events/replays/2454.mpr

Cut replay is attached.

Thanks for the report, i will have a look at it ASAP. Is the problem always appearing or only with certain split parameters? If not always, please provide the split parameters you used. Thanks
MikeB
S2 licensed
Quote from MaKaKaZo :Thanks for the new update

I remembered why I wanted to be able to select another pilot for the ending. There are some times when there's an accident and the pilot disconnects after getting upside down, but I don't want the replay to end either when he disconnects or at the end of the actual replay, so I'd rather pick another driver for the ending point.

Yeah, that's still on my TODO-List
MikeB
S2 licensed
Version 0.3.2 beta now released! Check the first post for details.
MikeB
S2 licensed
You got it :-) Sorry i did not answer before, but i am currently short of spare time due to additional workload at my job :-(
MikeB
S2 licensed
Quote from Gai-Luron :Hello,

I have some question for you MikeB

Funny that you are getting to the same difficulties i had before But i think can help you now

Quote from Gai-Luron :Along the replay UCID change permanently, there is a packet where i can find this modification?
For now, i update UCID when it's change in Frame. I Need this info for message parsing. Unfortunately, message send only UCID. Retrieving message parsing work with this method perfectly.

If you know how it is working the answer is easy But it took quite some time to figure this out: There is no package notifying you of changed UCID. Instead the UCIDs are changed by LFS automatically everytime a driver leaves the server. The driver with the highest UCID is moved to the UCID of the driver that has left the server.
You can find this in my code in method
CReplay::compactConnectionTable

This way it is always assured that there are no "holes" in the list of connections.

Quote from Gai-Luron :Now and this is my big problem, some STARTFINISHLINE packet are missing in replay. It's normal or there are an other packet sending this info or i make a mistake? I try to find if lap time are assigned to another player, but this laptime don't appear in any place in the replay.

The packages are not missing, but they are kind of delayed. Sometimes a packet does contain additional data after the first part. Have a look at method
CTimePacket::checkEvent

There I read the data size and packettype (Bytes 7 and 8). If the packettype is unknown i jump forward by the size of data and interpret the following data again with the checkEvent() method (see default-handler of switch statement). This is repeated until the end of the package is reached.
You definitely need this handling, because not only STARTFINISH events are sometimes located in this "delayed" data, but also other events sometimes are contained in the later data.

Quote from Gai-Luron :If i get ENTERPIT frame, there are not UCID or PLID? so strange, but LEAVEPIT yes!

Yes, thats true. For ENTERPITS there is only the carID available. For leaving pits there is also the connectionID.

Quote :And the last, what is the Frame 0xFD? I think it's possitionning or MCI ( insim ) packet like? i'am right?

I am not sure - I think it just contains the "normal" race data like car position etc.

Hope I could help you

Mike
MikeB
S2 licensed
Quote from MaKaKaZo :Suggestion: To be able to set the start and ending points at events of different drivers. I mean, like the resulting mpr starts when driver A begins lap 10 and ends when driver B enters the pits. This may be a little troublesome, but I've had times when I'd liked to be able to do this.

This little app has saved me a lot of time for when reviewing accidents and for making video captures.

I get the most out of it when using it with lfs-stats. In our league we generate stats for every race and division with lfs-stats which are put online. The graphs generated at the end of the stats file give you quite an accurate view of when you come across a certain someone during the race, be it an overtake or an accident. Then I just cut the mpr file using mpredit and I got it

If you are interested in understanding that better. Here's an example:
http://www.q3team.es/estadisticas/20080317/1/indexR.html

That's last week's race, in which I happenned to win but was given a penalty. In the last graph you can see that I ([Q3] makakazo) had an incident with a car at the beginning of lap 14, as a line touches mine and suddenly drops.

I didn't remember which lap that was at all after 40 laps, but using the stats you can easily find incidents involving any car, and then using mpredit you can cut the exact point you need, be it a 50 or 100 laps race or whatever

Hi Makakazo,
I also thought about making start and end events from different drivers possible. I hesitated because i think it might make the GUI too complicated. But i think you are right, it might be really usefull.
=> Suggestion noted for future release
MikeB
S2 licensed
Dont worry, I am just about to implement support for time-based splitting Last week I had a business trip to US so i had plenty of time during the flight... So the next release will support splitting based on race time
MikeB
S2 licensed
Quote from banshee56 :In LOTA, I process protest by first getting a replay snippet (thank you mprEDIT!!!!) that is as small as possible. This was a life saver in race 1 of our latest league in which we had 3 protests that were several laps deep into an hour long race.

If I know the accident happened on lap 3 in the turn at the end of the Blackwood backstraight, I get it on the lap of the incident, starting with going into sector 2 of lap 3 and ending with going into lap 3 sector 3 and indicate who to follow. Invariably, it doesn't follow the driver I asked about, and I have to pause, bring up the connections list, select the driver, and then start the replay.

Either fix (sorry if it has been already) the "follow car..." part, or start the replay paused.

To understand you right: You expect that lfs should start replay playback with camera focus on the car selected in mprEdit? Thats an interesting idea... But I have not much confidence that this can be influenced. Probably by changing the order of the Cars in the replay header, but that might have other side effects. I'll give it a try
MikeB
S2 licensed
Hmm... If i need to go the "real" 3D way: I am using QT for the GUI which has already built-in openGL support. Is there some sample code available anywhere how to load a car model and attach a skin using only openGL without any additional libraries?
mprEdit - Admins wishlist
MikeB
S2 licensed
Hi,

I am posting here to collect information about what you, the league admins and marshalls, are expecting from future mprEdit development.
(In case you don't know mprEdit yet, check this thread for information!)

As it seems the core functionality is working quite well, so now I can start working on a proper GUI and potential new features. So I would like to ask you:
- What is most annoying with mprEdit?
- What feature/functionality are you missing?
- Where do you see room for improvement?


To get you started, here is a list of already requested features in the main thread:
  • Geforz: Relabel "save" button to "save as" to indicate that the replay will not be overwritten [already integrated in my version]
  • J.B.: remember the mpr folder location for future use [already integrated in my version]
  • J.B.: display names without the colour coding characters [already integrated in my version]
  • J.B.: add a "save and load in LFS" button (preferably in a new instance of LFS in case it is already open)
  • MaKaKaZo: Possibility to create several files at one time. Like, you have a '+' buttón below the main pilot/selector that when pressed adds another line in which you can choose another pilot and beginning/ending point. You can add as many as you want and they are created as "filename_#.mpr".
  • MaKaKaZo: Possibility to create a single mpr file with the content of some laps concatenated. Based on the idea above, you select a few intervals and decide to either create separated files or one file with all the contents that would simply "skip" the parts not choosen.
  • Simon: automatic split of replay by laps. If race has 24 laps, mprEdit splits replay into 24 replays. Could be very interesting for movie making.
Last edited by MikeB, .
Display bmp of car with skin applied, C++
MikeB
S2 licensed
Hi there,

i am thinking about how to improve the GUI of mprEdit. Currently I have the idea of a car/driver selector, which shows an image of the car with the according skin applied. However i do not want to integrate full 3D rendering in my app
So my question is: Has anybody done something like this before? Or any idea how to do it "the easy way"? I want to achieve a look like this:

(image from lfs.net)
But rendered "on-the-fly" with the skin that the current driver is using. I am not sure it is possible at all, but maybe someone has a great idea?
FGED GREDG RDFGDR GSFDG