The online racing simulator
LFS Companion
(77 posts, started )
LFS Companion
Hello.

LFS Companion is a local insim application I've been working on the last couple of years. Its primary purpose is to make it easier to keep track of the chat, on-screen buttons to show you rpm, speed, gears etc. It is quite beneficial for the average LFS driver.

After getting good feedback on it, I'll be making it public and be developing it further.
This project is open source.
https://gitlab.com/kriss0706/lfs-companion


Features
- Read chat from within the application window
- In-game UI that displays speed, rpm, fuel percentage, lights, handbrake, avg fuel etc.
- Fully customizable in-game UI using insim buttons.
- In-game options to customize settings like fuel warning, kmh/mph, automatic lights etc.
- Hotkeys can be pressed to interact with the insim.

Connection properties (host, port for insim to connect to) can be set in the <LFS_Companion>/Config/Connection.ini.

LFS Companion is likely going to ask you to download the .NET runtime. You can find that here:
https://dotnet.microsoft.com/en-us/download/dotnet/6.0

Important notice
For the insim to read data sent from your LFS (speed, fuel etc.), you need to go into the cfg.txt in your LFS folder and set the following:
OutGauge Mode 1
OutGauge Delay 1
OutGauge IP 127.0.0.1
OutGauge Port 30000
OutGauge ID 0

Attached images
LFS1699735886-1518x878.jpg
LFS1699735871-1288x554.png
LFS1699735822-1192x524.png
LFS1699735806-1574x826.jpg
templates.jpeg
LFS1705648328-440x370.png
LFS1705648276-710x342.png
LFS1705648053-1635x648.png
LFS1705648032-1620x669.png
LFS1705647987-751x234.png
LFS1705647964-977x257.png
Awsome ! can't wait to try it now, and feedback it !
#3 - BeNoM
Neat! Good to have an alternative to LFSLazy.
Do have Gear Ratio show kph/mph?
Quote from GT4_PL :Do have Gear Ratio show kph/mph?

Gear ratio does not display speeds in the garage. If such thing isn't aquired through insim packets, i probably won't be "hacking" my way there. But will look into it.

EDIT: I believe top achieved speed for gear ratio is gotten only through memory. This won't be on the top of my list of priorities, but will look into it later on.
New version is out.

v2.2:
- Added options panel.
- Added fuel warning.
- Added button to hide UI.
- Added modules panel.
- Added car contact (on/off).
- Added object contact (on/off).
- Added laps info function (on/off) [disabled for now].
- Added strobe functionality for tows/cops. Doesn't full work yet.

EDIT: Added a seperate file to save user settings.
Attached files
LFS Companion v2.2.zip - 509.6 KB - 268 views
Quote :For now the application only connects via insim port 29999 and has no admin password set.

The app told me:
"InSim : password does not match your multiplayer admin password"
So I cleared the password I had set in "Start Server" menu and it worked.

In the pre-race screen, it should hide itself. (It makes the startgrid list disappear.)

Ingame the displayed numbers are just "0" "0,0" and "0,00%"?
They do not change when driving.
Quote from Gutholz :The app told me:
"InSim : password does not match your multiplayer admin password"
So I cleared the password I had set in "Start Server" menu and it worked.

In the pre-race screen, it should hide itself. (It makes the startgrid list disappear.)

Ingame the displayed numbers are just "0" "0,0" and "0,00%"?
They do not change when driving.

1) Yes, I'm aware of this. I'm planning to allow users to set ip, insim port and admin pw. Coming soon!

2) I don't really race myself, but will look into that pre-race thing.

3) Thanks for the feedback, I can tell you right away that the reason its just display 0 on everything is because you most likely haven't set the following outgauge settings in your LFS\cfg.txt.

OutGauge IP 127.0.0.1
OutGauge Port 30000

Ah yes, outgauge settings. Looks like this now:
OutGauge Mode 1
OutGauge Delay 1
OutGauge IP 127.0.0.1
OutGauge Port 30000
OutGauge ID 0

but still only zeros are displayed. Even when in cockpit view.

What I mainly want is small displays for: gear, rpm, speed.
Because some mods do not show that in the cockpit. I would like to disable all other messages/displays.

/edit:
Now it showed this attached error.
The german part reads: Usually every socket adress (protocol, network adress or connection) maybe only used once.
Maybe some sockets are not closed correctly?
Attached images
lfscomp.jpg
Quote from Gutholz :Ah yes, outgauge settings. Looks like this now:
OutGauge Mode 1
OutGauge Delay 1
OutGauge IP 127.0.0.1
OutGauge Port 30000
OutGauge ID 0

but still only zeros are displayed. Even when in cockpit view.

What I mainly want is small displays for: gear, rpm, speed.
Because some mods do not show that in the cockpit. I would like to disable all other messages/displays.

/edit:
Now it showed this attached error.
The german part reads: Usually every socket adress (protocol, network adress or connection) maybe only used once.
Maybe some sockets are not closed correctly?

Sadly i don't know enough german to read that entire message. But i see words like socket exception, and binding. So I'm gonna guess its failing to connect to the insim port. Have you set /insim 29999 in-game?

Keep in mind that if cfg.txt is edited, you're gonna need to restart LFS.
v2.4:
- Fixed Car Contact message not displaying properly.
- Fixed Object Contact message not displaying properly.
- Fixed car speed, no longer displaying in m/s. Now displays km/h.
Attached files
LFS Companion v2.4.zip - 510.4 KB - 221 views
v2.6:
- Users now have the option to customize insim connection settings in InSimConnection.json.

