The online racing simulator
Coding idjit needs help :)
(7 posts, started )
Coding idjit needs help :)
As a total complete numpty when it comes to using my 5 decrepit brain cells, I am appealing to the community for help

What I would like is a script/code/anything to limit the guests on my dedicated server to certain constraints. A good example of this (and why I know it is possible) is Beckys STCC servers, where the server automagically knows what config you are running (eg: Throttle Blip/cut)

I would like something so that ONLY people using a wheel set to 720 deg, using an H-Shifter with a clutch, and with NO throttle blip, throttle cut, or auto-clutch; and no brake help either can race on the server, but anybody could spectate regardless...
in other words, I want people limited to 100% 'realistic' - with one proviso, it must be easy to switch on or off

Thanks in advance for any help.
Quote from Bladerunner :I would like something so that ONLY people using a wheel set to 720 deg, using an H-Shifter with a clutch, and with NO throttle blip, throttle cut, or auto-clutch; and no brake help either can race on the server, but anybody could spectate regardless..

That isnt possible. And, before creating in Insim Program, you first have to learn how to connect to and bind UDP sockets in a programming language.(basically any language that supports them). I use python, for which there is no "insim library" for. Some other languages that people use for InSim are C++, C#, Java, PHP, (I'm the only one AFAIK that uses python).
Quote from wheel4hummer :That isnt possible.

It's partially possible. Double check the player flags bitfield for the "IS_NPL" packet and you'll notice you can get some of that sort of information.

I'm afraid you cannot detect wheel turn amount or what type of shifter being used. At the moment.

Quote from wheel4hummer :(I'm the only one AFAIK that uses python).

There *used* to be a python library. I don't think it's been updated in a while though. sdether created it if I remember correctly.

Theoretically all you need is an InSim client, and to check the players as they join (IS_NPL) and compare their bitfield your prefered settings. If they don't match, spectate them using the usual command. To turn it off, simply shutdown the program
720 degree rotation is not detectable, which is good - because not everyone has the facility! It is also totaly unrealistic in a race car (I have driven a small number of real race cars and in all cases the wheel is setup to be turnable lock to lock with both hands on the wheel in the quarter to three position).

H Shifter is not detectable

Clutch IS detectable - but it is not possible to detect between button or pedal clutch

The other aids are all detectable, and are pretty much what you get in the STCC platinum server. A clutch is encouraged by forcing those who dont use one to have throttle cut on.
Oh well...maybe have to wait a bit longer then...
[jk]
(until EVERYBODY got G25's and LFS is hard coded to not have the 'arcade' options )
[/jk]
Thanks for the help anyway guys
#6 - nilo
Quote from wheel4hummer :(I'm the only one AFAIK that uses python).

I'm with you. :Handshake

And I would really recommend it to beginners!

In fact, I started creating an insim-lib for python. Not much happened there, tough, due to some serious lack of time.

Choose your future.
Choose Python.
Quote from nilo :I'm with you. :Handshake

And I would really recommend it to beginners!

In fact, I started creating an insim-lib for python. Not much happened there, tough, due to some serious lack of time.

Choose your future.
Choose Python.

Python is nice, but I always seem to end up using Perl instead, unless I'm programming my s60 phone.

Now if only I could figure out why certain packets aren't unpacking properly.. (I freaking hate binary protocols)

Coding idjit needs help :)
(7 posts, started )
FGED GREDG RDFGDR GSFDG