Anti-recoil jumps down.

Forum to discuss the scripts, configs and connection of XIM with the Titan devices.

Moderator: antithesis

Anti-recoil jumps down.

Postby Soken » Sat Mar 06, 2021 3:13 pm

I have been having an issue for a long time with anti recoil script when using XIM apex.

The problem
Anti-recoil works perfect but once I move my mouse slightly down it will jump, a big jump. Once I move my mouse while firing to the left or right it will go that direction but also down.

Researching on the forums I found that this problem was common: https://www.consoletuner.com/forum/viewtopic.php?f=20&t=663
In this topic the exact problem is described. All the researching yet I am still doing something wrong. Maybe I am missing something or just being plain stupid.

I used the following scripts so far:
Special Antirecoil for XIM - By AlanMcGregor
AntiThesis ADS Antirecoil - By AntiThesis
Antirecoil utility by - By AlanMcGregor
And official gamepacks.

By every script I download I have the big jumps and recoil doesnt work propeply
Also with the Apex legends gamepack I followed clear instructions as shown below:
When using XIM Apex (and any other device which utilizes mouse as input for aming), set the Gamepack Anti-recoil as the following:
Anti-Recoil: ENABLED (not the mouse option)
Anti-recoil vertical pull force compensation: weapon dependent, start with 12
Anti-recoil horizontal pull force compensation: usually set to 0
Anti-recoil deadzone compensation: CHECKED (very important when using with XIM)


Anybody that has a solution for this would be a hero.
User avatar
Soken
Sergeant First Class
Sergeant First Class
 
Posts: 20
Joined: Thu Oct 29, 2020 8:36 pm

Re: Anti-recoil jumps down.

Postby mofotyler » Tue Mar 09, 2021 11:21 am

I spent many hours combing through endless post looking for something that works. From what i gather when your using antirecoil and it drops below the horizon and goes negative it double dips the antirecoil value and runs away. I'm using Xim4/Titan 1/Xbox1 and I have found some that work but are not perfect. Titan 2 has it figured out and there is several in library to chose from. I will link a few for titan 1 but I no longer remember who to give credit to for the scripts. I made rough changes for toggles and such I'm no expert at it. If they have error let me know been long time since used and they are very roughly eddited

This I hve not tried yet
viewtopic.php?f=6&t=8676&p=62875&hilit=Deadzone+Xim#p62875


Destiny Titan fun pack in the library is supposed to work for XIM. I am currently trying and so far its okay but lots going on in the script


This is a shorter version of the fun pack I believe but have not tested yet


Code: Select all
 
//==============================================================================
 
// RAPID-FIRE with embedded BURST-FIRE and ANTI-RECOIL
 
//==============================================================================         
// COPYRIGHT
 /*
    2016 antithesis from http://www.consoletuner.com. This Script was made and intended for http://www.Consoletuner.com & Titan 0ne ONLY,
    UNLESS written permission is given by the creator and/or copywritee. 
    All rights reserved. This material may not be reproduced, displayed, modified or distributed without the express prior written permission
    of the copyright holder. For permission, contact antithesis via http://www.consoletuner.com/forum 
 */

//------------------------------------------------------------------------------
// CONTROLLER TOGGLES
/*
            // Hold D-PAD UP, click button to the right   
 
            - Rapid-fire                D-PAD UP + PS4 R2 / XB1 RT
            - Burst-fire                D-PAD UP + PS4 CROSS  / XB1 X
            - Anti-recoil               D-PAD UP + PS4 L2 / XB1 LT           
*/

 
//==============================================================================
// DECLARATIONS
 
