The online racing simulator
yeah, I havn't had much success on the database issue either. I've done reading, but still have a long way to go.

For now Im quite happy tho, since you provided the tools for me to work on the formula. Lots of fun and testing
You could look at the lapper forum on the thread I started for database help.

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

Unfortunately, the help and advice given are well beyond my understanding, so I don't think I can take it much further.

There should be enough comments in the config file for you to change things like buttons, and/or their placement, and any formula you come up with for working out a drift skill score.
Tried again, and after quite a lot of effort (many, many hours) managed to get it so that it will save in the standard LFSLapper database, which is $StoredValueDbs (= "storedvalue"; # Name of the database in which additional values are stored).

IF ( $LapTime > GetStoredValue($userName . "_VariableID_" . $track . "_" . $car))
THEN
SetStoredValue
( $userName . "_VariableID_" . $track . "_" . $car, $VariableID
);
ENDIF


Where $VariableID is a name or a number, or result of a calculation.

This will save in the database, something like

sinanju_VariableID_SO1_FXR and then show a value ($VariableID) with this.

I've now been told that, at this moment in time, it's not yet possible to put this information in a !top type table, although this might be the next thing worked on in the LFSLapper application.

At the moment, the only thing I could think of is that you have some sort of external way of showing the scores (maybe on a website), by taking the information out of the database, e.g.

sinanju_VariableID_SO1_FXR, 2.5
sinanju_VariableID_SO2_FXR, 3.25
sinanju_VariableID_SO1_UFR,0.48
sinanju_VariableID_BL1_FXR,0.12
sinanju_VariableID_SO1R_FXR,3.25
sinanju_VariableID_SO3_FXR,2.95
sinanju_VariableID_SO2_UF1,4.65
sinanju_VariableID_SO1_UFR,4.53
sinanju_VariableID_FE1_FXR,1.06
sinanju_VariableID_FE1_UFR,3.56
sinanju_VariableID_FE1_XRT,4.65


and then importing as a type of csv file into a spreadsheet type program with comma and underscore delimiters, and sorting so that the above text list becomes

Driver VariableID Track Car Variable ID Result
sinanju VariableID BL1 FXR 0.12
sinanju VariableID FE1 FXR 1.06
sinanju VariableID FE1 UFR 3.56
sinanju VariableID FE1 XRT 4.65
sinanju VariableID SO1 FXR 2.5
sinanju VariableID SO1 UFR 0.48
sinanju VariableID SO1 UFR 4.53
sinanju VariableID SO1R FXR 3.25
sinanju VariableID SO2 FXR 3.25
sinanju VariableID SO2 UF1 4.65
sinanju VariableID SO3 FXR 2.95


Maybe not elegant, but maybe the only solution.


/EDIT

Over next couple of days, I'll update my script (including the database recording part) and upload here.
Quote from Ingolf :dygear, I'm not sure exactly how you would use the track length, but I guess it could be something else to experiment with. Do you mean the defined and constant track length or the distance the car has traveled during a lap?

I would use distance traveled in a lap, not the const based on the correct length of the track, as we have to consider things like an AutoX layout that might change the distance of the track by overlapping a straight or something onto it's self.
OK, I've done what I could, and produced a drift skill scoreboard that can be used as an add-on with LFSLapper.

Actually, I've done 3 versions; circular scoreboard, simple scoreboard, and scoreboard that gives more detail along with a score.
Attached images
dskill versions.png
Attached files
dskill_v0 4a.zip - 2.5 KB - 195 views
dskill_v0 4b.zip - 1.9 KB - 200 views
dskill_v0 4c.zip - 2.1 KB - 226 views
please help me
DriftPB and PB files are created,but when i write !drf or !top drift scores dont showing
In may be a $DefaultTopCar issue.

If you open your LFSLapper.lpr file, and search for $DefaultTopCar, you'll see something like

$DefaultTopCar = "XFG";

This is fine if the only car you drive is an XFG.

Change the existing line to

$DefaultTopCar = "UFR+XFR+RB4+RAC+FZR+XRR+FXR+FBM+LX4+LX6+XFG+XRG+XRT+FZ5+FXO+FO8+FOX+MRT+UF1+BF1";

This will mean whenever you do !top, etc., then it will make a list based on all the cars.
thank you !!!
Beautiful work sinanju,
I've been off line for a week due to loads of work, however I'll have a go on your different versions now and some more testing.

sinanju wrote:
Quote :At the moment, the only thing I could think of is that you have some sort of external way of showing the scores (maybe on a website), by taking the information out of the database, e.g.

Yes! This is what I can do. I keep track on the record table via matlab. Nice progress!


Quote :...it will save in the standard LFSLapper database, which is $StoredValueDbs (= "storedvalue"; # Name of the database in which additional values are stored).

I am a bit braindead/confused, but what is the "standard LFSLapper database"?

In LFSLapper.lpr I find:
$StoredValueDbs = "storedvalue"; # Name of the database in which additional values are stored
so I guess that's where the data go (storedvalue.dbs)?

Do we need to add some lines in the LFSLapper.lpr? Like for the DriftPB:
$DriftDatabase = "./DriftPB";

Cheers,
Broms
Quote from Ingolf :I am a bit braindead/confused, but what is the "standard LFSLapper database"?

In LFSLapper.lpr I find:
$StoredValueDbs = "storedvalue"; # Name of the database in which additional values are stored
so I guess that's where the data go (storedvalue.dbs)?

Do we need to add some lines in the LFSLapper.lpr? Like for the DriftPB:
$DriftDatabase = "./DriftPB";

Cheers,
Broms

Lapper has 3 databases.

One for Personal Best times (GripPB), one for drifting scores (DriftPB), and the $StoredValueDbs where all other variables should be saved to (for set and get).

You can't change the GripPB or DriftPB databases. Probably shouldn't try anyway as that's where the !top and !drf table data is stored.

I tried defining my own database but that failed. Lapper may well be hardcoded so that all variables that are set are put in the storedvalue database.

Until another way of saving data is made (currently being thought about), then the program will only be able to tell your drift skill score, wether it was better or worse than your previous score with that car/track combo, and the scores being saved to database, with better scores overwriting your previous best scores.

If you use Firefox, you can get an add-on (SQLite Manager?) that you can use to open the database to look at what's saved.
Ah, thx sinanju. I'll try that plugin to view storedvalue.dbs

I have been playing around with some balancing of the formula. Below (DS01.png) is one result that is simple yet quite ok.
DS=(($DP))/($LP^5))*10E6)
The emphasis is clearly on reducing the Drift Score using a power of 5 in the Lap Time. That way, you are forced to make "pretty fast laps", yet with a good drift point. Hence keep full control of speed and drift - a balance that is rewarding in itself when playing.

