Sensitivity Define

GPC1 script programming for Titan One. Code examples, questions, requests.

Sensitivity Define

Postby vBlasts » Sat Apr 30, 2016 11:45 pm

Hello, could someone please tell me what define sensitivity I should use for a script. I have the base as 100 so if I choose 130, the sensitivity would be increased by 30 percent.

What I would like to know is what I should have it set as if I wanted my Game Sensitivity to be set as 5 what should I set my define sensitivity at so it acts as 7, as well as what I should have it set to if I want it to act as 9.

I am also using this for BLOPS3 if that helps. :)
User avatar
vBlasts
First Sergeant
First Sergeant
 
Posts: 64
Joined: Mon Mar 21, 2016 2:05 am

Re: Sensitivity Define

Postby bonefisher » Sun May 01, 2016 12:00 am

Haven't messed with zeroing on the sensitivity in game but this is mostly a test and trail period for you to go through til your comfort zone is met my friend. Happy testing!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Sensitivity Define

Postby J2Kbr » Sun May 01, 2016 12:27 pm

I agree with bonefisher, it really depends on the game. The to find the equivalence it is, unfortunately, a trial and error process. And also, please note the the sensitivity in the script acts on the analog stick, meaning if you use 120 (+20%) and you analog stick is at 50% it converts 50% to 60%. On the other hand, games apply the sensitivity to the camera speed in function to the analog stick value. therefore, as you can find some correlation between the script sensitivity and the game sensitivity it is limited to a range window.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Sensitivity Define

Postby vBlasts » Sun May 01, 2016 7:58 pm

Wait so if the analog is at (50%) plus if it's set at 120 it's (+20%) then it all equals 70? I'm trying to find an equation to figure how it works but I haven't found one yet.
User avatar
vBlasts
First Sergeant
First Sergeant
 
Posts: 64
Joined: Mon Mar 21, 2016 2:05 am

Re: Sensitivity Define

Postby J2Kbr » Sun May 01, 2016 8:26 pm

Not exactly ... the math is this, lets say you are using 120, think about it as 1.2 (divided by 100), so the resulting value will be 50 * 1.2 = 60.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Sensitivity Define

Postby vBlasts » Sun May 01, 2016 8:43 pm

Ok, I see is there a way you could write a script so you could change your dead zone settings so that you can give your controller the feel of a mouse in a sense.
User avatar
vBlasts
First Sergeant
First Sergeant
 
Posts: 64
Joined: Mon Mar 21, 2016 2:05 am

Re: Sensitivity Define

Postby J2Kbr » Sun May 01, 2016 10:38 pm

sure :) .. you can adjust the deadzone at the define, higher the value, more sensitive ("mouse like") it will be.

Code: Select all
define DZ = 10;

main {
    deadzone(PS4_RX, PS4_RY, DZ, DZ);
}
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Sensitivity Define

Postby vBlasts » Mon May 02, 2016 6:45 pm

Could someone add the above script. (Dead zone Script) and this to it? viewtopic.php?f=6&t=3614#

As well as could they change it to work for XB1.
User avatar
vBlasts
First Sergeant
First Sergeant
 
Posts: 64
Joined: Mon Mar 21, 2016 2:05 am

Re: Sensitivity Define

Postby bonefisher » Mon May 02, 2016 8:18 pm

Code: Select all

/*******************************************************************************************************************
*                Battlefield 4 and Hardline by bonefisher and a Special Thanks to The_Rabid_Taco.                  *
/*******************************************************************************************************************
*   If needing adjusting any Rapid/Burst Fires or Anti-Recoil turn on Adjusting Mod which blocks the D-Pad keys    *
*   to allow easy adjustments without equipment coming out. Make sure to turn this mod off when finished adjusting.*
*   Rapid Fire and Burst Fire even on same adjusting mod are seperate adjustments whatever which one your on       *
*   adjusts separately from the other and goes for the Anti-Recoil long as you follow sequence of button presses.  *
/*******************************************************************************************************************
*                           TURNS MODS ON/OFF:  RUMBLE ON  /  NO RUMBLE OFF                                        *
*  MOD:            RUMBLE:       COMBINATION OF BUTTON PRESSES OF TURNING ON/OFF MODS AND ADJUSTING:               *
*  Rapid Fire      Single        PS: L2 + D-Pad Left                       X-Box: LT + D-Pad Left                  *
*  Burst Fire      Double        PS: L2 + D-Pad Left                       X-Box: LT + D-Pad Left                  *
*  Adjusting Fires Rapid/Burst   PS: HOLD R2 + Click D-Pad Left for Decrease and D-Pad Right for Increase Fire     *
*  Adjusting Fires Rapid/Burst   XB: HOLD RT + Click D-Pad Left for Decrease and D-Pad Right for Increase Fire     * 
*  Adjust Burst Delay            PS: HOLD R2 + Click D-Pad DOWN for Decrease and D-Pad UP for Increase Delay       *
*  Adjust Burst Delay            XB: HOLD RT + Click D-Pad DOWN for Decrease and D-Pad UP for Increase Delay       * 
*  Anti-Recoil     Single        PS: L2 + D-Pad Down                       X-Box: LT + D-Pad Down                  * 
*  Anti-Recoil LT  Double        PS: L2 + D-Pad Down                       X-Box: LT + D-Pad Down                  *
*  Adjusting Anti Recoil         PS: HOLD L2 + R2 then click the direction on D-Pad for what pull is needed by one *
*  Adjusting Anti Recoil         XB: HOLD LT + RT then click the direction on D-Pad for what pull is needed by one *
*  Auto Sprint     Single        PS: D-Pad UP + CIRCLE                     X-Box: D-Pad Up + B                     *
********************************************************************************************************************/

