A python script to inject force feedback effects into a Microsoft Sidewinder Force Feedback 2 from MechWarrior 5: Mercs telemetry
It also binds the pov hat to extra buttons and adds another "layer" for the buttons, giving you 30 buttons.
I have written a python script that does two things. Take telemetry and uses that to drive force feedback effects and read the joystick and use that to drive a virtual joystick for the game to read.
It gets the telemetry from the Space Monkey program. That sends it to this program as UDP packets.
To read and command the joystick I have written a python extension to read/control a Microsoft Sidewinder Force Feedback 2 joystick. You can find that here and here.
For some reason MechWarrior 5 doesn't like to read the Sidewinder, so you have to pass it to virtual joystick. The script uses vjoy with pyvjoy python bindings.
- Get a Microsoft Sidewinder Force Feedback 2 joystick, set as the preferred joystick. No drivers are needed on Windows 11.
- You will then need to setup vjoy and configure it like this: vjoy setup
- Setup SpaceMonky, make sure it works with MW5. Have it configured like this and this
- Copy the HOTASMappings.Remap to
your_user\AppData\Local\MW5Mercs\Saved\SavedHOTAS
- Config the joystick as you like. Remember hat is treated as more buttons and the
5
button acts as a layer for another set.5
plus7
and8
adjust the strength of the feedback. - From the command line, cd into where you have cloned this repro and run:
pip install -r .\requirements.txt
I made a video of this here as it's a little involved.
Once you have everything setup, the startup sequence is
- Start SpaceMonkey
- Click the
Open Motion
button. - Click
Initialize!
- Start the
UnrealEngineModLauncher.exe
- In windows terminal, cd to the directory you cloned the script in. then run
python .\MW5_FFB.py
- Start MW5.
Launch your mission as normal. Sometimes the telemetry doesn't flow, I found if you restart the mission it tends to fix the issue.
This seems to be caused by updating the virtual joystick too fast. If you run into this, increase this number : https://github.com/HappyFox/MW5_FFB/blob/main/MW5_FFB.py#L93 I have set it to 30 fps, which should be good for most systems.