Hey, A Message Board
« File rip: Recoil and spread (case study) »

Welcome Guest. Please Login or Register.
May 22, 2013, 1:11am




Hey, A Message Board :: Battlefield :: Hey, Den :: File rip: Recoil and spread (case study)
   [Search This Thread] [Share Topic] [Print]
 AuthorTopic: File rip: Recoil and spread (case study) (Read 3,370 times)
bel
True Bro
member is offline

[avatar]



Joined: May 2011
Gender: Male
Posts: 73
Location: Australia
 File rip: Recoil and spread (case study)
« Thread Started on Nov 21, 2011, 7:16am »

Alright, baby, now we're talking.

This was originally going to be a post in the bullet data thread, but it's become a monster so I'm making it a thread. Like a couple of other people, I've used the wonderful frankelstner's wonderful python scripts to rip the game data into text files. Den, if you're interested, it works and it comes out readable, but BF3 has a totally insane number of variables.

Personally, I'm interested in recoil, because that's something we can't quantify without the numbers, so I thought I'd have a hunt for that. Turns out It's hell-complicated. They weren't joking when they said every gun has 5000 variables.

I'm going to look just at the SCAR-H as an example, and see what we can find. We get (for the SCAR-H only):

Spread values (for all stances and situations (run/jump etc), for both ads and hipfire)
Horizontal and vertical recoil values
Received suppression effects
Attachment effects on accuracy


------------------------------------------

So let's go.

GunSwayData seems to be the heading for all of the accuracy information.
Spread appears to be called "dispersion", and looks like it's in angles in degrees. It's controlled by four variables:
Code:
    MinAngle
    MaxAngle
    IncreasePerShot
    DecreasePerSecond


My guess is that these operate the way they did in BC2, and that MinAngle is the cone on the first bullet, and MaxAngle is the widest the cone can get, incrementing by InceasePerShot and fighting against DecreasePerSecond.

The game has set values of these four variables for every possible combination of stance, zoom/unzoom and action, for every single gun. That's a ton of stuff. What it works out to is blocks arranged as:
Code:
    Stand
        NoZoom
            Base
            Move
            Jump
            Sprint
            VaultSmall
            VaultMedium
            Recoil
            GunSwayLag
        Zoom
            [ditto]
    Crouch
        [ditto]
            [ditto]
    Prone
        [ditto]
            [ditto]


Which is a completely insane amount of data. I think I'll try and write a script to rip it all, sometime this week.

SPREAD

It's not really helpful to dump all the numbers cold, but I'll run an example with some of the values for the SCAR to illustrate a few things:
Code:
SCAR-H
     Standing
        Unzoomed
            Base
                GunSwayDispersionData
                MinAngle 2.5
                MaxAngle 7.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0
            Moving
                GunSwayDispersionData
                MinAngle 3.0
                MaxAngle 7.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0
            Jumping
                GunSwayDispersionData
                MinAngle 7.0
                MaxAngle 7.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0
        Zoomed
            Base:
                MinAngle 0.300000011921
                MaxAngle 3.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0
            Moving:
                GunSwayDispersionData
                MinAngle 1.20000004768
                MaxAngle 3.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0
            Jumping:
                MinAngle 7.0
                MaxAngle 7.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0                    
    Crouching
        NoZoom
            Base
                MinAngle 2.0
                MaxAngle 7.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0
            Moving
                GunSwayDispersionData
                MinAngle 2.5
                MaxAngle 7.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0
        Zoom
            BaseValue
                GunSwayDispersionData
                MinAngle 0.300000011921
                MaxAngle 3.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0
            Moving
                MinAngle 1.20000004768
                MaxAngle 3.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0
    Prone
        NoZoom
            BaseValue
                MinAngle 1.5
                MaxAngle 7.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0
            Moving
                GunSwayDispersionData
                MinAngle 2.0
                MaxAngle 7.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0
            Zoom
                BaseValue
                GunSwayDispersionData
                MinAngle 0.300000011921
                MaxAngle 3.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0
            Moving
                GunSwayDispersionData
                MinAngle 1.20000004768
                MaxAngle 3.0
                IncreasePerShot 0.0799999982119
                DecreasePerSecond 11.0


SPREAD RUNDOWN

If you don't want to read the stat dump, I'll go over the important stuff we can pull just from this. Keep in mind, all of this is only for the SCAR so far. I'll have to check some other weapons at some stage.

1. Hip spread decreases slightly from stand->crouch->prone (which you can confirm in game by the size of your crosshair).
2. Stance does not affect ads accuracy; the zoom numbers are the same for prone, stand and crouch.
3. Even on the first shot in ads, the SCAR has a single-bullet deviation of 0.3 degrees. It's not pinpoint accurate on the first bullet. I can't see anything to indicate this might be different in single-fire, but it could be.
4. Moving while in ads significantly decreases your first-shot accuracy, but does not affect the maximum spread from prolonged spray.
5. Jumping immediately maxes out your spread even in ads, and then some. Don't bunny hop.

------------------------------

