The online racing simulator
issues with my next insim app "setup buddy"
hello,

after several years I consider to develop my next insim application. This time it should be a small one, but different things seem to be impossible unfortunately.

Short description of what I want to do: When racing on different servers with different cars on different tracks I am used from Grand Prix Legends (what I was racing for several years), that the game remembered that last used setup for every track and every car. LFS does not, and I feel it very annoying, so I was going to develop a "setup buddy": every time the track changes or I select a different car, then the setup buddy automatically selects the last setup that I have used for this combo.

In principle this is possible, I can read the setup out of the cfg.txt file and I can change the setup with the /setup command. The problems are, that I cannot detect reliably, when I am in the garage screen and (much worse) that I cannot detect a car change within the garage screen. I get a notification in the moment, when the user leaves the garage (with a ISP_NPL, but this is too late), but not when the user returns to the garage screen from the screen, where we can select the cars. I was playing the whole day with insim, captured a lot of insim traffic, but there was no appropriate notification, that could solve my problems.

Use of this tool could become quit intricately (e.g. change car=>leave garage=>reenter garage=>tool selects correct setup=> leave garage again and race..). So if I do not find a appropriate solution to detect car changes, maybe it would be better to write it in the Improvement Suggestions forum as a request instead of trying to develop an insim tool.

Any ideas, suggestions or hints? Any help would be very appreciated.

With kind regards
Soeren
I'm not sure what you're getting at:

Why exactly do you need to know when you're in what screen? You can change /car and /setup also whilst not in the garage, so why is it a problem?
When you go to the garage screen a PLP packet is sent (I think that is the only time that packet gets sent). When in the garage the car is not actually changed until you click OK, in which case a new NPL packet is sent with the new car info. There is no way, as far as I know, to detect which car the player has selected on the UI. LFS does not report the car being changed until you click OK to leave the garage.
Quote from hyntty :I'm not sure what you're getting at:

Why exactly do you need to know when you're in what screen? You can change /car and /setup also whilst not in the garage, so why is it a problem?

No, you can't. LFS tells you, that the driver is already in the race.

3g_drv_alrd ==>
german: Der Fahrer befindet sich bereits im Rennen
english: Driver already in race

kind regards
Soeren
Quote from DarkTimes :When you go to the garage screen a PLP packet is sent (I think that is the only time that packet gets sent). ...

unfortunately this does not happen if you were spectating the race previously.

Quote from DarkTimes :... When in the garage the car is not actually changed until you click OK, in which case a new NPL packet is sent with the new car info. ...

there are exceptions as well. But both issues are less important than the last one below, because I could (maybe) make some workarounds for this.

Quote from DarkTimes :... There is no way, as far as I know, to detect which car the player has selected on the UI. LFS does not report the car being changed until you click OK to leave the garage.

Quote from Soeren Scharf :No, you can't.

Yes you can.. Quite obviously you can't change car or setup whilst physically on track (duh... :doh but you can do so while spectating.

For example: You enter a server, determine the track, somehow determine which cars are allowed. If you have previously driven that combo a button saying "you've driven this combo previously" would appear and by clicking it you send /car and /setup commands to the game.
-
(T3charmy) DELETED by T3charmy

FGED GREDG RDFGDR GSFDG