Forza Motorsport 5 with Microsoft Wireless Speed Wheel on Xbox One

Full steering, rumble, bumpers in menus. This is my second script, and it's a big overhaul of my first. Everything works and you can use your MS Wireless Speed Wheel with FM5! Check the comments in the script for button use, and for controller setup!
Version2
Authorsteve.rand
Publish DateSun, 13 Jul 2014 - 13:03
Last UpdateSun, 13 Jul 2014 - 13:03
Downloads542
RATE


5

0

Release Notes: Please give this a vote if you use this wheel and this works for you, I spent a lot of time making this and i'd love to hear that it has helped! Thanks!
Code: Select all
// GPC Online Library
//
// Profile - Controller Options = Layout 6
// Advanced Controller Options:
//      Steering Axis Deadzone Inside = 0 (Stock is 24 for the stick-steering, but the huge dead-zone is a problem with a wheel)
//      Steering Axis Deadzone Outside = 70 (or 90 for 1:1 steering with the cockpit view. 70 feels more comfortable on this wheel and more like FM4 to me.)
// Assits:
//      Steering: Recommend "Normal" because the XB1 thinks we are using a stick to steer.
//      Shifting: Manual with Clutch or disable lines containting "//Auto Clutch" for Manual or Automatic.
//
// Keys:
//      Hold Left Trigger and Right Trigger to navigate up/down/left/right with the D-Pad on the wheel.
//      Hold Left Trigger and Right Trigger and press X or B to simulate the Left Bumper or Right Bumper.
//      All other game keys are the same (e.g D-Pad up for shift up, A for clutch, Y for "look behind". This is the default layout of FM4 for this wheel.
//
// Made by Steve Rand with some inspiration from others (steering and rumble)
//
// xbox360_speedwheel_on_xb1_forza_5.gpc
//
//----------------------------------------
 
 
main {
 
 
//---------------------
//SHIFTING
//---------------------
if(get_val(XB360_UP)){
    set_val((XB1_A), 100); //Auto Clutch - disable this line if using Auto or Manual
    set_val((XB1_RB), 100); //Layout 6 RB = shift up.
    set_val((XB1_UP), 0); //Don't send XB1_UP
    }
 
if(get_val(XB360_DOWN)){
    set_val((XB1_A), 100); //Auto Clutch - disable this line if using Auto or Manual
    set_val((XB1_LB), 100); //Layout 6 LB = shift down.
    set_val((XB1_DOWN), 0); //Don't send XB1_DOWN
    }
 
 
//---------------------
//STEERING
//---------------------
if(get_val(XB360_LX)<0){
    set_val(XB1_LX, ((get_val(XB360_LX) * 7) / 9) -23); //XB360 -1 = XB1 -23. Formula scales -1/-100 to -23/-100 (XB1 stick controls deadzone is 0-23)
    }
 
if(get_val(XB360_LX)>0){
    set_val(XB1_LX, ((get_val(XB360_LX) * 7) / 9) +23); //XB360 1 = XB1 23. Formula scales +1/+100 to +23/+100 (XB1 stick controls deadzone is 0-23)
    }
 
 
//---------------------
// RUMBLE
//---------------------
if (get_rumble(RUMBLE_B) > 1 && get_rumble(RUMBLE_A) > 1 ){ //Rumble evenly for offroad
    set_rumble(RUMBLE_A, (RUMBLE_B * 80));
    set_rumble(RUMBLE_B, (RUMBLE_B * 80));
    }
 
if (get_rumble(RUMBLE_B) > 1 && get_rumble(RUMBLE_A) == 0){ //On rev limiter, B-light only
    set_rumble(RUMBLE_B, (RUMBLE_B * 40)); //B-light on, but no rumble
    }
 
if (get_rumble(RUMBLE_RT)){ //XB1 new traction trigger rumble
    if (get_rumble(RUMBLE_B) < 41){ //If RUMBLE_B is just the rev limiter light, but we are also in a traction-loss situation...
        set_rumble(RUMBLE_B,(RUMBLE_RT * 50)) //XB1_RT rumble to RUMBLE_B
        }
    }
 
if (get_rumble(RUMBLE_LT)){ //XB1 new braking trigger rumble
    if (get_rumble(RUMBLE_A) == 0){
        set_rumble(RUMBLE_A,(RUMBLE_LT * 33)); //XB1_LT rumble to RUMBLE_A for even braking rumble
        set_rumble(RUMBLE_B,(RUMBLE_LT * 33)); //XB1_LT rumble to RUMBLE_B for even braking rumble
        }
    }
 
 
//---------------------
// MENU NAVIGATION
//---------------------
if((get_val(XB360_LT)==100 && get_val(XB360_RT)==100)){ //If both triggers are fully down...
    if(get_val(XB1_RB)==100){
        set_val(XB1_A, 0); //Ignore XB360_A (Clutch)
        set_val(XB1_RB, 0); //Ignore XB360_UP (Shift up)
        set_val(XB1_UP, 100); //Press XB1_UP
        }
    if(get_val(XB1_LB)==100){
        set_val(XB1_A, 0); //Ignore XB360_A (Clutch)
        set_val(XB1_LB, 0); //Ignore XB360_DOWN (Shift down)
        set_val(XB1_DOWN, 100); //Press XB1_DOWN
        }
    if(get_val(XB360_X)==100){
        set_val(XB360_X, 0); //Ignore XB360_X
        set_val(XB1_X, 0); //Ignore XB1_X
        set_val(XB1_LB, 100); //Press XB1_LB
        }
    if(get_val(XB360_B)==100){
        set_val(XB360_B, 0); //Ignore XB360_B
        set_val(XB1_B, 0); //Ignore XB1_B
        set_val(XB1_RB, 100); //Press XB1_RB
        }
    }
 
 
} //Ends the script