HamzaYslmn/Forza-Horizon-DualSense-Python
소개
Forza Horizon DualSense 적응형 트리거
기타 프로젝트측정된 스타 증가
- in 24h
- +2
- in 7 days
- +22
- in 15 days
- +23
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original🏎️ Forza Horizon - DualSense Adaptive Triggers
Real trigger feedback for Forza Horizon on PC.
Feel the brakes. Feel the engine. No setup juggling.
My Steam profile: https://steamcommunity.com/id/teccno/
For CS:GO item Sponsorship :D : https://steamcommunity.com/tradeoffer/new/?partner=291638630&token=Xyg4vITU
💛 Huge thanks to Jared (jmac122) for sponsoring this project by gifting me Forza Horizon 6.
📜 Contents
- What it does
- Install
- In-game setup
- Enable Steam Haptics
- Run it
- Auto-launch with Steam
- Tuning the feel
- Troubleshooting
- Credits
💡 What it does
Forza Horizon sends car telemetry over UDP, but Steam Input doesn't use the DualSense's adaptive triggers. This tiny app fills the gap:
- Left trigger (brake) — pushes back harder the more you press. Buzzes like ABS when tires slip. Extra resistance when handbraking.
- Right trigger (throttle) — soft progressive resistance. Thumps on gear shifts. Buzzes at the rev limiter.
How it talks to your controller without fighting Steam
┌──────────────────┐ UDP 5300 ┌──────────────────┐ HID write ┌─────────────┐
│ Forza Horizon │ ──────────────► │ This app │ ──────────────► │ DualSense │
│ (Data Out) │ telemetry │ (trigger bits │ triggers only │ controller │
└──────────────────┘ 324 bytes │ only) │ └─────────────┘
└──────────────────┘ ▲
│
┌──────────────────┐ HID write │
│ Steam Input │ ──────────────────────►│
│ (rumble bits) │ rumble + buttons │
└──────────────────┘
Both the app and Steam write to the same controller — but they touch different bytes:
- Steam owns the rumble motors and button mapping.
- This app only flips the adaptive trigger bits (
valid_flag0bits0x04and0x08). - The HID device is opened in non-blocking mode, so writes fire immediately instead of waiting on the controller. Nothing gets queued, nothing blocks Steam.
That's why you can run both at the same time and neither one breaks the other.
🛠️ Install
You need: Windows 10/11 or Linux, and a DualSense controller (USB or Bluetooth).
- Go to the latest release.
- Download
win_start.bat(Windows) orlinux_start.sh(Linux). - Put it in any empty folder.
- Important: I highly recommend installing
uvmanually first. Open PowerShell and run this command:powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"- If you skip this,
win_start.batwill try to installuvautomatically. However, Windows might block this auto-install with an "Execution Policy" error in PowerShell. - If you get the Execution Policy error: Hold Shift + Right-Click in the folder, click "Open PowerShell window here", paste
Set-ExecutionPolicy RemoteSigned -scope CurrentUserand hit Enter, then typeYand Enter.
- If you skip this,
- Double-click
win_start.bat(orlinux_start.sh).
The launcher handles downloading the app, preparing the environment, and running it. Next time you run it, it will also check for updates.
[!NOTE] A standalone Windows
.exeis also attached to each release as an experimental option. The recommended way to run the app is stillwin_start.bat— it self-updates and works the same across every Windows version.
Linux extras: install
libhidapi(sudo apt install libhidapi-hidraw0/sudo pacman -S hidapi/sudo dnf install hidapi) and the udev rule fromapp/packaging/linux/70-dualsense.rules. Then unplug/replug the controller once.GUI on Linux: X11 needs
libxcb-cursor0(sudo apt install libxcb-cursor0); Wayland works as is. On GNOME the minimize-to-tray icon needs the AppIndicator extension.
🎮 Playing with SISR (Xbox App / Windows Store users)
If you are playing the game via the Xbox App or Microsoft Store, you will need a tool that makes the game recognize your controller as an Xbox controller. One option is SISR (Steam Input System Redirector) — it redirects Steam Input to the system level and emulates a real Xbox controller, so it works even with Windows Store apps and anti-cheat-protected games.
Because SISR routes the controller through Steam Input, Steam can grab the physical DualSense exclusively and prevent this app from connecting. To avoid this, you must start the programs in this exact order:
- First, launch THIS APP (
win_start.bat) and wait for the short pulse on the triggers. - Second, launch SISR (and Steam).
- Finally, launch Forza Horizon.
(Note: If your controller disconnects while playing, close SISR, restart this app, then open SISR again. For SISR setup and emulation options, see the SISR README.)
Manual install (for developers)
git clone https://github.com/HamzaYslmn/Forza-Horizon-DualSense-Python
cd Forza-Horizon-DualSense-Python/src
uv sync
uv run main.py
Need uv? pip install uv or astral.sh/uv.
🎯 In-game setup
In Forza Horizon, open Settings → HUD and Gameplay and scroll to the bottom:
| Setting | Value |
|---|---|
| Data Out | ON |
| Data Out IP Address | 127.0.0.1 |
| Data Out IP Port | 5300 |
[!NOTE] The app listens on System → Data Out IP Address (default
127.0.0.1). If127.0.0.1doesn't work in your Forza, write::1(IPv6) in both places. Forza on another PC: set the app to0.0.0.0(or::for IPv6 too) and enter this PC's network IP in Forza.
🔊 Enable Steam Haptics
Steam can vibrate the left and right rumble motors on your DualSense controller. To enable them:
In Steam:
- Right-click Forza Horizon in your library → Properties.
- Go to Controller → Additional Settings.
- Make sure DualSense vibration is turned ON.
In-game (Forza Horizon):
- Open Settings → Advanced Controls.
- Find the Vibration option and enable it.
DualSense software:
For best results, install the official PlayStation® Accessories software:
- Download: PlayStation® Accessories
This ensures your DualSense firmware is up to date for windows.
ℹ️ About Adaptive Triggers: Steam doesn't support DualSense adaptive triggers for this game. That's what this app does — it adds realistic trigger feedback (brake resistance, engine feedback, ABS pulses, gear thumps, rev limiter buzz) on top of the rumble that Steam provides.
▶️ Run it
Double-click win_start.bat (Windows) or linux_start.sh (Linux).
You'll feel a short pulse on both triggers — that means it's working. Now launch Forza Horizon and drive.
Start the launcher before Forza Horizon. If you use HidHide, allowlist
python.exe.
🎮 Auto-launch with Steam
Want the triggers to turn on automatically when you press Play? Tell Steam to run the launcher first.
⚠️ Warning: Sometimes auto-launching this way can cause issues with the application. For the most stable experience, it is recommended to launch the app manually by double-clicking the script.
In Steam, right-click Forza Horizon → Properties.
Open the General tab and find Launch Options.
Choose one of the following commands based on your preference (change the path to where your
win_start.batactually is):Option A: Keeping Steam Overlay & Playtime Tracking (Recommended) This wraps the script in
cmd.exe /cso Steam can properly monitor the process, keeping your Steam Overlay (Shift+Tab) and Playtime Tracking fully functional while automatically closing the console window afterwards:"C:\Windows\System32\cmd.exe" /c ""C:\Your\Path\To\Forza-Horizon-DualSense-Python\win_start.bat" %command%"Option B: Simpler Method A direct way to launch, though the Steam Overlay and playtime tracking may stop working:
"C:\Your\Path\To\Forza-Horizon-DualSense-Python\win_start.bat" %command%
That's it. Press Play - the launcher runs, then the game opens.

