The online racing simulator
Searching in All forums
(882 results)
Bass-Driver
S3 licensed
Is option 1 instead of that CName to Hex convertion?
That whould be a cleaner solution indeed.
Bass-Driver
S3 licensed
Oke after adding alot of missing lines in the packets that represnts the packetsizes/type/req/ etc and cleaning the code a bit. I have been started to add the multiply/divide stuff to the packetsizes.
Also i've set the insimversion to 9.

The insim wont even start and tells me that the adminpass is wrong.
It seems to go wrong with getting info from the IS_VER insimpacket.

Is there something else i need to change with packets,like the TCP/UDP packets for example. Because LFS might also send/receive packets with differend bytesizes with the new insim version?

EDIT: I disabled some Try{} Catch{} to make lapper crash. The app closes within a second, so had to be quick to make a screenshot of it.

Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Quote from xspeedasx :well the
packet[0] = 8 * 4;

should be 2 (divided by 4 so that sizes up to 1020 can fit into 0-255 possible values).
packet[0] = 8 / 4;

and the size after reading can be calculated like this:

public ACR(byte[] packet)
{
PacketSize = pakGetByte(packet, 1) * 4;


Ahh oke, i will try that.
Are there packets that doesn't require the divide/multiply stuff?

Thank you all for the help.
Bass-Driver
S3 licensed
Quote from xspeedasx :

Feel so stupid right now. After adding all those packets in LFSLapper. With no experience in C# lol.
Trying to learn and understand the working of the code.

But some examples:

Sending a packet: I did this

public byte[] OCO(byte OCOAction, byte Index, byte Identifier, byte Data)
{
byte[] packet = new byte[8];
packet[0] = 8 * 4;
packet[1] = (byte)TypePack.ISP_OCO;
packet[2] = 0;
packet[3] = 0;
packet[4] = OCOAction;
packet[5] = Index;
packet[6] = Identifier;
packet[7] = Data;

return packet;
}

Reading a packet: What do i do here??

// OK For Insim 7
//Admin Command Report ( added @ 16-10-2017)
public class ACR // Size 12, 16, 20... 72 depending on Text
{
public readonly int PacketSize; // 12, 16, 20... 72 depending on Text
public readonly int ReqI; // 0
public readonly int UCID; // Unique Connection ID
public readonly int Admin; // set if user is an admin
public readonly int Result; // 1 - processed / 2 - rejected / 3 - unknown command
public readonly int Sp3; // Spare 3
public readonly string Text; // 4, 8, 12... 64 characters - last byte is zero

public ACR(byte[] packet)
{
PacketSize = pakGetByte(packet * 4, 1); //1 Byte (multiply 'packet' by 4) ??
ReqI = pakGetByte(packet, 2); //1 Byte
UCID = pakGetByte(packet, 4); //1 Byte
Admin = pakGetByte(packet, 5); //1 Byte
Result = pakGetByte(packet, 6); //1 Byte
Sp3 = pakGetByte(packet, 7); //1 Byte
Text = pakGetString(packet, 8, 64); // 4, 8, 12... 64 characters - last byte is zero
}
}

Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Quote from Victor :Hmm what are you trying to do here?

Taking a guess: you would like to get the name of a mod.

Indeed, i tried to get the 6 chars name of the mod.

First get the chars/official carname from the NPL insim packet, which gives me some weird symbols if it is a mod. But that is fine.

Then i checked the web for some methods to convert it to HEX like the link below.

https://stackoverflow.com/questions/16999604/convert-string-to-hex-string-in-c-sharp

Some methods did work. And the output was almost the same as the modded car (Skin ID), but some chars didn't convert well, which gives me different HEX values.
LFSLapper V7.0.9.0 Test #6
Bass-Driver
S3 licensed
Hello everyone.

After days being frustrated to get the new insimpacket sizes not to work. I can finally start release something that actually works.
Thanks to all who gave me advice.

I will try to add the new stuff Scawen is releasing during the test phases of the game.
Every new test version of LFSLapper will be uploaded in the first post.


NOTE: LFSLapper V7.0.9.0 DOES NOT WORK in LFS version V or older!!!

EDIT: Released Testversion #6 , Works on LFS W47 and higher

Download the test version and let me know if something isn't working. I might take a couple of days to fix stuff. Schwitz
============================================================================

+---------------------------------------------------------------+
|Changes from 7.0.8.1 to 7.0.9.0 TEST #6
+---------------------------------------------------------------+
=================================================
New:
=================================================

1: [Playervar]: "SkinName". GetPlayerVar("SkinName");
2: [LapperFunction]: SetListAllowedMods(); Set allowed mods. Max 120 mods allowed


CASE "!setmodlist":
SetListAllowedMods("4A1C57,FA2989,39CEEB,238F06");
#SetAllowedMods(""); #Allow all mods.
BREAK;

3: [LapperFunction]: GetListAllowedMods(); Get list of allowed mods.

CASE "!getmodlist":
$List = getlistallowedmods();
$NrOfMods = ToNum($List["NrOfAllowedMods"]);

privmsg("^7===== ^3List of Allowed mods ^7(".$NrOfMods.") ^3mods ^7=====");

IF($NrOfMods == 0) THEN
privmsg("^3All mods are allowed!");
ELSE
FOR ( $i = 0; $i < $NrOfMods ; $i = $i + 1)
privmsg("^7Mod ^0[^3".$i+1."^0]^7: ".$List[$i,"SkinID"]);
ENDFOR
ENDIF
BREAK;

4: LFS Rest API (request info about a certain mod) Test #1
-Register your LFSLapper @ https://www.lfs.net/account/api
-Fill in your ClientID and ClientSecret in myInc.LPR (includes/myinc.lpr)
-2 differend ways to request modinfo , by username(must be on track!!!) or by SkinID

$modinfo = getmoddedcarinfo("Bass-Driver");
or
$modinfo = getmoddedcarinfo("E25059");
-Variables in testscript below or in (includes/optional/lfsrestapi_Info.lpr)
=================================================
Changed:
=================================================

1: LFSLapper Insim version changed to version 9. Only compatible with LFS W43 and higher

2: Update: Event OnObjectHit() New argument to get contactspeed when hit an object:
$ContactSpeed

3: PlayerVar: GetPlayerVar("Car"); , Will now display the SkinID, if you've selected a mod.

4: Updated trackList.cfg
=================================================
Fix:
=================================================

1: Some autoX objects didnt match with their objectindex number
2: [Lappercrash] when loading more than 30 objects at once
3: [Event]: OnPlayerSelectCar() didnt displayed the name of the car correctly
4: [Event]: Several Events like (OnDist, OnDriftScore) didnt execute when more than 8 players on the track
Caused by MCI packets when more than 8 player are on the track


Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Quote from Viperakecske :Sure bass,sure Big grin

https://youtu.be/EBhnzJTzEUA

Ok, i take back my words Schwitz
Bass-Driver
S3 licensed
Quote from Victor : Do you really need to host insim applications on the gaming machine itself?

Yes, i host couple of LFSLapper insims which i edit/add/delete/move scripts/files daily .Its for development as for normal use.

Connecting LFSLapper from my PC to the server will cause delays. Which is not ideal for insim connections. Especially with alot of players on the server.

Same for cruise servers aswell. They might have a database (SQL/Files) they have to edit daily/weekly).
Bass-Driver
S3 licensed
Quote from michal 1279 :FragMasters apparently do.

