LFS stats! v1.42 (c) Alexander 'smith' Rudakov 2004-2006 (piercemind@gmail.com) 1. General information 2. Requirements 3. Usage instructions 4. Configuration 5. FAQ 6. Miscellaneous information 6.1. Template files 6.2. A few advices 6.3. Thanks 6.4. Additional information 6.5. Update log 1. General information This program is developed for making some general and statistical information of Live for speed S2 races. It is very useful for long/league races. ATTENTION! There is no technical support on this program at all, so use it on your own risk! 2. Requirements To use stats.exe you need modern Windows installation and purchased Live for Speed S2 0.5T or newer. It is reported that the program runs fine under WINE as well. 3. Usage instructions 1) chose your ConnectionMethod and change other required parameters in stats.xml 2) run lfs.exe 3) being in lfs, type: /insim 65000 (note that 65000 is default port value and can be changed) 4) run stats.exe 5) start replay and wait util it ends 6) on race finish (when everyone finished) stop replay, stats.exe closes itself and race information files are created in files according to templates assigned in stats.xml. Note #1: you'll need *.tsv-like files to generate race graphs. Note #2: Relay connection is not recommended, please use direct local connection for best and almost bug free results. 4. Configuration You can adjust some of the program's variable parameters by editing stats.xml. Note that parameters are case-sensitive and their values are not validated, so use your built-in sanity check to avoid getting weird errors. You can specify configuration file name as a command-line parameter when launching stats. Default configuration file name is stats.xml. 5. FAQ Q: Could somebody explain the 'Lap times stability' section please? A: The lower the stability number - more stable one's lap times are. Only racers who completed more than 2 laps are present in stability table. First lap time is excluded from calculation. I use the following deviation formula to calculate stability. Example of calculation for one player: stability = sqrt(sumN((AverageLapTime - LapTimeN)^2) / (N - 1)) where: N - number of laps; AverageLapTime - Player's average lap time; LapTimeN - Player's time of Nth lap; Q: I made a stats for our 2h endurance race and it didn't show penalty - drive through.. it's an bug or it can't show it? A: It shows only not completed penalties in results. That is a limitation of LFS, only not completed penalty information can be obtained on race finish. Q: Why it shows 0 pit stops for an DNF racer, while I know he did at least one? A: Since there are no pit-related insim packets (yet?), there is no possibility to determine number of pit stops other than getting their number on race finish. If player hasn't finished, pit stops count is not available. Q: Some of the players are marked as DNF in results table, although they completed the whole race. What's wrong? A1:Replay has ended until every single player finished their final laps, so no correct results information is available. A2:Some players disconnected or entered spectate mode before their final position in ingame race results table was decided, thus, no race result packet was sent for them by LFS, and they will be marked as DNF. Q: Everything stats generates is terribly wrong! Wrong times, bestlap times, positions, graphs... A1:Stats is designed to work with S2 replays, Demo replays are not supported. A2:Have you used relay connection? It's not reliable due to some stats issues. A3:Shit happens... Q: I don't understand what flags values means. A: k = keyboard m = mouse w = wheel ag = auto gears ac = auto clutch gb = gear change blip gc = gear change cut bh = brake help th = throttle help Q: I start lfs stats [...] it calculate lap times,chat,etc... but when race ends program shuts and it wont write to results! A: Most probably you are trying to make stats of single player or demo replay. These replays are not processed by default. To counter that, set SprDemoCheck key in configuration file to false. Also there might be no finished racers, so you'll have to disable AtLeastOneFinishedCheck key to get results. 6. Miscellaneous information 6.1. Template files Current implementation of templates is very basic. It does work, but it is not capable of detecting unmatched brackets and similar errors, so please be careful while editing, or you'll get some unexpected results :) 6.2. A few advices Do not set replay speed too high. Ideally it's best when you run it at 1x. If your PC is fast enough, use higher speeds. It is recommended that you leave computer alone while re-playing. Violation of these requirements can render stats inaccurate or even interrupt stats gather process. It's due to some insim packets can be lost, what is absolutely fatal. If stats.exe is terminated abnormally (yes, it still can happen), make sure to re-initialise LFS insim system (/insim 0) or restart LFS. There is results2.css file in distribution. Make sure to put it together with generated results html files to make statistics page look properly. 6.3. Thanks I'd like to express my gratitude to those, who helped me to perfect the program in one or another way (no particular order): DevilEST, ekze, Eza, FreddyP, n|inCogNito, Neuron, AttaHorse. Thanks to asman for creating a very nice looking banner! 6.4. Additional information This program was developed using TinyXml library (www.sourceforge.net/projects/tinyxml), original code (2.0 and earlier) copyright (c) 2000-2002 Lee Thomason (www.grinninglizard.com) 6.5. Update log v1.42 - Added qualification support; - Added ability to use LFSWorld's statistical data in comparision tables (UseAndUpdatePubStats keyword, enabled by default); - Re-touched template files;