define HOME          = 0;      // XB1_XBOX    XB360_XBOX   PS4_PS           PS3_PS
define SHARE         = 1;      // XB1_VIEW    XB360_BACK   PS4_SHARE        PS3_SELECT
define OPTIONS       = 2;      // XB1_MENU    XB360_START  PS4_OPTIONS      PS3_START
define MELEE         = 3;      // XB1_RB      XB360_RB     PS4_R1           PS3_R1
define SHOOT         = 4;      // XB1_RT      XB360_RT     PS4_R2           PS3_R2
define ZOOM          = 5;      // XB1_RS      XB360_RS     PS4_R3           PS3_R3
define GRENADE       = 6;      // XB1_LB      XB360_LB     PS4_L1           PS3_L1
define ADS           = 7;      // XB1_LT      XB360_LT     PS4_L2           PS3_L2
define SPRINT        = 8;      // XB1_LS      XB360_LS     PS4_L3           PS3_L3
define RX_AXIS       = 9;      // XB1_RX      XB360_RX     PS4_RX           PS3_RX
define RY_AXIS       = 10;     // XB1_RY      XB360_RY     PS4_RY           PS3_RY
define LX_AXIS       = 11;     // XB1_LX      XB360_LX     PS4_LX           PS3_LX
define LY_AXIS       = 12;     // XB1_LY      XB360_LY     PS4_LY           PS3_LY
define DPAD_UP       = 13;     // XB1_UP      XB360_UP     PS4_UP           PS3_UP
define DPAD_DOWN     = 14;     // XB1_DOWN    XB360_DOWN   PS4_DOWN         PS3_DOWN
define DPAD_LEFT     = 15;     // XB1_LEFT    XB360_LEFT   PS4_LEFT         PS3_LEFT
define DPAD_RIGHT    = 16;     // XB1_RIGHT   XB360_RIGHT  PS4_RIGHT        PS3_RIGHT
define WEAPON_SWAP   = 17;     // XB1_Y       XB360_Y      PS4_TRIANGLE     PS3_TRIANGLE
define CROUCH        = 18;     // XB1_B       XB360_B      PS4_CIRCLE       PS3_CIRCLE
define JUMP          = 19;     // XB1_A       XB360_A      PS4_CROSS        PS3_CROSS
define RELOAD        = 20;     // XB1_X       XB360_X      PS4_SQUARE       PS3_SQUARE
 
//------------------------------------------------------------------------------
// RAPID-FIRE
/*
    - Adjust Hold & Rest times up & down, and/or tweak the balance of Hold & Rest until the weapon feels right
    - For greater recoil control (in addition to Anti-recoil), use Hold and Rest values higher than MPS/2
    - Set to 0 to disable Rapid-fire for any mode. For example, fire an AK-47 in automatic for HIP, but semi-automatic in ADS for increased recoil control
*/

 
define HIP_Hold  = 30;   // HIP hold SHOOT time
define HIP_Rest  = 20;   // HIP release SHOOT time
 
define ADS_Hold  = 30;   // ADS hold SHOOT time
define ADS_Rest  = 20;   // ADS release SHOOT time
 
 
//------------------------------------------------------------------------------
// ANTI-RECOIL
/*
    - Use values between 0 to 100 to adjust Left and Right X-axis (horizontal) anti-recoil. Use Left or Right, not both
    - Use values between 0 to 100 to adjust Y-axis (vertical) anti-recoil
    - Know your weapon recoil patterns before entering a match and don't change the load-out without editing these values
    - Enter 0 for no anti-recoil or disable all anti-recoil via D-PAD UP + PS4 L2 / XB1 LT
*/

define HIP_L = 0;       // Primary Hip X-axis Left. Range of 0 to 100.
define HIP_R = 0;       // Primary Hip X-axis Right. Range of 0 to 100.
define HIP_V = 30;       // Primary Hip Y-axis Vertical. Range of 0 to 100.
 
define ADS_L = 0;       // Primary ADS X-axis Left. Range of 0 to 100.
define ADS_R = 0;       // Primary ADS X-axis Right. Range of 0 to 100.
define ADS_V = 50;       // Primary ADS Y-axis Vertical. Range of 0 to 100.
 
 
//------------------------------------------------------------------------------
// RUMBLE
 
define RumbleStrength = 60// Change to 0 to disable rumble
 
//==============================================================================
// LOOK BUT DON'T TOUCH ANYTHING BELOW THIS LINE. YOU BREAK IT, YOU BOUGHT IT!
//==============================================================================
 
//------------------------------------------------------------------------------
// Persistent Vars
define PVAR_ToggleFlags = SPVAR_1;
 
 
//==============================================================================
// VARIABLES
 
// Store toggle states
int ToggleFlags;
 
//------------------------------------------------------------------------------
// Function & Combo Variables
 
int RightStick_X = 0;
int RightStick_Y = 0;
int HoldTime, RestTime;
 
//==============================================================================
// INITIALISATION
 
init
{
 
    // Retrieve Toggle States
    ToggleFlags = get_pvar(PVAR_ToggleFlags, -32768, 32767, 0);
}
 
//==============================================================================
// MAIN
 
