BeamNG Remote Control [Irrelevant backstory, skip if not interested] A few weeks ago, Kerbal Space Program 0.24.2 was released, after almost a year of no releases. I was so pumped! Surely by now they would have fixed the problems with joystick support that led to a lot of joysticks not working. Well... they hadn't. After a bit of frustration, I said to myself "Surely one of the many multiplayer mods supports remote control. Maybe that'll help me." - but alas, none of the KSP multiplayer mods has real remote control. So I said to myself "this should be easy to mod in!" and I started by trying to coax KSP into loading SlimDX. But all it did was barf at me. Well then, I said to myself, we'll just have to set up a remote control. And off I went and started coding up the client part: An application that takes game control input and sends it somewhere over the network. I made some decent headway and had an application that could enumerate DirectInput devices and read them. Meanwhile, I remembered about beamng.drive. Downloaded it and played around a bit and plugged in my Thrustmaster dual trigger 3-in-1 and what is this? It doesn't work! Many hours were spent trying to come up with a working input map, but it was impossible. But then I said to myself "Hey, beamng.drive is supposed to have decent mod support. Let's take a look at this." And off I went and found remotecontroller.lua. And it didn't work. And I fiddled with it a bit more and then a bit more aaaand... I got it to work! [Real content starts here] I present to you: The beamng remote control. If your joystick, gamepad, or wheel is not supported by BeamNG.drive yet... this might just be the ticket! This application enumerates all DirectInput devices and lets you select one of them plus three axes to... remote control beamng.drive! Caveats This may not work at all if you have a 32-bit OS. Try installing The 32-bit SlimDX runtime from slimdx.org/download.php! BeamNG.drive will open a network socket if you run it with the -luasock commandline parameter, so your Firewall might pipe up. Allow it to listen to connections. All of this is highly experimental. This utility requires you to fudge around in the system lua files for the game. The updater will probably revert the fudging if you run it so beware of that. I have no idea what will happen if BeamNG and my utility fight over control of an input device. So you should probably remove any inputmaps for a device you'd like to use with my utility before trying this. Download The application is attached. Setup You need to install .Net Framework 4.0 Extract BeamNGRemote.zip Backup your BeamNG.drive\alpha_prerace\lua\system directory Copy the lua directory into your BeamNG.drive\alpha_prerace folder so that main.lua and remotecontroller.lua overwrite the files in BeamNG.drive\alpha_prerace\lua\system Done, you can now run JoystickTool.exe Usage Start BeamNG.drive with the "-luasocket" commandline parameter. (Add this parameter to the shortcut you use to start the game with.) Load a level. Start JoystickTool.exe and select a joystick and Axes. Click "Start". Actuate the axes on your game input device and see if cool things happen. Source Code Source code is here: https://github.com/duk3luk3/KSPRemoteTCP - Yes. It says KSP. You need the SlimDX development kit from http://slimdx.org/download.php. Roadmap Add support for remote hosts Add support for buttons Add input-output curves
very nice, i like - good idea and work Could i suggest to make the lua side working via hooks and it using another filename than the default one?
Hey, thanks for dropping by. I have a few questions: 1) How would I hook lua files? 2) How can I control the camera? I haven't found a lua file that controls the camera. 3) Are you going to fix the problem that remotecontroller.lua gets loaded before socket.core is initialised? Because then I won't have to override main.lua...
I can NOT get this to work.. I'm not the best with software, so maybe I'm doing something wrong, but every time I run the joystick.exe, it just stops running. I'd love to use it though, looks like a really handy tool.
Hi, sadly I can't test on Windows 8(.1). Please check that 1. You have DirectX 9 installed 2. You have .Net 4.0 installed 3. You have the SlimDX runtime for .Net 4.0 installed That should be everything you need. I've attached a debug build. Please run that and see if it produces any error messages!
Hi Every time when i hit that start button it gives me this error why ? http://prntscr.com/4scfax And also can you make tutorial like how to set it up It would be really cool