The online racing simulator
New definition of DRIFT scoring
Hi all!
- and yes, I do prefer real racing in LFS, but I have hosted a few drift sessions (using insim LFSlapper) and to my amusement came to a new? idea.

In order to make players actually drive the course (instead of making 20 burnouts), I thought we need to relate the drift score to the laptime. So below I propose a formula to go into the scoring sheet. I know basics of the insim programming language, but have not yet succeded in converting the driftscores into what I suggest below (instead of english, I use Matlab).
------------------------------------------------------------------------
%drift/speed efficeiency
% Using insim LFS lapper and the default driftmeter it should be possible
% to adjust drift scores in relation to the lap time. Drift skill should
% not only depend on the actual rpm/angle and traction, but also be
% reflected by lap time. Hence, a new drift skill (DS) need to be defined.

%RESULT
DS=Drift_Skill; % Earned when completing a lap (using LFSlapper)

%RECORDED
DP=driftpoints; % This is what is recorded by the LFSlapper (per lap).
LP=Lap_Time; % lap time (obviously) is also avilable...

% Drift_skill (DS) would then be defined and recorded as:
DS=100*(DP/(DP+(LP*100)));

%RECORD write
%DS should go into the list (DriftPB.elp dbs?)
%so that it is available and displayed when enetering !drf

% This number (DS) is scaled in percentage, so that
% for instance: 80 means 80% drift/speed efficiency
% & 100 is total control.
------------------------------------------------------------------------
I challenge everyone that is more talented than me in achieving this goal or want to help until the patch comes out. Perhaps it is not the correct way of creating this index, but we should be able to work from here if you are interested.

Cheers,
/Broms
Hi

I'll have a look at this sometime soon, but not sure I could do all parts of it.

I'm a bit ropy on the set and get database functions, although I would imagine your $DS scores would have to save into the storedvalue.dbs database rather than the drift database (no big deal though).

Don't think you could use !drf at all, although there is the ability to output your own table of your own making (see Tim[NL]'s scoring !points that does that sort of thing).

You should easily be able to get and set the variables you need, such as

$NickName = GetCurrentPlayerVar("NickName");

$DP = GetCurrentPlayerVar( "DriftScore" );

$LP = GetCurrentPlayerVar( "LapTime" );

$DS = 100 * ($DP/($DP+(LP*100)));


Are you happy with the $DS function score?

Assuming my maths are correct (I have no confidence in them, so check), if you were to do a 60 second lap and score 6000 points (say at AS1), then you would get

$DS = 100 * (6000 / (6000 + (60 * 100)))
$DS = 100 * (6000 / (6000 + 6000))
$DS = 100 * (6000 / 12000)
$DS = 100 * 0.50
$DS = 50
$DS = 50%

Who's to say that's not great time and score, but 50% looks poor.

If you take the 100 * away from front of equation, you'll still end up with 50%!

$DS = (6000 / (6000 + (60 * 100)))
$DS = (6000 / (6000 + 6000))
$DS = (6000 / 12000)
$DS = 0.50
$DS = 50%

In fact, you'll never get 100%

as

$DS = SCORE
.........-------
.........SCORE + (TIME x 100)

It's that + sign at bottom that will always make bottom larger than top.

No big deal for programming as you can always change the function.
OK, had thought about the formula.

What about

SCORE + AVERAGE SPEED (MPH)
-------------------------------
SCORE + TIME (SECONDS)


For instance, if you had a track exactly 1 mile long, then

if you scored 1000 points, averaging 30MPH, and took 120 seconds

1000 + 30............1030
----------.....=>...-----....=>....0.9196.....=....92%
1000 + 120...........1120

if you scored 1000 points, averaging 60MPH, and took 60 seconds

1000 + 60............1060
----------.....=>...-----....=>....1.0.....=....100%
1000 + 60............1060


if you scored 1000 points, averaging 90MPH, and took 45 seconds

1000 + 90
............1090
----------.....=>...-----....=>....1.0431.....=....104%
1000 + 45............1045


if you scored 1000 points, averaging 120MPH, and took 30 seconds

1000 + 120..........1120
----------.....=>...-----....=>....1.0874.....=....109%
1000 + 30............1030