main
{
    // Repeat main loop every 4ms. Higher values add to T1 CPU load
    vm_tctrl(-6);
 
//------------------------------------------------------------------------------
// HAIR TRIGGERS
 
    // Shoot
    if (get_val(SHOOT)) { set_val(SHOOT, 100); }
 
    // ADS   
    if (get_val(ADS)) { set_val(ADS, 100); }
 
//------------------------------------------------------------------------------
// TOGGLES
 
    if (get_val(DPAD_UP))
    {
        // Rapid-fire (PS4 R2 / XB1 RT)
        if(event_press(4)) { SetToggle(1); }
 
        // Anti-recoil (PS4 L2 / XB1 LB)
        if (event_press (7)) { SetToggle (2); }
 
        // Burst-fire
        if (event_press (3)) {SetToggle (3); }
    }
 
 
//------------------------------------------------------------------------------
// RAPID-FIRE & ANTI-RECOIL
 
    // Hip-fire Settings
    if (!get_val (ADS))
    {
            if (get_val (SHOOT))
            {   
                if (test_bit (ToggleFlags, 1))
                    { RapidFireSpeed (HIP_Hold, HIP_Rest); } // Rapid-fire
                if (test_bit (ToggleFlags, 2) && !test_bit (ToggleFlags, 3))
                    { AntiRecoil(HIP_L, HIP_R, HIP_V); } // Anti-recoil
            }
    }
 
    // Aim Down Sights Settings
    if (get_val(ADS))
    {
            if (get_val (SHOOT))
            {   
                if (test_bit (ToggleFlags, 1))
                    { RapidFireSpeed (ADS_Hold, ADS_Rest); } // Rapid-fire
                if (test_bit (ToggleFlags, 2) && !test_bit (ToggleFlags, 3))
                    { AntiRecoil(ADS_L, ADS_R, ADS_V); } // Anti-recoil
            }
    }
 
//------------------------------------------------------------------------------
} // end main
 
//==============================================================================
// COMBOS
 
combo RapidFire
{
    set_val(SHOOT, 100);
 
    // Integrated anti-recoil. Works best for burst and auto-fire. Causes jitter for semi-auto.
    if (test_bit (ToggleFlags, 2))
    {
        if (test_bit (ToggleFlags, 3) && get_val(ADS))
        { AntiRecoil(ADS_L, ADS_R, ADS_V); }
        else if (test_bit (ToggleFlags, 3) && !get_val(ADS))
        { AntiRecoil(HIP_L, HIP_R, HIP_V); }
    }
 
    // Burst-fire mode
    if (test_bit (ToggleFlags, 3))
         { HoldTime = 5 * HoldTime; }
    else { HoldTime = HoldTime; }
 
    wait(HoldTime);
    set_val(SHOOT, 0);
    wait(RestTime);
    set_val(SHOOT, 0);
}
 
combo Rumble
{
    set_rumble (RUMBLE_A, RumbleStrength);
    wait(300);
    reset_rumble();
}
 
//==============================================================================
// FUNCTIONS
 
//------------------------------------------------------------------------------
// RAPID-FIRE
 
function RapidFireSpeed (RF_HoldTime, RF_RestTime)
{   
    HoldTime = RF_HoldTime; RestTime = RF_RestTime;
    if (HoldTime > 0)
        { combo_run(RapidFire); }
}
 
//------------------------------------------------------------------------------
// ANTI-RECOIL
 
function AntiRecoil(AntiRecoil_L, AntiRecoil_R, AntiRecoil_V)
{
    // Horizontal anti-recoil parameters
    if (get_val(SHOOT) && isqrt(pow(get_val(RX_AXIS), 2) + pow(get_val(RY_AXIS), 2)) <= 25)
    {
        if(abs(RX_AXIS) <= 25)
        {
            // Compensate to the RIGHT
            RightStick_X = (get_val(RX_AXIS) + AntiRecoil_R);
            if (RightStick_X > 100) {RightStick_X = 100;}
                set_val(RX_AXIS, RightStick_X);
 
            // Compensate to the LEFT
            RightStick_X = (get_val(RX_AXIS) - AntiRecoil_L);
            if (RightStick_X < -100) {RightStick_X = -100;}
                set_val(RX_AXIS, RightStick_X);
 
        // Vertical anti-recoil parameters
 
            RightStick_Y = (get_val(RY_AXIS) + AntiRecoil_V);
            if (RightStick_Y > 100) {RightStick_Y = 100;}
            else if (RightStick_Y < -100) {RightStick_Y = -100;}
                set_val(RY_AXIS, RightStick_Y);
        }
    }
}
 