Configurable options:
- Host
- Port
- Admin password
- Prefix (not needed as there are no commands, but added anyway)

I've attached the new files here as well as the #1 post.
Attached files
LFS Companion v2.6.zip - 512.4 KB - 205 views
v2.6.1:
- Improvements to options panel.
- Moved modules to options panel.
- Removed modules panel.
- Warning messages for low fuel is now customizable.
Attached files
LFS Companion v2.6.1.zip - 512.5 KB - 222 views
v2.7:
- Users can now use kmh or mph in options.
- Fixed minor bugs.
- New option that allows you to always show menu buttons, or only show while standing still. (Customize UI and Options).
- Moved Car Contact and Object Contact buttons to Messages.
- Added ReCon module (not ready yet).
- OutGauge Port is now customizable in InSimConnection.json.
Attached files
LFS Companion v2.7.zip - 514.3 KB - 252 views
The constant updates are amazing, good stuff! Proper Lazy competitor.
Quote from BeNoM :The constant updates are amazing, good stuff! Proper Lazy competitor.

Thanks, I appreciate it. Lazy is an amazing piece of software, and I'm not planning on taking over/replacing it. More like just covering more customization than Lazy was able to.
Does it have or will it have a feature like the best lap recording comparing and estimate timing?
Quote from loopingz :Does it have or will it have a feature like the best lap recording comparing and estimate timing?

Displaying lap times is no big deal, that's fairly easy. But for recording laps, comparing, or displaying best lap(s) it is slightly more work. I can say for sure I'll be displaying laptimes, I'll think about it.
v2.8:
- Bugfixes.
- Strobe is no longer displayed in "customize ui" if module is disabled.
- Added datetime button.
- Datetime button is now customizable as the rest of the UI.
- Added setting to set datetime format (date and time, date, time)
- Fixed 3 bugs with messages not being copied to clipboard via application interface.
- Menu buttons are no longer disappearing in spectate.
- Added an icon.
- Clicking on interest reward now shows how much it is in chat.

Note: The RC Helper module is a feature for the cruise server [RC] Reality Cruise. The module can be turned on in the in-game options.

EDIT: Someone reported a bug that caused the entire insim to lag out when the server full of connections, just a little quickfix. I've attached v2.8.1
Attached files
LFS Companion v2.8.zip - 561.7 KB - 205 views
LFS Companion v2.8.1.zip - 561.7 KB - 210 views
v2.9:
- InSim now sends updates from spectators.
- Reward button now appears in spectate.
- Fixed menu buttons getting stuck. Now hide/show as they should.
- Fixed mph showing '0' upon car contact.
- Removed custom commands (through application window).
- Bug fixes.
- Added logs for chat messages and car contact.
- Added Autoupdate
--> Now checks for newer version at Load
--> Downloads, extracts and installs new version.
- InSim buttons can now be toggled with SHIFT+B.
- Decreased insim update interval to 40ms (was 60ms).
- Improved Json checks
--> Json files are now validated at startup of application.
--> Json properties will be replaced if they are missing.
--> Json files will be created if they don't exist.

Important note:
If you wish to save your old button locations and in-game settings, all you have to do is copy over the new .exe and .pdb file into your old LFS-Companion directory and you should be good to go.
Attached files
CompanionV2.9.0.0.zip - 1.4 MB - 248 views
Hey! I have an error, when i click on Customise UI or Settings, LFS Companion crashes (InSim connection), and it's stuck in "InSim is not connected" loop. Can't exit it normally.

Any help?

Screen of error under.
Attached images
LFSCompanion-Error.png
Quote from Menticek :Hey! I have an error, when i click on Customise UI or Settings, LFS Companion crashes (InSim connection), and it's stuck in "InSim is not connected" loop. Can't exit it normally.

Any help?

Screen of error under.

Its very likely this error occured when you switched server. I'm aware of the error but haven't found a permanent fix. Here's a temporary fix:

1) Open your task manager (CTRL+ALT+DEL)
2) Find "LFS Companion.exe"
3) End process

The reason why the error cannot be closed is because the insim is technically running and not crashed, so the timers are still running =D
I'm hoping to get this fixed in the future.
Quote from kristofferandersen :Its very likely this error occured when you switched server. ...

No, i was on the same server, haven't switched with it active.
Somehow when i spawn, it does BUFF EXCEED or what is the error, and does that loop. But tnx for the reccomendation.
v3.0:
- chat_messages.txt now only shows messages sent my players.
- Added insim_messages.txt, which only contains messages sent by insim or server.
- messages when players connect/disconnect now shows up in chat_messages.txt
- Selected button ID messages are no longer showing.
- Changed message color to white.
- Added auto updater.
- Fixed car contact bug displaying the wrong name.

The files are now too big to upload to the forum, so I'll be using download links from now on.
v3.2:
- Fixed TC button not display properly.
- Updater now displays progressbar.
- Improved version formatting for Updater.
- Fixed minor UI bugs for Updater.

v3.3:
- Added laptimes.
- Added personal best.
- InSim now uses EntityFramework to CRUD to local database.
- Local database now stores PB.
- Local database now stores carnames and tracknames.

LFS Companion
(77 posts, started )
FGED GREDG RDFGDR GSFDG