MOST RECENT DOWNLOAD
mpRes V2.08 to V2.10
mpRes V2.08
----------------------------------------------------------------------
Hello fellow racers and admins!
After by now a couple of years of playing around with it, I finally decided to publish my webscript for getting race statistics out of the replays.
About the 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 originally 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 ...
The basic idea was 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.
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.
What it does and what not
Well ... the script reads the replays, that you upload to your server and generates results in written and graphical form ...
To a certain extend you can alter the outcome of the results in order to comply with your event's rules. You might also incorporate penalties into your results (penalties may include time, laps or even disqualification of a racer).
On the other hand, it does not make things more simple than possible. The drawback of a quite easy handling once everything is configured is, that you have to configure things first, aditionally you are restricted in naming your replays in order to assign them to the event, they belong to. This might change in the future, when I'll have a database based version of the script ... but you'll be able to see average fuel consumption and engine damages ... just search for it ...
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. Penalties (including disqualifications) can be given on a per file/player basis.
- 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.
OK, I think, that's it for the moment ... try it out and let me know, what you think
Here it comes:
mpRes V2.08 to V2.10
mpRes V2.08
Changelog
Legend:
# -> Bug Fix
$ -> Language fix or change
+ -> Addition
- -> Removed
^ -> Change
! -> Note
-------------------------- 2.10 [08-Mar-2021] ------------------------
+ Added support for new mpr file version since LFS0.6V (Test)
-------------------------- 2.08-HFphp55 [11-Feb-2017] ------------------------
# fixed function for colored driver names in case php >= 5.5 is used
------------------------------ 2.08 [07-Feb-2017] ----------------------------
+ Added support for new mpr file version since LFS0.6Q10
+ Added support for updated Blackwood track
------------------------------ 2.07 [21-Feb-2016] ----------------------------
# Fixed broken support for replay containing layout data
! /setlap commands are not yet implemented at this stage, this will be done in the next version
------------------------------ 2.06 [14-Feb-2016] ----------------------------
+ Added support for new mpr file version since LFS0.6K9
+ Added support for Rockingham weather update
# Path files for Kyoto-Bugfix included
! /setlap commands are not yet implemented at this stage, this will be done in the next version
------------------------------ 2.05 [20-Dec-2015] ----------------------------
+ Added support for new Rockingham tracks in LFS0.6K
# fix for racers finishing laps before race even started
! /setlap commands are not yet implemented at this stage, this will be done in the next version
------------------------------ 2.04-hf [02-May-2015] ----------------------------
# fix for compatibility with php > 5.5.0 (modified pack/unpack)
! /setlap commands are not yet implemented at this stage, this will be done in the next version
------------------------------ 2.04 [02-April-2015] ----------------------------
+ add new Westhill tracks compatibility
^ increase of maximum players to 40
! /setlap commands are not yet implemented at this stage, this will be done in the next version
------------------------------ 2.03 [06-Janury-2015] ----------------------------
+ ignore takeovers in single driver replays
+ added quick results overview for simple lists (res) and csv exports (csv)
------------------------------ 2.02 [01-November-2013] ----------------------------
# fixed some error in graph_select.php
# fixed wrong function getlanguage() in includes/functions.php
# fixed wrong argument for font width in graphs_png.php
+ added language variables graph->all and graph->nosvg to lang/en.ini and lang/de.ini
+ added change of tyretype to pit icons (green tyre means type was changed, details are shown in tooltip)
^ added script version to footer, the script also checks now, if a result was created with a previous version and recreates it in that case
------------------------------ 2.01 [01-April-2013] ----------------------------
# fixed wrong language variable for race progress chart in graphselect.php (line 43)
# fixed wrong variable for lap-deviation of single drivers in tpl/sta.tpl.php (line 48)
# fixed some language variables in lang/en.ini
+ added handicap shown on results for finished players (includes/get_replays.php | includes/readmpr/header.php | includes/readmpr/postprocess.php | tpl/erg.tpl.php | lang/en.ini | lang/de.ini)
--------------- 2.00 final (first official release) [22-March-2013] -----------