• Like our community? Become a contributor -> here

SR4L rF2 - Grid and Pit Tool Box (Work in Progress)

DJCruicky

Well-Known Member
Staff member
Moderator
Modding team
League Member
Joined
May 15, 2012
Location
England
Last few days I been having some fun doing a bit of programming. Not done any in years so a bit rusty and slow at it.

Something I've not liked about rF2 is trying to work out who you might be sharing a Pit box with before the race.
If you knew who you were sharing with then you could talk to that person and say when you going to pit so they don't come in on them laps, or something.
Some tracks it's easy to tell who you are sharing with as normally you would be sharing a garage or tent with them. But for other tracks it's not that clear. Think of Spa67.

So made a little program that automatically types in the chat box who you are sharing with. I just press one button on the keyboard and it's done. It works in all sessions but best time to use it is in the Warmup session.

Looks like this-->
20220928013945_1.jpg
As you can see I'm sharing with Stewart.

Nice thing about the tool, I don't have to be logged in as an Admin or the need to remote access the server for it to work.

I don't think we have enough drivers in the league for pit sharing to be an issue at the moment, but it's nice to have a tool to use if we ever do.
It will say ">>Drivers Sharing Pit boxes, None<<" for most of our races in the meantime :D.


I'm also integrating a Hotkey that Reverses the Grid. One that works without the need to remote the server. More info on that soon. Early tests is looking very good.

DJC
 

bullwinkle

New Member
Staff member
Site Admin
Moderator
Modding team
Race Director
League Member
Joined
Mar 7, 2014
wow and where did you learn to do all this stuff. N wonder you are so fast, your brain is bigger.
 

DJCruicky

Well-Known Member
Staff member
Moderator
Modding team
League Member
Joined
May 15, 2012
Location
England
Internet, Tim, internet :D.

You all may have saw I tested it out in Sundays Fun race. It worked very well :). Although it does show up the problems with rFactor but.

I pressed the button at start of Warmup and it reported no one sharing. Here is the log. As you can see everyone has their own pitbox:-

pit=1 Ed Pond
pit=2 Tim McCoy
pit=3 David Cruickshank
pit=6 Mel Fisk
pit=8 Dave Coyne
pit=9 J-P Simard
pit=11 Michel Z. Santello
pit=13 Ron ODell
>>>>>> Drivers Sharing Pitboxes, None <<<<<<

Great!!


Then half way into Warmup:-
Dave Coyne leaves the server.
Tobias Schaugg joins the server for the first time.
and then Dave Coyne re-joins server with a minute to go.

I thought lets see what happens if I try my program again:-

pit=1 Ed Pond
pit=2 Tim McCoy
pit=3 David Cruickshank
pit=6 Mel Fisk
pit=9 J-P Simard
pit=11 Michel Z. Santello
pit=12 Tobias Schaugg
pit=13 Ron ODell
pit=13 Dave Coyne

>>>>>> Drivers Sharing Pitboxes <<<<<<
Ron ODell + Dave Coyne, are sharing a Pitbox

I was surprised, I took a look and indeed they were sharing the same garage tent.
Instead of Dave Coyne being put back into pit number 8 where he was he now been put into pit number 13 with Ron even though there are other empty spots.

Something we all need to keep a watch on if you sharing.

I'm going to be trying out the Reverse grid part of my program on Wednesday fun races while Myles7 is on holiday. Do join.
 

Ratus

New Member
League Member
Joined
Feb 23, 2015
Location
Switzerland
Great work DJC! Many times we had this problem (pit shared) on the CMS Races when big grids. As a solution or way around the first piting driver should pit as far right as possible (only 2 tyres in the red field). In case the second driver pits simultaneously he can use same pitstand sametime by positioning his car left of the other.

Would it be possible that other leagues could use your cool programm when big grids events?
 

DJCruicky

Well-Known Member
Staff member
Moderator
Modding team
League Member
Joined
May 15, 2012
Location
England
I've watched a few of your CMS Live streams with you all doing the pitstop checks in Warmup. It's almost like organised chaos each event you all trying to find, and get into your pit spot with many restarts of Warmup :D. You still had the guy park right in the middle of the pit spot in race despite all of that :eek:.
I'm probably just going to keep the program with SR4L for now.
 

DJCruicky