I realise you may have possibility of having score of over 100%, but you'd have to go some to drift that fast!

Or you could make it that anything over 1.0 just scores 100% anyway.

Also, average speed has a variable set up in lapper, so makes it easier to program

$AvgSpeed = GetCurrentPlayerVar( "AvgSpeed" );
Why make it a percent at all? How about you just make it drift score divided by lap time, what ever their value is is just that, their value. No need to make it a percent if you can't define what a good drifting lap is vs that of a bad one. Speaking of that, What defines a good drifting lap?
Thanks for input guys!

I was thinking along those lines using the average speed to "normalise" the lap score. Just like you mention with your 4 examples and the 1 mile long track.

That formula would still carry my point thru, namely, that you would have to do a "decent" lap in order to get some good drift scores. Hence, you can not score huge by simply making twenty 360 burnouts before the finishing line. Actually, the more I think about it the more I like using average speed like in your examples.

It is possible that the formula needs to be tweaked in order to find a balance between average speed/laptime/driftscores. Drift score should still have a little more weight than average speed. It simply needs testing and a considered decision.

However, the formula in it self is easy to change and play with and as long as the lapper outputs this "normalized" result, it can be tuned into something we like.

As for your last examples sinanju, having a possible score above 100% doesnt disturb me really. It could work fine, and Im keen to try it out as an experiment on a cruise session.

Dygear -By using a percentage value the score is more or less independent of track choise. For good or for bad, but it is easier to relate to a certain level (say 82%) than remember what you scored last time.... "...was it 178227 points or was it 179227?" (yes, it may be in the database)

That said, you could be right by just dividing driftscore with laptime. Or even multiply driftscore with average speed?

So then it comes down to defining what a good drift is. I think this could be agreed on if we test a few formulas and find one that is fun and feels right. We dont need to make it complicated. Just remove the element of gamers going off driving path to crank up the points. If they do, they should see a loss of driftpoints in the lapscore. Thats all.

My aim is (ofcourse) not to completely rewamp the drifting concept, just add a little feature since insim and LFSlapper is powerful enough to let us. At least a dozen Ive spoken to would like to see such an implementation. And for me, half the pleasure would be to try to invoke it and make it work. The rest is to watch peoples enjoyment if it is successful.

Sinanju, you say that !drf cant be used so the only way is to make a new table, right? I guess I have to look into that Tim[NL]'s scoring !points dingy then.

So what we have:

$NickName = GetCurrentPlayerVar("NickName");
$DP = GetCurrentPlayerVar( "DriftScore" );
$LP = GetCurrentPlayerVar( "LapTime" );
$AvgSpeed = GetCurrentPlayerVar( "AvgSpeed" );

$DS = ($DP+$AverageSpeed)/($DP+$LP) // or whatever we tune it to

Now, the question is how do we make that table that contains:
Rank Nickname Driftscore
$?? driftmaniac $DS
... ... ...
and that will show if we type for example !ds

Cheers
Broms
OK, I've done some work on this system, but have 3 problems.

The first I expected - my lapper database skills are zero, so can't get database to work. My database config is probably all wrong.

