Special Anti-Recoil for XIM4 and XIM Apex
Re: Special Anti-Recoil for XIM4 and XIM Apex
alanmcgregor wrote:UPDATE 1.5
+ Added Turbo Loot
+ Added Custom Auto Sniper Hold Breath
Thank you very much
-
Tahsin - Sergeant Major
- Posts: 100
- Joined: Wed May 15, 2019 7:57 am
Re: Special Anti-Recoil for XIM4 and XIM Apex
Didn't you change it from the anti-recoil reel? Before the introduction of the breath hold, it shot normally.
-
Bagura32rus - Sergeant Major
- Posts: 73
- Joined: Fri Dec 21, 2018 9:37 pm
- Location: RUSSIA
Re: Special Anti-Recoil for XIM4 and XIM Apex
the anti recoil only works for the red dot and holo
it would be nice if you can somehow make it work for 2x 3x 4x 6x
this is for pubg btw
it would be nice if you can somehow make it work for 2x 3x 4x 6x
this is for pubg btw
-
STEELSERIES310 - Sergeant
- Posts: 9
- Joined: Fri May 31, 2019 6:44 am
Re: Special Anti-Recoil for XIM4 and XIM Apex
- Code: Select all
#pragma METAINFO("aim stablizer plus anti recoil", 1, 0, "bonefisher")
// INPUT INITIALIZATION
#define MOV_RY_AXIS STICK_1_Y
#define MOV_RX_AXIS STICK_1_X
#define ADS BUTTON_8
#define SHOOT BUTTON_5
// USER CONFIGURABLE VARIABLES
int mid_stabilizer_sensitivity = 50;
int aim_stabilizer_sensitivity = 80;
//Percent of anti ARecoil to always apply regardless of aim movement
fix32 MinARecoilPercent = 30.0;
fix32 StickNoise = 7.0;
uint16 ARecoilDelay = 0;
//Apex Dead zone Remover
fix32 ARecoil_H_ToUse = 0.0;
fix32 ARecoil_V_ToUse = 30.0;
main {
// Arg 1: Deadzone value to remove from X axis (horizontal)
// Arg 2: Deadzone value to remove from Y axis (vertical)
// Arg 3: Deadzone shape. 1.0 == CIRCLE, 0.0 == SQUARE
removedz(12.0, 10.0, 1.0);
if(get_val(ADS) && get_val(SHOOT)) {
sensitivity(MOV_RY_AXIS, (fix32)mid_stabilizer_sensitivity, (fix32) aim_stabilizer_sensitivity);
sensitivity(MOV_RX_AXIS, (fix32)mid_stabilizer_sensitivity, (fix32) aim_stabilizer_sensitivity);
}
if (get_actual(BUTTON_5) && time_active(BUTTON_5) >= ARecoilDelay)
{
if (abs(get_actual(STICK_1_X)) < StickNoise) set_val(STICK_1_X, 0.0);
if (abs(get_actual(STICK_1_Y)) < StickNoise) set_val(STICK_1_Y, 0.0);
if (abs(get_actual(STICK_2_X)) < StickNoise) set_val(STICK_2_X, 0.0);
if (abs(get_actual(STICK_2_Y)) < StickNoise) set_val(STICK_2_Y, 0.0);
//We currently only want shoot to be on during the hold phase of rapid fire
if (get_actual(BUTTON_8) && get_val(BUTTON_5))
{
AntiRecoil(STICK_1_X, ARecoil_H_ToUse);
AntiRecoil(STICK_1_Y, ARecoil_V_ToUse);
}
else if(get_val(BUTTON_5))
{
AntiRecoil(STICK_1_X, ARecoil_H_ToUse);
AntiRecoil(STICK_1_Y, ARecoil_V_ToUse - 3.0);
}
}
}
// FUNCTIONS
// This is a ported T1 function no longer supported by T2 (this is literally the code from T1, provided by Jefferson Koppe).
void sensitivity(uint8 i, fix32 m, fix32 s) {
fix32 v = get_val(i);
if(v) {
if(m) {
v = (v > 0.0) ? midpoint(v, m) : midpoint(v * -1.0, m) * -1.0;
}
if(s) {
v = (v * s) / 100.0;
}
if(v > 100.0) v = 100.0;
else if(v < -100.0) v = -100.0;
set_val(i, v);
}
return;
}
fix32 midpoint(fix32 v, fix32 m) {
if(v <= m) return((v * 50.0) / m);
return(((50.0 * (v - m)) / (100.0 - m)) + 50.0);
}
void AntiRecoil(uint8 AxisToApply, fix32 ARecoilToApply)
{
fix32 CurrentX = get_val(STICK_1_X);
fix32 CurrentY = get_val(STICK_1_Y);
fix32 MinARecoilFactor = MinARecoilPercent / 100.0;
fix32 MinARecoilToApply = MinARecoilFactor * ARecoilToApply;
//This sets the ARecoil to be dependent on both X and Y axis movement. With more emphasis on Y
fix32 MovementARecoilToApply = (1.0 - MinARecoilFactor) * ((ARecoilToApply * (100.0 - sqrt(CurrentX*CurrentX + CurrentY*CurrentY))) / (100.0 + abs(CurrentX) + (CurrentY*CurrentY*0.5)));
set_val(AxisToApply,clamp(MinARecoilToApply + MovementARecoilToApply + get_val(AxisToApply),-100.00,100.00 - MinARecoilToApply));
}
void removedz(fix32 DX, fix32 DY, fix32 DS) {
static fix32 px, py, rx, ry;
fix32 fx = get_actual(STICK_1_X);
fix32 fy = get_actual(STICK_1_Y);
if(fx != px || fy != py) {
px = fx;
py = fy;
fix32 fsx = (fx > 0.0) ? 1.0 : ((fx < 0.0) ? -1.0 : 0.0);
fx = abs(fx);
fix32 fsy = (fy > 0.0) ? 1.0 : ((fy < 0.0) ? -1.0 : 0.0);
fy = abs(fy);
fix32 a = atan2(fy, fx);
fx += DX * pow(cos(a), DS);
fy += DY * pow(sin(a), DS);
rx = clamp(fx, 0.0, 100.0) * fsx;
ry = clamp(fy, 0.0, 100.0) * fsy;
}
set_val(STICK_1_X, rx);
set_val(STICK_1_Y, ry);
return;
}
Try this out!
- bonefisher
- Lieutenant General
- Posts: 5413
- Joined: Thu Jan 29, 2015 10:49 am
Re: Special Anti-Recoil for XIM4 and XIM Apex
could you change the way you turn rapidfire on/off pushing options+r2 pauses the game in most cases
eg when you need to turn rapid fire off quickly in apex legends when you have been downed and need to use your shield it brings the menu up and pretty much leaves you to be shot.
X+L2 worked well in your essential script.
eg when you need to turn rapid fire off quickly in apex legends when you have been downed and need to use your shield it brings the menu up and pretty much leaves you to be shot.
X+L2 worked well in your essential script.
-
Nate36 - Master Sergeant
- Posts: 41
- Joined: Tue Apr 24, 2018 12:33 am
Re: Special Anti-Recoil for XIM4 and XIM Apex
STEELSERIES310 wrote:the anti recoil only works for the red dot and holo
it would be nice if you can somehow make it work for 2x 3x 4x 6x
this is for pubg btw
You can set Hight button for 4x 6x an increase the value
-
Tahsin - Sergeant Major
- Posts: 100
- Joined: Wed May 15, 2019 7:57 am
Re: Special Anti-Recoil for XIM4 and XIM Apex
bonefisher wrote:
- Code: Select all
#pragma METAINFO("aim stablizer plus anti recoil", 1, 0, "bonefisher")
// INPUT INITIALIZATION
#define MOV_RY_AXIS STICK_1_Y
#define MOV_RX_AXIS STICK_1_X
#define ADS BUTTON_8
#define SHOOT BUTTON_5
// USER CONFIGURABLE VARIABLES
int mid_stabilizer_sensitivity = 50;
int aim_stabilizer_sensitivity = 80;
//Percent of anti ARecoil to always apply regardless of aim movement
fix32 MinARecoilPercent = 30.0;
fix32 StickNoise = 7.0;
uint16 ARecoilDelay = 0;
//Apex Dead zone Remover
fix32 ARecoil_H_ToUse = 0.0;
fix32 ARecoil_V_ToUse = 30.0;
main {
// Arg 1: Deadzone value to remove from X axis (horizontal)
// Arg 2: Deadzone value to remove from Y axis (vertical)
// Arg 3: Deadzone shape. 1.0 == CIRCLE, 0.0 == SQUARE
removedz(12.0, 10.0, 1.0);
if(get_val(ADS) && get_val(SHOOT)) {
sensitivity(MOV_RY_AXIS, (fix32)mid_stabilizer_sensitivity, (fix32) aim_stabilizer_sensitivity);
sensitivity(MOV_RX_AXIS, (fix32)mid_stabilizer_sensitivity, (fix32) aim_stabilizer_sensitivity);
}
if (get_actual(BUTTON_5) && time_active(BUTTON_5) >= ARecoilDelay)
{
if (abs(get_actual(STICK_1_X)) < StickNoise) set_val(STICK_1_X, 0.0);
if (abs(get_actual(STICK_1_Y)) < StickNoise) set_val(STICK_1_Y, 0.0);
if (abs(get_actual(STICK_2_X)) < StickNoise) set_val(STICK_2_X, 0.0);
if (abs(get_actual(STICK_2_Y)) < StickNoise) set_val(STICK_2_Y, 0.0);
//We currently only want shoot to be on during the hold phase of rapid fire
if (get_actual(BUTTON_8) && get_val(BUTTON_5))
{
AntiRecoil(STICK_1_X, ARecoil_H_ToUse);
AntiRecoil(STICK_1_Y, ARecoil_V_ToUse);
}
else if(get_val(BUTTON_5))
{
AntiRecoil(STICK_1_X, ARecoil_H_ToUse);
AntiRecoil(STICK_1_Y, ARecoil_V_ToUse - 3.0);
}
}
}
// FUNCTIONS
// This is a ported T1 function no longer supported by T2 (this is literally the code from T1, provided by Jefferson Koppe).
void sensitivity(uint8 i, fix32 m, fix32 s) {
fix32 v = get_val(i);
if(v) {
if(m) {
v = (v > 0.0) ? midpoint(v, m) : midpoint(v * -1.0, m) * -1.0;
}
if(s) {
v = (v * s) / 100.0;
}
if(v > 100.0) v = 100.0;
else if(v < -100.0) v = -100.0;
set_val(i, v);
}
return;
}
fix32 midpoint(fix32 v, fix32 m) {
if(v <= m) return((v * 50.0) / m);
return(((50.0 * (v - m)) / (100.0 - m)) + 50.0);
}
void AntiRecoil(uint8 AxisToApply, fix32 ARecoilToApply)
{
fix32 CurrentX = get_val(STICK_1_X);
fix32 CurrentY = get_val(STICK_1_Y);
fix32 MinARecoilFactor = MinARecoilPercent / 100.0;
fix32 MinARecoilToApply = MinARecoilFactor * ARecoilToApply;
//This sets the ARecoil to be dependent on both X and Y axis movement. With more emphasis on Y
fix32 MovementARecoilToApply = (1.0 - MinARecoilFactor) * ((ARecoilToApply * (100.0 - sqrt(CurrentX*CurrentX + CurrentY*CurrentY))) / (100.0 + abs(CurrentX) + (CurrentY*CurrentY*0.5)));
set_val(AxisToApply,clamp(MinARecoilToApply + MovementARecoilToApply + get_val(AxisToApply),-100.00,100.00 - MinARecoilToApply));
}
void removedz(fix32 DX, fix32 DY, fix32 DS) {
static fix32 px, py, rx, ry;
fix32 fx = get_actual(STICK_1_X);
fix32 fy = get_actual(STICK_1_Y);
if(fx != px || fy != py) {
px = fx;
py = fy;
fix32 fsx = (fx > 0.0) ? 1.0 : ((fx < 0.0) ? -1.0 : 0.0);
fx = abs(fx);
fix32 fsy = (fy > 0.0) ? 1.0 : ((fy < 0.0) ? -1.0 : 0.0);
fy = abs(fy);
fix32 a = atan2(fy, fx);
fx += DX * pow(cos(a), DS);
fy += DY * pow(sin(a), DS);
rx = clamp(fx, 0.0, 100.0) * fsx;
ry = clamp(fy, 0.0, 100.0) * fsy;
}
set_val(STICK_1_X, rx);
set_val(STICK_1_Y, ry);
return;
}
Try this out!
Something not clear happens when I start it up with the feeling that sensitivity has been added XIM Apex purple lights appear!
-
Bagura32rus - Sergeant Major
- Posts: 73
- Joined: Fri Dec 21, 2018 9:37 pm
- Location: RUSSIA
Re: Special Anti-Recoil for XIM4 and XIM Apex
Bagura32rus wrote:bonefisher wrote:
- Code: Select all
#pragma METAINFO("aim stablizer plus anti recoil", 1, 0, "bonefisher")
// INPUT INITIALIZATION
#define MOV_RY_AXIS STICK_1_Y
#define MOV_RX_AXIS STICK_1_X
#define ADS BUTTON_8
#define SHOOT BUTTON_5
// USER CONFIGURABLE VARIABLES
int mid_stabilizer_sensitivity = 50;
int aim_stabilizer_sensitivity = 80;
//Percent of anti ARecoil to always apply regardless of aim movement
fix32 MinARecoilPercent = 30.0;
fix32 StickNoise = 7.0;
uint16 ARecoilDelay = 0;
//Apex Dead zone Remover
fix32 ARecoil_H_ToUse = 0.0;
fix32 ARecoil_V_ToUse = 30.0;
main {
// Arg 1: Deadzone value to remove from X axis (horizontal)
// Arg 2: Deadzone value to remove from Y axis (vertical)
// Arg 3: Deadzone shape. 1.0 == CIRCLE, 0.0 == SQUARE
removedz(12.0, 10.0, 1.0);
if(get_val(ADS) && get_val(SHOOT)) {
sensitivity(MOV_RY_AXIS, (fix32)mid_stabilizer_sensitivity, (fix32) aim_stabilizer_sensitivity);
sensitivity(MOV_RX_AXIS, (fix32)mid_stabilizer_sensitivity, (fix32) aim_stabilizer_sensitivity);
}
if (get_actual(BUTTON_5) && time_active(BUTTON_5) >= ARecoilDelay)
{
if (abs(get_actual(STICK_1_X)) < StickNoise) set_val(STICK_1_X, 0.0);
if (abs(get_actual(STICK_1_Y)) < StickNoise) set_val(STICK_1_Y, 0.0);
if (abs(get_actual(STICK_2_X)) < StickNoise) set_val(STICK_2_X, 0.0);
if (abs(get_actual(STICK_2_Y)) < StickNoise) set_val(STICK_2_Y, 0.0);
//We currently only want shoot to be on during the hold phase of rapid fire
if (get_actual(BUTTON_8) && get_val(BUTTON_5))
{
AntiRecoil(STICK_1_X, ARecoil_H_ToUse);
AntiRecoil(STICK_1_Y, ARecoil_V_ToUse);
}
else if(get_val(BUTTON_5))
{
AntiRecoil(STICK_1_X, ARecoil_H_ToUse);
AntiRecoil(STICK_1_Y, ARecoil_V_ToUse - 3.0);
}
}
}
// FUNCTIONS
// This is a ported T1 function no longer supported by T2 (this is literally the code from T1, provided by Jefferson Koppe).
void sensitivity(uint8 i, fix32 m, fix32 s) {
fix32 v = get_val(i);
if(v) {
if(m) {
v = (v > 0.0) ? midpoint(v, m) : midpoint(v * -1.0, m) * -1.0;
}
if(s) {
v = (v * s) / 100.0;
}
if(v > 100.0) v = 100.0;
else if(v < -100.0) v = -100.0;
set_val(i, v);
}
return;
}
fix32 midpoint(fix32 v, fix32 m) {
if(v <= m) return((v * 50.0) / m);
return(((50.0 * (v - m)) / (100.0 - m)) + 50.0);
}
void AntiRecoil(uint8 AxisToApply, fix32 ARecoilToApply)
{
fix32 CurrentX = get_val(STICK_1_X);
fix32 CurrentY = get_val(STICK_1_Y);
fix32 MinARecoilFactor = MinARecoilPercent / 100.0;
fix32 MinARecoilToApply = MinARecoilFactor * ARecoilToApply;
//This sets the ARecoil to be dependent on both X and Y axis movement. With more emphasis on Y
fix32 MovementARecoilToApply = (1.0 - MinARecoilFactor) * ((ARecoilToApply * (100.0 - sqrt(CurrentX*CurrentX + CurrentY*CurrentY))) / (100.0 + abs(CurrentX) + (CurrentY*CurrentY*0.5)));
set_val(AxisToApply,clamp(MinARecoilToApply + MovementARecoilToApply + get_val(AxisToApply),-100.00,100.00 - MinARecoilToApply));
}
void removedz(fix32 DX, fix32 DY, fix32 DS) {
static fix32 px, py, rx, ry;
fix32 fx = get_actual(STICK_1_X);
fix32 fy = get_actual(STICK_1_Y);
if(fx != px || fy != py) {
px = fx;
py = fy;
fix32 fsx = (fx > 0.0) ? 1.0 : ((fx < 0.0) ? -1.0 : 0.0);
fx = abs(fx);
fix32 fsy = (fy > 0.0) ? 1.0 : ((fy < 0.0) ? -1.0 : 0.0);
fy = abs(fy);
fix32 a = atan2(fy, fx);
fx += DX * pow(cos(a), DS);
fy += DY * pow(sin(a), DS);
rx = clamp(fx, 0.0, 100.0) * fsx;
ry = clamp(fy, 0.0, 100.0) * fsy;
}
set_val(STICK_1_X, rx);
set_val(STICK_1_Y, ry);
return;
}
Try this out!
Something not clear happens when I start it up with the feeling that sensitivity has been added XIM Apex purple lights appear!
Set xim apex polling rate to 500 hrz
-
Tahsin - Sergeant Major
- Posts: 100
- Joined: Wed May 15, 2019 7:57 am
Re: Special Anti-Recoil for XIM4 and XIM Apex
with the rest of the scenarios, everything is fine, but this one is not suitable for some reason, well, I'll try for 500
-
Bagura32rus - Sergeant Major
- Posts: 73
- Joined: Fri Dec 21, 2018 9:37 pm
- Location: RUSSIA
Re: Special Anti-Recoil for XIM4 and XIM Apex
ON it! thanks bonefisher!
Bagura32rus, I'm not familiar with PUBG mechanics in the game, don't know what are you referring to.
The hold-bread is a generic stand alone mod fully customizable, is not writed specifically for PUBG.
In most FPS, when you hold-breath you are aiming down sight and then you press and hold another button to sniper breath, the code allows you to select which button in your game does it.
Yep this is a new breed of anti-recoils scripts and takes abit more of the T2 cpu, mine is also removing deadzone and rescaling X/Y, 500Hz helps to reduce the workload and avoid USB offsyncs (XIM purple lights)
Got it and UPDATED: Ver 1.6
Bagura32rus wrote:Didn't you change it from the anti-recoil reel? Before the introduction of the breath hold, it shot normally.
Bagura32rus, I'm not familiar with PUBG mechanics in the game, don't know what are you referring to.
The hold-bread is a generic stand alone mod fully customizable, is not writed specifically for PUBG.
In most FPS, when you hold-breath you are aiming down sight and then you press and hold another button to sniper breath, the code allows you to select which button in your game does it.
Yep this is a new breed of anti-recoils scripts and takes abit more of the T2 cpu, mine is also removing deadzone and rescaling X/Y, 500Hz helps to reduce the workload and avoid USB offsyncs (XIM purple lights)
Nate36 wrote:could you change the way you turn rapidfire on/off pushing options+r2 pauses the game in most cases
eg when you need to turn rapid fire off quickly in apex legends when you have been downed and need to use your shield it brings the menu up and pretty much leaves you to be shot.
X+L2 worked well in your essential script.
Got it and UPDATED: Ver 1.6
-
alanmcgregor - Major
- Posts: 994
- Joined: Tue Mar 27, 2018 8:38 am
Return to User's Script Documentation
Who is online
Users browsing this forum: No registered users and 59 guests