Well-Known Member
Staff member
Moderator
Modding team
League Member
Joined
May 15, 2012
Location
England
I mentioned above that I'm also integrating some Grid reverse options into the program.


1664924399150.png


There are a few apps to do this already, but mine works a little bit different.
The reverse grid is all done with mostly just the one keyboard F9 hot key button and it does it all for you. There is no need for me to remote to the server, no need to make batchfiles, everything can be done from my game screen.
The program uses the chat box to send all the admin commands to the server so I don't have to. How lazy is that? :D

It always finds the newest race result xml file to use, but as seen in the screen snap above it gives option to use the 2nd newest xml also. This is only used in emergencies where we need to go back to warmup after a failed race start for what ever reason.
If you don't want the latest file, the 'Load xml file from folder' option lets you choose any old xml from your xml folder. It brings up a file dialogue box to pick a file. You want a reverse grid from the qualify results?, no problem.

Before pressing that magic Hotkey, I decide if we want a Reverse grid, Normal grid, or Random grid. The normal grid is the same order as the result file.

Mine, just like other grid programs uses the Admin command /GridEdit Position DriverName to tell the server what position a driver needs to be in.

Other apps fail when people leave for the night at the end of the previous race and then a new driver enters. You would get errors when doing the grid edit where person(s) can end up out of place.
Mine uses the push sort method, everyone gets put in grid position 1 and the game pushes each person below that downwards so you end up with the correct order. New drivers that have just entered the server will filter to the back of the grid.

I will test it all out in the Wednesday nights fun 10 minute reverse races :).
 
Last edited:

DJCruicky

Well-Known Member
Staff member
Moderator
Modding team
League Member
Joined
May 15, 2012
Location
England
I made some new additions to the program.

When I press the middle mouse button, it brings up an admin button panel as seen below.

1665613511170.png

Before the program solely worked with hot keys on the keyboard, but that was getting a bit out of hand remembering where they were. It's a lot easier now with this pop up GUI button panel.
It's spit up into 3 sections. Grid Sorting, Pit Sharing and Admin buttons.

You might have spotted the 'Manually edit Pit positions of Drivers sharing' button. Not only does the program tell you who is sharing, but I now might be able to do something about it to move these sharing drivers to empty spots if there are any.
The example above where Ron ODell + Dave Coyne were sharing, I now could do something about it.
The program will also type in the chat box something like......
>>>> Moved driver 'Jim Ford' from Pit no. 3 to 17
>>>> Please check your new pit position Jim
If you were to see this message then that person should have a quick look to see where his new Red Arrow pit spot location is. If you were expecting your pit spot at the end of the pitlane and then in race it's at the start and you miss it, then it's your own fault for not looking where it was in Warmup.

Alternatively I also made a new button 'Move all Driver Pit positions in order from pit number 1 onwards'. This will push move all drivers down the list filling in any empty spots.

A list before the sort:-
pit=1 Ed Pond
pit=2 Tim McCoy
pit=3 David Cruickshank
pit=6 Mel Fisk
pit=9 J-P Simard
pit=11 Michel Z. Santello
pit=12 Tobias Schaugg
pit=13 Ron ODell
pit=13 Dave Coyne
See Ron + Dave sharing pit 13 (unlucky for them)

The List after the sort:-
pit=1 Ed Pond
pit=2 Tim McCoy
pit=3 David Cruickshank
pit=4 Mel Fisk
pit=5 J-P Simard
pit=6 Michel Z. Santello
pit=7 Tobias Schaugg
pit=8 Ron ODell
pit=9 Dave Coyne
Ron + Dave are no longer sharing.

These buttons use the rF2 admin command '/pitbydriver' to edit the Pits. This command does have some limitations. I get one shot at using it. My software can no longer see who is sharing no more after using it (unless I restart Warmup). Also, if someone leaves and re-joins then the game puts them back in the pit where they were before the edits. You would see odd things like 2 cars on top of each other in the pits when the person re-joins. It's like this data is stored inside rfactor in two locations.

I tested the reverse Grid sorting in Wednesdays reverse races. No problems. All good :).
 
Last edited:

bullwinkle

New Member
Staff member
Site Admin
Moderator
Modding team
Race Director
League Member
Joined
Mar 7, 2014
His head is too big for his body he is just so damn smart. Impressive
 
Top