The 2nd is I can't use any formula that has laptime as part of the equation. This is because I can't (as yet) find a way of dividing a number with a time. At least, not until someone can give me a way of converting time into numbers (and I've asked) so that something like 1 min 23.65 seconds = 83.65.

3rd is can't get table to show anything apart from my name. Likely because of the database issue. And I would like it to have car type as one of the columns. In fact, I would rather show columns for
Position - Driver Name - Car - Drift Points - Average Speed - Skill Points

However, apart from that, fairly well on. See attached image.

The result buttons are only seen by the driver, but (one of) the scores is a global sms that everyone sees.

(The debug messages are because of the laptime is not a number issue).

To get this to work, copy the dskill.lpr file (found in attached zip file) and add to your /includes folder. Open the the /addonsused.lpr file and add the line include( "./dskill.lpr");

Instructions included as part of the .lpr file.

I've tried to put comments in as much as possible, so things can be changed fairly easily. Have a play.

For instance, one of the formulas I've used is


<?php 
$DS2 
round(((100/$DP)*$AS),2); # 100 divided by Drift Score multiplied by Average Lap Speed
?>

$DP and $AS both work, so you could play around with other formulas that use these variables (e.g.(($DP+$AS)/$DP), etc), till you get one you like.

It should be easy just to put % sign at end of any answer to show result as a percentage, or whatever.

If you type !dskill once you've done a lap, you'll see the table is there, but fairly blank.

For some weird reason, couldn't use !ds or !DS as a way of making table appear - something like CASE "!dskill": works, but CASE: "!ds": wont.

Also. Be aware that Lapper works out distance and speed using km/h, so shouldn't be problem with differences in skill score if someone using mph has same drift score and laptime as someone using km/h.
Attached images
lapper dskills.png
Attached files
dskill.zip - 2.6 KB - 298 views
Quote from sinanju :OK, I've done some work on this system, but have 3 problems.

The 2nd is I can't use any formula that has laptime as part of the equation. This is because I can't (as yet) find a way of dividing a number with a time. At least, not until someone can give me a way of converting time into numbers (and I've asked) so that something like 1 min 23.65 seconds = 83.65.

Had a bit of a brainwave so have managed (with some community assistance) to find a solution to this problem, so can now use number of seconds as part of any equation.

Now all we need is a good formula.

A bad formula will get you back to front results.

For instance, if on first scoring lap you got
Quote :Score = 5 000 points
Laptime = 100 seconds
Avg Speed = 100 km/h

but on 2nd lap you got
Quote :Score = 10 000 points
Laptime = 100 seconds
Avg Speed = 100 km/h

some formula's would give worse drift skill score for higher drift score, e.g.

laptime.......................100........................100
--------------.....=>.....----------.....=>.....----.....= 2.0
points / speed..............5 000 / 100...... ......50


but

laptime.......................100........................100
--------------.....=>.....----------.....=>.....----.....= 1.0
points / speed..............10 000 / 100...... ....100


Attached images
Lapper dskills with working laptime.png
I'm sure we can detect when a client is doing burn outs, I mean it's not like they are moving that far so just find out when a the speed dips below a certain level and move on from there.
Quote from Dygear :......just find out when a the speed dips below a certain level and move on from there.

You can already set that as a parameter, along with minimum and maximum angles.


<?php 
$MinimumDriftSpeed 
39# Minimum speed in km/h to maintain. Driving below that speed will reset score (25kmph is approx 16 mph,and 39 is approx 24 mph)
$MinimumDriftAngle 5# Minimum angel to maintain. When angle is below value, score is reset
$MaximumDriftAngle 75# Maximum angel to maintain. When angle is above value, score is reset
?>

Just set the numbers to your own personal preference.
Looking good!
I will check it out and test for formula tweaking.

Ok, some testing with the initial code: The popup window diplays ok after a finished lap + the message in top left corner (red circles).
However, the values are not yet correct, except the usual driftscore. The value of 100 may be a result of the formula, so I need to test and change that a little bit. It seems we have a really good start here, thanks for writing that code sinanju, excellent work.

I get all other values =0. Hmmm. I see they must be default values set by dskill.lpr

Now, when I type !dskill no table is yet showing. I tried on a local host, so Im not sure thats why or if it is the database problem like you mentioned. I'll test it a bit more and start to look at your code so I understand what's going on - and what isnt

Edit: Now I set up a regular host and table is still not showing when typing !dskill. I see I use V5.9.2.5, and you tested with V5.9.2.6 so thats the first thing I can eliminate.

Cheers,
Brom
Attached images
dskill.jpg
OK, version 0.2 dskill.lpr attached.

I've included new formula's, which incorporate lap times.

Dskills table now has all results showing.

Removed all traces of databases as things went bit wrong!

I played around with various scoring formulae and put them in an excel table to see how they'd look.

Could do with getting much more results and adding them into table to see how they compare.
Attached images
dskill button.png
Attached files
dskill v02.zip - 2.1 KB - 245 views
Drift Skill Score Formulas.zip - 19.7 KB - 248 views
Fantastic, i will test, check out the test form xls and start filling in for evaluation.
Also give some thought to how you want results to be displayed.
Attached images
dskill button.png
First I tested on a custom made AU1 and dskill showed nothing, no lap results, nor the table. I guess there are probs that has to do with the setup of custom tracks because starting line must be defined. I switched to SO1.

On SO1, I do get finish line results from dskill (top left and the pop-up for a few secs - all with correct numbers) but I am not able to see the table when typing !dskill. Is that because Im testing alone? Would it be visible only after finished race or available after each lap update? I'm not completely sure of how far you came with the table.

I run from lapper 6.0.1.1 now and made a "fresh" folder without any of my previous scripts and changes. Do I need to deactivate any of the "includes".

Currently my addonused.lpr looks like this (with dskill at the bottom):


include( "./utils.lpr");
include( "./myInc.lpr");

#### Include for splitting infos ####
include( "./pitboard.lpr");
include( "./pitwindow_gui.lpr");
# OR
#include( "./defPitInfo.lpr");
#####################################

#### Include for drifting infos ####
#include( "./driftdef.lpr");
# OR
include( "./driftmeter.lpr");
#####################################

include ("./debug.lpr");
# GUI Framework main include - this MUST be first
include ("./gui.lpr");

# Help GUI
include ("./gui_help.lpr"); # Multi-tabbed help (all in one)

# Admin GUI
include ("./gui_admin.lpr"); # Admin GUI root include
include ("./gui_admin_membership.lpr"); # Admin GUI Membership administration
include ("./gui_admin_handicaps.lpr"); # Admin GUI Handicap allocations

include( "./safetycar.lpr");
include( "./ctrack.lpr");

include( "./guiconfig.lpr");

include( "./who.lpr");

include( "./tops.lpr");

include( "./listevent.lpr");
include( "./winnerflags.lpr");
include( "./dskill.lpr");

The driftmeter/pitboard and everything else is all ok (delivering messages and tables as usual). 'DriftPB.elp' is recording so there is a trigger somwhere that I am missing? Do I need to call anything in the 'LFSLapper.lpr' (as it is now, its default from download version).

I enjoyed your xls sheet. Can be real handy for more testing.
For the drift skill score board (dskill_button.png - the latter one), what you have made is superb. I might come with suggestions when I get it all to work at my end. It's something I can experiment with as well, i need to learn how to manage those pop-ups and buttons
Quote from Ingolf :First I tested on a custom made AU1 and dskill showed nothing, no lap results, nor the table. I guess there are probs that has to do with the setup of custom tracks. I switched to SO1.

As long as there's a start/finish line I don't think there should be any difference.

The scoring system will work as long as a complete lap of any circuit is made (that's why I put it in the OnLap event section).

Quote from Ingolf :I am not able to see the table when typing !dskill.

This is because, as yet, there's is no database set up for the !dskill command to interrogate and list results.

Quote from Ingolf :
I run from lapper 6.0.1.1 now and made a "fresh" folder without any of my scripts and changes. Do I need to deactivate any of the "includes".

As long as the driftmeter.lpr and dskill.lpr are included, should work.

May even work without driftmeter.lpr. Not sure if lapper works out and collects drift details even although it may not show them as part of the default coding.

driftmeter just puts it into a specific way of outputting and showing the data.

Quote from Ingolf : 'DriftPB.elp' is recording so there is a trigger somwhere that I am missing?

The normal drift data is all kept in the standard DriftPB.dbs and DriftPB.elp SQL databases.

The dskills.lpr will need new database setup (bit like Yisc[NL]'s database for his pitboard).

Unfortunately, this database setup is probably the thing I can't do.

Quote from Ingolf :I enjoyed your xls sheet. Can be real handy for more testing.

Have been feeding more information in and looking at results - see attached updated spreadsheet.

From the results, I think the best formula should be bit like what Dygear suggested, but with slight tweak.

I suggest something like ((Drift Score / Laptime)/50)

DRIFT SCORE / LAPTIME
-----------------------
..............50

To try it out, change the existing $DS3 formula to

<?php 
  $DS3 
round((($DP/$LP)/50),3); # Drift Score divided by Average Laptime / 50
?>

This should show Drift Skill Points to 3 decimal places.

Using above formula and using times and speed based on real results from RB4 on SO1, then results would be


Drift.....Average.....Lap......Skill
Score...Speed.......Time.....Points
--------------------------------
1724....123.95......58.09....0.59
1934....125.02......57.59....0.67
2719....129.08......55.78....0.97
3188....125.39......57.42....1.11
3559....115.18......62.51....1.14
3813....120.34......59.83....1.27

If you made some decent scores with decent lap time, then results could be

Drift ....Average....Lap....Skill
Score....Speed....Time....Points
----------------------------------------------------------
5000....125.02....57.59....1.74 (1.736)
5000....125.39....57.42....1.74 (1.742)
10000...125.02....57.59....3.47 (3.473)
10000...125.39....57.42....3.48 (3.483)
20000...125.02....57.59....6.95 (6.946)
20000...125.39....57.42....6.97 (6.966)

although not a lot of diffence in Skill Points if within same sort of lap time with same sort of drift score, unless shown to 3 decimal places.

Quote from Ingolf :For the drift skill score board ... I might come with suggestions when I get it all to work at my end. It's something I can experiment with as well, i need to learn how to manage those pop-ups and buttons

If you look in the dskill file, you'll see the following:


<?php 
### Set button and initial left/right and top/bottom coordinates ###
 
$origL 165;  # Left edge of button
 
$origT 100;  # Top edge of button
?>

Changing these numbers will move the board round the screen, but in such a way that it will keep it all together.

If you want to change text size, change these


<?php 
$Height 
4;  # height of button
$spacing 4;  # text spacing
?>

Normally you want to keep both about same, but in the new button design, the $Height of the skill result is probably about 16 (can't remember as code is at home, while I'm typing this at work).

If you change text size, then you may also want to change


<?php 
 $Width 
14;  # width of button
?>

As text will need to spread out more otherwise it gets very condensed to fit into same space.
Attached files
Drift Skill Score Formulas.rar - 34.8 KB - 223 views
Really nice work there sinanju!
Quote :
The scoring system will work as long as a complete lap of any circuit is made (that's why I put it in the OnLap event section).

I figured the starting and finishing line need to be well defined, but it works if custom track is setup properly. Perfect!

About the table not implemented (!dskill)
Quote :This is because, as yet, there's is no database set up for the !dskill command to interrogate and list results.

Yes I thought so (work in progress ).

Quote :The dskills.lpr will need new database setup (bit like Yisc[NL]'s database for his pitboard).
Unfortunately, this database setup is probably the thing I can't do.

Can't do everything m8! I'll look into it and see if I can get my hands on it.

The main thing is I/we got a tool to tune scoring depending on the variables I was after and this is excellent! I'll be coming back with some feedback and input when I get some verdicts on the system (from other clients).

It would be sweet if you could provide the dskill.lpr that shows that last dskill_button.png (lower panel) with the score in large bold red font. I like that!
Thanks for the examples on building buttons! I'll dive into it straight away!

I will also test the different formulas you have provided in the test-sheet and especially your favourite ones.

many cheers!
/Broms
Ok, starting to get a good combination of speed and drift now using:

$DS5 = round(($DP/100)*(($AS^2)/$LP),0);

It slowly turns into what I am looking for: Speed + Drift.

It seems with this setup you can't zig-zag down a straight, and you have to keep up a good speed in the turns as well. Have only tested it on 2 tracks so far (about 20 laps in South City). The score itself is in the range of 1000's but its ok for now - might scale/normalize it later on.

Will post some more evaluation results shortly.

See image for some examples of the type of scoreboard you could make with lapper.

For altenate layout, try

<?php 
####  SCOREBOARD 2

    
openPrivButton"ds_back2",$origL,$origT+30,$Width+15,$Height+36,$spacing,$time,16," ");
    
openPrivButton"ds_frnt2",$origL+1,$origT+36,$Width+13,$Height+28,$spacing,$time,32," ");
    
openPrivButton"ds_name2",$origL+2,$origT+31,$Width+11,$Height+1,$spacing+1,$time,0$NickName); # player who will see board    

####  Button Labels
    
openPrivButton"ds_oads_label2",$origL+2,$origT+37,$Width,$Height,$spacing,$time,64,langEngine"%{main_ds_oads_label2}%")); # OverAll Drift Score
    
openPrivButton"ds_asfl_label2",$origL+2,$origT+41,$Width,$Height,$spacing,$time,64,langEngine"%{main_ds_asfl_label2}%")); # Average Speed For Lap (km/h))
    