//------------------------------------------------------------------------------
// SET TOGGLES
 
function SetToggle(FlagLocation) {
    if(test_bit(ToggleFlags, FlagLocation)) {
        clear_bit(ToggleFlags, FlagLocation);
    }
    else {
        set_bit(ToggleFlags, FlagLocation);
        if (RumbleStrength > 0) { combo_run(Rumble); }
    }
    set_pvar(PVAR_ToggleFlags, ToggleFlags);
}


This one works pretty good but it will drop sometimes if you do burst it will help


Code: Select all
//    XIM 4 ANTIRECOIL (AJUSTABLE)_RAPIDFIRE (AJUSTABLE)_AUTOSPOT
//    ALL COMBOS TOGGLED OFF
 
 
//   VIEW + DOWN TOGGLES ANTIRECOIL ON/OFF   ONLY ACTIVE WHEN ADS
//   VIEW + RIGHT TOGGLES AUTO SPOT ON/OFF
//   VIEW + UP TOGGLES RAPID FIRE ON/OFF   ACTIVE ADS AND HIP FIRE     14 DEFAULT RATE OF FIRE
 
 
//   A + UP INCREASES RATE OF FIRE     A + DOWN DECRESS RATE OF FIRE   14 DEFAULT RATE OF FIRE
 
//   X + UP DECRESS ANTIRECOIL    X+ DOWN INCREASE ANTIRECOIL          22 DEFAULT ANTIRECOIL
 
 
 
 
int rapid_onoff = FALSE;   
int ANTIRECOIL_ENABLE = FALSE;   
int Autospot_onoff = FALSE;
 
define XIM4_MIN_VAL = 17; //ANTIRECOIL WILL GO NO LOWER THAN  XIM4_MIN_VAL    (THINK MINIMUM IS 13 FOR XIM 4)
 
int ANTIRECOIL_FORCE = 5;
 
int RATE_OF_FIRE = 14;   // Range: 1 to 25 RPS (Round/s)
                            // Values higher than 25 would be so fast that the
                            // game probably will not detect 100% of the events.
int tmp, rsf, xcmp;
int hold_time, rest_time;
 
 
 
main {
        if(get_val(1)  && event_press(14))  {       
         ANTIRECOIL_ENABLE=!ANTIRECOIL_ENABLE;
        }
 
        if(get_val(1)  && event_press(16))  {   
        Autospot_onoff=!Autospot_onoff;
        }
 
        if (Autospot_onoff) {combo_run(Autospot);
        }
 
        if(get_val(1)  && event_press(13))  {             
        rapid_onoff=!rapid_onoff;
        }
 
    if(rapid_onoff) {if(get_val(4)) {combo_run(RAPID_FIRE);}
    }   
 
       hold_time = 500 / RATE_OF_FIRE;
        rest_time = hold_time - 20;
        if(rest_time < 0) rest_time = 0;
 
            if(get_val(19)){                           
        if(event_press(13)){
            RATE_OF_FIRE = RATE_OF_FIRE +1;}
 
        if(event_press(14)){
            RATE_OF_FIRE = RATE_OF_FIRE -1;}
 
        }
            if(get_val(20)){                           
        if(event_press(14)){
            ANTIRECOIL_FORCE = ANTIRECOIL_FORCE +1;}
 
        if(event_press(13)){
            ANTIRECOIL_FORCE = ANTIRECOIL_FORCE -1;}
            }
 
 
    if(ANTIRECOIL_ENABLE) {
        // AIM down side + aiming and shooting but not moving - enable antirecoil
        // AIM down side + aiming and shooting AND moving left or right (i mean aiming) - not walking left or right - disable the antirecoil?
        if(get_val(PS4_L2) && get_val(PS4_R2) && isqrt(pow(get_val(PS4_RX), 2) + pow(get_val(PS4_RY), 2)) <= 35) {//CHANGE THIS VALUE TO STOP ANTI RECOIL \\
      //if(get_val(PS4_R2) && (get_ptime(PS4_R2) <= 50 || get_ptime(PS4_R2) >= 100)) {
            if(abs(PS4_RX) <= 35) {  //CHANGE THIS VALUE TO STOP ANTI RECOIL \\
                // Rescale XIM4 aim Y axis
                if(get_val(PS4_RY) >= XIM4_MIN_VAL) {
                    set_val(PS4_RY, get_val(PS4_RY)-XIM4_MIN_VAL);
                    sensitivity(PS4_RY, NOT_USE, rsf);
                } else if(get_val(PS4_RY) <= -XIM4_MIN_VAL) {
                    set_val(PS4_RY, get_val(PS4_RY)+XIM4_MIN_VAL);
                    sensitivity(PS4_RY, NOT_USE, rsf);
                } else set_val(PS4_RY, 0);
 
                // Rescale XIM4 aim X axis
                if(get_val(PS4_RX) >= XIM4_MIN_VAL) {
                    set_val(PS4_RX, get_val(PS4_RX)-XIM4_MIN_VAL);
                    sensitivity(PS4_RX, NOT_USE, rsf);
                } else if(get_val(PS4_RX) <= -XIM4_MIN_VAL) {
                    set_val(PS4_RX, get_val(PS4_RX)+XIM4_MIN_VAL);
                    sensitivity(PS4_RX, NOT_USE, rsf);
                } else set_val(PS4_RX, 0);
 
                // X movements compensation
                tmp = ANTIRECOIL_FORCE - 3 * abs(get_val(PS4_RX));
 
                // Apply the anti-recoil
                if(tmp <= 0) tmp = 1;
                tmp = get_val(PS4_RY) + tmp;
                if(tmp > 100) tmp = 100;
                else if(tmp < -100) tmp = -100;
                set_val(PS4_RY, tmp);
 
                // Re-apply deadzone;
                deadzone(PS4_RX, PS4_RY, XIM4_MIN_VAL, XIM4_MIN_VAL);}
            }
        }
    }
 
 
