PiranMOTO PIE (PHP; InSim; Easy) - Windows EXE running a PHP InSim framework
** Please consider this a beta release at this time! **
PIE is designed to be give easy access to InSim functionality with the PHP programming language (ver 7.2, CLI mode). It takes care of connection to InSim (and optionally OutSim and OutGauge) and maintaining the connection, and calls a user-defined function on receipt of any packet. It can be used to connect to an LFS client (local mode) or an LFS server (host mode) and comes with some basic commands and debugging.
PIE is a commandline executable that reads a PHP file (refered to as a PIE script) and optionally a text configuration file. PIE then uses the settings provided to initiate a connection to InSim. Once connected, PIE will wake from sleep at the specified frequency to run a 'tick'. During this tick, PIE will process any incoming packets, call any pending callback functions, and return to sleep. PIE runs at between 5 and 50 ticks per second, default 20.
PIE scripts consist of PHP functions that are called by PIE as appropriate, such as at startup, on receipt of a packet, at a pre-specified time, etc.
There are functions available to do common tasks such as sending packets, speaking to chat, etc., and a PIE object provides constantly-updated InSim information and a data store.
Functions that are called on receipt of an InSim packet are called with a parameter which consists of all the packet data, unpacked into an associative array. Some packets with combined values have additional indexes for the separated values, and all text fields have been made safe for windows (0 byte stripped, raw SkinID bytes converted to SkinID text string).
I see what you mean with the lights now. I'm planning on smoothing them out with the rest of the curves, and the light texture will be fine-tuned a bit better to match. It'll still be three distinct sections, but they'll curve gently along their length and have a less angular transition between them.
Thanks for the setups, I will give them a thrashing over the weekend :thumbs: To be honest I'm really not skilled enough to drive this thing anywhere near the limits - it's all I can do to get through the roundabout section of the ring without crashing. It's no less fun though
About a bigger version, maybe, but I've got a lot of other modding to do and not much time to do it. It's derivatives-allowed though, so anyone is welcome to make a bigger version if they're impatient. (This one does have aero, btw, quite a bit. It might not feel like it, but without any it is barely touching the ground at about 100kph )
Speaking of the fragility... we're running this tonight on DD at an offroad fig 8 (round 5, 20:30 UTC). Fingers crossed!
Thanks for the kind words. It's a strange vehicle for sure
Quick fixes: I've updated the rear lights and allowed all tyres.
To-do: I'm still thinking about the overall shape, more details, how much more I need to cut for wheels etc., and possibly adding fairings for the knee supports. I will save the smoothing for after another WIP update.
We're going to sneak a quick special event into the schedule before we kick off season 7, with our racers choosing the combos. *(what really?)*
Suggest the car/track combinations you'd like to race most on our discord server, we'll all vote on them, and then we'll run the 7 most popular for this week's event. *(oh god no)*
To keep it relatively sane, we'll require that in each combo we must have either a car or track that we've raced before. One new thing at a time! *(well that's something at least)*
If it's a track that's not in the server's !vote menu (list available at https://piranmoto.co.uk/servers), let us know so we can upload and check it in time. *(just no)*
Voting will be open until Weds evening, combos will be announced and readied on server for practice on Thurs. *(we're all going to die)*
I've got all kinds of grass layouts over on PiranMOTOGrassRacing, but no small ovals. The closest is Rony's, but it's probably bigger than you're looking for. (!v to vote layouts)
I'm happy to host any layouts you make, there's some good grass places in WE if you can find the right patch of lumpiness. I could maybe transplant one of the old banger ovals onto grass
EDIT: Clean racing on Grass and Street servers! Not everyone knows PM does anythign other than DD
A quick update, version 0.1g, to make use of the new mod filtering system: Carlim now uses the /cars and /mods commands when setting a whitelist, to hide cars for which there are no whitelisted options.
I don't know if it's related, but I was helping someone out with the the insim SCH packet and it isn't working as expected. If I set CharB to 105 (lower case i), LFS seems to receive 57 (9 key) and turns hazards on instead of toggling ignition. I hadn't used that packet before so I have no more useful info than that I'm afraid, no idea if it has always been so.
Edit: It worked when sending 'V' in upper case, the view changed as expected.
Steering lock is one of those things where I have conflicting info - most Lions seem to be listed at between 18 and 24 metres turning circle, but that corresponds with 15 to 20 degrees of turning angle. 35 degrees of steering as we have now is a 9 metre turning circle, so we're already pushing the boundaries of the data I found
Having said that, it is important to me that this can be used by everyone who wants to, for any purpose... including drifting. Once you throw the back of this thing, it just keeps going and going and going, maybe a bit more steering angle would be useful for that. People who want lower angles can always do it in the setup.
I am thinking maybe when they list turning circle instead of steering angle, that they mean it in real world terms, ie, the space it needs to turn including the overhang. These turning circle calculators don't include overhang, which would make a big difference and render my numbers above useless.
I've used it for a while, it's good. It does take a while to get our info in there, but our setup is not standard. (I'm a webdev too, I feel your pain in trying to cover all these possibilities neatly )
The changes proposed look like they will fix all the problems we have
I thought maybe the free-text could override the setup you have now, which is great for organisers if they know which cars they are using. Maybe also a default set in the season settings? For example I would then use the text 'Various' until they were chosen, then fill them in properly. Rony would do the same with 'TBC'.
If you leave the possibility of having full data in there, you could use it elsewhere - on the mod page, for example, or an icon on the mod's cover pic.
That looks to be the best fit for covering everyone without going crazy.
I think it's one of those things where you can clarify endlessly, but never really get rid of the last bit of fuzz. We use 'event' for 'a round in a season' just because we have rounds within those and it was sometimes clunky to distinguish.
Yeah, you can use a text command for that: /p_dt USERNAME
One thing to watch is that you must use the smaller MST packet for sending the commands to the host, not the larger MSX packet. (I have a check in my 'say' function that looks for a leading slash and uses MST if it finds it, MSX if not.)
One useful thing I can see missing from the forum calendar system is a non-default or free-text option for the fields.
For DD, we're running 21 races with various cars at various venues, but the event goes into the calendar as 1 practice at BL1 because that's as close as I can get.
If it's too much to put free-text options into each field, maybe just an 'other' option for the fields, and a separate short text field for notes?
I appreciate we're a bit of an edge case, but I've seen it outside our case too. I've practised a standard config for a race advertised in the calendar, only to realise it was actually a layout track when I got there.