openPrivButton"ds_asfla_label2",$origL+2,$origT+45,$Width,$Height,$spacing,$time,64,langEngine"%{main_ds_asfla_label2}%")); # Average Speed For Lap (mph))
    
openPrivButton"ds_avlt_label2",$origL+2,$origT+49,$Width,$Height,$spacing,$time,64,langEngine"%{main_ds_avlt_label2}%")); # Single Lap Time (in minutes/seconds)
    
openPrivButton"ds_dss2_label2",$origL+2,$origT+53,$Width,$Height+4,$spacing+2,$time,0,langEngine"%{main_ds_dss2_label2}%")); # Drift Skill Score choice 2


####  Score Buttons      
    
openPrivButton"ds_oads2",$origL+17,$origT+37,$Width,$Height,$spacing,$time,64,langEngine"%{main_ds_oads2}%"$DP)); # OverAll Drift Score
    
openPrivButton"ds_asfl2",$origL+17,$origT+41,$Width,$Height,$spacing,$time,64,langEngine"%{main_ds_asfl2}%"$AS)); # Average Speed For Lap (km/h))
    
openPrivButton"ds_asfla2",$origL+17,$origT+45,$Width,$Height,$spacing,$time,64,langEngine"%{main_ds_asfla2}%"$ASa)); # Average Speed For Lap (mph))
    