There is a big difference between this version and the upcoming one.
Not the difference in versions we have now. Which some is still in use
Bass-Driver
S3 licensed
Quote from michal 1279 :You can use temporary free server option.

They still can host old LFS version servers afaik.

Noone want to host old servers after the new version is out lol
Bass-Driver
S3 licensed
About the hosting stuff, i think i miss a ton of information here.

So Scawen get rid of the dedicated servers? Thats a big nope after all those years working with LFS Dedicated servers.

-What if you want to test something for a day and you do not want to be a host of the server?

-All the big companies that host LFS Servers, Are not be able to host any LFS servers anymore?

-I have multiple servers running + Insim at home. Now i have to pay for those? Thats a no for me.
i can better stop developing my insim now. Just a waste of time.

Wasn't it possible to change the dedicated server with more protection:

-You will not be able to start a dedicated server without a valid LFS website user/pass and license.
Bass-Driver
S3 licensed
Not surprised, that this was going to happen. Typical Scawen message Big grin

Anyway, i'm looking forward to the big update.
Cannot wait to drive on the new refreshed tracks.
Keep up the good work. Smile
Bass-Driver
S3 licensed
We currently reached a unique visitor count of 1100+.
We thank you all for that.

BUT

Someone is having a laugh on the server. The WR lists from all the 6 stages are filled with the same name. That guy is damn quick.

