The online racing simulator
Searching in All forums
(966 results)
Gai-Luron
S3 licensed
Zone event trigger only one action when entering in zone. Not along the zone. Maybe doing zone more restricted relative to apex and test speed and angle when entering in this zone. Maybe 2 or more contigus zone. To be tested! For now you haven't angle but try if zone correspond to your wish first. There is an example in the script for registering zone

Gai-Luron
Gai-Luron
S3 licensed
Drift count code . Original Code by Monk. I have never change it.
One tick = 1/10 second

driftScore= absangle * speed * speed / 10000

on tolow speed, drift score reset to 0


double driftscoreinthistick = this.absangle * speed * speed / 10000d;

if (speed < minspeed)
{
this.driftticks = 0;
this.totaldriftscore = 0;
this.lastdriftscore = 0;
}
else
{
if (this.absangle > minangle && this.absangle < maxangle)
{
this.driftticks++;
this.lastdriftscore += driftscoreinthistick;
this.totaldriftscore += driftscoreinthistick;
//System.Console.WriteLine(string.Format("DRIFT: {0} {1} {2} {3} score: {4}", this.UserName, this.NickName, this.UniqueID, this.ConnectionNumber, this.driftscore));
}
else
{
this.driftticks = 0;
}
}

Gai-Luron
S3 licensed
Exact, it's more quick and the error is not big enough.

LFSRelax use trigonetrical approach for the distance between 2 car.

if you have simple mathematical func to know the minimal distance between a point( your car ) and a segment in a node, you can make a great drift programm. But create the full segment for each track will be a big big work.

Perhaps Scawen can add a insim packet to know the distance between theorical path ( F4 display ) and the car. This simplify the drift scoring


Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
I can have less than 1 meter, but i write zone for this resolution. LFS have resolution of

1/65536 meter

For a circle, you need need calculation ( a2 + b2 = c2 ). Not for square, no need floating point calculation.


Tu use a path it's possible using a mix of node and a segment ( theorical path segment in the specified node, y = ax + b, each node have and a and b value ).

In this case, you locate the node where you car is and then calculate the minimal distance to the segement associated in this node.

But the big work is to determine all this segment for all tracks, i think zone is more easier

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

Using zone event.

A zone event is a zone who trigger an action in LFSLapper when car enter in it. it's a square zone with 1 meter resolution ( 0 to n meter ). This zone is user determinated. is it sufficient for your purpose? Maybe you can make a test with this feature and if it's what you want, i can make avaiable angle and perhaps the distance for the car to the center of this zone.
Make a test!

But i don't know how many zone won't slow LFSLapper. To be tested.

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

New Release: 5.8.4.2

Support multi-language

Gai-Luron


+-------------------------------+
|Changes from v5.841RC to 5.842 |
+-------------------------------+
1. Add new GLScript function
strFormat( formatStr,arg1,..,argn );
example:
strFormat( "The player {0}, there is actually {1} players on track", GetCurrentPlayerVar("nickName"), GetLapperVar( "nbPlayersOnTrack" ) )

