The online racing simulator
InSim Checking for Single Player
Okay, so for my Artificial Intelligence in Racing Simulators project using Live For Speed, I really want to limit this to Single Player only, even better if I could limit to "Single Player" _ONLY_ meaning; no Multiplayer, no Hot lapping or Training.

Inside the IS_STA packet I can detect if the player is playing by checking to see if ISS_GAME is turned on _AND_ ISS_MULTI is turned off. However, using InSimSniffer, with many different situations I've found that even while watching a multiplayer replay ISS_GAME is turned on AND ISS_MULTI is turned off. Which would allow the LFS -> AIRS interface to believe it can successfully work, when it can not.

I can so far detect when the player is watching a SPR, connected to a server - including their own or multiplayer in general (which is a good elimination as that prevents people from abusing this to gain miles in LFS or compete with the AIRS).

But I still need to detect hotlapping and MPR correctly, any thoughts ideas or things I've overlooked?

EDIT: Ahaa. I can now detect the MPR correctly, actually I was already detecting it correctly. My detection works like this so far, still need to detect Hot Lap mode...

"OnConnect" -> Request IS_STA from LFS using the TINY...
When STA is received, set "IsSafeToUseAIRS = false".
Only set "IsSafeToUseAIRS = true" IF the ISS_MULTI is off and ISS_GAME is on.
If IsSafeToUseAIRS then request IS_NCN from LFS.
When NCN is sent, make sure there is only 1 Total connection, and that the UCID is 0, 'host'. Which will eliminate MPR, at least those where the player was not alone on the host. . . Hmmm.

Still would like a way to detect hotlapping, and perhaps a better way to detect MPR.
Thanks for the question, and part of the answer.
My suggestion is to request an IS_RIP whenever the STA changes to ISS_GAME. This will either result in an IS_RIP with the (pseudo boolean) MPR member set to 1 (= multiplayer replay), or an Error value of RIP_NOT_REPLAY (= multiplayer game).
That works great! Thanks Morpha, by the way I had to re-update my InSim.txt apparently ... I probably would have noticed that, but I didn't have RIP packets... Or Screenshot stuff... Hmm. Well, now I wonder if there is a way to detect Hotlap mode. Or at the very least to tell LFS to invalidate a hotlap. Not that I think my AI will compete with WRs but I don't want someone using it for any sort of malicious activity. Although I really don't know if I will share in the first place, but better to be safe all around than not.

Quick bragging note; my AI beat the LFS (pro) AI on the dragstip with LX6 (0.80) and FZR (0.24)... :P

FGED GREDG RDFGDR GSFDG