define SENSITIVITY = 150;
define DZ          =  10;
 
int BurstDelay, HoldTime3;
int AutoRunOnOff;
int RapidFireOnOff;
int HoldTime, RateOfFire;
int BurstFireOnOff;
int HoldTime2, BurstOfFire;
int ToggleAntiRecoil;
int ToggleFireMods;
int anti_recoil, anti_recoil_left, anti_recoil_right;
int ANTI_RECOIL, ANTI_RECOIL_LEFT, ANTI_RECOIL_RIGHT;

init {
    AutoRunOnOff = get_pvar(SPVAR_1, 1, 2, 2);
    RateOfFire = get_pvar(SPVAR_2, 10, 1000, 40);
    HoldTime = get_pvar(SPVAR_3, 10, 2000, 30);
    BurstOfFire = get_pvar(SPVAR_5, 20, 125, 40);
    BurstDelay = get_pvar(SPVAR_6, 1, 125, 40);
    ToggleAntiRecoil = get_pvar(SPVAR_7, 1, 3, 1);
    ANTI_RECOIL = get_pvar(SPVAR_8, 0, 100, 30);
    ANTI_RECOIL_LEFT = get_pvar(SPVAR_9, 0, 100, 2);
    ANTI_RECOIL_RIGHT = get_pvar(SPVAR_10, 0, 100, 0);
    ToggleFireMods = get_pvar(SPVAR_11, 1, 3, 1);
}