Can someone beat his times??

Bass-Driver
S3 licensed
Quote from sinanju :My FXR time is approx 8 seconds slower than the fastest.

With keys, this car has the worse understeer of all the cars, and I struggle to get round all the turns, even with full front wing, and no rear wing.

If anyone has a set that works well, and is willing to share, I'd be grateful Smile

Here is my set. I did a 1:18:08

Controller: Mouse/Keyboard.
Bass-Driver
S3 licensed
No need to apologize. Welcome back Big grin
Bass-Driver
S3 licensed
Not sure when you will be online, but i whould like to test your insim.
I have been in your server a couple of times. But its pretty quiet in there.
Even with a great layout and insim.
Bass-Driver
S3 licensed
Again thanks for testing.

I havent opened the guiconfig script. I just saw the line in the results. Ye me lazy Big grin

Not sure it solves the problem with the orginal LFSLapper version 7.0.8.1.exe, since you found that line in your script.
Bass-Driver
S3 licensed
Opened all scripts from the includes directory in notepad++, and finding the word "DriftPB", i found 1 script file that has the old drift database value.

Could you find that file and parameter and change the value to "./Databases/DriftPB", to see if that helps.

bin\default\includes\guiconfig.lpr
$DriftDatabase = "./DriftPB";

Thank you
Bass-Driver
S3 licensed
Thanks for testing.

This is interesting.

Can you verify the values below are the same in LFSLapper.LPR or other scripts.

$DriftDatabase = "Databases/DriftPB";
$StoredValueDbs = "Databases/storedvalue";
$GripDatabase = "Databases/GripPB";

If these values are differend. That could mean it creates a database in the "wrong" folder. In this case the 'default' directory instead of 'default/Databases'.

The variables you see above, matched with the parameters in the sourcecode.


About the discord libraries. I have tried to place those files into a seperate folder, with no success yet. Need to dig deeper into programming to understand how to do that.
Bass-Driver
S3 licensed
Hello,

After looking into the sourcecode, i saw a few faulty default parameters.
Example:
'./PBgrip' instead of './Databases/PBgrip'.

I changed those parameters.

My question to you guys, is to test this with the attached LFSLapper.exe

Make sure you create a backup first before deleting the existing databases and LFSLapper.exe

Version 7.0.8.0 or 7.0.8.1 is needed to use this LFSLapper.exe

Thank you
Bass-Driver
S3 licensed
Thanks for testing.
Will check the sourcecode this evening.
Bass-Driver
S3 licensed
Yaay,
Found the orginal script in my mail that i've sent to Sinanju in march 2017.
Bass-Driver
S3 licensed
Thanks for still using the script i made.
i'll check my backups, if i can find the original script.
Bass-Driver
S3 licensed
Hello,
Thank you for finding this weird database behaviour.

The database files in the '/default/databases' directory should be the most accurates ones. You could try this by deleting(backup) the databases files in de '/default' directory.

I dont think there is a reason, its probably just a typo in the sourcecode or lfslapper.LPR that creates 'new' databases in the wrong directory.
Bass-Driver
S3 licensed
Quote from Yisc[NL :;1967450"]Wow, this is a very nice system with a great GUI.
I am sure people will start using this, so thanks for sharing and making this.

Thank you Smile
FGED GREDG RDFGDR GSFDG