The online racing simulator
LFS stats!
(465 posts, closed, started )
Freddy_P, I guess you solved the problem?
Oh yes. Sorry.

I had a password in my own server.

Merry Christmas, Chuck
v1.33 don't work under wine
hello smith!

thanks for the great program.

2 weeks ago i tried to get stats v1.32 working on our linux server to do live-stats.
and i wondered, it worked.
but after updating to v1.33 it won't work.
i allways get this output:
LFS stats! v1.33 (c) 2004-2005 Alexander 'smith' Rudakov ([email protected])
Connecting [127.0.0.1 29999 30000 ***pass***]
Error connecting to LFS: Sockets error 5

when i use the v1.32-exe, it works fine.

have you any idea what this could be?

ciao... paXton
Quote from paXton :2 weeks ago i tried to get stats v1.32 working on our linux server to do live-stats.
and i wondered, it worked.
but after updating to v1.33 it won't work.

The root of the problem might be my update of compiler to msvc 2005, as nothing in the sockets code's been changed...
Well, since now I'm avoiding halting on any sockets error less than WSABASEERR, so can you try if this one really works?
Attached files
stats.rar - 73.6 KB - 256 views
this one works. 8)

paXton
Quote :Spr and demo replays checking can be turned off (SprDemoCheck key),
erroneous results can occur if disabled;

can you explain what this exactly means and changes?
It changes nothing for you if you are not getting these weird sockets errors.
LFS Stats + LFS Spectator
Not sure it's a question I should ask here since LFS Stats works fine in the normal way.

ATM we're holding a league which can be followed through LFS Spectator. Afterwards the MPR gets scanned by this piece-of-art tool and the results are displayed online. So far so good.

Somehow the MPR part afterwards seemed a bit useless since LFS Stats can do it directly. I could distinguish 2 direct methods. The server method and the relay method.

Because I'm using LFS Spectator I can't use the server option on top of that since the port is already occupied, so I tried the relay option which was announced to be experimental. As you can see in my attachment the same race, one the MPR way and one the Relay way produced different results. results.rar So I guess a few packets were lost in space.

Now is there a sort of way to get these 2 (or more) insim programs work together ? Something that not only accepts packets but reads and forwards them ?

Regards,
DuVeL
Attached files
results.rar - 84.1 KB - 217 views
Change of topic (i.e. this isn't a bug report). I was thinking of a wonderful tool for recording the results of leagues, based on my participation in the Vixen Challenge.

My thoughts are like this: Would it not be a good thing to have a utility that can keep track of races over a season? All the race results can be recorded, various statistics can be calculated from it (like Autosport), and (with a bit of giggerypokery) apply a points system somehow too.

Some basic stuff would need to be made (like a gui), so that a race result can be 'imported' into a season. Support could be made for sprint and feautre races (as many leagues have this format) amongst others, and a variety of points 'styles' could be implemented (Vixen had championships for Sprint, Feature, Overall and Team).

Obviously it's a lot harder than it looks, but I was wondering as I am want to do, if anyone (smith or otherwise) would like to attempt something like this?

If not, no worries.
DuVeL, you figured everything right, relay server is what you have to use with multiple insim programs.
The thing is, stats currently doesn't always work as supposed to in relay mode, and I haven't traced why yet (frankly speaking, there are more exciting things around than that )
So, I'm afraid, mpr is the only way atm. To speed up things and eliminate mpr stage, you might want to ask one of the participator to run stats during race connected to his local game.

tristancliffe, the features you are talking of, they all are about a decent championship site! And in my opinion it's much easier to implement than extending current program's source to behave in the same way
scripting language+sql database+apache wins!
Quote from smith :So, I'm afraid, mpr is the only way atm. To speed up things and eliminate mpr stage, you might want to ask one of the participator to run stats during race connected to his local game.

OK, will do so.

Thx for the reply
I Think i've encountered a new bug. If a racer is crossing the finish line in the pits while he has a DT penalty, and the finishing positions of the other racers are not received yet by stats (ex. because some of they are lapped), the DT player is placed right after the number of finished racers, who have their correct positions.
This is because of I (and I thought, lfs too), count a finished player with uncompleted penalty as disqualified.
What penalty flag he's got in lfs finish table of that replay?
DT he has, but he is still placed as 2nd in the result (although in LFS he is placed at the bottom of the result table with DQ).

here is a link
I'd like to see the replay if it's possible.

EDIT:
thanks for replay, I'll try to fix the problem on weekend.
Sure!

You can have it here

Thanx
Mighty smith,
first of all thank you for this great tool .
I want to ask you if it is possible to add an extra report at bottom showing if someone during an mpr pitted (shift+s). It seems to me that this information is contained in a race tracking packet with ID IS_PLP. It'll be usefull for league replay supervisors as usually noone is allowed to pit with shift+s but anyone have to drive to pits.

Thank you
Razzone, if you set LogIngameMessages keyword to true in configuration file, file with all replay messages will be created along with main results.
All you need is just some grepping on this file to get desired information.
GerG, it should be fixed now (binary operators in one function were messed up), give me a sign if it is still screwed.

Bad thing is that finish position changes due to disqualification don't affect other tables and graphs, I know it's not accurate, but we'll have to live with it
Have you, or do you plan to, give out the source for this tool?
I would love to see how you did all of this. And I would like to learn how to decode all of the packets that LFS sends me.
BTW, awsome work on this, I use the CSV files that this program spews on in LFS : F1 stats. Thank you very much.
Quote from Dygear :Have you, or do you plan to, give out the source for this tool?
I would love to see how you did all of this. And I would like to learn how to decode all of the packets that LFS sends me.
BTW, awsome work on this, I use the CSV files that this program spews on in LFS : F1 stats. Thank you very much.

Thanks for your good words!
I'm not going to publish complete stats source since it's way too ugly. But, considering you weren't first person asking for some insim programming code, I decided to post something like typical insim barebone app (based on old Scawen's example, but adopted to S2 with relay server support). To add your flavour, all you have to do is just add your logic to main program loop.
This one is a C/C++ source with MSVS.Net 2005 project file, and I hope it doesnt need any more explaining itself.
Attached files
insim_app_barebone.rar - 86.2 KB - 216 views
Hi, your app is really great, but I can't get it to work with almost all replays from our legue. I don't know why, but just after the "Race started" message, it just say "Race Ended". Some replays with less racers works perfect, so I think that there is some kind of bug. It happens with both 1.33 and 1.34 versions.
Below is a link to one of the replays that doesn't work:
http://www.savefile.com/files/8231200
anibarro, I just checked that replay, and it works ok on my system. I think the problem is in your not very fast pc. lfs heavily calculates something on mpr replay start, and if that time is big enough (cant say exact numbers), like in your case with 20 players, insim connection is lost.
Solution? Ask someone with high spec cpu to make stats.
Thanks for you answer You are probably right, as my PC are quite slow :S
Race starts before stats.exe intialised..
I'm having some problems getting LFS stats running.. when I start the stats.exe program, it correctly comes up and starts going through the initialisation and then says "Waiting for the race to start.."

I hit restart on my lfs pc which duly comes up on LFS stats console that I am restarting the race.

However, by the time it has gone through the "Connecting [<ip address>] ... STA..VER.." the race is already started on my LFS pc, and the server is then back to square one "Waiting for the race to start.."

Anyone have any idea's as to what i'm doing wrong ? :pillepall
This thread is closed

LFS stats!
(465 posts, closed, started )
FGED GREDG RDFGDR GSFDG