openPrivButton"ds_avlt2",$origL+17,$origT+49,$Width,$Height,$spacing,$time,64,langEngine"%{main_ds_avlt2}%"$LT)); # Single Lap Time (in minutes/seconds)
    
openPrivButton"ds_dss22",$origL+15,$origT+49,$Width,$Height+17,$spacing,$time,0,langEngine"%{main_ds_dss22}%"$DS2)); # Drift Skill Score 2
?>

And in the Lang "EN" section, add


<?php 
####  SCOREBOARD 2
main_ds_oads_label2 "^7Overall Drift Score";
main_ds_asfl_label2 "^7Average Lap Speed";
main_ds_asfla_label2 "^7Average Lap Speed";
main_ds_avlt_label2 "^7Single Lap Time";
main_ds_drss_label2 "^3Drift Skill Score";
main_ds_dss1_label2 "^2Drift Skill Score 1";
main_ds_dss2_label2 "^2Drift Skill%nl%^2Score";
main_ds_dss3_label2 "^2Drift Skill Score 3";
main_ds_dss4_label2 "^2Drift Skill Score 4";
main_ds_dss5_label2 "^2Drift Skill Score 5";

main_ds_oads2 "^3{0} ^7points";
main_ds_asfl2 "^3{0} ^7km/h";
main_ds_asfla2 "^3{0} ^7mph";
main_ds_avlt2 "^3{0}";
main_ds_drss2 "^1{0}";
main_ds_dss12 "^1{0}";
main_ds_dss22 "^1{0}";
main_ds_dss32 "^1{0}";
main_ds_dss42 "^1{0}";
main_ds_dss52 "^2{0}";
?>