combo RAPID_FIRE {
    set_val(4, 100);
    wait(hold_time);
    set_val(4, 0);
    wait(rest_time);
    set_val(4, 0);
    }
 
    combo Autospot {
    set_val(3, 100);
    wait(40); wait(980);
    }




supposedly you add this in to fix the sudden drop I have not used it yet.

Code: Select all
int RECOIL_V = 30; // vertical recoil 
int RECOIL_H = 0//horizontal recoil
int RY;
int RX;
 
 
 
main {
    if (get_val (PS4_R2))
    {   
        AntiRecoil(PS4_RY, RECOIL_V);
        AntiRecoil(PS4_RX, RECOIL_H);
    }
 
}
 
 
 function AntiRecoil (axis, recoil)
{
     RY = get_val(PS4_RY);
     RX = get_val(PS4_RX);
 
    if (get_val(PS4_R2) && (isqrt(RX*RX + RY*RY)) <= abs(recoil))
    {
        if(abs(RY) <= abs(recoil))
        {
            set_val(axis, (recoil * (100 - abs(get_val(axis)))) / 100 + get_val(axis));
        }
    }
}
 
User avatar
mofotyler
Corporal
Corporal
 
Posts: 5
Joined: Thu Jan 21, 2021 8:23 am

Re: Anti-recoil jumps down.

Postby Soken » Thu Mar 11, 2021 5:03 am

I have given up on it, I am using Computer Vision anti recoil now for Apex Legends. With a XIM, and its perfect.
User avatar
Soken
Sergeant First Class
Sergeant First Class
 
Posts: 20
Joined: Thu Oct 29, 2020 8:36 pm

Re: Anti-recoil jumps down.

Postby mofotyler » Thu Mar 11, 2021 5:58 am

Soken wrote:I have given up on it, I am using Computer Vision anti recoil now for Apex Legends. With a XIM, and its perfect.


Yeah im actually about to give the mouse and keyboard plugin for Titan 1. I have tried so many scripts but they are inconsistent with antirecoil using a Xim. one second its perfect and then the next im shooting dirt at their feet or its not working at all.
User avatar
mofotyler
Corporal
Corporal
 
Posts: 5
Joined: Thu Jan 21, 2021 8:23 am

Re: Anti-recoil jumps down.

Postby mosta88 » Sun Sep 12, 2021 5:24 pm

I CAN NOT CHANGE VALUE RECOIL V\H
HOW I CAN CHANGE CONTROLLER I HVAVE PS5
User avatar
mosta88
Private
Private
 
Posts: 1
Joined: Tue Sep 07, 2021 6:56 pm


Return to XIM Apex, XIM4, XIM Edge with Titan devices

Who is online

Users browsing this forum: No registered users and 40 guests