RECOIL
There's another variable called "Recoil" at [Stance]-[Zoom]-Recoil. This would be gun kick. It does not appear to change from stance to stance, though, so I'll just present it once.
Code:
            Recoil
                RecoilAmplitudeMax 10.0
                RecoilAmplitudeIncPerShot 0.5
                HorizontalRecoilAmplitudeIncPerShotMin -0.20000000298
                HorizontalRecoilAmplitudeIncPerShotMax 0.20000000298
                HorizontalRecoilAmplitudeMax 10.0
                RecoilAmplitudeDecreaseFactor 15.0


I assume "recoil" is vertical and "horizontal recoil" is what it says on the tin. It's interesting to note that upwards recoil always increments, but horizontal recoil will randomly increment/decrement. That would cause the gun to twitch side-to-side and climb steadily upwards, which is exactly what we see for the SCAR-H.

I'm not sure what those units really are. Degrees would be consistent, but 10 degrees worth of recoil seems absurd even as a maximum.

----------------------------------------------------

SUPPRESSION EFFECTS,

(both zoomed and unzoomed, again, for the SCAR-H only; everything is weapon-specific):
Code:
        DispersionMod
            MinAngleModifier 1.5
            IncreasePerShotModifier 0.0799999982119
        RecoilAngleMod 1.0

My guess is that this is additive, not multiplicative. Multiplying the increment by 0.07 would significantly help your accuracy, not hinder it. Plus there are some others like MaxAngle that are modified by "0.0", which certainly can't be a multiplier.

So, suppression hugely decreases your first-shot accuracy, and doubles your spread-added per shot.

------------------------------------------------------

ATTACHMENTS:

Here's where it gets interesting.

All weapon-altering attachments have a file listing the ways they modify the spread and recoil values. To prevent it being a massive data dump, I'll only post the values which are changed by the attachment. Assume that it's the same for all stances unless I give explicitly different values.

These are still pulled from the SCAR-H's unique files, but as far as I can see the attachment effects are consistent between weapons.

The laser pointer:
Code:

    Unzoomed
            MinAngleModifier 0.670000016689
    Zoomed
            MinAngleModifier 1.0

My guess is these ones are multiplicative, unlike the suppression modifiers, as most of the other values are 1.0, not 0.0.

So the laser pointer multiplies your unzoomed MinAngle by 0.67, making your initial shots more accurate when firing from the hip. It does nothing when ADS'd. Hear me, all you snipers using laser pointers because it makes you feel like you're in Delta Force.

The foregrip:
Code:
        RecoilAngleMod 0.5
            
            (All other modifiers 1.0 or 0.0)


Which is a little interesting as to what it means. There's no variable called "Recoil angle" that I've seen, recoil is done with seperate values for vertical and horizontal amplitude (se above). But nonetheless, the foregrip definitely directs recoil upwards, so I assume it multiplies the HorizontalRecoilAmplitudes by 0.5.

The heavy barrel:
Code:
    Zoomed
            MinAngleModifier 0.5
            IncreasePerShotModifier 1.5
        RecoilMagnitudeMod 1.20000004768
    Unzoomed
            MinAngleModifier 1.0
            IncreasePerShotModifier 1.5
        RecoilMagnitudeMod 1.20000004768

So:
Heavy barrel halves the starting spread when ads'd, but increases your per-shot increment by 50%, and your upwards recoil by 20%.
From the hip, the heavy barrel has no benefits, but still increases your spread per shot and recoil. The spread increment actually makes a big difference when spraying.

The flash suppressor:
Code:
            MaxAngleModifier 1.5
            IncreasePerShotModifier 1.25

            (All stances and zoom/nozoom)


So it increases your max angle (which probably only matters when hip-spraying), and your per-shot increment (which always matters).

On the plus side, it has no effect on MinAngle, so your gun doesn't lose accuracy on its first shot, only sustained fire. I'd seen Demize99 tweet something to this effect at some stage, so it looks like he knew what he was talking about.

The bipod:
Code:
        MinAngleModifier 0.5
        MaxAngleModifier 1.0
        IncreasePerShotModifier 0.5
        DecreasePerSecondModifier 1.0
        RecoilMagnitudeMod 0.5
        RecoilAngleMod 0.670000016689

        (All stances and zoom/unzoom)


So the bipod just pretty much makes life swell. It increases first-shot accuracy, decreases per-shot increment, and cuts both vertical and horizontal recoil. It's worth noting that it cuts vertical recoil slightly more, so it promotes a circular rather than rising recoil pattern.

Interestingly, it doesn't affect your maximum or the recovery rate, so if you're going to use your whole LMG clip, you're actually going to be just as inaccurate by the end with or without the bipod.
Also, there's a variable at the end of the file that indicates its modifiers come into effect "OnlyInSupportedShooting," which is pretty self explanatory.

The silencer:
Code:
    Zoomed
        MinAngleModifier 0.5
        RecoilMagnitudeMod 0.899999976158
    Unzoomed
        MinAngleModifier 1.34000003338
        RecoilMagnitudeMod 0.899999976158


So the silencer halves your initial spread, and decreases your vertical recoil slightly. This file has no information on damage, or the infamous visible-on-minimap thing. I'll have a look elsewhere for that eventually.

--------------------------------------------------------------