Attached images
possilbe drift skill scoreboard buttons.PNG
Thx for the layout tips - very useful.
For the moment I am tuning the SpeedDrift formula and it feels almost perfect after 100 laps on 3 different tracks. I normalized my formula above to span ranges of 0-20 pts instead of 20 000 pts.

I really appreciate your help sinanju, it adds to LFS what is already in the game but not accessible. Now it is!
If you want to see this DRIFT SKILL (work in progress) in action, then I've put it on my server Sin'rs.

Apologies, but as yet, I'm unable to save your skill scores, although your normal drift scores will be saved.
Attached images
dskill button.jpg
yes, thx, I just went a few laps around on your server and watched the dskill... looks good.

Funny thing was as I tried out my own formula:

$DS5 = round(($DP/100)*(($AS^2)/$LP),0);

...the values came really close to your number 4.

Sometimes just a little bit less, and sometimes a little bit more... in the decimals. No matter how I behaved.

Must do some calculations on that.

How about normalization of the score based on the distance of the track?
Tried looking at this another way, and thought about how many points per amount of time.

You could do something like skill points = drift points per second.

Like 0.1 skill points per 100 drift points per second, where 6000 drift points in 1 minute (60 seconds) would get you 10 skill points, or the one I much prefer, which is 0.06 skill points per 100 drift points per second and is based on 10,000 drift points per minute, giving you 10 skill points.

