The online racing simulator
car restrictions
hey i want to finish my race system with car restrictions like 5% intake restrictions but how would i set it up?
#2 - Krayy
In the main lapper file:


<?php 
#Syntax :
#
#$HandicapCarsTracks = "car/track:mass:irest,car/track:mass:irest,...,car/track:mass:irest";
#
#car : LFS short car name
#track : LFS short track name
#mass : mass handicap in kg
#irest : Air intake restriction in percent

$HandicapCars "UFR:0:30,XFR:0:30";

?>

So the last line in our lappr file puts a 30% restriction on UFRs and XFRs with no weight penalty. I'm looking at expanding my Handicapping code to include car restrictions too. Will let you know how I get on.
Quote from Krayy :In the main lapper file:


<?php 
#Syntax :
#
#$HandicapCarsTracks = "car/track:mass:irest,car/track:mass:irest,...,car/track:mass:irest";
#
#car : LFS short car name
#track : LFS short track name
#mass : mass handicap in kg
#irest : Air intake restriction in percent

$HandicapCars "UFR:0:30,XFR:0:30";

?>

So the last line in our lappr file puts a 30% restriction on UFRs and XFRs with no weight penalty. I'm looking at expanding my Handicapping code to include car restrictions too. Will let you know how I get on.

ye but i want it to be reset after the race so would i do $handicaps = " "?
#4 - Krayy
Quote from Fire_optikz001 :ye but i want it to be reset after the race so would i do $handicaps = " "?

Yes, an empty string ("") clears the handicaps
so if i wanted to use this for my race sys it would be...


<?php 
$HandicapCars 
"$car:$mass:$intake";

?>

?
#6 - Krayy
Quote from Fire_optikz001 :so if i wanted to use this for my race sys it would be...


<?php 
$HandicapCars 
"$car:$mass:$intake";

?>

?

Yep
Quote from Krayy :Yep

ok so would i put that on race start or what?

or right when the user selects it
#8 - Krayy
At the moment, only in the lapper config file. I will try and update the !hc command to allow for car/track/user handicaps in the near future
i thought u said i could do it with

<?php 
$HandicapCars 
"$car:$mass:$intake"
?>

if i can where do i put that line?
Quote from Fire_optikz001 :i thought u said i could do it with

<?php 
$HandicapCars 
"$car:$mass:$intake"
?>

if i can where do i put that line?

In the main Lapper config file. Search the file to find the sample lines that are alreay in there.
Quote from Krayy :In the main Lapper config file. Search the file to find the sample lines that are alreay in there.

ok i think i got what ur sayin
What code would you add to Turn off & restrict ABS and EBS (engine breaking on the BF1 to 0 ?
You can't force off EBS, even in directly, this information is not reported back to an InSim client in any way. I'm pretty sure that ABS is also not reported to InSim. Only the player's help flags are reported, such as Clutch Assist, and if they are using a Mouse, Keyboard or Wheel.
Quote from Dygear :You can't force off EBS, even in directly, this information is not reported back to an InSim client in any way. I'm pretty sure that ABS is also not reported to InSim. Only the player's help flags are reported, such as Clutch Assist, and if they are using a Mouse, Keyboard or Wheel.

So there is no way to block lets say.

Tc : off
EBS : 0%
Gear ratio : 0-6 locked
Gear ration : 7 open to adjust
Final ratio : locked
No, you have no control over the setup of the car. The only thing you can do is force intake restrictions on cars, but they have to pit in order for it to be updated. This means that, for example, you can give a car a 10% intake restriction via a command, but you will have to force pit them in order from that change to take effect. You can't modulate the level of restriction while the car is on track with the current tools we have as InSim programmers.

If you take a look in your LFS directory, you'll find another folder called docs. In that directory you'll find a file called InSim.txt. This contains all information about the InSim system, and what it can an can't do.

---

I just want to say, I love what you're trying to do. I love F1 as well, and I wish you all of the best.

-- Mark 'Dygear' Tomlin, Founder - Simulation Federation Internationale de l'Automobile.
Actually the IS_NPL packet that gets sent when a player joins the race does allow for checkking if the player has ABS or Traction Control enabled:


<?php 
// Setup flags (for SetF byte)
#define SETF_SYMM_WHEELS    1
#define SETF_TC_ENABLE        2
#define SETF_ABS_ENABLE        4
?>

It's just that Lapper ignores this value in it's code:


<?php 
            
public NPL(byte[] pak)
            {
                
PLID pakGetBytepak3);
                
UCID pakGetBytepak);
                
PType pakGetBytepak);
                
Flags pakGetWord(pak6);
                
nickName pakGetString(pak824);
                
Plate pakGetString(pak328);
                
CName pakGetString(pak404);
                
SName pakGetString(pak4416);
                
TyreRearLeft = (tyre)pakGetByte(pak60 );
                
TyreRearRight = (tyre)pakGetByte(pak61);
                
TyreFrontLeft = (tyre)pakGetByte(pak62);
                
TyreFrontRight = (tyre)pakGetByte(pak63);
                
H_Mass pakGetByte(pak64);
                
H_TRes pakGetByte(pak65);
                
Pass pakGetByte(pak67);
// SetF should be read here!!!!
                
NumP pakGetByte(pak73);
            }
?>

Maybe in a future version. I use a heavily modified Lapper code base, and will probably enable this later on.

FGED GREDG RDFGDR GSFDG