main {

    vm_tctrl(-8);
   
    // Set hair triggers
    if (get_val(4)) set_val(4, 100);
    if (get_val(7)) set_val(7, 100);
   
    if(get_val(XB1_LT) == 0) {
        sensitivity(XB1_RX, NOT_USE, SENSITIVITY);
        sensitivity(XB1_RY, NOT_USE, SENSITIVITY);
    }
    if (get_val(7) && event_press(15) && !get_val(4)) {
        if (ToggleFireMods == 3) {
            ToggleFireMods = 1;
            set_pvar(SPVAR_11, ToggleFireMods);
        } else if (ToggleFireMods == 1) {
            ToggleFireMods = 2;
            set_pvar(SPVAR_11, ToggleFireMods);
            combo_run(RumbleNotifier);
        } else if (ToggleFireMods == 2) {
            ToggleFireMods = 3;
            set_pvar(SPVAR_11, ToggleFireMods);
            combo_run(DoubleRumbleNotifier);
        }
    }
    if (ToggleFireMods == 2 && get_val(4)) {
        combo_run(RapidFire);
    } else if (ToggleFireMods == 3 && get_val(4)) {
        combo_run(BurstFire);
    }   if(event_release(4)) { combo_stop(BurstFire);
    }
    // This portion of the script allows for fine tune adjustment of the fire
    // rate.  Pressing right on the dpad will increase the rate of fire by one,
    // and pressing left on the dpad while shooting will decrease the rate of
    // fire by one.  Do not use ADS while adjusting rate of fire or it will
    // adjust the anti recoil settings instead.  Again these are stored in
    // persistent variables and will be stored across sessions.
    if (get_val(4) && !get_val(7)) {
        if (event_press(16)) {
            if (RateOfFire < 25) {
                RateOfFire = RateOfFire + 1;
            } else if (RateOfFire >= 25) {
                RateOfFire = 25;
            }
            set_pvar(SPVAR_2, RateOfFire);
        }
        if (event_press(15)) {
            if (RateOfFire > 0) {
                RateOfFire = RateOfFire - 1;
            } else if (RateOfFire <= 0) {
                RateOfFire = 0;
            }
            set_pvar(SPVAR_2, RateOfFire);
        }
        HoldTime = 500 / RateOfFire;
        set_pvar(SPVAR_3, HoldTime);
    }
    if (get_val(4) && !get_val(7)) {
        if (event_press(16)) {
            if (BurstOfFire < 50) {
                BurstOfFire = BurstOfFire + 1;
            } else if (BurstOfFire >= 50) {
                BurstOfFire = 50;
            }
            set_pvar(SPVAR_5, BurstOfFire);
        }
        if (event_press(15)) {
            if (BurstOfFire > 0) {
                BurstOfFire = BurstOfFire - 1;
            } else if (BurstOfFire <= 0) {
                BurstOfFire = 0;
            }
            set_pvar(SPVAR_5, BurstOfFire);
        }
        HoldTime2 = 5 * BurstOfFire;
    }
    if (get_val(4) && !get_val(7)) {
        if (event_press(13)) {
            if (BurstDelay < 20) {
                BurstDelay = BurstDelay + 1;
            } else if (BurstDelay >= 20) {
                BurstDelay = 20;
            }
            set_pvar(SPVAR_6, BurstDelay);
        }
        if (event_press(14)) {
            if (BurstDelay > 0) {
                BurstDelay = BurstDelay - 1;
            } else if (BurstDelay <= 0) {
                BurstDelay = 0;
            }
            set_pvar(SPVAR_6, BurstDelay);
        }
        HoldTime3 = 5 * BurstDelay;
    }

    // This checks to see if ADS is on and down is pressed on the D-Pad.  This
    // actually has multiple functions, the first being an always on anti recoil
    // with the second being a ADS only anti recoil.  A rumble notification is
    // used to distinguish which one is being used.  A single rumble is always
    // use anti recoil.  A double rumble is used for ADS only anti recoil. 
    // Pressing down while in ADS a third time disables this function.
    if (get_val(7) && event_press(14) && !get_val(4)) {                                 
        if (ToggleAntiRecoil == 3) {
            ToggleAntiRecoil = 1;
            set_pvar(SPVAR_7, ToggleAntiRecoil);
        } else if (ToggleAntiRecoil == 1) {
            ToggleAntiRecoil = 2;
            set_pvar(SPVAR_7, ToggleAntiRecoil);
            combo_run(RumbleNotifier);
        } else if (ToggleAntiRecoil == 2) {
            ToggleAntiRecoil = 3;
            set_pvar(SPVAR_7, ToggleAntiRecoil);
            combo_run(DoubleRumbleNotifier);
        }
    }
    // This checks to see which (if any) anti recoil is turned on and runs the
    // appropriate combo for that anti recoil.
    if (ToggleAntiRecoil == 2 && get_val(4)) {
        combo_run(AntiRecoil);
    } else if (ToggleAntiRecoil == 3 && get_val(7) && get_val(4)) {
        combo_run(AntiRecoil);
    }
    // This section is used to fine tune the anti recoil if it is set to on.
    // So while shooting and having ADS up pressing up on the dpad will reduce
    // anti recoil by one, pressing down on the dpad will increase the down pull
    // by one, pressing right on the dpad will increase right pull by one, while
    // pressing left on the dpad will increase the left pull by one.  These
    // values are stored in persistent variable allowing them to be used every
    // time a new session is started, the script is reloaded, or even if the
    // Titan One looses power.
    if ((ToggleAntiRecoil == 2 || ToggleAntiRecoil == 3) && get_val(4) && get_val(7)) {
        if (event_press(13)) {
            ANTI_RECOIL = ANTI_RECOIL - 1;
           
            if (ANTI_RECOIL < 0) {
                ANTI_RECOIL = 0;
            }
            set_pvar(SPVAR_8, ANTI_RECOIL);
        }
        if (event_press(14)) {
            ANTI_RECOIL = ANTI_RECOIL + 1;
           
            if (ANTI_RECOIL > 100) {
                ANTI_RECOIL = 100;
            }
            set_pvar(SPVAR_8, ANTI_RECOIL);
        }
        if (event_press(15)) {
            if (ANTI_RECOIL_RIGHT > 0) {
                ANTI_RECOIL_RIGHT = ANTI_RECOIL_RIGHT - 1;
                ANTI_RECOIL_LEFT = 0;
            } else if (ANTI_RECOIL_RIGHT <= 0 && ANTI_RECOIL_LEFT < 100) {
                ANTI_RECOIL_LEFT = ANTI_RECOIL_LEFT + 1;
                ANTI_RECOIL_RIGHT = 0;
            } else if (ANTI_RECOIL_LEFT >= 100) {
                ANTI_RECOIL_LEFT = 100;
                ANTI_RECOIL_RIGHT = 0;
            }
            set_pvar(SPVAR_9, ANTI_RECOIL_LEFT);
            set_pvar(SPVAR_10, ANTI_RECOIL_RIGHT);
        }
        if (event_press(16)) {
            if (ANTI_RECOIL_LEFT > 0) {
                ANTI_RECOIL_LEFT = ANTI_RECOIL_LEFT - 1;
                ANTI_RECOIL_RIGHT = 0;
            } else if (ANTI_RECOIL_LEFT <= 0 && ANTI_RECOIL_RIGHT < 100) {
                ANTI_RECOIL_RIGHT = ANTI_RECOIL_RIGHT + 1;
                ANTI_RECOIL_LEFT = 0;
            } else if (ANTI_RECOIL_RIGHT >= 100) {
                ANTI_RECOIL_RIGHT = 100;
                ANTI_RECOIL_LEFT = 0;
            }
            set_pvar(SPVAR_9, ANTI_RECOIL_LEFT);
            set_pvar(SPVAR_10, ANTI_RECOIL_RIGHT);
        }
    }
    if ((event_press(13) && get_val(18)) || (event_press(18) && get_val(13))) {
        if (AutoRunOnOff == 1) {
            AutoRunOnOff = 2;
        } else if (AutoRunOnOff == 2) {
            AutoRunOnOff = 1;
        }
        set_pvar(SPVAR_1, AutoRunOnOff);
       
        if (AutoRunOnOff == 1) {
            combo_run(RumbleNotifier);
        }
    }
    if (AutoRunOnOff == 1) {
        if (get_val(12) < -97) { combo_run(AutoSprint);
        }
    }
    deadzone(9, 10, DZ, DZ);
}

