Guys, would you help me test my new anti-recoil script?
Re: Guys, would you help me test my new anti-recoil script?
Below is a good primer for recoil compensation. This was based upon my experience with COD but easily applies to other games.
https://www.consoletuner.com/forum/viewtopic.php?f=26&t=10016
One thing that you have to consider for recoil compensation is the look inversion setting for some games. For people that don't know, with look inversion you pull back on the joystick to look up and push forward to look down. This is how airplane joysticks work. I am one of those odd people that still use look inversion due to all the early flight simulator games. For example, look inversion is an option in Call of Duty.
Because the right stick values in the Y axis are 100 to -100. You simply have to invert how to apply the compensation (i.e. add vs subtract).
Another thing to consider is look value vs gun value. Many video games segregate the two. For example, you can have a perfectly centered look (X = 0, Y= 0) without ever changing the value. An example of this is not touching the joystick on the controller. The gun value is the games translation of inputs (look, gun, recoil, ADS, shoot button, etc.). In my example, you simply hold the shoot button and the gun value will increase (i.e. the screen starts looking up) based upon the recoil even with X =0, Y-0. The guns reaction determines how the recoil compensation should be applied. If a gun is very straight forward, then a linear compensation will work. If a gun's recoil starts slower and then ramps quickly, then a curved or exponential equation may work better.
Sometimes the recoil is varies greatly in the vertical and horizontal directions. See the BO4 beta video that shows the recoil. With these patterns, a hybrid approach would be needed.
https://www.consoletuner.com/forum/viewtopic.php?f=26&t=10016
One thing that you have to consider for recoil compensation is the look inversion setting for some games. For people that don't know, with look inversion you pull back on the joystick to look up and push forward to look down. This is how airplane joysticks work. I am one of those odd people that still use look inversion due to all the early flight simulator games. For example, look inversion is an option in Call of Duty.
Because the right stick values in the Y axis are 100 to -100. You simply have to invert how to apply the compensation (i.e. add vs subtract).
Another thing to consider is look value vs gun value. Many video games segregate the two. For example, you can have a perfectly centered look (X = 0, Y= 0) without ever changing the value. An example of this is not touching the joystick on the controller. The gun value is the games translation of inputs (look, gun, recoil, ADS, shoot button, etc.). In my example, you simply hold the shoot button and the gun value will increase (i.e. the screen starts looking up) based upon the recoil even with X =0, Y-0. The guns reaction determines how the recoil compensation should be applied. If a gun is very straight forward, then a linear compensation will work. If a gun's recoil starts slower and then ramps quickly, then a curved or exponential equation may work better.
Sometimes the recoil is varies greatly in the vertical and horizontal directions. See the BO4 beta video that shows the recoil. With these patterns, a hybrid approach would be needed.
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
Re: Guys, would you help me test my new anti-recoil script?
Mad wrote:Make sure to credit DrNefario for his work.
- Code: Select all
#define RY get_actual(22)
#define RX get_actual(21)
main {
if (get_actual(4)) AntiRecoil(ar);
}
}
HEy Mad,
Just a quick question on the code above. Where it says 22, 21 and 4 - those are basically:
22 = STICK_1_Y
21 = STICK_1_X
4 = BUTTON_5
Right? Or I'm lost :D
- My recommendation for learning C programming: 'C Programming Absolute Beginner's Guide'
- Create your own scripts with GPC2 Scripting
- Create your own scripts with GPC2 Scripting
-
jelly44 - Sergeant Major of the Army
- Posts: 220
- Joined: Tue Feb 05, 2019 3:49 pm
Re: Guys, would you help me test my new anti-recoil script?
jelly44 wrote:HEy Mad,
Just a quick question on the code above. Where it says 22, 21 and 4 - those are basically:
22 = STICK_1_Y
21 = STICK_1_X
4 = BUTTON_5
Right? Or I'm lost :D
You are correct, If you press F1 in Gtuner to see the GPC Designator's its the first lot of numbers you'll see going down the left side
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
- Mad
- Major General
- Posts: 4533
- Joined: Wed May 22, 2019 5:39 am
Re: Guys, would you help me test my new anti-recoil script?
Thank you Mad & bonefisher!
DrNefario - thank you for the anti recoil algorithm. I tested fully on Firestorm last night and it was awesome. Somehow I feel I have more freedom when shooting in ADS while tracking targets.
DrNefario - thank you for the anti recoil algorithm. I tested fully on Firestorm last night and it was awesome. Somehow I feel I have more freedom when shooting in ADS while tracking targets.
- My recommendation for learning C programming: 'C Programming Absolute Beginner's Guide'
- Create your own scripts with GPC2 Scripting
- Create your own scripts with GPC2 Scripting
-
jelly44 - Sergeant Major of the Army
- Posts: 220
- Joined: Tue Feb 05, 2019 3:49 pm
Re: Guys, would you help me test my new anti-recoil script?
Hey thanks for the recoil algorithm. I am curious on the "math" behind this. Would you be able to explan DrNefario?
-
residualflash - Master Sergeant
- Posts: 39
- Joined: Fri Apr 05, 2019 8:37 pm
Re: Guys, would you help me test my new anti-recoil script?
The one click config does not seem to work or change any values. Is there something I need to do or is it a bug?
-
infintejock21 - Sergeant
- Posts: 6
- Joined: Tue Aug 06, 2019 12:00 am
Re: Guys, would you help me test my new anti-recoil script?
infintejock21 wrote:The one click config does not seem to work or change any values. Is there something I need to do or is it a bug?
NVM. I had to update.
-
infintejock21 - Sergeant
- Posts: 6
- Joined: Tue Aug 06, 2019 12:00 am
Re: Guys, would you help me test my new anti-recoil script?
Hey Dr, out of all the BF5 scripts, I find yours is the most accurate but if an enemy moves behind a rock or down a hill, my cross hair drops down really quickly. I believe it's a known issue for xim users due to mouse stacking, or something along those lines. Any chance you could look at adding something to your scrip to counter this and or also look at adding an option to change the rate of rapid fire? Thanks bud, love your work.
-
Syaoran - Private First Class
- Posts: 2
- Joined: Fri Oct 11, 2019 8:04 am
Re: Guys, would you help me test my new anti-recoil script?
Syaoran wrote:Hey Dr, out of all the BF5 scripts, I find yours is the most accurate but if an enemy moves behind a rock or down a hill, my cross hair drops down really quickly. I believe it's a known issue for xim users due to mouse stacking, or something along those lines. Any chance you could look at adding something to your scrip to counter this and or also look at adding an option to change the rate of rapid fire? Thanks bud, love your work.
That sounds very interesting, will you please record a video or something to help me better identify this issue?
-
DrNefario - Master Sergeant
- Posts: 35
- Joined: Sun Dec 30, 2018 12:04 pm
Return to User's Script Documentation
Who is online
Users browsing this forum: No registered users and 74 guests