Xbox360 Force-Feedback Racing Wheel on XB1 Forza 5

This builds off the initial script by LimitZer0. Use with Forza 5 controller layout 6 and an outside steering axis deadzone of 90. While this still does not provide true force feedback (protocols not supported), it does give you: (1) vibration to the wheel that emulates both the XB1 trigger rumble and the overall controller rumble which leaves you with at least a decent feeling of connection to the road; (2) steering input correction; and (3) automatic control of the clutch when upshifting/downshifting so the assist can be turned off. I use it with a Mad Catz Xbox360 Wireless Force Feedback Wheel, and find it suits my needs for now. In addition to LimitZer0, further acknowledgments to 1ronnie and LEX LOST from the ControllerMax forums for some of the rumble and auto-clutch code that was incorporated and modified herein.
Version1.1
Authorhemmicidal
Publish DateMon, 31 Mar 2014 - 19:49
Last UpdateWed, 11 Jun 2014 - 18:48
Downloads1057
RATE


1

0

Release Notes: Adds directional-pad look left/right functionality and removes redundant clutch activation combo. Credit to picklock for some of the updated code. Look to his script for use with Fanatec wheel.
Code: Select all
// Forza 5 Steering-Rumble-Clutch-Look Script.gpc
 
int val_rumble_rt = 0;
int val_rumble_lt = 0;
int val_rumble_tmax = 0;
int val_rumble_A = 0;
int val_rumble_B = 0;
int val_rumble_avg = 0;
main {
 
//Steering Correction
    if(get_val(XB1_LX)<0){
            set_val(XB1_LX, ((get_val(XB1_LX) * 7) / 9) -23);
    }
    if(get_val(XB1_LX)>0){
            set_val(XB1_LX, ((get_val(XB1_LX) * 7) / 9) +23);
    }
            //Set Outside Deadzone to 90 for perfect setting.
 
//Rumble to the Wheel: Rumble A gets max of XB1 LT/RT rumble (x6), Rumble B gets avg of XB1 Rumble A/B
    val_rumble_rt = get_rumble(RUMBLE_RT);
    val_rumble_lt = get_rumble(RUMBLE_LT);
    val_rumble_A = get_rumble(RUMBLE_A)
    val_rumble_B = get_rumble(RUMBLE_B);
 
    if (val_rumble_lt >= val_rumble_rt) val_rumble_tmax = (val_rumble_lt * 6);
    if (val_rumble_lt < val_rumble_rt) val_rumble_tmax = (val_rumble_rt * 6);
    if (val_rumble_tmax > 100) val_rumble_tmax = 100;
 
    val_rumble_avg = ((val_rumble_A + val_rumble_B) / 2);
    if (val_rumble_avg > 100) val_rumble_avg = 100;
 
            set_rumble(RUMBLE_A, val_rumble_tmax);
            set_rumble(RUMBLE_B, val_rumble_avg);
 
 
// Auto-Clutch
   if(get_val (XB1_LB)) combo_run(A)
   if(get_val (XB1_RB)) combo_run(A)
 
// Using right/left on D-pad to look right/left in-game.
   if(get_val (XB1_LEFT)) combo_run(B)
   if(get_val (XB1_RIGHT)) combo_run(C)
 
}
// Auto-Clutch Activation
    combo A {
        set_val(XB1_A, 100);
}                                                                                           
 
// Look Left - Dpad Left
    combo B {
        set_val(XB1_RX, -100);
}
// Look Right - Dpad Right
    combo C {
        set_val(XB1_RX, 100);
}