combo RumbleNotifier {
    set_rumble(RUMBLE_A, 100);
    wait(200);
    reset_rumble();
}
combo DoubleRumbleNotifier {
    set_rumble(RUMBLE_A, 100);
    wait(200);
    set_rumble(RUMBLE_A, 0);
    wait(200);
    set_rumble(RUMBLE_A, 100);
    wait(200);
    reset_rumble();
}
combo RapidFire {
    set_val(4, 100);
    wait(HoldTime);
    set_val(4, 0);
    wait(HoldTime);
    set_val(4, 0);
}
combo BurstFire {
    set_val(4, 100);
    wait(HoldTime2);
    set_val(4, 0);
    wait(HoldTime3);
    set_val(4, 0);
}
combo AutoSprint {
    set_val(XB1_LS, 100);
    wait(40);
    set_val(XB1_LS, 0);
    wait(40);
}
combo AntiRecoil {
    anti_recoil = get_val(10) + ANTI_RECOIL;
    if(anti_recoil > 100) {
        anti_recoil = 100;
    }
    set_val(10, anti_recoil);
   
    anti_recoil_left = get_val(9) - ANTI_RECOIL_LEFT;
    if(anti_recoil_left < -100) {
        anti_recoil_left = -100;
    }
    set_val(9, anti_recoil_left);
   
    anti_recoil_right = get_val(9) + ANTI_RECOIL_RIGHT;
    if(anti_recoil_right > 100) {
        anti_recoil_right = 100;
    }
    set_val(9, anti_recoil_right);
}

here you go!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Sensitivity Define

Postby Vendetta » Sun Jul 17, 2016 9:40 pm

How would define_SENSITIVITY work in Destiny. The in-game controls let you set 1-10. Anecdotal example: Most snipers will run 3-4 and most shotgunners will run 7-10. 10 is very fast camera movement.

So in Destiny what would be the math?

Here's what has be written before:
viewtopic.php?f=6&t=3665&p=26718&hilit=sensitivity#p26718

Trying to get the math right for this script:
viewtopic.php?f=2&t=3478&p=25264&hilit=sensitivity#p25264

So say, I have in-game set to 7, but while ADSing I want 3 via the script.

Code: Select all
define SENSITIVITY = 60;

main {

        if(get_val(ADS)) {
        sensitivity(9, NOT_USE, SENSITIVITY);
        sensitivity(10, NOT_USE, SENSITIVITY);
    }
}




    Playstation PS4, Astro A50 Gen 3, Elgato Game Capture HD60 S
    2x Benq 27” Gaming Monitors, Netduma R1 Gaming Router
    Titan One/Two Controller Input Device, Battle Beaver PS4 Controller, SCUF Infinity4PS Controller
User avatar
Vendetta
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 226
Joined: Fri Jul 31, 2015 8:40 pm

Next

Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 71 guests

cron