Well, that's my essay for today. Keep in mind all of this is a) just for the SCAR-H and b) not 100% confirmed, because the stat files are huge and there might be modifiers I've missed. There also seem to be a number of deprecated variables, like RecoilAmplitudeX,Y,Z, which are all set to 0.0. The variables I've reported are the ones I believe are the most likely to be in use by the game.

I also don't know whether frankelstner's tool is perfect yet; there's a couple of seemingly nonsensical numbers elsewhere in the file that could be DICE or could be the text conversion. He could speak on that if he reads this.

My next project is to see what's different from gun-to-gun, particularly in the attachment modifier stuff, and to try and write a script to pull all this data straight out into a more readable format for every gun, not just the one I'm looking at. Otherwise this will be an absolutely mammoth task.
« Last Edit: Nov 21, 2011, 7:47am by bel »Link to Post - Back to Top  IP: Logged
frankelstner
True Bro
member is offline





Joined: May 2011
Gender: Male
Posts: 48
 Re: File rip: Recoil and spread (case study)
« Reply #1 on Nov 21, 2011, 7:59am »

Things have barely changed since BC2:

Code:
    <instance guid="516D8951-9ED7-4F48-A0E6-53BED3E6DEFC" type="GameSharedResources.GunSwayData">
        <complex name="Stand">
            <complex name="NoZoom">
                <complex name="BaseValue">
                    <field name="MinAngle">1.5</field>
                    <field name="MaxAngle">5.0</field>
                    <field name="IncreasePerShot">0.45</field>
                    <field name="DecreasePerSecond">3.0</field>
                    <field name="UseAimSpecialisation">true</field>
                </complex>
                <complex name="Moving">
                    <field name="MinAngle">2.5</field>
                    <field name="MaxAngle">5.0</field>
                    <field name="IncreasePerShot">0.45</field>
                    <field name="DecreasePerSecond">3.0</field>
                    <field name="UseAimSpecialisation">true</field>
                </complex>
                <complex name="Jumping">
                    <field name="MinAngle">5.0</field>
                    <field name="MaxAngle">5.5</field>
                    <field name="IncreasePerShot">1.8</field>
                    <field name="DecreasePerSecond">3.0</field>
                    <field name="UseAimSpecialisation">false</field>
                </complex>
                <complex name="VaultingSmallObject">
                    <field name="MinAngle">0</field>
                    <field name="MaxAngle">5.5</field>
                    <field name="IncreasePerShot">1.8</field>
                    <field name="DecreasePerSecond">11.0</field>
                    <field name="UseAimSpecialisation">false</field>
                </complex>
                <complex name="VaultingMediumObject">
                    <field name="MinAngle">0</field>
                    <field name="MaxAngle">5.5</field>
                    <field name="IncreasePerShot">1.8</field>
                    <field name="DecreasePerSecond">11.0</field>
                    <field name="UseAimSpecialisation">false</field>
                </complex>
                <complex name="Recoil">
                    <field name="RecoilAmplitudeMax">99.0</field>
                    <field name="RecoilAmplitudeIncPerShot">0.5</field>
                    <field name="RecoilAngleMax">90.0</field>
                    <field name="RecoilAngleIncPerShot">30.0</field>
                    <field name="RecoilAmplitudeDecreaseFactor">7.0</field>
                </complex>
                <complex name="GunSwayLag">
                    <field name="MoveStrafeModifier">0</field>
                    <field name="MoveForwardModifier">0</field>
                    <field name="RotateYawModifier">0</field>
                    <field name="RotatePitchModifier">0</field>
                    <field name="ReleaseModifier">0</field>
                </complex>
            </complex>


Regarding the accuracy of the tool, the file format made it very easy to skip unknown parts. And by parts I mean single lines which do not start a new subsection (i.e. all sections are there and in the right position). Everything that you can see however should be correct. Things missing are GUIDs mainly. You cannot see yet which projectile belongs to which gun. Or the materials used. Some numbers are missing too and some bools as well. There is a certain type I assume to be bool but instead of 0 and 1 this one uses 2 and 3. I haven't included this as I'm not perfectly sure how to handle it.

As for spread on the first shot: The minimum deviation value has been the most important stat for a bf2 weapon. And as this game is supposed to be a successor it is very likely that even the first bullet is off.
Link to Post - Back to Top  IP: Logged
bel
True Bro
member is offline

[avatar]



Joined: May 2011
Gender: Male
Posts: 73
Location: Australia
 Re: File rip: Recoil and spread (case study)
« Reply #2 on Nov 21, 2011, 8:24am »

It's actually startlingly similar to BC2, considering how different the weapons feel. I'd never looked at its actual files so I didn't realise it even used the same tags.
« Last Edit: Nov 21, 2011, 8:46am by bel »Link to Post - Back to Top  IP: Logged
sleep
True Bro
member is offline





Joined: Jan 2009
Gender: Male
Posts: 10,189
 Re: File rip: Recoil and spread (case study)
« Reply #3 on Nov 21, 2011, 11:14am »

awesome. thanks for your work.
Link to Post - Back to Top  IP: Logged
rukqoa
Bro
member is offline





Joined: Nov 2011
Gender: Male
Posts: 5
 Re: File rip: Recoil and spread (case study)
« Reply #4 on Nov 21, 2011, 12:42pm »