Advanced — run the Python script directly (no BAT file)
If you cloned the repo and use uv, paste this into Launch Options instead:
cmd /c "start /MIN /D C:\Your\Path\To\Forza-Horizon-DualSense-Python\src uv run main.py" && %command%
🎚️ Tuning the feel
Every effect (brake force, ABS buzz, gear thump, rev limiter, etc.) can be tweaked or turned off from the Settings page in the app — no file editing needed. Changes apply on next launch.
The redline is learned per car (where Forza cuts power at full throttle), so the redline buzz and the shift lights need no per-car tweaking.
🩺 Troubleshooting
| Symptom | Fix |
|---|---|
DualSense gamepad interface not found |
Controller not connected, or HidHide is hiding it — allowlist python.exe. |
No UDP packets yet |
Forza's Data Out is off, IP/port is wrong, Windows Firewall is blocking, or try ::1 instead of 127.0.0.1 (in Forza and in the app's System tab). |
Windows Defender / SmartScreen blocks win_start.bat |
1. On the blue "Windows protected your PC" screen, click "More info". 2. Click the "Run anyway" button that appears at the bottom. (The script only downloads required dependencies.) |
| Triggers feel weak | Raise brake_max_force / throttle_max_force, or lower the matching curve. |
| Triggers feel like a brick wall | Lower brake_max_force / throttle_max_force, or raise the matching curve. |
| Triggers feel stiff at a light press | Lower the baseline force, or raise the curve. |
| No vibration on gear shift | Car must be moving faster than 3 km/h and changing between valid gears. |
| Console window is blank after the startup pulse | Run from a terminal with cd src && uv run main.py --headless to skip the TUI. |
📁 Project layout
src/
├── main.py # Entry point
└── modules/
├── config/settings.py # 👈 the file you edit
├── session.py # backend start / stop (GUI, TUI, --headless)
├── loop.py # per-packet loop
├── dualsense/
│ ├── device.py # HID layer
│ ├── adaptive_trigger.py # generic trigger effect primitives
│ └── haptics.py # game sound -> haptic actuators
├── forzahorizon/
│ ├── telemetry.py # UDP telemetry parser
│ ├── trigger_effects.py # Forza-aware trigger effects
│ └── game_watch.py # exit when the game closes
├── dsx/ # DSX mode
└── gui/, tui/ # window (Qt) / terminal (Textual)
🎮 DSX Support
I have integrated DSX (DualSenseX) support. Due to DSX limitations, you might not get the exact 1:1 experience, but I have done my best. A lower-fidelity version of the adaptive trigger effects is fully supported.

