Adjustable Rapid-fire, Anti-recoil, Auto-burst & Semi-burst

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

Adjustable Rapid-fire, Anti-recoil, Auto-burst & Semi-burst

Postby antithesis » Fri Dec 23, 2016 7:53 am

This script has been requested (and promised...) multiple times. It's a cut-down version of my more complex scripts to remove game-specific weapon tracking. It's intentionally generic and can be used in any shooter.

* Adjustable Rapid-fire, with separate settings for HIP & ADS.
* Adjustable Anti-recoil, with separate settings for HIP & ADS, on both horizontal and vertical axes.
* Adjustable Semi-burst and Auto-burst fire modes for improved reticle bloom, recoil and cooldown control, with separate settings for HIP & ADS. Anti-recoil is applied only to the burst for optimal recoil management.
* Plays friendly with Xim4!

Version:

1.13

Added condition to ignore L1 press when adjusting HIP recoil to ensure ADS anti-recoil adjusts correctly.

1.12
The Bonehead Patch: changed adjustable ADS recoil button combos to prevent interference with JUMP, CROUCH etc while ADS

1.11
Added support and toggle for Y-axis inversion.

1.10
- Changed toggled behaviour to make Weapon Mode selection more intuitive
- Split burst-fire into Auto-Burst for automatic weapons, and Semi-Burst for semi-auto weapons
- Added LED colours to indicate Weapon Mode

WEAPON MODES

* Default weapon-fire = Anti-recoil ON, Rapid-fire OFF, Auto-burst OFF, Semi-burst OFF. Applies anti-recoil (optional) to default fire mode for as long as SHOOT is held

* Semi-auto Rapid-fire = Anti-recoil ON, Rapid-fire ON. Rapid-fire SHOOT and apply anti-recoil (optional) for as long as SHOOT is held

* Semi-auto Burst-fire = Anti-recoil ON, Semi-burst ON. Tap to Rapid-fire SHOOT and apply anti-recoil (optional) for the duration of the burst

* Automatic Burst-fire = Anti-recoil ON, Auto-burst ON. Tap SHOOT and apply anti-recoil (optional) for the duration of the burst

IMPORTANT STUFF (sort of...)

Open in GTuner > Compiler to read documentation throughout the script.
Use Tools > Device Manager to view TRACE values for Rapid-fire HIP, Rapid-fire ADS, Anti-recoil HIP X & Y and Anti-recoil ADS X & Y.

The script features two anti-recoil implementations -

1. Standard get_val (SHOOT), where anti-recoil is applied for as long as the trigger is held, which is how it normally works. Intended for automatic and semi-automatic weapons. This anti-recoil method is active when semi-burst and auto-burst are OFF.

2. Embedded anti-recoil in AutoBurst and SemiBurst combos, where anti-recoil is applied for only as long as a weapon is firing a burst. This offers more precise timing and control over anti-recoil and weapon bloom. Active when semi-burst and auto-burst are ON.

Unlike the bog-standard RapidFire combo, the script uses 1000 / FireRate (instead of 500) and allowed a higher FireRate range of 1-50 (instead of 1-25) for more granular control over the timing. 1000ms = 1 sec, so I figured this may correlate better to rounds / sec values.

The wait time between non-burst shots, burst lengths and burst pauses can be edited in DEFINES.

ROADMAP

There's a few tweaks and add-ons I'll aim to slot to the script in the coming weeks, but this should be enough to get started.

Here's a few ideas rattling around my head -

* Weapon tracking. Bytecode and SPVAR limits are problematic
* Track bursts fired and auto-reload when empty. Will need some manual configuration to tell the script the magazine and burst size
* L1 / L2, R1 / R2 swapping
Last edited by antithesis on Tue Aug 08, 2017 2:44 pm, edited 57 times in total.
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

Re: Adjustable Rapid-fire, Adjustable Anti-recoil and Burst-

Postby jayjack » Fri Dec 23, 2016 9:19 am

Sir,

Allow me a a minute to express my gratutude.
I've had Titans for 6 months or so and I've been constantly thinking of this and endlessly hounding the coders for such a script. Lol

I have just come back from a 2 month deployment and went through the forum and said, ".....oh...still nothing... :( "

And now, here this is.
Thanks again
User avatar
jayjack
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 284
Joined: Tue Jul 26, 2016 2:41 pm

Re: Adjustable Rapid-fire, Adjustable Anti-recoil and Burst-

Postby antithesis » Fri Dec 23, 2016 9:27 am

Timing is everything...

frashbang has been after this for some time and I'd written a script for The Division for my personal amusement to see if it solved the problem. It did, but the script is very much in a beta state and too complex to cherry-pick the right code.

I saw your post and thought I'd better pull my finger out and tidy it up for more general use, which I'm sure I promised to do months ago. I already had all of the components, it just needed to be tied together.

Anyway, consider it an early Xmas pressie. I hope it does what you boys need it to do. It's mostly about the burst-fire, but has adjustable rapid-fire and Xim-friendly anti-recoil for any game.
Last edited by antithesis on Fri Dec 23, 2016 12:19 pm, edited 2 times in total.
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

Re: Adjustable Rapid-fire, Anti-recoil and Burst-fire

Postby Frashbrang » Fri Dec 23, 2016 10:42 am

Merry ximming Christmas antithesis you titan coding genius! Hahaha I cannot wait to try this out.