The one thing I'm not seeing anywhere is how/where suppressors decrease bullet damage at long range...
Link to Post - Back to Top  IP: Logged
battleaxerx
True Bro
member is offline

[avatar]

"You can't take the sky from me."



Joined: Jan 2010
Posts: 772
 Re: File rip: Recoil and spread (case study)
« Reply #5 on Nov 21, 2011, 1:56pm »

Amazing post, bro. Three chears for bel, a true bro.

"3. Even on the first shot in ads, the SCAR has a single-bullet deviation of 0.3 degrees. It's not pinpoint accurate on the first bullet. I can't see anything to indicate this might be different in single-fire, but it could be. "

Did some H bar testing, and with a 6x scope, you can see the bullet deviation on semi auto. Using the HBar made the groups closer, but still not perfect. Probably around .1 degree of unaccuracy maybe. Oops, you already know what it does! (1.5 degrees) heh. So yea, it helps single fire...

"RecoilAmplitudeMax 10.0"

This might mean the cap on muzzle climb. When you go full auto non stop the gun climbs until it stops at some point, which might be what the 10 does (marking the spot that the gun can't climb anymore)

"Heavy barrel halves the starting spread when ads'd, but increases your per-shot increment by 50%, and your upwards recoil by 20%. "

So uhhhhh, per shot increment? What's that mean exactly? I might have to go back and look at the recoil stats or spread... Does this mean the Hbar is actually bad for burst and sustained fire??

Care to touch on the effects of bipod and HBAR used together? Makes your gun into a little sniper or something?
Link to Post - Back to Top  IP: Logged
didjeridu
True Bro
member is offline

[avatar]



Joined: Dec 2010
Gender: Male
Posts: 10,566
 Re: File rip: Recoil and spread (case study)
« Reply #6 on Nov 21, 2011, 3:55pm »

Awesome. Fantastic job sir.
Link to Post - Back to Top  IP: Logged
yhzh
True Bro
member is offline





Joined: Feb 2010
Posts: 117
 Re: File rip: Recoil and spread (case study)
« Reply #7 on Nov 21, 2011, 5:53pm »

Thanks for the effort bel.

Well this has convinced me to stop using the HBAR. I've been trying it on some of the guns, but always felt the added benefits were difficult to notice and came at a steep cost.
It seems too punishing to increase spread added per shot on top of the recoil increase.
Two negatives for one positive that only benefits during semiautomatic fire at ranges only slightly greater than would be possible otherwise.

I wonder how many shots it would take for a gun with heavy barrel to catch up with a gun without HBAR in terms of deviation under full auto fire.
« Last Edit: Nov 21, 2011, 5:54pm by yhzh »Link to Post - Back to Top  IP: Logged
battleaxerx
True Bro
member is offline

[avatar]

"You can't take the sky from me."



Joined: Jan 2010
Posts: 772
 Re: File rip: Recoil and spread (case study)
« Reply #8 on Nov 21, 2011, 8:08pm »

"I wonder how many shots it would take for a gun with heavy barrel to catch up with a gun without HBAR in terms of deviation under full auto fire. "

Good question... or ponder...?

Um, yea, like maybe for burst fire on certain guns the Hbar can land more hits at range before having bad accuracy... and such like that...
Link to Post - Back to Top  IP: Logged
bel
True Bro
member is offline

[avatar]



Joined: May 2011
Gender: Male
Posts: 73
Location: Australia
 Re: File rip: Recoil and spread (case study)
« Reply #9 on Nov 21, 2011, 8:50pm »

Wait, wait wait.

I just went to work that out (it's actually really easy), and there's something really obvious here that I missed.

DecreasePerSecond is foxtrotting huge. At +0.08 spread per bullet fighting against -11 per second, the SCAR has to shoot 130 rounds every second to increase its spread faster than the recovery rate. It actually fires ten. So your spread is never going to increase above MinAngle, unless the units on one of these numbers are off by orders of magnitude.

MinAngle is all that matters; spread per shot is irrelevant because the recovery rate seems to be so high as to negate it. So the heavy barrel (and the flash suppressor) are suddenly looking like much more attractive propositions. Looking at symthic's chart, that's true of every single weapon.

Can that be right? I could have absolutely sworn that I can see spread increase when I spray-ads, especially with the LMGs. Can someone test that? I don't have bf3 on this machine, and won't for a while.
Link to Post - Back to Top  IP: Logged
sleep
True Bro
member is offline





Joined: Jan 2009
Gender: Male
Posts: 10,189
 Re: File rip: Recoil and spread (case study)
« Reply #10 on Nov 22, 2011, 1:22am »


Nov 21, 2011, 8:50pm, bel wrote:
I could have absolutely sworn that I can see spread increase when I spray-ads, especially with the LMGs. Can someone test that?


can't test at the moment but LMG ads sustained fire definitely gets super random (wide cone of fire) after a certain number of shots, even when visually it looks like you're successfully fighting the recoil and should be putting shots on target. i haven't noticed that with other gun classes but then i rarely fire more than 8-10 consecutive shots with them
Link to Post - Back to Top  IP: Logged
kirbyderby
True Bro
member is offline

[avatar]



Joined: May 2011
Gender: Male
Posts: 1,251
 Re: File rip: Recoil and spread (case study)
« Reply #11 on Nov 22, 2011, 2:08am »

(not tests, just my personal experience)
I distinctly remember spraying a full G3 magazine at somebody today, at mid-close range, and bullets went everywhere; both of us were spraying full-auto and barely getting any hits. Had to switch to my pistol to finish the job. If it makes a difference, I was using IRNV scope, grip, and HBAR.

On the other hand, when I'm using the M249 and spraying, I don't notice a significant spread increase until the vertical recoil stops. Then again, that happens after about 15 shots and it's hard to tell what's really going on.

Thanks a bunch for your work on the files, bros; these numbers are really great for helping me understand this game.
Link to Post - Back to Top  IP: Logged
bel
True Bro
member is offline

[avatar]



Joined: May 2011
Gender: Male
Posts: 73
Location: Australia
 Re: File rip: Recoil and spread (case study)
« Reply #12 on Nov 22, 2011, 6:47pm »

Alright, I'm going to have to go away and think about this one. It's not making sense.

I worked out what the recoil for a few guns should be, and did some quick practical testing, and the results are... weird. Basically, the charted numbers don't work.

At the very least, there's two important values missing:
Code:
    ShootingRecoilDecreaseScale 0.10000000149

    FirstShotRecoilMultiplier 1.35000002384

These are global values for each gun. If the recoil recovery is multiplied by ShootingRecoilDecreaseScale while you hold down the trigger, it drops into ballpark ranges, but is still not perfect. Left at 15 or whatever, it's absurdly high and the gun wouldn't recoil at all.
I'm not sure about FirstShotRecoilMultiplier; obviously it's going to amplify recoil on the first bullet, but I'm not sure how the game defines "first."

From my testing; the IAR and the AEK both recoil more than they should, even with DecreaseScale taken into account. The AN-94 recoils less than it should, which is interesting.

The horizontal values are also very strange. The AN-94 should kick straight up from its horizontal min-max, but it actually drifts to the right. The IAR also does something very strange with the bipod equipped. Normally, it recoils up and to the right, but with the bipod deployed, it walks to the left. I have absolutely no explanation for that.

I haven't tried to quantify spread because it's stochastic and much harder to see than recoil, but cone-of-fire definitely does increase as you hold down the trigger, which it shouldn't from the raw stats.

Curiouser and curiouser. We definitely don't have the whole story here. I wouldn't trust much of what's on the chart at the moment. It's going to be no better than a ballpark idea.
« Last Edit: Nov 22, 2011, 6:50pm by bel »Link to Post - Back to Top  IP: Logged
skitrel
True Bro
member is offline




[homepage]

Joined: Sept 2010
Posts: 185
 Re: File rip: Recoil and spread (case study)
« Reply #13 on Nov 25, 2011, 5:16am »


Quote:
I'd seen Demize99 tweet something to this effect at some stage, so it looks like he knew what he was talking about.


I should bloody hope he knows what he's talking about, he's responsible for ALL balancing in the game. Of anyone out there he's going to have an absolutle intimate knowledge of all this code and it's effects.
Link to Post - Back to Top  IP: Logged
redcrossworker
True Bro
member is offline





Joined: May 2011
Gender: Male
Posts: 10,015
 Re: File rip: Recoil and spread (case study)
« Reply #14 on Nov 25, 2011, 12:06pm »


Nov 22, 2011, 6:47pm, bel wrote:
Alright, I'm going to have to go away and think about this one. It's not making sense.

I worked out what the recoil for a few guns should be, and did some quick practical testing, and the results are... weird. Basically, the charted numbers don't work.

At the very least, there's two important values missing:
Code:
    ShootingRecoilDecreaseScale 0.10000000149

    FirstShotRecoilMultiplier 1.35000002384

These are global values for each gun. If the recoil recovery is multiplied by ShootingRecoilDecreaseScale while you hold down the trigger, it drops into ballpark ranges, but is still not perfect. Left at 15 or whatever, it's absurdly high and the gun wouldn't recoil at all.
I'm not sure about FirstShotRecoilMultiplier; obviously it's going to amplify recoil on the first bullet, but I'm not sure how the game defines "first."

From my testing; the IAR and the AEK both recoil more than they should, even with DecreaseScale taken into account. The AN-94 recoils less than it should, which is interesting.

The horizontal values are also very strange. The AN-94 should kick straight up from its horizontal min-max, but it actually drifts to the right. The IAR also does something very strange with the bipod equipped. Normally, it recoils up and to the right, but with the bipod deployed, it walks to the left. I have absolutely no explanation for that.

I haven't tried to quantify spread because it's stochastic and much harder to see than recoil, but cone-of-fire definitely does increase as you hold down the trigger, which it shouldn't from the raw stats.

Curiouser and curiouser. We definitely don't have the whole story here. I wouldn't trust much of what's on the chart at the moment. It's going to be no better than a ballpark idea.


Maybe some files are decoys. :)
Link to Post - Back to Top  IP: Logged
SheWolf
True Bro
member is offline





Joined: Mar 2010
Gender: Female
Posts: 10,726
Location: czech republic
 Re: File rip: Recoil and spread (case study)
« Reply #15 on Nov 25, 2011, 1:13pm »


Nov 25, 2011, 5:16am, skitrel wrote:

Quote:
I'd seen Demize99 tweet something to this effect at some stage, so it looks like he knew what he was talking about.


I should bloody hope he knows what he's talking about, he's responsible for ALL balancing in the game. Of anyone out there he's going to have an absolutle intimate knowledge of all this code and it's effects.


he has stated untruths in the past before (bad company 2), and pretty persistent. so yeah, we might not bet our lives on the accuracy of his statements.
Link to Post - Back to Top  IP: Logged
bel
True Bro
member is offline

[avatar]



Joined: May 2011
Gender: Male
Posts: 73
Location: Australia
 Re: File rip: Recoil and spread (case study)
« Reply #16 on Nov 26, 2011, 4:05am »

Accuracy in BF3 is really interesting. Thanks to the ever-awesome frankelster, I've modded the recoil values and done some controlled testing. This is what it looks like:

------------------------------

SPREAD:


Your gun will place bullets randomly, anywhere within the cone defined by your current spread. In any given stance, your spread starts out at MinAngle for that stance. Every bullet you fire increases this by IncreasePerShot, up to a maximum of MaxAngle. Easy enough.

The interesting part is the recovery; your gun does not recover spread while it is shooting. Thanks again to frank for pointing this out first. You recover only while a bullet is ready, but not fired; there is a delay equivalent to firetime. This is a recurring theme in BF3, for both spread and recoil, so it's useful to get your head around.

Recovery is also the only way to decrease spread; your gun does not automatically switch to a lower MinAngle when you ads, it has to recover to the lower value.

So there's two important things here; the first is that if you start firing in a less accurate stance and switch to a more accurate one, you need to let go of the trigger for a moment to let your spread drop. The second is that the usual "low firerate means more accuracy" thing is completely untrue here. There's no per-bullet difference between otherwise-equal 600 rpm and 500 rpm weapons. If, however, you had enough control to fire a 600rpm gun at 500rpm, it would be significantly more accurate than the 500rpm weapon itself.

------------------------------

RECOIL:

Recoil is a lot more complicated. You have vertical and horizontal kick values, and they're treated quite differently.

The vertical kick (RecoilAmplitudeIncPerShot) is static; every time you fire, your gun kicks up by this amount, until the total deviation hits RecoilAmplitudeMax. It is not a random value between 0 and Amp, it's just Amp.
Horizontal is random. Every shot moves the gun by a random amount between its horizontal Min and Max values, which can mean left, right or not at all depending on the gun. Confusingly, negative values move the gun right, and positive values move the gun left.

There's another value called FirstShotRecoilMultiplier. This amplifies the vertical kick only, on any bullet fired at less than the gun's max firerate. In general, shots in single fire always get the multiplier, as will the first bullet in any burst. Later bullets in a burst will kick by the standard amount. This ties into the spread recovery thing in a very interesting way; if your gun has recovered spread since your last shot, it will recoil more. That means burst fire has, on average, more recoil and less spread than full auto.

Recoil recovery is the kicker. I still don't really understand it.
There are two values, RecoilAmplitudeDecreaseFactor and ShootingRecoilDecreaseScale.
DecreaseFactor is the equivalent of DecreasePerSecond for spread; it applies only when your gun is not firing. It's not, however, in degrees per second. It's something else. It's also huge. With just about every gun, as soon as you stop firing for more than a fraction of a second, your gun zeros.

Unlike spread, when your gun is firing full auto it still recovers, but at a much slower rate. This rate is some combination of DecreaseFactor and DecreaseScale, and is quite slow. It can be approximated for most guns at about 1-2 degrees per second, but that's only an approximation.

I'm really not sure how the two really combine, or even how DecreaseFactor itself works. From some quick testing, it looks like recoil recovery accelerates from 0 up to some maximum value, and then continues to recover at that maximum value until your gun is zeroed. Whether DecreaseFactor relates to the acceleration or the max value, or both, or neither... I don't know. Plus, all of this is pretty academic, as the acceleration is reset on each bullet and DecreaseFactor is so high you don't notice unless you slow the gun down.

-------------------------------

THE AN-94:

The AN-94 is a terrible gun, in just about every way, but it's also unique, and has some interesting properties that make it worth a section... just in case it ever gets buffed.

The AN-94's FirstShot multiplier is 0.67, it has two bullets in a burst, and its burst fire rate is higher than its automatic fire rate. What this means is that the AN's burst fire kicks ass... comparatively. Its first round in each burst has 33% less recoil, rather than more, while retaining the advantages of burst fire regarding spread-reduction. As its burst fire mode has only two bullets, if you spam click on burst fire you get quite respectable rpm, with reduced recoil on every second round, and a bit of spread recovery. Interesting? Yes. Will I switch from the AEK? Hell no, but it might be useful one day.

-----------------------------------

Cliff notes/tl;dr:

Spread does not recover at all while the gun is firing. After you let go, it recovers very quickly.
The only way to reduce spread (including switching stances) is by recovery.

Vertical recoil is a static value; it always kicks by the same amount.
...except on the first shot of any burst, which has a multiplier applied.
Horizontal recoil is a random value between min and max
Min and max are counter-intuitive; negative values kick to the right.
Horizontal recoil does not have a first-shot multiplier.

I still don't really understand recoil recovery.
A slight recovery rate is applied even while firing (between 1-2 deg/sec for most guns)
A very high (almost instantaneous) recovery kicks in a moment after you release the trigger.
I'm not sure on the exact numbers or units, but it's kind of irrelevant since the whole process is so fast.
Recovery applies to both horizontal and vertical recoil.

The AN-94 is a pretty cool guy. Awful, but still cool.
« Last Edit: Nov 26, 2011, 4:25am by bel »Link to Post - Back to Top  IP: Logged
sleep
True Bro
member is offline





Joined: Jan 2009
Gender: Male
Posts: 10,189
 Re: File rip: Recoil and spread (case study)
« Reply #17 on Nov 26, 2011, 2:29pm »

Thanks for the write-up, very informative.

what's the AN-94's burst fire rate? it always seemed to be the same as the full auto ROF to me, but it's hard to guess from just two bullets.

as for the FirstShotRecoilMultiplier, that's a cool thing i didn't know about, but while it gives the AN-94 a vertical recoil advantage for bursting, that advantage seems pretty small. most ARs' v-recoil seems to be around .60 after the multiplier while the AN-94 is .50. The M416 is .56 and the KH2002 matches it at .50 (which, as a sidenote would seem to make it a more accurate single-fire-and-3-round-burst-only weapon than the M16A4 as long as a grip is involved).
« Last Edit: Nov 26, 2011, 2:37pm by sleep »Link to Post - Back to Top  IP: Logged
frankelstner
True Bro
member is offline





Joined: May 2011
Gender: Male
Posts: 48
 Re: File rip: Recoil and spread (case study)
« Reply #18 on Nov 26, 2011, 5:31pm »

900 burst, 600 full auto. I agree about the modifier, I'm fairly sure it will be reduced to 0.4 or 0.5 in a future patch.
Link to Post - Back to Top  IP: Logged
bel
True Bro
member is offline

[avatar]



Joined: May 2011
Gender: Male
Posts: 73
Location: Australia
 Re: File rip: Recoil and spread (case study)
« Reply #19 on Nov 26, 2011, 9:36pm »

Oh, its still absolutely terrible. Even with the modifier its acuracy is outclassed by most other guns because its base recoil is so high. But it's interesting.

What's most depressing is that the real Abakan is about the most awesome thing to come out of Russia since vodka. DICE has put the mechanics in game to model its real two-round burst, but for some reason chickened out.

Done properly, its burst fire rate should be about 1800, and its FirstShotRecoil should be exactly 0.0.
« Last Edit: Nov 26, 2011, 9:40pm by bel »Link to Post - Back to Top  IP: Logged
bmwtx
True Bro
member is offline





Joined: Nov 2011
Gender: Male
Posts: 45
 Re: File rip: Recoil and spread (case study)
« Reply #20 on Nov 28, 2011, 3:31pm »

Trying to put a spreadsheet together to analyze some of the differences between vertical recoil / spread between certain weapons within each weapon class.

For vertical recoil, I'm assuming the 1st shot would be: Vertical Recoil * First Shot Multiplier, and the second shot would be the first shot's value + Vertical Recoil.

E.g. if you have a Vert. Recoil of .2, and a first shot multiplier of 3, the first shot would be .6, with the second being .8? (By this I'm looking at degrees away from starting position, so you'd jump up .6 and the next shot would only be .2 added on top)
Link to Post - Back to Top  IP: Logged
bel
True Bro
member is offline

[avatar]



Joined: May 2011
Gender: Male
Posts: 73
Location: Australia
 Re: File rip: Recoil and spread (case study)
« Reply #21 on Nov 28, 2011, 7:02pm »


Nov 28, 2011, 3:31pm, bmwtx wrote:
Trying to put a spreadsheet together to analyze some of the differences between vertical recoil / spread between certain weapons within each weapon class.

For vertical recoil, I'm assuming the 1st shot would be: Vertical Recoil * First Shot Multiplier, and the second shot would be the first shot's value + Vertical Recoil.

E.g. if you have a Vert. Recoil of .2, and a first shot multiplier of 3, the first shot would be .6, with the second being .8? (By this I'm looking at degrees away from starting position, so you'd jump up .6 and the next shot would only be .2 added on top)


Yep, that's correct. Keep in mind you're also being pulled back down at a per-second rate roughly approximate to RecoilAmplitudeDecreaseFactor * ShootingRecoilDecreaseScale, so for the AEK, 18 * 0.1. That's only approximate, as I said, but it's close enough for jazz.
Link to Post - Back to Top  IP: Logged
bmwtx
True Bro
member is offline





Joined: Nov 2011
Gender: Male
Posts: 45
 Re: File rip: Recoil and spread (case study)
« Reply #22 on Nov 29, 2011, 10:43am »


Nov 28, 2011, 7:02pm, bel wrote:

Yep, that's correct. Keep in mind you're also being pulled back down at a per-second rate roughly approximate to RecoilAmplitudeDecreaseFactor * ShootingRecoilDecreaseScale, so for the AEK, 18 * 0.1. That's only approximate, as I said, but it's close enough for jazz.


Thanks, so from this point I'm going to factor that variable in once I get the chart out past 10 rounds (the guns I'm currently using are the so-called "popular" high ROF weapons, so the time it takes to fire 10 rounds would be less than 1s).