In the example figure there are some
Key characteristics:

Test parameters setup (typical for South City Classic)
X-axis - Lap time interval: 58-68 seconds
Y-axis - Drift Point range: 3000-9000 points
Z-axis - Drift Skill: 0-140 points (this may vary a bit...)

In the figure we can see that:
1) The rate of change in Drift Skill (DS) gets larger with lower lap times, and/or
2) higher drift points raises drift skill more and more the faster you go.

I tried several other approaches that seem to work fine. One that I liked was to simply reduce the laptime by a factor given from the Drift Point. That reduction would correspond to the Drift skill and is only a set of seconds subtracted from the lap time. You can ofcourse also express that reduction in percent of total lap time. A funny idea that I am working on a little bit more. I'll get back on that later.

EDIT: Looks like this now...
$DS5=round(10*((1-(($LP-((($DP/100)^3)/($LP)))/$LP))),1);
Testing several tracks now, and it seems promising at the moment...
Attached images
DS01.png
Quote from Ingolf :EDIT: Looks like this now...
$DS5=round(10*((1-(($LP-((($DP/100)^3)/($LP)))/$LP))),1);

Think you should get rid of the *10 multiplier, otherwise you end up with big numbers again, and round it to 2 decimals
$DS5=round(((1-(($LP-((($DP/100)^3)/($LP)))/$LP))),2);

You still end up with more logarithmic score than mine (mines is 10,000 points per minute).

Graph comparisons based on same drift points / laptimes.
Attached images
Driftskill score comparison.png
I'll be testing on the longer tracks and also compare with your approach. Interesting

EDIT: Have now been testing for quite a while and with some close LFS friends. This is purely awesome. Just what I/we needed. The different formulas can still be tweeked, but some of them work really well. We keep track of score via SQL and are quite happy with that. Hopefully, I can learn more (when I have time) to develop this into a better recording sytem after the next tyre physics update.
2

FGED GREDG RDFGDR GSFDG