Based on actual points collected by me in specific time, I would have either

Drift Score....Time......Skill Points....(Formula)
3813............59.83.....6.37............( ( Drift Score / Time ) / 10 )
3813............59.83.....3.82............( ( Drift Score / Time ) / 16.667 )

I'm not much of a drifter, so I don't think that score should rank very high (otherwise why not just keep drift points?) so skill score of 3.82 seems reasonable.

And telling people you're getting score based on 10,000 points per minute sounds cooler than 6,000 points per minute!
Attached images
skill points equals x drift points per minute.PNG
Also an interesting way of doing it ^^. I will have to have a go on it so see how it feels and if it correspond to what I would expect after a "succeesful" driflap vs a "failed" driftlap.

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?
Quote from Ingolf :....I am not able to see the table when typing !dskill...

Been working on this, but only little success.

The necessary information is saved into the StoredValue database, but gets overwritten everytime you do new complete lap.

Unfortunately, I don't have the skills to set up database and call information back out in a table.

What I have so far is..


<?php 
CatchEvent OnMSO
$userName$text # Player event

    
$idxOfFirtsSpace indexOf$text" ");

    IF( 
$idxOfFirtsSpace == -THEN
      $command 
$text;
      
$argv "";
    ELSE
      
$command subStr$text,0,$idxOfFirtsSpace );
      
$argv trimsubStr$text,$idxOfFirtsSpace ) );
    ENDIF
    
    SWITCH( 
$command )

#    How to get Drift Skill Table

    
CASE "!dskill":
    CASE 
"!dskills":
    CASE 
"!skills":
    CASE 
"!skill":
    CASE 
"!DSKILL":
    CASE 
"!DSKILLS":
    CASE 
"!SKILL":
    CASE 
"!DSKILLS":
        
topUser"^3Drift Skill Table","drift_skill","DESC",argv );    
    
#        topUser( "^3Drift Skill Table","ToNum( GetUserStoredValue( $userName . "average_speed_kmh" ));","DESC",argv ); # doesn't appear to work
#        topUser( "^3Drift Skill Table","GetUserStoredValue( $userName . "average_speed_kmh" );","DESC",argv );  # doesn't appear to work

    
BREAK;

    ENDSWITCH
  
SetCurrentPlayerVar"drift_skill",GetCurrentPlayerVarround("drift_skill" ),2); 
  
SetUserStoredValue"drift_skill",ToNumGetUserStoredNum"drift_skill" )));   
#   SetUserStoredValue( "drift_skill",ToNum( GetCurrentPlayerVar( "drift_skill" )));  # doesn't appear to work

EndCatchEvent
?>


Also. I can't get the bit of my table that works to output score with decimal places.

Needed:
Database set up to collect all necessary results (user(or nickname)/track/car/driftscore/laptime/speed/driftskillpoints).

Table to output (based on track you are on)
Position / nickname / car / driftpoints / laptime / speed / driftskillpoints

The design of this driftskills database and the output table probably needs to be similar to the !drf (driftpoints) database, but that seems to be hardcoded into lapper, so I can't reverse engineer to see how it's setup.

Apart from database/table issues, only needs a formula to be agreed to work out drift skill points, and a design of what information is output and how it's shown via buttons.

Although formula and buttons will easily be configurable by anyone afterwards to use different formula or button design - plenty of comments in code to show what everything does, and where it goes.
Attached images
dkill table.png
1

FGED GREDG RDFGDR GSFDG