User Tools

Site Tools


arma:config:cfgrecoil

Recoils

Weapon Recoils

In a short overview the recoil configuration comes to this. Time, Horizontal shift, Rise

Those 3-number groups, the rest is tweaking, not much else to know.

Here is example of VTE M60 recoils.

VTE_m60[] = {0,0,0, 0.08,0.01,0.02, 0.05,-0.003,-0.008, 0.2,0,0};
VTE_m60Prone[] = {0,0,0, 0.1,0.003,0.005, 0.05,-0.003,-0.01, 0.05,0,0};

As you can see we have a normal recoil (VTE_m60) and prone recoil (VTE_m60Prone), the prone recoil is called from different config.cpp entry than normal, like this:

recoil = "VTE_m60";
recoilProne = "VTE_m60Prone";

Tips

Q1184 the master of ArmA recoils told us this:

Ok there's one more thing to watch for: recoils are FPS-sensitive, the better your FPS, the smoother the recoil. The lower your FPS, the more jumpy and uncontrollable it becomes. So test'em in low FPS too.

Recoil Configuration

Recoil Configuration by Tactician

This is a manual of recoils by Tact from OFP WGL, it should give pretty good idea how they work.

Introduction

Recoil is an important detail of creating infantry weapons in OFP. Who wants to play with a rifle or machine gun that fires dead-accurate in full-auto mode, or kicks up to the sky after a single shot? This tutorial shows how to make your own recoil setting, apply it to your weapon, and tune it to fit your weapon.

Basic knowledge of config.cpp editing is a prerequisite for this lesson.

Understanding the Recoil

Each recoil preset under cfgRecoils reads from left to right and specifies change in weapon position over time. It is somewhat similar to camera scripting; it commits the changes smoothly over a specific period of time.

In each recoil preset there can be any number of “reference points” telling the weapon where to go and how fast to make the change. Each point is made up of three elements:

1. time to make the change (in seconds)
2. amount the gun is kicked “back” (offset)
3. amount the gun is kicked “up” (angle)

For example, BIS's basic rifle recoil looks like this:

riffleSingle[] = {0.05,0.02,0.04, 0.05,0,0};

There are two reference points in this preset. The first one takes 0.05 seconds to kick back 0.02 and up 0.04. The second takes 0.05 seconds to return to zero (normal position). The felt result is a recoil that takes the same amount of time to go up and down, in a linear motion, like this shape:

/\

If you've played FDF Mod, you're probably familiar with their unique weapon recoils. An FDF rifle recoil looks more like this:

riffleSingle[] = {0.05,0.02,0.05, 0.35,0,-0.006, 0.07,0,-0.006, 0.13,0,0};

It takes the same amount of time, 0.05 seconds, to go back 0.02 and up 0.05 (a little higher than BIS's rifle recoil), then takes 0.35 seconds to return to 0 offset and slightly negative angle. It stays at this slightly negative angle for 0.07 seconds then takes 0.13 seconds to return to 0 angle. The felt result is a stronger kick up with far more delay in “recentering” the weapon on the aiming point. This makes the gun harder to fire rapidly, and requires more user intervention in repeat firing.

In OFP there are no distinctions in recoil configs between standing, crouching, or prone recoils. OFP reads the recoil and automatically changes it to suit the soldier's position. In ArmA however we can setup normal recoil and then the recoilProne configs like shown at top of this page.

Making your own recoil

To make your own recoil preset in an addon config, create your own CfgRecoils section. This section is readAndCreate, so you can just start tossing in as many recoil presets as you like. Here's an example of what it should look like:

class CfgRecoils
{
	testRecoil[] = {0.05,0.03,0.05, 0.03,0,0.03, 0.03,0,0};
	testRecoil2[] = {0.03,0.01,0.02, 0.04,0,0};
};

In that example, testRecoil will be a stronger recoil taking a bit more time to recenter. testRecoil2 will be a light recoil suitable for something more like a .22LR hunting rifle.

Applying the recoil to your weapon or magazine

If the weapon in question has no extra fireModes, like Single or Burst selection, just specify the recoil like so:

recoil = testRecoil; 

If the weapon has more firemodes, you'll have to specify the recoil for each one. Note that in most cases, making separate recoils for single and full-auto is unrealistic; why should the gun, firing the same ammo as before, handle any differently?

Tuning recoil to your weapon

Here are some speculative suggestions on how to custom-fit recoil presets to your weapons. Speculative because it's been years since I've fired a gun

1. Base it on the caliber of the bullet and size of the cartridge of the bullet. A 7.62 rifle bullet should generally create more recoil (especially offset) than a 5.45 bullet.

2. Base it on the weight of the weapon. A heavier weapon might have a slower kick back, and consequently take more time to recenter.

3. Modify it for the handling of the weapon. If the weapon is commonly known to “handle better” than another similar firearm, you can reduce the angle setting accordingly.

A handy technique in tuning recoils for fully-automatic weapons, especially machine guns, is to set the recoil to be slower in recentering than the weapon fires. For example, say your M60 has a reloadTime of 0.1 (1 shot every tenth of a second). If you set the recoil to kick back in 0.055 seconds and recenter in 0.065 seconds, the aim point will keep “climbing” as its being fired, stopping at a certain (hardcoded) point. This requires the shooter to drag the aim point down as he fires, and generally makes shooting from optics view a better choice. The effect is, of course, stronger when crouching or standing, making prone still the best firing position.

However, the above technique will probably screw up AI gunners utterly. Make sure they don't fire too quickly by tweaking the aiRateOfFire delay (and maybe by increasing the aiDispersion coeff on the y plane).

arma/config/cfgrecoil.txt · Last modified: 2008-05-01 22:41 by snakeman