CfgRecoils – ArmA: Armed Assault
New Recoil
Recoil sample
class cfgRecoils { class my_awesome_recoil { // x y a b muzzleOuter[] = { 0.3, 1.0, 0.3, 0.2 }; kickBack[] = { 0.03, 0.06 }; permanent = 0.1; temporary = 0.01; }; };
Weapon sample
class CfgWeapons { class MyRifle { recoil = "my_awesome_recoil"; }; };
Global config sample
class CfgWeaponHandling { class Recoil { kickVisual = 0.3; //multiplier for extra camera-only movement for weapon kickback impulseCoef = 1; //common coefficient for weapon-based recoil configuration values, increase to make all recoils stronger, decrease to make them all weaker prone = 1.25; //coefficient of recoil forces while in prone (this is further multiplied by weapon resting coefficients) }; };
Description
- Parameter muzzleOuter defines the possible area where the recoil would like to move the weapon's muzzle randomly at each shot. It is defined as ellipse with variables defining the (x = horizontal axis position, y = vertical axis position, a = horizontal magnitude, b = vertical magnitude); or, translated to the weapon's recoil movement behavior (how far to the right, how high up, how much horizontal deviation, how much vertical deviation).
- Parameter kickBack defines the minimum and maximum of random interval for backward force applied over the arms and torso for each fired shot.
- Remaining parameters define how much of the random muzzle displacement within the defined ellipse space is permanent (causing muzzle rise you should compensate for) and how much is temporary (causing temporal weapon rise up and down, thus causing the weapon to shake in your hands).
Camera shakes are derived from the overall magnitude of each recoil impulse forces.
Basic suggestions
- would you like your weapon to kick more to the right ? Increase Horizontal Axis Position value of muzzleOuter.
- would you like your weapon to kick more upwards ? Increase Vertical Axis Position value of muzzleOuter.
- would you like your weapon to jump left and right more randomly ? Increase Horizontal Magnitude value of muzzleOuter.
- would you like your weapon to jump up and down more randomly ? Increase Vertical Magnitude value of muzzleOuter.
- would you like your weapon to climb up more ? Increase permanent.
- would you like your weapon to shake more in your hands ? Increase temporary.
- would you like your weapon to kick back more ? Increase kickBack.
- and vice versa.
Legacy Recoils
In an effort to ensure compatibility across mods here are the current recoil values used in ArmA (permission provided to list these by Maruk). By using these as a starting/reference point for your mods own recoils you will ensure that your mod can be used alongside other mods.
Recoil is defined as three numbers in a row indicating time taken,kick back,kick up. There can be a series of these recoils settings per weapon config.
Recoil is defined by weapon and not per bullet.
You can define a prone recoil to simulate the lower recoil of being prone and firing with a bipod/tripod support.
NOTE - as of beta patch the recoil values have changed and are mostly snappier and more responsive. I will update them here with actual numbers asap.
pistolBase[] = {0,0,0, 0.080000,0.003000,0.020000, 0.050000,-0.003000,-0.033000, 0.050000,0,0};
subMachineGunBase[] = {0,0,0, 0.060000,0.005000,0.005000, 0.050000,0,-0.020000, 0.060000,-0.005000,0.005000, 0.050000,0,0};
assaultRifleBase[] = {0,0,0, 0.060000,0.010000,0.010000, 0.100000,0,-0.020000, 0.100000,-0.010000,0.010000, 0.050000,0,0};
machinegunBase[] = {0,0,0, 0.080000,0.010000,0.040000, 0.050000,-0.003000,-0.010000, 0.200000,0,0};
launcherBase[] = {0,0,0, 0.200000,0,0.050000, 0.100000,0,0};
AK74Recoil[] = {0,0,0, 0.060000,0.010000,0.012000, 0.100000,0,-0.020000,0.100000, -0.010000,0.010000,0.050000,0,0};
M240Recoil[] = {0,0,0, 0.080000,0.010000,0.050000, 0.050000,-0.003000,-0.008000, 0.200000,0,0};
M240RecoilProne[] = {0,0,0, 0.100000,0.003000,0.005000, 0.050000,-0.003000,-0.010000, 0.050000,0,0};
M249Recoil[] = {0,0,0, 0.070000,0.002000,0.010000, 0.035000,-0.002000,-0.020000, 0.050000,0,0};
M249RecoilProne[] = {0,0,0, 0.100000,0.003000,0.004000, 0.050000,-0.003000,-0.008000, 0.050000,0,0};
M4Recoil[] = {0,0,0, 0.060000,0.010000,0.010000, 0.100000,0,-0.018000, 0.100000,-0.010000,0.010000, 0.050000,0,0};
PKMRecoil[] = {0,0,0, 0.100000,0.030000,0.040000, 0.050000,-0.030000,-0.080000, 0.050000,0,0};
PKMRecoilProne[] = {0,0,0, 0.100000,0.003000,0.005000, 0.050000,-0.003000,-0.010000, 0.050000,0,0};