Found some rather interesting results, particularly when looking at the PKP in relation to the M27 IAR / M249.

And in case you're wondering "Why 10 rounds?" I found that I was maintaining better accuracy when firing in "Bursts" of 10 rounds (only in BF3 would a burst consist of 10 rounds...) each, sometimes 8, depending on the weapon.
Link to Post - Back to Top  IP: Logged
koningfloris
Bro
member is offline





Joined: Nov 2011
Gender: Male
Posts: 5
 Re: File rip: Recoil and spread (case study)
« Reply #23 on Dec 2, 2011, 3:11am »


Quote:
You recover only while a bullet is ready, but not fired; there is a delay equivalent to firetime.


How do you know this to be true? Especially that firetime delay?

I actually do think you are right, playing with the guns does feel like the ROF might affect a delay for recoil and spread reduction, but is there any hard evidence?

I do think it is a quite strange mechanic. My play style is to use assault guns at longer range than most people do. I do this by using space to single shot my gun, in this way I can leave the gun on full auto for close range sprays. But this mechanic suggest that the higher the ROF the better it would be for me since I could push out bullets faster and more accurate on long range targets.

I did use the AEK-971 for a bit, but I am having trouble singe shotting that in full auto. The M416 does it quite well.
Link to Post - Back to Top  IP: Logged
bel
True Bro
member is offline