To use it: in DSX open Settings → Networking → Mod system, turn on incoming UDP and Let mods control adaptive triggers; in this app turn on System → DSX integration. The port is read from DSX automatically. If triggers don't react, the Logs tab says why (for example a DSX switch that is off).
🎧 Haptics
Feel the game's sound in your hands while you race, over USB or Bluetooth. Turn it on in Controls → Haptics; set the strength (up to 500%) in Settings.
- Your speaker volume doesn't matter: 100% is the game's full sound.
- When Forza vibrates, you feel Forza instead: the controller plays one at a time.
- Everything your speakers play during a race comes through, music and voice chat too. Linux needs PulseAudio or PipeWire (over USB: the controller's 'Analog Surround 4.0' profile). macOS can't capture game sound.
💡 Lights
In Controls → Lights:
- Shift lights: the lightbar turns from green to red as the revs climb, the player LEDs fill up like a rev bar, and both blink at the rev limiter. The app learns each car's real limiter (where Forza cuts power at full throttle), so the redline buzz fires at the right rpm too.
- ABS light: the mic LED blinks with the ABS rumble.
Brightness is in Settings → Lights. In DSX mode DSX keeps the lights.
🙏 Credits
Built by HamzaYslmn.
💛 Sponsors
- Jared (jmac122) — gifted me Forza Horizon 6 so this project could keep moving forward. Thank you, Jared!
- BeaudinSan — thank you for your incredibly generous support! It truly means a lot to me.
- McLarenF1God — thank you for Forza Horizon 6 DLC's
- Griever — thank you for DSX + DLC's
- PlusMinusZer0 — thank you for your Pudding!
- dotcom — thank you for your Cake!
- wallbangz — thank you for your Cake!
- BambinoPinguino — thank you for your Tea!
- Ereldun — thank you for your Coffee!
- Clevens克林 — thank you for your Candy!
- 海 拔 88 — thank you for your Candy!
- SeriousHamster — thank you for your Candy!
A heartfelt thank you as well to the anonymous sponsors who quietly supported this project, and to everyone whose appreciation, kind words, and social media shares helped keep me motivated throughout the journey.
📜 Third-party licenses
The window UI uses Qt for Python (PySide6) by The Qt Company, licensed under the GNU LGPL v3. PySide6 is used unmodified. The launcher bundle installs it from PyPI on first run; the standalone binaries include it, and you can rebuild them against any compatible PySide6 version from this repository's source (packaging/). Other dependencies keep their own licenses (see src/pyproject.toml).
Built for an immersive racing experience
관련 프로젝트 살펴보기
불러오는 중…