Antirecoil with time delay (beta)

GPC2 script programming for Titan Two. Code examples, questions, requests.

Antirecoil with time delay (beta)

Postby sky418 » Tue Jul 11, 2017 4:41 pm

Cooperative work bonefisher & sky418 in beta testing (conceptual).
Download in Gtuner IV (GPS Scripts).
The idea was to make antirecoil with a delay in start and a change the value in time
Test & give feedback.
User avatar
sky418
Command Sergeant Major
Command Sergeant Major
 
Posts: 124
Joined: Fri Nov 25, 2016 4:28 am

Re: Antirecoil with time delay (beta)

Postby J2Kbr » Tue Jul 11, 2017 5:18 pm

Awesome work... bonefisher gave me a "taste" of it couple days ago. Very nice.
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: Antirecoil with time delay (beta)

Postby Vendetta » Sat Jul 15, 2017 2:02 am

What type of weapons would this be effective on. Can you give me some idea of what your trying to accomplish with the delay? When ever bonefisher's doing something I'm interested. I'd like to know how to apply this.
    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

Re: Antirecoil with time delay (beta)

Postby bonefisher » Sat Jul 15, 2017 3:33 am

Vendetta wrote:What type of weapons would this be effective on. Can you give me some idea of what your trying to accomplish with the delay? When ever bonefisher's doing something I'm interested. I'd like to know how to apply this.

We are still work in progress but still works awesome....Anyway has a first shot delay before starting minimum value then gradually going to maximum value on a adjustable time scale of how slow or fast you increase minimum to maximum value of the anti-recoil. So the idea is usually depending on weapon of choice the first bullet comes out needing to apply anti-recoil anywhere from 50ms to 200ms then as you fire the second, third and fourth shots continuing to need more anti-recoil gradually til it levels off which you can adjust starting minimum anti-recoil to maximum anti-recoil with how fast you like to do this depending on weapon.
Right now were adding a reverse also to this so it does maximum to minimum value for an option and looking into adding deadzone remover to this but I'm looking into a gradually timed sensitivity when stick movement so it is so smooth working to stay on target and not to mess up normal speed of the stick. :smile0517:
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Antirecoil with time delay (beta)

Postby sky418 » Sat Jul 15, 2017 4:37 am

I don't have COD, and don't know the name of weapon, but on the remote play i see in game:
First 20-25 bullets - normal anti recoil, than the recoil changed to new parameters, become more then before.
In BF4, it's official from DICE, the support weapon stops recoil ufter 20 bullets.
So - you must have the time variable recoil.
User avatar
sky418
Command Sergeant Major
Command Sergeant Major
 
Posts: 124
Joined: Fri Nov 25, 2016 4:28 am

Re: Antirecoil with time delay (beta)

Postby monty34 » Sun Jul 16, 2017 10:41 am

I´ve tested the script, in the first shot i didn´t see a improvement compared to a fix AR value. I think the key here is to find the right values:

Let´s take an example from Destiny with a Hand Cannon (Eyasluna). AR applied to the full magazine (last shoot position should be similar to the first shoot position)

Starting Recoil after the first shoot: 35
End Recoil after the last shoot: 50
Magazine Size: 12
RPM: 138

Total time to empty the magazine: 138RPM/12 =11,5 sec or 11,5/12 = 0,96s/shoot
In ms = Empty magazine=11500ms or 960 ms per shot

So after the first shoot, AR starts for the following 11 shots. Time for duration is 11*960ms = 10560ms --> After the 12th shoot you need no recoil as you have to reload your magazine.

Delta AR= End Recoil (50) - Start Recoil (35) = Increase of 15 over 11 shots --> 15/11 = +1,37 AR per Shoot or every 960ms

This math could be adapted if the basis is not the full magazine, for PVP i would consider only the amount of shots i need to kill the opponent.

I guess the increase of AR is linear in your code?
User avatar
monty34
Command Sergeant Major
Command Sergeant Major
 
Posts: 165
Joined: Wed Jun 28, 2017 7:25 pm

Re: Antirecoil with time delay (beta)

Postby sky418 » Sun Jul 16, 2017 1:47 pm

If i correct understand you. It's not a good weapon for this test script, RPM, RPM < eq 250~300 is a too low RPM, it's like you shoot yourself, and can control yourself every shoot, & the is not enough time for duration in this script. THX for parametrs, We'll see what can we do.
P.S.
RPM is not equal of bullets is equal in time.
example RPM
225/60 = 3.75 RPS - Divide RPM by 60 for rounds per second (RPS)
1000/3.75 = 266 MPS - Divide 1000 (ms) by RPS, for milliseconds per shot (MPS)
MPS is contains two parameters per one shoot before you start the second one
And no matter automatic or rapidfire it's a weapon phithics, in rest time the weapon takes another bullet
266/2 = 133 Hold / Rest times - Divide MPS by 2 to find the approximate times
User avatar
sky418
Command Sergeant Major
Command Sergeant Major
 
Posts: 124
Joined: Fri Nov 25, 2016 4:28 am

Re: Antirecoil with time delay (beta)

Postby Vendetta » Sun Jul 16, 2017 2:23 pm

I worked with the script for about an hour, I too had a problem dialing it in. Using weapons in Destiny; I started with Auto-Rifles, Pulse Rifles, Scout's and then went to Side Arms. At present, with my limited knowledge of the internal coding I was unable to see any advantage from using a traditional Anti-recoil script.

Maybe it's the weapons design in Destiny, which is a distinct possibility.