[avatar]



Joined: May 2011
Gender: Male
Posts: 73
Location: Australia
 Re: File rip: Recoil and spread (case study)
« Reply #24 on Dec 2, 2011, 3:39am »


Dec 2, 2011, 3:11am, koningfloris wrote:

Quote:
You recover only while a bullet is ready, but not fired; there is a delay equivalent to firetime.


How do you know this to be true? Especially that firetime delay?

I actually do think you are right, playing with the guns does feel like the ROF might affect a delay for recoil and spread reduction, but is there any hard evidence?


I know because we modded the game and tested it. If you hack a gun so that it fires once a second, your spread recovery is delayed by exactly one second. That's enough hard evidence to convince me, at least.
« Last Edit: Dec 2, 2011, 3:56am by bel »Link to Post - Back to Top  IP: Logged
kirbyderby
True Bro
member is offline

[avatar]



Joined: May 2011
Gender: Male
Posts: 1,251
 Re: File rip: Recoil and spread (case study)
« Reply #25 on Dec 2, 2011, 3:45am »

If I'm reading Den's chart right, all assault rifles have the same spread recovery rate and spread added per shot (exception: G3), so single-shotting would give you equal spread on most weapons.

On the recoil side, the AEK has less vertical recoil, but much more random side recoil. It also seems to have a higher first-shot multiplier: M416 has 2, AEK has 3. I think this would apply to every shot fired in semi-auto mode. Basically, your spread increase (don't forget about initial spread) will be negligible for firing semi-auto... but weapons with a higher first-shot multiplier like the AEK and F2000 will have more recoil when shooting semi-auto.

Also, firing the AEK semi-automatically in full-auto mode will be harder to do than with the M416; the M416 is 750 RPM, the AEK is 900 RPM. You will end up firing bursts more often because of the high RPM.

Don't forget to look at Den's chart if you haven't already, he probably explains it better than I do.
denkirson.xanga.com/756891604/bf3/
Link to Post - Back to Top  IP: Logged
koningfloris
Bro
member is offline





Joined: Nov 2011
Gender: Male
Posts: 5
 Re: File rip: Recoil and spread (case study)
« Reply #26 on Dec 2, 2011, 6:29am »


Dec 2, 2011, 3:39am, bel wrote:


I know because we modded the game and tested it. If you hack a gun so that it fires once a second, your spread recovery is delayed by exactly one second. That's enough hard evidence to convince me, at least.


Yes, that would be enough for me too. I seriously like your data in this thread. Thanks.


Quote:
On the recoil side, the AEK has less vertical recoil, but much more random side recoil. It also seems to have a higher first-shot multiplier: M416 has 2, AEK has 3. I think this would apply to every shot fired in semi-auto mode. Basically, your spread increase (don't forget about initial spread) will be negligible for firing semi-auto... but weapons with a higher first-shot multiplier like the AEK and F2000 will have more recoil when shooting semi-auto.


Yes, but I wonder (since I do not have the time at the moment to calculate and think about it) if the lesser delay before recovery will offset the extra recoil the AEK gives.


Quote:
Also, firing the AEK semi-automatically in full-auto mode will be harder to do than with the M416; the M416 is 750 RPM, the AEK is 900 RPM. You will end up firing bursts more often because of the high RPM.


Yes, this is true. I have a hard time shooting 1 bullet instead of 2 with the AEK. I plan on trying a bit harder to see if it will be possible for me at all.

Link to Post - Back to Top  IP: Logged
   [Search This Thread] [Share Topic] [Print]

Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Notice | FTC Disclosure | Report Abuse | Mobile