I've fully implemented the NPL with zero NumP as a join request, and the InSim program can reply with Allow or Disallow. That's done and tested. The spawn position option still needs to be implemented. This seems simple in the case where a spectator is joining the race in game.
It is more complicated to deal with the case where a pitted player, who is already in the race, wants to leave the pits. It seems to me that ideally the join request should be sent in this case too. Otherwise there will still be a case for car reappearing and instant spectate, that there is no more reason for in the case where someone joins the race. Unfortunately there simply is no join request in this case, so I'm looking right now to see if I can change the internal packet sequence to allow this. This would also allow the external program to (optionally) determine and specify the spawn position for that player returning from the pits.
If that turns out to be possible, then there is no need to actually STORE starting positions in players. The InSim program would just send the start position any time, if it wants to, on fresh join or return from pits. Also the 'teleport' case is still to be coded but that seems simple too. I hope to allow teleport without car fixing as an option, that could allow stuck cars to be brought back into the race.
So far, so good, but there is still one more case. Where people will start when they enter from the lobby screen. Without the ability to STORE start positions in players (i.e. specify a start point for all subsequent joins) there is no mechanism to specify the start point for players on the grid, entering from the lobby. But maybe that does not matter. You can do something with autocross start positions if you want to control where they appear when they've all clicked "ready". Or you could quickly teleport them to new positions after entry (though this is maybe a bit messy).
Does that make sense? The idea of actually storing start positions in players could be useful but may cause its own problems, so that's why I'm trying to avoid it.