View Full Version : Ranking System
Gai-Luron
1st November 2009, 22:34
Hello,
I plain to put a ranking system into LFSLapper. Can you put here how do you imagine a ranking system? How configure it in GLScript? Etc...
Thank's for your ideas
Gai-Luron
Krayy
9th November 2009, 00:56
Do you mean ranking as in what team drivers are highest ranked in server/wr times and/or in seniority within the team?
Or are you talking about a race points system?
Because I actually see both of those as linked. We have had some discussions within my regular race team as to how we should handle a points system, and have sort of decided that certain types of races require different points systems from others.
That being said, what I was looking at doing was to customise Lapper to enable us to parse a file with multiple points configurations (sort of like a simple .ini file format), and then enable a GUI in GLScript to select which points system will be used for that race, or race series. This ties in with a Race Manager GUI that I'm working on which will enable us to tie Lapper in to our website so that we can create a rcae series there, send it to Lapper, and then use a GL GUI to fine tune it. We'll look at having race points, as well as points for most improved during series (to encourage different driver skill levels), fastest laps in quali, practice etc and some special situations.
So flexibility is what I'm after.
Gai-Luron
9th November 2009, 17:19
Hello,
i think about an config championship file and points management
And idea is
1 = 20
2 = 18
3 = 16
...
RelativeToPlayer = true;
date = dd/mm/yyyy;
Time = hh:mm;
Car = XFG+XRG;
Track = SO6;
qualify = no;
date = dd/mm/yyyy;
Time = hh:mm;
qualify = yes;
qualifyTime = 30; // in minute
Car = RB4;
Track = SO1;
points = "poinType2"; // override championship point
date = dd/mm/yyyy;
Time = hh:mm;
qualify = yes;
qualifyTime = 30,20; // in minute
laps = 20,10;
Car = RB4,XFG;
Track = SO1,BL1;
points = "poinType2"; // override championship point
title = "Firts championship";
race = "1";
race = "2";
points = "poinType1";
Krayy
9th November 2009, 19:24
Hi GL,
That's pretty close to what we were looking at. Your config file does break some parsing rules for .ini files, so heres a slightly modified version that makes the following changes:
1. The race series has a name
2. The races in that sequence are linked via the "series =" line with their sequence in the series indicated by the "sequence =" line. This way the races are tied to a series
3. Some extra points given for things like fatsest lap, top qualifier, most improved grid position
4. Add in default handicaps (mass:irest) and player specific handicaps (we modify these based on results, so might need to allow for adding handicaps in points system)
Lastly we should make sure that the system is flexible enough to allow for extra settings like driving aids allowed, registered drivers only etc.
[points]
name = "poinType1"
1 = 20
2 = 18
3 = 16
...
RelativeToPlayer = true;
FastestLap = 1
PolePosition = 1
MostImprovedGrid = 2
[series]
name="champ1"
title = "First championship";
points = "poinType1";
HandicapDefault = "20:0";
SaveReplays = yes
MailResults = krayy0@gmail.com
[race]
series="champ1"
sequence=1
date = dd/mm/yyyy;
Time = hh:mm;
Car = XFG+XRG;
Track = SO6;
qualifyTime = 0; // in minute
// qualify = no; <- specifying qualify time overrides
Laps = 10
HandicapUsers = "@krayy:20:0,4aged:30:0";
Allowresets = yes
[race]
series="champ1"
sequence=2
date = dd/mm/yyyy;
Time = hh:mm;
qualifyTime = 30; // in minute
Car = RB4;
Track = SO1;
points = "poinType2"; // override championship point
Laps = 20
HandicapUsers = "@krayy:40:0,4aged:20:0";
Allowresets = no
Krayy
9th November 2009, 20:35
Or better still, do it as XML that allows .NET to read natively and also allows us to integrate it with our websites easier:
<LFSLapperRaceConfig>
<PointsSystems>
<points>
<name>poinType1</name>
<Pos1>20</Pos1>
<Pos2>20</Pos2>
<Pos3>20</Pos3>
<RelativeToPlayer>true</RelativeToPlayer>
<FastestLap>1</FastestLap>
<PolePosition>1</PolePosition>
<MostImprovedGrid>2</MostImprovedGrid>
</points>
</PointsSystems>
<RaceSeries>
<name>champ1</name>
<title>First championship</title>
<points>poinType1</points>
<HandicapDefault>20:0</HandicapDefault>
<SaveReplays>yes</SaveReplays>
<MailResults>krayy0@gmail.com</MailResults>
<race>
<sequence>1</sequence>
<date>dd/mm/yyyy</date>
<Time>hh:mm</Time>
<Car>XFG+XRG</car>
<Track>SO6</Track>
<qualifyTime>0</qualifyTime>
<Laps>10</Laps>
<HandicapUsers>krayy:20:0,4aged:30:0</HandicapUsers>
<Allowresets>yes</Allowresets>
</race>
<race>
<sequence>2</sequence>
<date>dd/mm/yyyy</date>
<Time>hh:mm</Time>
<Car>RB4</car>
<Track>SO1</Track>
<qualifyTime>0</qualifyTime>
<Laps>10</Laps>
<HandicapUsers>krayy:30:0,4aged:25:0</HandicapUsers>
<Allowresets>yes</Allowresets>
</race>
</RaceSeries>
</LFSLapperRaceConfig>
Gai-Luron
9th November 2009, 23:05
:( in my opinion XML it's not very easy to read or write by human.
Krayy
9th November 2009, 23:55
:( in my opinion XML it's not very easy to read or write by human.
Hell I have trouble reading and writing my address :razz:
I'm fine either way. An INI parser is easy to write (I've done many of them in PERL), and yes, being human editable is probably a bonus.
LifeSteala
10th November 2009, 00:16
XML files can be read by a human easily with the use of an XSL Stylesheet. So if you have a generic XML file, you can create a generic stylesheet to be viewed in a browser.
Gai-Luron
10th November 2009, 09:19
Read and write?
Krayy
13th November 2009, 00:08
As an addendum to this topic, how about writing a generic .ini load function that we could use to load ini files into queryable arrays. Not only for race config but also for things like UserGroups e.g.
UserGroups.ini
[admin]
krayy
gai-luron
fred
barney
[superusers]
krayy
gai-luron
wilma
[banned]
barney
Add a new Class (IniFile) thats a Hastable of Hashtables, initialise an instance as LFSLapper.IniFile, then initialise it like:
IniFileRead("UserGroups", "./UserGroups.ini");
and access it by reading all entries as an array:
$array = GetIniFiledata ("UserGroups", "admin", GetCurrentPlayerVar("UserName"));
This would not only be for usergroups but also track data, race config etc.
Fire_optikz001
13th November 2009, 01:45
As an addendum to this topic, how about writing a generic .ini load function that we could use to load ini files into queryable arrays. Not only for race config but also for things like UserGroups e.g.
UserGroups.ini
[admin]
krayy
gai-luron
fred
barney
[superusers]
krayy
gai-luron
wilma
[banned]
barney
Add a new Class (IniFile) thats a Hastable of Hashtables, initialise an instance as LFSLapper.IniFile, then initialise it like:
IniFileRead("UserGroups", "./UserGroups.ini");
and access it by reading all entries as an array:
$array = GetIniFiledata ("UserGroups", "admin", GetCurrentPlayerVar("UserName"));
This would not only be for usergroups but also track data, race config etc.
hmm i like that but only one problem... no way to add to file ingame
Krayy
13th November 2009, 01:48
hmm i like that but only one problem... no way to add to file ingame
Easy as...just write a IniFileWrite function that will dumpo the nominated hashtable in an .ini section format.
Krayy
13th November 2009, 02:54
You could even use this system to set the initial Lapper vars instead of editing them in the LFSLapper.lpr file, so that the lapper file isn't touched as much. Eg:
Lapper.ini
[LapperGlobals]
$GripDatabase = "./GripPB";
$adminEmail = "";
$smtpServer = "";
$loginMail = "";
$passMail = "";
$VoteRestart = -1;
$DefaultTopCar = "XFG+XRG";
...
Other uses: swear words, Track names & codes, etc
lysergic
16th February 2010, 21:59
:( in my opinion XML it's not very easy to read or write by human.
I agree :)
Any news?
loconstant
1st March 2010, 10:23
Up :)
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.