This function is a very powerfull fonction to format text
The following table lists format controls supported by the C# String.Format() method together with examples of each control:
Control Type Description Example
C Currency
Displays number prefixed with the currency simple appropriate to the current locale
{0:C} of 432.00 outputs $432.00
D Decimal
Displays number in decimal form with optional padding
{0:D4} of 432 outputs 00432
E Exponential
Displays number in scientific form with optional value for fractional part
{0:E5} of 432.32 outputs 4.32320E+002
E Fixed
Displays the number including the specified number of decimal digits
{0:F3} of 432.324343 outputs 432.324
N Number
Converts a number to a human friendly format by inserting commas and rounding to the nearest 100th
{0:N} of 123432.324343 outputs 123,432.32
X Hexadecimal
Converts a number to hexadecimal
{0:X} of 432 outputs 1B0
0:0... Zero Padding
Adds zeros to pad argument
{0:0000.00} of 43.1 outputs 0043.10
0:0#... Space Padding
Adds spaces to pad argument
{0:####.##} of 43.1 outputs 43.1
% Percentage
Multiplies the argument by 100 and appends a percentage sign
{0:00.00%} of .432 outputs 43.20%

2 - Add new GLScript command
myConfig();
This show the Lapper config panel for the player

3 - Remove shift + I command.

4 - Add !myconfig in default LFSLapper.lpr file to call the player config panel

5 - Add language bloc translation in config file
Syntax :
Lang idLang
...
EndLang
You can create many block you want. Many block as you want for Lang "EN".
idMessage = Message;

idMessage is an idenditification of the message.
Message is the message displayed on the screen. You can put in it {0} ... {n} parameter. Look at strFormat

Example:
Lang "EN"
main_welc1 = "^7Welcome {0} ^7to ^1LFSLapper ^7powered server !&^2Type ^7!help ^2after leaving garage to see commands.";
main_welc2 = "^7Your actual friendly Position (all visitors) : ^7{0}&^2Your actual League prequalify Position : {1}^6Estimate Pool : {2}&Don't use swearwords on this server&respect other player&otherwise you can be banned";
main_accept = "Accept";
EndLang
Lang "EN"
main_deny = "Deny";
essai = "My test value 1 = {0}, value 2 = {1}";
EndLang
Lang "FR"
main_welc1 = "^7Bienvenue {0} ^7sur ce serveur Géré par ^1LFSLapper^7!&^2Tapez ^7!help ^2 pour voir les commandes après avoir quitté le garage";
main_welc2 = "^7Votre position absolue (Tous les visiteurs) : ^7{0}&^2Votre position de préqualification : {1}^6Estimation de poule : {2}&Ne pas employer de mots grossiers sur ce serveur&Respecter les autres joueurs&sinon vous risquez d'être banni";
main_accept = "Accepter";
main_deny = "Refuser";
essai = "Mon essai valeur 1 = {0}, valeur 2 = {1}";
EndLang

6 - Add new GLScript command
GlobalMsg( "Message" );
if same as cmdLFS("/msg Message"), but GlobalMsg support automatic translation ( see below )

7 - Add new GLScript command
GlobalRcm( "Message" );
if same as cmdLFS("/rcm Message") and cmdLFS("/rcm_all"), but GlobalRcm support automatic translation ( see below )

8 - Add new GLScript command
PrivRcm( "Message" );
if same as cmdLFS("/rcm Message") but for the current player, privRcm support automatic translation ( see below )

9 - Add new GLScript command
langEngine("%{idMessage}%", param,...,param )
but this function don't return the translated message, but set the translate
engine for the global messaging. This function must be used everywhere in message function

example:
langEngine("%{main_welc2}%",$Posabs,$Posqual,$Groupqual )
main_welc2 is defined in language block for the different language
the value is english is :
"^7Your actual friendly Position (all visitors) : ^7{0}&^2Your actual League prequalify Position : {1}^6Estimate Pool : {2}&Don't use swearwords on this server&respect other player&otherwise you can be banned"
in main_welc2 message
{0} is replaced by value of $Posabs
{1} is replaced by value of $Posqual
{2} is replaced by value of $Groupqual

10 - Add new GLScript command
langTranslate("%{idMessage}%", param,...,param ) same as langTranslate
but this function return the translated message.
idMessage , same id who is defined in block message
param1,..,paramn , parameter to fusion with message. look at strformat

11 - Add the choice of the lang in the !myconfig command.

12 - Fix minor bug in info when an error occur un script

13 - Fix bug in releasing button when type shift+I

14 - Language pack for EN ( English ) and FR ( French )


Release
Gai-Luron
S3 licensed



Special thank's

The original program was written by MonkOnHotTinRoof. I had his permission to maintain and develop it because it stopped the development. Thank's a lot Monkter for your initial prog Wink

Dev Team
Gai-Luron : Official Coder
Bass-Driver: Support & Coder
LakynVonLegendaus: Support & Coder
Yisc[NL] : Support & Script Coder
Sinanju: Support

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

LFSLapper Development Subforum : Help, Request, Bugs, Scripts
http://www.lfsforum.net/forumdisplay.php?f=262

Download
Version 7.0.9.1

LFSLapper's Manual (Work in progress)
Tutorials

LFSLapper will work for both Demo and Licensed hosts and can be used also for single player games.
Will also work on dedicated servers and Linux OS (Mono required).

Specifications:
  • Runs on Windows using .NET, or on Linux with Mono
  • Written in Microsoft C#.
  • Source is available under GNU license.
  • Multi-threaded: A single LFS Lapper instance can manage multiple LFS servers.
  • Able to reload the configuration without leaving LFS.
  • Connection to LFS server using UDP or TCP.
  • Uses the SQLite 3 database for easy data management
  • Complete scripting language (GLScript) to develop your own scripts and events
    • Management of events triggered by LFS
    • Event Timer for Delayed Effects
    • Logic tests (IF/ELSE, CASE/SWITCH)
    • Loops (WHILE, FOR, FOREACH)
    • Global or local variable scope
    • Able to call internal LFSLapper functions
    • Call script sub-functions
    • Easy to use LFS buttons. Multiple buttons on the screen. Fully configurable
    • Buttons can auto-close on Timer and generate actions
    • Blinking Buttons
  • Easy to include other custom modules or scripts
  • Automatic detection of program crashes
  • Automatic restart
  • Notification by e-mail on crash.
  • Complete management of log files for easy debugging of your scripts.
Features:
  • Create qualification user groups using external files or configuration file
  • Hotlaps or drift mode
  • Store lap PBs in Grip (Hotlap) or drift mode
  • Can calculate PB by an average of 1 to 10 laps
  • Calculate and store points in drift mode.
  • Top PBs display in LFS.
  • Display charts in LFSH (Hottlaps, Drift)
  • Event-specific scripts
  • View driver PBs from LFS World
  • View driver statistics (fuel, km, ...) from LFS World
  • Export files via FTP to use or display on websites.
  • Call personalized web pages and run the code returned by these pages
  • Allows setting the date format for regional support.
  • Management of node events (enter/exit custom track locations)
  • GLScript allows function calls on Timer.
  • Setting permissions on the server according to criteria of lap times by car and circuit.
  • Manage lists of swear words
  • Manage driver and car handicapping (Car, Car/track, Driver)
  • Manage use of driving aids in LFS
  • Full vote management of LFS to End Race, Restart Race, Restart Qualification
  • Sort race grid relative to PB or WR
  • Automatic Car/Track rotation
  • Display leading or following times separating the driver from other racers
  • Personalized messages on record (WR)
  • List qualifying drivers on the server
  • Events called on Lapper start, new driver connections, disconnections, leaving pits, split times, enter pits, etc. ...
  • Define custom commands to be executed via LFS chat.
  • Message flood detection
  • Set the maximum number of laps allowed by a racer during a session
  • Detects loss of car control (customisable)
  • Detects drivers that are too slow
  • Detects drivers that are parked on the track
  • Displays speed or distance values depending on the unit chosen by the drivers: km / h, km or mph, mp
  • Calculates acceleration time
  • Configurable pit windows
  • Penalty management: Speeding in pit lane. Jumping the start before the green light
  • Add/remove autoX objects
  • Carcollision detection
  • Object collision detection
  • Actions buttons
  • ... And much more
Quick start
  1. Make sure you have .NET Framework installed (Mono will work, too).
  2. Extract archive to arbitrary directory.
  3. please read doc/readme.txt.
Utility
Trackinfo maker
Trackinfo maker is an utility who generate a trackInfo.cfg with splitting of wr with your own coefs. I generate the default trackInfo.cfg with this utility
http://cgtavc.monespace.net/la ... wnload/l...ackinfo1.4.zip

Clean SPB
CleanSPB.exe is an utility who clean all spb on PB file
http://cgtavc.monespace.net/la ... nload/lapper/CleanSPB.rar


PBLFSLapperPHPViewer By Gai-Luron
http://cgtavc.monespace.net/la ... wnload/l...PViewer1.0.rar


All prog by Gai-Luron
LFSRelax :http://www.lfsforum.net/showthread.php?t=27913
LFSLapper :http://www.lfsforum.net/showthread.php?t=25756
LFSStat : http://www.lfsforum.net/showthread.php?t=24933
Last edited by Bass-Driver, .
Gai-Luron
S3 licensed
Not same recup locale mode

Gai-Luron
Gai-Luron
S3 licensed
Probably strange config in locale. Like separator for decimal used in your windows. Take a look in this direction.

For LFSLapper, post int the good area.

http://www.lfsforum.net/forumdisplay.php?f=262

bye

Gai-Luron
Gai-Luron
S3 licensed
Hello,

Thank's for your post

Quote from [d9] :
- AIs detection and prevention of making them the stats + simple management (possibility to blocking them)

LFSLapper don't work with AI

...
Quote from [d9] :
- possibility of use of mutliple groups of admins/mods - eg. !kick commnd (power users+mods+admins), !ban command (mods+admins), !track command (admins)

Already exist. Group of User. Infinite number of Group. Take a look on onMessage event to view simple use.

Quote from [d9] :
- blue flag management + actions ... like airio
...
- !cancel command for admins/moderators (defined user groups) - stopping of restart/qualify countdown eventually to cancel of kick/ban vote (different command eg. !cancelvote or same command with intelligent behaviour for both situations) ... inspired by zion manager

Can you explain more. I don't know how work airio. No time to install it

Quote from [d9] :
- custom grid building on restarts (depend on session pb/server pb/lfsw pb etc.) ... like airio/ctra

Already in Todo List

Thank's for your idea. i put this ideas on todo list

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Yes FBM have a digital Speedo!

Gai-Luron
LFSLapper Release
Gai-Luron
S3 licensed
USE THE LFSLapper SUBFORUM FOR YOUR MESSAGES


LFSLapper will work for both Demo and Licensed hosts and can be used also for single player games.
Will also work on dedicated servers and Linux OS (Mono required).



Download Last Release

LFSLapper Subforum

Actually Working LFSLapper



Some features
  • Multi LFS Management: One LFSLapper manage one or more LFS
  • Dedicated language script for config file : GLScript
  • LFSLapper come with powerfull script written by Yisc
  • Sqlite3 Databases
  • Multilanguage support
  • Programm crash detection and notification by email and automatic restart
  • Public personal best lap notification
  • Public split times notifications
  • Best laps ladder; each track, each car with its own table
  • Auto Restart
  • Automatic rotation Tracks and/or Cars
  • Swearwords actions
  • Multiple LFS Event catched : End race, start race, on pit, end pit, Best split, etc...
  • Welcome message
  • Simple drift scoring
  • Idle car detection
  • Pit actions
  • Flooding protection
  • FTP Personal best lap Transfer
  • Authorization ( license, Controls, handicap )
  • Penalties catching
  • Mph or Km/h
  • LFSLapper command via web
  • Messages box using LFS buttons
  • Actions buttons
  • ... And much more
Gai-Luron


USE THE LFSLapper Subforum FOR YOUR MESSAGES
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Already done
Gai-Luron
S3 licensed
No some programm are obsolete too in this database. No up to date!!

I think it's important to have this section in official forum.

Gai-Luron
Gai-Luron
S3 licensed
Hello,

I can, if only nobody want to do this, manage the new unofficial add-on database. But i think, it's better that a non developper user do that!

Bye

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

Victor give us a section for LFSLapper in

Live for Speed > Main > LFS Programmer Forum

Subforum named : "LFSLapper Development"

Now you can put your request, bugs report, Scripts, Config issue in this subforum.

Many, many thank's to Victor

LFSLapper progress report:
Next release become the new official release. The major improvement is the support for multilanguage in config file and some minor other improvement and maybe a C# user plugin support ( if i have time, if no, later ).

Bye

Gai-Luron
Last edited by Gai-Luron, .
Config help
Gai-Luron
S3 licensed
Hello,

You can put here your config issue.

I never reply to config help in PM


Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

LFSRelax is not for windows 7! Maybe recompiling it!

Gai-Luron
Gai-Luron
S3 licensed
Hello,

New RC release

Quote :
+--------------------------------+
|Changes from v5.840 to 5.841 RC |
+--------------------------------+
1. Add new GLScrip command
CurrentPlayerlfsWorldPB( $argv );

Display a screen table with the lfs world PB for the current player
$argv cant contain a car or a track or the two values
$argv = "XRT" -> Display all LFS world PB for the XRT Car
$argv = "BL1" -> Display all LFS world PB for the BL1 Track
$argv = "BL1 XRT" -> Display LFS world PB for the XRT car and BL1 Track

This feature need the pubStatIdk setted in config file

Due to the tarpit that forces you to wait 5 seconds between two call to pubstat
( if two player join in less than 5 sec the server ), you need to wait few second
before retry command.

2. Add new function in LFS chat
!mypb to view your LFS world PB

example:
!mypb XRT
!mypb BL1



Gai-Luron
S3 licensed
Quote from Tim NL :Loading WR...OK

But your connection is not ok.
Check your Insim port. Start LFS server with argument "/Insim=29999"
or type "/insim 29999" in talk window when server is already running.
And check if your admin pwd from the dedi server the same is as in lapper.
In the ini file and in LFSLapper.lpr

No need to put Pass in LFSLapper.lpr. Only in the Ini.

Gai-Luron
Gai-Luron
S3 licensed
Quote from Target78 :Thank you for the answers!
Maybe like this understandable my question: picture :Kick_Can_

For now, no export .elp for userStoredValue, sorry!


Gai-Luron
Gai-Luron
S3 licensed
Hello,

Release Candidate 5.840RC on the first Page.

Quote :+----------------------------+
|Changes from v5.838 to 5.840|
+----------------------------+
1. Release Candidate

+----------------------------+
|Changes from v5.837 to 5.838|
+----------------------------+

1. Add Lapper Var : nbPlayersOnTrack
GetLapperVar( "nbPlayersOnTrack" );

2. Little optimization: Reload LFSServers.cfg as soon as it's modified

3. Fix Bug on votation if votation end is activated

4. New GLScript function
GetUserGripPb( username, carName, trackName )
example
GetUserGripPb( "gai-luron, "FBM", "BL1" );
GetUserDriftPb( username, carName, trackName )
example
GetUserDriftPb( "gai-luron, "FBM", "BL1" );

5. Now all this player value are in kph and not depending on the player unit
GetCurrentPlayerVar("Dist");
GetCurrentPlayerVar("SessDist");
GetCurrentPlayerVar("AvgSpeed");
GetCurrentPlayerVar("InstantSpeed");
GetCurrentPlayerVar("BestSpeed");

To have the result in player unit make a conversion using ToPlayerUnit( valueKph )

6. Add new GLScriptcommands
Speed and dist are in kilometer, you need to do convertion in script to display the appropriate value
ToMph( value ) Convert a value in Mph or Mile
ToKph( value ) Convert a value in Kph or kilometer
ToPlayerUnit( value ) Convert a value depending of the player unit choice

7. Add new player var
GetCurrentPlayerVar("UnitDist");
return km if player use this unit
return Miles if player use this unit

8 - Add new GLScript command
RegisterZoneAction( trackname, Xposition, Yposition, metersAroundZone, callbackfunction );
Backcall command is executed when a zone is reached by a player
Example
RegisterZoneAction( "BL1" , -78,200, 5 , DisplaySpeed );
On track BL1, When zone X=-78, Y = 200 in 5 meter around this zone is reached,the Sub DisplaySpped is executed. To have the coords of a specified portion of track.go to this place with your car and type !zone ( if you are admin ))



Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Quote from oldnavy :Hi. Im using newest beta version and i dont get it how to start lapper. I pur all info( i think) to lfsservr.cfg and in game i get mesage liek this LFSLapper in Stand By State ,and no comands works. heres my lfsservers.cfg

<?php 
#    Configuration of LFSServer to be Managed with LFSLapper
# One line per server
# Remote port is the port used to manage LFSLapper remotely, future extension
# One remote port per LFSLapper on one machine, autoStart is optionnal
#Unique ID|GroupId|Ip|Port|WorkDir|IniFile|autoStart
remotePort=3001;
DEF1|gr1|127.0.0.1|29999|./default|default_1.ini|autoStart
?>


I inserted all admin pass in lfslapper.lpr and in default_1.ini

type !start in LFS chat

or use autoWork to start lapper in work mode
Gai-Luron
S3 licensed
Gai-Luron
S3 licensed

IF ($AKM == "The Greatest") THEN
Greatest();
ELSE
Worst();
ENDIF

FGED GREDG RDFGDR GSFDG