About this script - the basics
mpRes is a php-script, designed to analyze multiplayer replays gathered from the racing simulation Live for Speed and to produce statistics out of them. A great deal of the data thereby produced is long known to the community as the InSim-tool Live for Stats written by Gai-Luron offers similar features and is widely used to display race statistics. The features offered by mpRes are thus inspired by that tool.
A second basis for this script was the work done by MikeB during the development of his tool mprEdit. Thanks to MikeB - who published his results - we gained a little understanding to the inner structure of LfS multiplayer replays apart from the documented replay headers. I was able to hook on here and to discover one or two interesting things.
The idea - acknowledgements
Arrived at that point emerged the idea to create statistics directly out of a replay. This was mainly due to two reasons:
- To provide a possibility to simplify the offering of race statistics and results by rendering it unnecessary to cope with screenshots or to run the replay through the InSim tool and then manually adapt all the linking inside the resulting HTML-output.
- Simply to see, if I was capable of doing it ...
Especially the first point was a result of my teammate Jogy's experience with the CityLiga. At this point I'd like to really thank him first of all for his eternal patience and also for his enthusiasm towards this project. He never lost both of them, although I kind of buried him in thoughts and problems from time to time and although my own motivation to finish this project went exponentially towards 0 at some point in time which is reflected in the long development period that now lasts around 2 years. Also I'd like to thank the whole CityLiga, who agreed - inmidst a running season - to use the first edition of this script and thus be my personal β-testers.
The target audience
This script is designed especially for leagues that want to or must display whole seasons of results and for organizers of big single events, particularly those where takeovers are included and/or rejoining the race (possibly maintaining already done laps) is allowed.
As this script uses some predefined (via config-file) values that determine the outcome of it, I explicitly do not recommend parsing through random replays. For this purpose the abovementioned tool Live for Stats surely is the better choice.
Differences to ingame results
Out of various reasons the results gained by using this script can - and are to some extent meant to - differ from those obtained from LfS itself. These differences are mainly as follows:
- Disqualifications (e.g. due to not having done a mandatory pitstop) are not automatically done by this script. Instead the racers are included normally into the result as I want the people responsible for an event to be able to decide, when a racer is to be disqualified and when not.
- Unfinished racers can - depending on the configuration - be defined as finished and thus achieve a regular position (A minimum percentage of the total race distance is to be defined.).
- Rejoining the race after a defined race progress will be rigorously and impartially ignored. Thus everything done (i.e. any laps) after such a rejoin will not show up in the result.
- Results of different stints (due to rejoins) can - the corresponding setting provided - be added up to give a total result. A lack of that setting will result in only the last valid stint (see above for invalid ones) being evaluated.
- Unfinished races, e.g. due to mass disconnections can be reasonably evaluated by manually adjusting the desired race distance.