Hey fellow RF2 nuts - to cut right to the chase, I need a RF2 64-bit plugin that does absolutely nothing other than write the current speed of the car to a text file every half second or so, that's it. Appending a new line to the file every time. That's it! No GUI, no configurable settings, nothing. Long story short the reason is this - I have a big box fan I'm going to mount on top of my monitor, and the idea is that as you accelerate, the fan begins blowing air at you reletive to your speed, so that by the time you've reached your top speed on the straight it's at 100% power and you're getting blasted with air. Certainly not "accurate" or realistic but I think it could add a bit of fun and immersion and I already have the hardware laying around for this. The fan is connected to a variable speed drive which is connected to a PLC, which receives commands from my PC over a serial connection using the modbus protocol. None of that is important though! Because a friend of mine is a Ruby wizard and has already written me a small Ruby app that will monitor a text file (the one you would be creating with speed in it), take the most recent line in the text file every time it sees a line added, scale it however I choose to a 0-100% value in the modbus protocol, and then send that out over a serial connection to the PLC, which will then drive the fan at the requested speed. So the hard work is done. He's a busy guy and has no time/desire to learn the rf2 plugin language/type and basically does zero windows development, so I'm afraid I need to find someone else to create this simple little plugin. So ALL I need is this: when driving/out of the pits/whatever, the plugin writes the current speed in mph to a text file about every third of a second or half a second, adding a new line each time. It doesn't need to ever delete the file, create a new file, or anything fancy like that. The ruby script simply monitors a text file and every time it sees a new line, uses it scales it and sends it to the fan, so timing accuracy isn't important either. So the output text file would look like this, let's say driving down a straight: 30 35 39 45 60 80 etc etc It does not need to do any kind of marking for a new session, or delete any previous values from a previous launch of rf2, it can just keep appending to the same file forever. Nothing fancy! I'm desperate to make this happen as I think it'd be cool and I have all the hardware already laying here plus the needed ruby script, and looking through the example rf2 plugin code it seems it already writes some of these values to a file, however I would have no idea how to edit it and compile it, especially to a 64-bit plugin. If someone could do this for me I'll paypal you $15, it's not a ton but it's all I got right now. I figure for someone familiar with rf2 plugin creation, this could be done in literally 10 minutes, especially using the example plugin code provided by ISI. I will also give you a HUGE shoutout in the little demo video I'll be making once it's finished and working. Thanks so much! When it's finished I have no problem sharing the little ruby app and plugin for all those other rfactor 2 users that happen to have an industrial PLC plus variable frequency drive laying around, LOL. You never know!
Great. I am sure someone wrote something similar for I racing. The same guy wrote something so he could use a ffb/vibration motor out of a joy pad and fixed it on his brake pedal to simulate wheel lock or abs.
If this thing dumps every half second then this file will get big. How about I wipe the file each time you hit the race button.
Thanks so much! You're a lifesaver. as for getting big, I've been running the motec telemetry plugin which logs a ton of data points 50ish times a second, and I think the biggest file I've ever seen was maybe half a megabyte. By my simple math, just writing speed to a new line 3 times a second would make a 5MB file every 100 hours of gameplay. However that said if it's no extra trouble for you, clearing the file whenever works for me! I just didn't want to trouble anyone more than necessary Can we do 3 times a second? I'll paypal you as soon as I get something, however there's no rush at all if you're busy as I just sold my G27 and my t500rs won't be here for another 7 days, so won't be able to race till then.
You must do quite short runs That said, I believe your maths is correct. Averaging 2.5 characters per line and a 2 byte end of line will give you around 5MB per hundred hours. But what's important is you don't need it later, so clearing on each run will avoid any potential issues in the long term.
Caught me ok ok, I just checked and most of them are closer to 3MB. btw, your plugin is amazing. I had an ex-F1 (80's) mechanic over (current mechanic for my buddy who runs historics), and he was jealous of how many data points we get, and for free LOL Anyway, so many talented people on this forum. Thanks for all the help
~ In our community, every December, we have the Simracing Awards. Theres a category called "Forum member" to the ones that stands out from the crowd, helping people. Believe me that if ISI forums had something similar, Noel would be the winner some years in a row.
I don't know... I totally dropped the ball on this project. Hahaha. I was on vacation the week he made the request and I completely forgot about it. Duh. I will get to work on it though.
Okay... this is a very quick and totally untested plugin. It may not work at all. I am headed out of the office so I can't test. But if someone wants to give it a shot let me know. https://www.dropbox.com/s/0795gae2u9t9ea6/SpeedDump_x64.dll?dl=0 It dumps the speed in m/sec to a file called SpeedDump.txt.
Making progress! Hardware and Ruby modbus conversion program are ready to go and working, something's up with the plugin though, I've contacted Noel. Will definitely be making a video when it's done!