The online racing simulator
Get race results from a (xml?) file
I'm working on a raceleague manager where teams and drivers can be added and results can be entered so that everyone can check who's the best driver and who sucks.

Here's the topic containing more information about the application:
http://www.lfsforum.net/showthread.php?t=32211

One of the best features is that you can import rFactor XML files, in stead of entering everything from a race result manually.

I was wondering if a similar thing could be done with LFS. Does it create a file after a race? or is all the racedata reachable through lfs world?

If anyone has an idea, it would be much appreciated .
All the data you should need can be found in the header of the MPR or SPR replay file

The fileformats are found here:
http://www.lfs.net/?page=coderfiles
<shameless plug>

My little program LFSPoints will create XML files of race data from multiplayer replays. You just add whichever replays you want to use to the championship, then click on File > Export, select Export Replays, and save the data as an XML file.

The export then basically just takes all the MPR header data and converts it into XML.

http://www.lfsforum.net/showthread.php?t=31513

</shameless plug>
DarkTimes, would you have a rough spec for your XML format? Perhaps we can combine it with rFactor's output and get some sort of common format and a bunch of converter scripts / programs. I know that there was discussion on this a little while ago and, correct me if I'm wrong, it ended up with a little bickering..

That might make DemonTPx's, and anyone else who's working on similar projects, lives easier..
I've never sat down and worked out a spec, but here is an example of the sort of XML files LFSPoints creates.

I used to have a nice little InSim app that basically just wrote out each packet as XML, but that got lost when my PC died last month.
Attached files
LFSPoints_XML_Example.zip - 2.8 KB - 174 views
Looks good, DarkTimes. I'll try to create an import function for that .

EDIT: mpr files look good too, but aren't those a bit too big to upload to a website? I cannot check right now, I'm at my work.
Quote from DemonTPx :EDIT: mpr files look good too, but aren't those a bit too big to upload to a website? I cannot check right now, I'm at my work.

Shouldn't be.. Unless you're talking about a 32 man / person endurance race they're usually less than a few hundred KB, at most.
Bin there, done that

Ok, from the start. I have written a league manager which consists mainly of two programs.
The first one generates a stats file from the replay (live recording on the lfs server also works).
It is not xml. I use a simple CSV like format, but extending to store XML should be a simple task.
Here is an example of the current format: http://liveforspeed.at/files/WE1_race_0710041939.gstats
The tool is written in Java and the source is here (Apache 2.0 License):
https://openbakery.org/svn/repos/trunk/gstats/
and here
https://openbakery.org/svn/repos/trunk/gstats-common/

The second tool is a module for the drupal CMS (http://drupal.org) with is written in PHP. Here multiple leagues can be created with different rules. The stats file generated with the first tool can be uploaded and stats, graphs standings are dynamically generated.
See: http://liveforspeed.at/?q=league/results/41 and http://liveforspeed.at/?q=en/league/standings/5
The source code for the drupal modules is here (GPL):
https://openbakery.org/svn/rep ... nk/drupal/modules/league/
and here
https://openbakery.org/svn/rep ... pal/modules/league_graph/
Quote from the_angry_angel :Shouldn't be.. Unless you're talking about a 32 man / person endurance race they're usually less than a few hundred KB, at most.

Great! Could you pm or mail me one or two of those files please, so I can implement an import function?
Quote from Brilwing :Bin there, done that

Ok, from the start. I have written a league manager which consists mainly of two programs.
The first one generates a stats file from the replay (live recording on the lfs server also works).
It is not xml. I use a simple CSV like format. Here is an example: http://liveforspeed.at/files/WE1_race_0710041939.gstats
The tool is written in Java and the source is here (Apache 2.0 License):
https://openbakery.org/svn/repos/trunk/gstats/
and here
https://openbakery.org/svn/repos/trunk/gstats-common/

The second tool is a module for the drupal CMS (http://drupal.org) with is written in PHP. Here multiple leagues can be created with different rules. The stats file generated with the first tool can be uploaded and stats, graphs standings are dynamically generated.
See: http://liveforspeed.at/?q=league/results/41 and http://liveforspeed.at/?q=en/league/standings/5
The source code for the drupal modules is here (GPL):
https://openbakery.org/svn/rep ... nk/drupal/modules/league/
and here
https://openbakery.org/svn/rep ... pal/modules/league_graph/

Thats only for LFS I see. Paddock is for LFS, rFactor, <your favorite racing game here> and it can also be used for real-life racing leagues.
Quote from DemonTPx :Thats only for LFS I see. Paddock is for LFS, rFactor, <your favorite racing game here> and it can also be used for real-life racing leagues.

For the first tool yes.

But the second tool depends only on the gstats file format, or to be more precise the mysql db schema. I don't know rfactor, but if you have a results xml and convert it to my format than you can also manage rfactor league. Theoretically

There was a discussion about a common xml format some time ago, but nothing came out of it.
(I also mentioned there that a common xml format should be racing game independend: http://www.lfsforum.net/showthread.php?p=388497#post388497)
Quote from the_angry_angel :DarkTimes, would you have a rough spec for your XML format? Perhaps we can combine it with rFactor's output and get some sort of common format and a bunch of converter scripts / programs. I know that there was discussion on this a little while ago and, correct me if I'm wrong, it ended up with a little bickering..

That might make DemonTPx's, and anyone else who's working on similar projects, lives easier..

Yeah, no one could decide what they wanted the format to be or to look like. At the end of the day, I wanted something portable, non-specific the each game. Not my issue any more as I've sold SimFIA.

FGED GREDG RDFGDR GSFDG