This is a work-in-progress script, that implements GTA or BeamNG-like Steering Correction to LFS by adding a Virtual XInput gamepad, reading a real gamepad input and correcting its output based on slide angles. Also features a rudimentary TC and Brake Help (ABS-like) feature.
- Reads XInput Gamepad in slot 1
- Creates Virtual XIput Gamepad in slot 2
- Reads car information through LFS OutSim
- Gets input from Gamepad 1 and outputs corrected Steering through Gamepad 2
- VigemBus
- Any Xinput gamepad in Slot 1
- Written and tested on Python 3.9, requires XInput and vgamepad libraries
- Either set LFS_cfg_location in default.cfg and to your LFS cfg.txt loctation or manually set the LFS cfg.txt Outsim section to the following:
OutSim Mode 2
OutSim Delay 5
OutSim IP 127.0.0.1
OutSim Port 30000
OutSim ID 0
OutSim Opts 80
- Make sure you have VigemBus installed and a gamepad in slot 1
- Launch CountersteerLFS before LFS
- In controls, bind Steering, Gas, Brakes and Handbrake to XInput Gamepad 2
- Currently, Gas and Brakes are hardcoded to the Triggers, and Steering to the left Joystick
- Error Handling
- Better LFS cfg patching
- Standalone EXE release
- Better profile handling
- More configurable options