Thanks for stripping everything back and making it adjustable on the fly.

E X C I T E D

lets see if this works on rainbow six siege!
User avatar
Frashbrang
Command Sergeant Major
Command Sergeant Major
 
Posts: 153
Joined: Sat Jul 16, 2016 4:02 pm

Re: Adjustable Rapid-fire, Anti-recoil and Burst-fire

Postby cdc1287 » Fri Dec 23, 2016 11:11 am

Hey,

I have just bought a Titan One, it's here sitting next to me still in the packaging. Can this script work well with The Division?

I will be using it alongside the Xim 4.

Thanks for any help,

Chris
User avatar
cdc1287
Private First Class
Private First Class
 
Posts: 2
Joined: Sat Oct 08, 2016 3:35 pm

Re: Adjustable Rapid-fire, Anti-recoil and Burst-fire

Postby antithesis » Fri Dec 23, 2016 11:38 am

cdc1287 wrote:Hey,

I have just bought a Titan One, it's here sitting next to me still in the packaging. Can this script work well with The Division?

I will be using it alongside the Xim 4.

Thanks for any help,

Chris


It will work with any shooter, however things get a little messy when a game has Primary, Secondary and Sidearm or Heavy weapons.

I have a similar script in development for The Division with weapon tracking to manage Pri / Sec / Sidearm rapid-fire, anti-recoil and burst fire separately, but it's not adjustable on-the-fly (yet?). I'll work on it over the Xmas / New Year break. That's where this script came from, it's the stripped-down version of my Division code mixed with the adjustable stuff from my Garden Warfare 2 script.

The problem with The Division is the game adds input delay whenever you hold down SHOOT for any period of time. That's where burst-fire in particular comes in handy.

The Division ins't particularly Xim-friendly in PvP simply due to the poor look mechanics and input lag, so mileage may vary. But in PvE, the script is great.

Frashbrang wrote:Merry ximming Christmas antithesis you titan coding genius! Hahaha I cannot wait to try this out.

Thanks for stripping everything back and making it adjustable on the fly.

E X C I T E D

lets see if this works on rainbow six siege!

No wukkers frash. Thanks for keeping your boot up my arse to get this script published :P

This code could form a core framework for any game. It weighs in at around 43% with some bloat, so plenty of stuff can be crammed in around it.

The issue again is weapon tracking, but I'll figure something out to swap in different settings for different weapons. I reckon I can do it using bit operations and maybe dumping the separate ADS & HIP rapid-fire settings (I need 15 SPVARS to manage primary, secondary & tertiary weapons).

I've been mucking around with the burst-fire mode for a couple of hours and it's working really well for bloom, recoil, cooldown and mouse control. Aim and tap, aim and tap, or simply hold SHOOT. Either way, it does what it's supposed to do :)
Last edited by antithesis on Fri Dec 23, 2016 12:52 pm, edited 6 times in total.
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

Re: Adjustable Rapid-fire, Anti-recoil and Burst-fire

Postby cdc1287 » Fri Dec 23, 2016 11:50 am

Ahh brilliant, I will wait for that script then. I only play PvE so luckily that won't be an issue for me :).

Thanks for doing this antithesis, I know programming can be a royal pain and take up all your free time.

Merry Christmas,
Chris
User avatar
cdc1287
Private First Class
Private First Class
 
Posts: 2
Joined: Sat Oct 08, 2016 3:35 pm

Re: Adjustable Rapid-fire, Anti-recoil and Burst-fire

Postby jayjack » Fri Dec 23, 2016 2:05 pm

Tried this in BF4 all works great except BurstFire.

I activated the mode and got the single rumble confirmation.
I used semi-automatic weapons.
Either taping or holding SHOOT gets me a single shot.

I adjusted the values:
Code: Select all
 
// Fine-tune the length of a burst. Use whole numbers only, not fractions, e.g 5, not 5.5
define BurstMultiplier  = 5; // Multiplies the adjustable fire-rate value to create the burst
define WaitMultiplier = 3; // Used when holding SHOOT instead of tapping SHOOT for Burst-fire
 

without sucess.

I shouldn't need to change the auto-fire value, correct? If the weapon fires well in that mode.

Any ideas?

Meanwhile, I'm off to check the script in R6S. Which hasn't been kind to previous AR methods.
User avatar
jayjack
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 284
Joined: Tue Jul 26, 2016 2:41 pm

Re: Adjustable Rapid-fire, Anti-recoil and Burst-fire

Postby Frashbrang » Fri Dec 23, 2016 3:09 pm

Do let us know how you get on in r6s. I'm out at the moment but cannot wait to try
User avatar
Frashbrang
Command Sergeant Major
Command Sergeant Major
 
Posts: 153
Joined: Sat Jul 16, 2016 4:02 pm

Re: Adjustable Rapid-fire, Anti-recoil and Burst-fire

Postby Frashbrang » Fri Dec 23, 2016 6:21 pm

Hi anth,

Rapid fire works, anti recoil works, hip rapidfire adjustment works, ads rapidfire adjustment works but I'm baffled about the burst function. I just can't get it to burst on tap fire.

Helpings please
User avatar
Frashbrang
Command Sergeant Major
Command Sergeant Major
 
Posts: 153
Joined: Sat Jul 16, 2016 4:02 pm

Next

Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 81 guests