I have probably 25 AR scripts for different weapon AR values in Destiny, so I started with those numbers which I've already determined work well in traditional AR scripts. I used this number as the START VALUE, (2) I did a calculation very similar to Monty's above to try to find the MAX VALUE. I left the TIME DIRECTION at 500.000 (Default).

I increased the slider to a value of 209 from it's default of 100, which I found had the most profound impact on the recoil.

The MAX VALUE calculation is somewhat difficult to determine, I like to see some math regarding it.

If there is weapon in a particular game title that you have dial in and can give me the game title name, weapon name and script config, I would love to try it out. I have most FPS games on my hard disk.

Below I've posted my traditional AR script (Destiny: MIDA Multi-Tool). (Also by Bonefisher)

Code: Select all
#pragma METAINFO("MIDA Multi-Tool Anti-Recoil X40 Y0", 1, 0, "Vendetta")
 
// Contains code sourced from: Bonefisher
 
#include <ps4.gph>
#include <keyboard.gph>
 
#define TRUE !FALSE
#define SENSITIVITY         0.01
 
#define     VERTICAL        40 //change this value to vertical recoil: 0 to 100; Higher the number, more adjustment downward
#define     HORIZONTAL      00 //change this value: 0 to 100; Higher the number, more adjustment to the left (Poistive) Right (Negitive)
 
int  anti_tmp;
int  anti_tmp1;
int  anti_tmp2;
 
int  ANTI_NO_RECOIL;
 
main {
    if(get_val(BUTTON_8) && get_val(BUTTON_5)) {
        combo_run(AntiRecoilADV);
    }else {
    if(event_release(BUTTON_5)) {
        combo_run(easy_down);
    }
    }
    if(get_actual(STICK_1_Y) < -35.0 || get_actual(STICK_1_Y) > 35.0 ||
       get_actual(STICK_1_X) < -35.0 || get_actual(STICK_1_X) > 35.0) {
        combo_stop(AntiRecoilADV);
    }
    if(event_active(BUTTON_17) > 0) {
        combo_run(Reload)// need to use reload gloves for this to work
      }
}
 
combo AntiRecoilADV {
    set_val(STICK_1_Y, get_val(STICK_1_Y) * SENSITIVITY);
      anti_tmp = (int) get_val(STICK_1_Y) + VERTICAL;
      if(anti_tmp > 100) anti_tmp = 100;
      else if(anti_tmp < -100) anti_tmp = -100;
      set_val(STICK_1_Y, anti_tmp);
    set_val(STICK_1_X, get_val(STICK_1_X) * SENSITIVITY);
    anti_tmp1 = (int) get_val(STICK_1_X) + HORIZONTAL;
      if(anti_tmp1 > 100) anti_tmp1 = 100;
      else if(anti_tmp1 < -100) anti_tmp1 = -100;
      set_val(STICK_1_X, anti_tmp1);
}
 
combo easy_down {
    if(is_release(BUTTON_5)) {
      anti_tmp2 = (int) get_val(STICK_1_Y) - VERTICAL;
      if(anti_tmp2 > 100) anti_tmp2 = 100;
      else if(anti_tmp2 < -100) anti_tmp2 = -100;
      set_val(STICK_1_Y, anti_tmp2);
    }
      wait(300);
}
 
combo Reload {
    wait (800);
    set_val(BUTTON_14, 100);
    wait (40);
    set_val(BUTTON_14, 0);
    wait (40);
    set_val(BUTTON_14, 100);
    wait (40);
    set_val(BUTTON_14, 0);
}
    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

Re: Antirecoil with time delay (beta)

Postby monty34 » Sun Jul 16, 2017 4:41 pm

@ sky418: Yes you´re right, Time between two shoots is splitted into Hold & Rest Time. But what is the main intention for your time delay? From my point it´s more that you increase the AR value per shot as you probably never have the exact starting value and therefore compensate the increasing Y-Value for a row of shots.

@vendetta: Great to see another Destiny Fan here :smile0202: I´m happy to try your script later, it will be interesting if it shows differences to mine for MIDA use. If you have a T2 i can share my code for testing.
User avatar
monty34
Command Sergeant Major
Command Sergeant Major
 
Posts: 165
Joined: Wed Jun 28, 2017 7:25 pm

Re: Antirecoil with time delay (beta)

Postby antithesis » Sun Jul 16, 2017 9:40 pm

Two examples of where this is useful -

1. Automatic Rifles in Destiny where recoil starts high before levelling off.
2. Just about every automatic weapon in The Division, where recoil starts moderately before climbing steeply after a couple of seconds.

For most games and most semi-auto weapons, flat anti-recoil should do the job, but timed interpolation is a handy addition to the toolkit for automatic weapons.

I tried Xenologer's timed anti-recoil code and it felt good for slowing / accelerating anti-recoil over time. The anti-recoil effect itself was cool, but I couldn't get it to play friendly with my more complex Xim-friendly anti-recoil code, nor did it work well for Xim by itself, nor was it useful for many guns that I use.

Given the limited scope of application and stupid amount of time I worked on a failed integration, I had to give it a miss for now. Sky was helping me out with some code examples, so I'm sure with bonefisher helping him, this could turn into something pretty neat.
Official Australian retailer for Titan One, Titan Two and XIM APEX at Mod Squad
User avatar
antithesis
Colonel
Colonel
 
Posts: 1912
Joined: Sat May 28, 2016 10:45 pm

Next

Return to GPC2 Script Programming

Who is online

Users browsing this forum: midg3t2 and 102 guests