CfgAmmo Config Reference: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(some more descriptions)
(Many small fixes + major layout overhaul. Only CfgVehicles Config Reference to do (in this set))
Line 1: Line 1:
{{Stub}}
{{Cfg ref|start}}
==Introduction==
'''''cfgAmmo''''', '''''cfgMagazines''''', '''''cfgWeapons''''' and '''''cfgVehicles''''' are root classes defined in the engine's <tt>config.bin</tt>.


== Introduction ==
These classes can be subsequently added to by addons.


cfgAmmo, cfgMagazines, cfgWeapons and cfgVehicles are root classes defined in the engine's config.bin.  These classes can be subsequently added to by addons.
''cfgAmmo'' defines the missile or projectile characteristics for ammunition held in a ''cfgMagazine'' which, in turn, is used by a ''cfgWeapon'', which, in turn, is selected for use in a (series of) ''cfgVehicles'' or added as a portable weapon for a soldier.


cfgAmmo defines the missile or projectile characteristics for ammunition held in a cfgMagazine which, in turn, is used by a cfgWeapon, which, in turn, is selected for use in a (series of) cfgVehicles or added as a portable weapon for a soldier. The same ammunition can be used by multiple magazines, and the same magazine can be used by multiple weapons. Generally, the same ammunition and the same magazine are used where possible, for consistency amongst weapons and to allow tweaks and changes to any single cfgAmmo to propagate naturally through all sources that use it.
The same ammunition can be used by multiple magazines, and the same magazine can be used by multiple weapons. Generally, the same ammunition and the same magazine are used where possible, for consistency amongst weapons and to allow tweaks and changes to any single ''cfgAmmo'' to propagate naturally through all sources that use it.


Note that engines accept integer values where a float would normally be expected.
'''Note''' that engines accept ''integer'' values where a ''float'' would normally be expected.


=== OFP Legacy Behaviour ===
===OFP Legacy Behaviour===
All ''[[Real Virtuality]]'' games since ''Arma'' use the root class ''cfgMagazines''. In contrast, ''OFP/Arma: Cold War Assault'' relies on constructs within its ''cfgWeapons'' class to distinguish between weapon and magazine parameters.


All [[Real Virtuality]] games since ArmA use the root class cfgMagazines.  In contrast, OFP/Arma: Cold War Assault relies on constructs within its cfgWeapons class to distinguish between weapon and magazine parameters.
The ''cfgAmmo'' class is similar across every game engine, and aside from incremental additions of tokens with new game versions, the overall structure has not changed significantly.


The cfgAmmo class is similar across every game engine and aside from incremental additions of tokens with new game versions, the overall structure has not changed significantly.
===Modifications===
<syntaxhighlight lang="c">
access = 1;
</syntaxhighlight>


#Ammunition classes can be added.
#Existing classes can (sometimes) be altered.


==Modifications==
The default ''class'' for ''cfgAmmo'' specifies <tt>access = 3;</tt> - Almost all subsequent classes inherit this value, which means they cannot be altered in any way.


access=1;
To allow YOUR addon to subsequently modify YOUR ammunition (should you wish other addons to do so), you '''must''' change the <tt>access=</tt> in YOUR ammunition.


*Ammunition classes can be added.
===CamShake===
*Existing classes can (sometimes) be altered.
New to ''[[Arma 3]]'' is the ability to introduce ''camera shake'' to the firing of weapons by including subclasses within each ''cfgAmmo'' definition. In all cases, ''CamShake'' only affects players (as obviously, ''AI'' have no screens to shake).


The default class for cfgAmmo specifies access=3; Almost all subsequent classes inherit this value, which means they cannot be altered in any way.
:'''CamShakeFire''' applies to anyone within the specified ''distance'' of the firer.
:'''CamShakePlayerFire''' applies to the firer directly, instead of the proximity effect.
:'''CamShakeHit''' applies to anyone struck by or within the area of effect ([[#indirectHit|indirectHitRange]]) of the projectile. Parameters are the same as the ''[[addCamShake]]'' command.


To allow YOUR addon to subsequently modify YOUR ammunition (should you wish to with other addons), you must change the access= in YOUR ammunition.
Example:


<syntaxhighlight lang="c">
class myAmmo: BulletCore
{
class CamShakeFire
{
power = 30;
duration = 0.5;
frequency = 20;
distance = 30;
};
class CamShakePlayerFire
{
power = 0.06;
duration = 0.1;
frequency = 20;
};
class CamShakeHit
{
power = 100;
duration = 1;
frequency = 20;
};
}
</syntaxhighlight>


== CamShake ==
==Alphabetical Order==
{{Cfg ref|abc}}
===A===
====airFriction====
;Type:[[TokenNameValueTypes|Float]]
;Description: As implied, how much the air friction slows down the projectile. Negative values.


New to [[Arma 3]] is the ability to introduce camera shake to the firing of weapons by including subclasses within each cfgAmmo definition.  In all cases, CamShake only affects players (as obviously, AI have no screens to shake).
====airLock====
;Type: [[TokenNameValueTypes|Boolean]]
;Description: Declares if ammo can lock on air targets. Also makes ''AI'' to decide whether to engage air units with the particular ammo.


'''CamShakeFire''' applies to anyone within the specified ''distance'' of the firer. '''CamShakePlayerFire''' applies to the firer directly, instead of the proximity effect.  '''CamShakeHit''' applies to anyone struck by or within the area of effect ([[#indirectHit|indirectHitRange]]) of the projectile.  Parameters are the same as the [[addCamShake]] function.
====allowAgainstInfantry====
;Type: [[TokenNameValueTypes|Integer]]
;Description: Default <tt>1</tt>. If <tt>0</tt>, the ''AI'' will not (deliberately) employ this weapon against infantry targets. Used to override ''[[#cost|cost]]'' behaviour.


Example:
====animated====
 
====audibleFire====
;Type: [[TokenNameValueTypes|Float]]
;Description: How much can ''AI'' hear when given weapon is fired.
 
<syntaxhighlight lang="c">
audibleFire = 5.0;
</syntaxhighlight>


class myAmmo: BulletCore
====autoSeekTarget====
{
;Description: Self-guided projectiles? Used in ''anti-tank'' artillery shells.
class CamShakeFire
{
power = 30;
duration = 0.5;
frequency = 20;
distance = 30;
};
class CamShakePlayerFire
{
power = 0.06;
duration = 0.1;
frequency = 20;
};
class CamShakeHit
{
power = 100;
duration = 1;
frequency = 20;
};
}


=A=
===B===
====brightness====
;Type: [[TokenNameValueTypes|Float]]
;Description: The intensity of the light source. Used in ''illuminating flares''.


==airFriction==
<syntaxhighlight lang="c">
'''[[ArmA]]'''
brightness = 2;
<br>[[TokenNameValueTypes|Float]]
</syntaxhighlight>
<br>'''Description:''' As implied, how much the air friction slows down the projectile. Negative values.


==airLock==
===C===
[[TokenNameValueTypes|Boolean]]
====canLock====
<br>'''Description:''' Declares if ammo can lock on air targets. Also makes AI to decide whether to engage air units with the particular ammo.
;Type: [[TokenNameValueTypes|Integer]]
;Description: Declares if ammo is able to lock (necessary for ''airLock'', ''irLock'' and ''laserLock'').
;Possible values: <tt>0</tt> = false, <tt>1</tt> = cadet mode only, and <tt>2</tt> = always.


==allowAgainstInfantry==
<syntaxhighlight lang="c">
'''[[Arma 3]]'''
canLock = 0;
[[TokenNameValueTypes|Integer]]
</syntaxhighlight>
<br>'''Description:''' Default 1.  If 0, the AI will not (deliberately) employ this weapon against infantry targets.  Used to override [[#cost|cost]] behaviour.


==animated==
====cartridge====
'''[[ArmA]]'''
;Type: [[TokenNameValueTypes|String]]
;Description: Declares the path to the cartridge ''P3D model'', which may be ejected on each shot. Like all model specifications, <tt>.p3d</tt> is inferred.


==audibleFire==
<syntaxhighlight lang="c">
[[TokenNameValueTypes|Float]]
cartridge = "FxCartridge[.p3d]";
<br>'''Description:''' How much can AI hear when given weapon is fired.
</syntaxhighlight>


audibleFire=5.0;
====cost====
;Type: [[TokenNameValueTypes|Integer]]
;Description: ''Cost-gain'' evaluation is performed to choose an appropriate weapon.
:''Gain'' includes self-preservation.
:''Cost'' includes time required to complete the attack.
As a result, weapons with ''high cost'' are unlikely to be used against common targets, esp. when ''low cost'' weapons are available. Still, there may be situation where ''AI'' may decide to use high cost weapon, esp. when it thinks it has little chance of survival and needs to attempt destroying enemy quickly.


==autoSeekTarget==
<syntaxhighlight lang="c">
'''[[Arma 3]]'''
cost = 5000;
<br>'''Description:''' Self-guided projectiles?  Used in anti-tank artillery shells.
</syntaxhighlight>


=B=
====cmImmunity====
;Type: [[TokenNameValueTypes|Float]]
;Description: Specifies a missile's resistance to countermeasures (such as ''chaff'' and ''flares'').
;Possible range: <tt>0.0</tt> to <tt>1.0</tt>


==brightness==
<syntaxhighlight lang="c">
'''[[Arma 2]]'''
cmImmunity = 0.9;
<br>[[TokenNameValueTypes|Float]]
</syntaxhighlight>
<br>'''Description:''' The intensity of the light source.  Used in illuminating flares.


brightness = 2;
====CraterEffects====
;Type: [[TokenNameValueTypes|String]]
;Description: Declares which crater effect to spawn on ''hit on ground''.
;Possible values: <tt>BombCrater</tt>, <tt>ExploAmmoCrater</tt>, <tt>GrenadeCrater</tt>, <tt>ImpactEffectsBig</tt>, <tt>MissileCrater</tt>, and <tt>ShellCrater</tt>.


=C=
<syntaxhighlight lang="c">
CraterEffects = "ExploAmmoCrater";
</syntaxhighlight>


==canLock==
===D===
[[TokenNameValueTypes|Integer]]
====deflecting====
<br>'''Description:''' Declares if ammo is able to lock (necessary for airLock, irLock & laserLock)
;Type: [[TokenNameValueTypes|Integer]]
<br>'''Possible values:'''
;Description: Declares if ammo is deflecting and thus it's deflection angle.
*0 = false
*1 = cadet mode only
*2 = always.


canLock=0;
<syntaxhighlight lang="c">
deflecting = 10;
</syntaxhighlight>


==cartridge==
===E===
[[TokenNameValueTypes|String]]
====effectsFire====
<br>'''Description:''' Declares the path to the cartridge P3D model, which may be ejected on each shot. Like all model specifications, .p3d is inferred.


cartridge="FxCartridge[.p3d]";
====effectsMissile====


==cost==
====effectsSmoke====
[[TokenNameValueTypes|Integer]]
<br>'''Description:''' Cost-gain evaluation is performed to choose an appropriate weapon. Gain includes self-preservation, cost includes time required to complete the attack.


As a result, weapons with high cost are unlikely to be used again common targets, esp. when low cost weapons are available. Still, there may be situation where AI may decide to use high cost weapon, esp. when it thinks it has little chance of survival and needs to attempt destroying enemy quickly.
====explosionEffects====
;Type: [[TokenNameValueTypes|String]]
;Description: Declares which explosion effect to spawn on ''hit''.
;Possible values: <tt>BombExplosion</tt>, <tt>ExploAmmoExplosion</tt>, <tt>ExplosionEffects</tt>, and <tt>GrenadeExplosion</tt>.


Generally, cost is assigned to vague equivalents to real-world currency.
====explosionTime====
;Type: [[TokenNameValueTypes|Integer]]
;Description: Declares after how many seconds ammo will explode (''e.g.'' used on ''timed hand grenades'').


cost=5000;
<syntaxhighlight lang="c">
explosionTime = 5;
</syntaxhighlight>


==cmImmunity==
====explosive====
'''[[Arma 3]]'''
;Type: [[TokenNameValueTypes|Float]]
<br>[[TokenNameValueTypes|Float]]
;Description: Declares if ammo is explosive, and if it is, how much of the damage is done using explosion. The rest is assumed to be caused by kinetic impact.
<br>'''Description:''' Specifies a missile's resistance to countermeasures (such as chaff and flares). Possible range is from 0.0 to 1.0.
:<tt>1</tt> means fully explosive, <tt>0</tt> means fully kinetic.


cmImmunity = 0.9;
===F===
====fuseDistance====
;Type: [[TokenNameValueTypes|Float]]
;Description: The ''minimum'' distance any ''explosive projectile'' has to travel, before it becomes ''armed'' and thus explodes on impact.


==CraterEffects==
Missiles hitting short of the given range still visually explode, causing no damage or shockwave effects.
'''[[ArmA]]'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' Declares which crater effect to spawn on hit on ground.
<br>'''Possible values:''' BombCrater, ExploAmmoCrater, GrenadeCrater, ImpactEffectsBig, MissileCrater, ShellCrater


CraterEffects="ExploAmmoCrater";
Grenades will stick into the ground for ''x'' amount of time and then disappear causing no damage, or (in case <tt>''explosionTime=''</tt> is set) explode after ''x'' seconds, causing damage.


===H===
====hit====
;Type: [[TokenNameValueTypes|Float]]
;Description: Damage on hit. In OFP total damage is calculated as: <tt>''Total damage'' = ''Hit damage'' - ''Indirect damage''</tt> (while hit value is larger than ''indirectHit'').


<syntaxhighlight lang="c">
hit = 8;
</syntaxhighlight>


=D=
====HitEffects====
<syntaxhighlight lang="c">
class HitEffects
{
vehicle = "ImpactMetal";
object = "ImpactConcrete";
};
</syntaxhighlight>


==deflecting==
====hit...[]====
'''[[ArmA]]'''
;Description: The list of sound effects, themselves defined as [[#sound....5B.5D|sound...[]]] arrays, to play whenever the specified events occur, with the loudness or intensity of the sound following.
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' Declares if ammo is deflecting and thus deflection angle.


deflecting=10;
All array values are defaulted to:


<syntaxhighlight lang="c">
hitBuilding[] = {"soundHit", 1};
</syntaxhighlight>


Example:


=E=
<syntaxhighlight lang="c">
hitGroundSoft[] = {
"soundGroundSoft1", 0.2,
"soundGroundSoft2", 0.2,
"soundGroundSoft3", 0.1,
"soundGroundSoft4", 0.1,
"soundGroundSoft5", 0.1,
"soundGroundSoft6", 0.1,
"soundGroundSoft7", 0.1,
"soundGroundSoft8", 0.1
};
</syntaxhighlight>


==effectsFire==
=====hitArmor[]=====
'''[[ArmA]]'''


==effectsMissile==
=====hitBuilding[]=====
'''[[ArmA]]'''


==effectsSmoke==
=====hitConcrete[]=====
'''[[ArmA]]'''


==explosionEffects==
=====hitDefault[]=====
'''[[ArmA]]'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' Declares which explosion effect to spawn on hit.
<br>'''Possible values:'''
*BombExplosion
*ExploAmmoExplosion
*ExplosionEffects
*GrenadeExplosion


==explosionTime==
=====hitFoliage[]=====
'''[[ArmA]]'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' Declares after how many seconds ammo will explode (e.g. used on timed hand grenades).


explosionTime=5;
=====hitGlass[]=====


==explosive==
=====hitGlassArmored[]=====
[[TokenNameValueTypes|Float]]
<br>'''Description:''' Declares if ammo is explosive, and if it is, how much (What part of the damage is done using explosion, the rest is assumed to be caused by kinetic impact, given as a ratio - 1 means fully explosive, 0 means fully kinetic)


=====hitGround[]=====
;Description: OFP (only)


=====hitGroundHard[]=====


=F=
=====hitGroundSoft[]=====


==fuseDistance==
=====hitIron[]=====
'''[[ArmA]]'''
[[TokenNameValueTypes|Float]]
<br>'''Description:''' The minimum distance any '''explosive''' projectile has to travel, before it becomes "armed" and thus explodes on impact. Missiles hitting below the given range still visually explode, causing no damage or shockwave effects. Grenades will stick into the ground for X amount of time and then disappear causing no damage, or (in case 'explosionTime=' is set) explode after X seconds, causing damage.


=H=
=====hitMan[]=====


==hit==
=====hitMetal[]=====
[[TokenNameValueTypes|Float]]
<br>'''Description:''' Damage on hit. In OFP total damage is calculated as:  Total damage = Hit damage - Indirect damage (while hit value bigger then Indirecthit)


hit=8;
=====hitMetalplate[]=====


==HitEffects==
=====hitPlastic[]=====
'''[[ArmA]]'''


class HitEffects
=====hitRubber[]=====
{
  vehicle = "ImpactMetal";
  object = "ImpactConcrete";
};


==hit...[]==
=====hitWood[]=====
<br>'''Description:''' The list of sound effects, themselves defined as [[#sound....5B.5D|sound...[]]] arrays, to play whenever the specified events occur, with the loudness or intensity of the sound following.  All array values are defaulted to:


hitBuilding[] = {"soundHit",1};
===I===
====indirectHit====
;Type: [[TokenNameValueTypes|Float]]
;Description: Damage in ''indirectHitRange''.


Example:
<syntaxhighlight lang="c">
hitGroundSoft[] = {"soundGroundSoft1",0.2,"soundGroundSoft2",0.2,"soundGroundSoft3",0.1,"soundGroundSoft4",0.1,"soundGroundSoft5",0.1,"soundGroundSoft6",0.1,"soundGroundSoft7",0.1,"soundGroundSoft8",0.1};
indirectHit = 8;
</syntaxhighlight>


===hitArmor[]===
====indirectHitRange====
===hitBuilding[]===
;Type: [[TokenNameValueTypes|Float]]
===hitConcrete[]===
;Description: Radius in metres where ''indirectHit'' damage is caused.
'''[[ArmaTokenNames|ArmA]]'''
===hitDefault[]===
'''[[ArmaTokenNames|ArmA]]'''
===hitFoliage[]===
'''[[ArmaTokenNames|ArmA]]'''
===hitGlass[]===
'''[[ArmaTokenNames|ArmA]]'''
===hitGlassArmored[]===
'''[[ArmaTokenNames|ArmA]]'''
===hitGround[]===
OFP (only)
===hitGroundHard[]===
'''[[ArmaTokenNames|ArmA]]'''
===hitGroundSoft[]===
'''[[ArmaTokenNames|ArmA]]'''
===hitIron[]===
'''[[ArmaTokenNames|ArmA]]'''
===hitMan[]===
===hitMetal[]===
'''[[ArmaTokenNames|ArmA]]'''
===hitMetalplate[]===
'''[[ArmaTokenNames|ArmA]]'''
===hitPlastic[]===
'''[[ArmaTokenNames|ArmA]]'''
===hitRubber[]===
'''[[ArmaTokenNames|ArmA]]'''
===hitWood[]===
'''[[ArmaTokenNames|ArmA]]'''


<syntaxhighlight lang="c">
indirectHitRange = 75;
</syntaxhighlight>


====initTime====
;Type: [[TokenNameValueTypes|Float]]
;Description: How long (in seconds) the projectile waits before starting it's ''motor''.


=I=
<syntaxhighlight lang="c">
initTime = 0.2;
</syntaxhighlight>


==indirectHit==
====irLock====
[[TokenNameValueTypes|Float]]
;Type: [[TokenNameValueTypes|Boolean]]
<br>'''Description:''' Damage in indirectHitRange.
;Description: Declares if ammo can lock on ''IR-targets''.


indirectHit=8;
===L===
====laserLock====
;Type: [[TokenNameValueTypes|Boolean]]
;Description: Declares if ammo can lock on ''laser designator''.


==indirectHitRange==
====lightColor[]====
[[TokenNameValueTypes|Float]]
;Type: [[TokenNameValueTypes|Array]]
<br>'''Description:''' Radius in metres where indirectHit damage is caused.
;Description: Declares color of light (''e.g.'' on ''flares'').


indirectHitRange=75;
<syntaxhighlight lang="c">
lightColor[] = {1, 1, 1, 0};
</syntaxhighlight>


==initTime==
===M===
[[TokenNameValueTypes|Float]]
====maneuvrability====
<br>'''Description:''' How long (in seconds) the projectile waits before starting it's motor.
;Type: [[TokenNameValueTypes|Float]]
;Description: Declares maneuvrability of guided missiles.


initTime=0.2;
Higher values than <tt>30-33</tt> cause ''the missile'' (when locked on) to spin wildly and rarely hit the target.


==irLock==
Tweaking ''sideAirFriction'' and ''simulationStep'' makes the missile track and hit it's target, but (especially in ''multiplayer'') from other player's ''POV'' the missile will spin out of control, whilst from the shooters own ''POV'', it will still fly straight and hit it's target.
[[TokenNameValueTypes|Boolean]]
<br>'''Description:''' Declares if ammo can lock on IR-targets.


<syntaxhighlight lang="c">
manueuvrability = 30;
</syntaxhighlight>


====manualControl====
;Type: [[TokenNameValueTypes|Boolean]]
;Description: If <tt>1</tt>, causes the projectile to be guided towards the firer's crosshairs.


=L=
See: [http://en.wikipedia.org/wiki/SACLOS SACLOS guidance behaviour], such as for ''TOW'' missiles.


==laserLock==
<syntaxhighlight lang="c">
[[TokenNameValueTypes|Boolean]]
manualControl = 0;
<br>'''Description:''' Declares if ammo can lock on laser designator.
</syntaxhighlight>


==lightColor[]==
====maxControlRange====
[[TokenNameValueTypes|Array]]
;Type: [[TokenNameValueTypes|Float]]
<br>'''Description:''' Declares color of light (e.g. on flares).
;Description: Declares in which distance to player ammo can be controlled during flight.


lightColor[]={1,1,1,0};
Using this on handheld ''launchers'' causes the ''missile'' to ''time-out'' after approximately 1.5km, loosing all control of the warhead, which causes the missile to spin around/take off in random directions (until it self-destructs - ''timeToLive''), making higher values useless.


Using this on any ''vehicle mounted launchers'' (like the ''TOW'', ''Hellfire'' or ''Maverick'') allows the warhead to track '''and''' turn to follow it's target even if said target is behind the player's vehicle (and possibly ''AI-controlled'' ones too), which requires a high ''manueuvrability'' value on the missile.


That way, one can simply lock on, then pass the locked ''target'' and shoot a missile, which will follow the target even without direct line of sight.


=M=
'''Note''' that The missile follows the target regardless of ''obstacles'', ''init-time'' or ''initspeed'', meaning the missile might crash into the ground, especially at lower heights.
==maneuvrability==
[[TokenNameValueTypes|Float]]
<br>'''Description:''' Declares maneuvrability of guided missiles.
Higher values than 30-33 cause the Missile (when locked on) to spin wildly and rarely hit the target; tweaking sideairfriction and simulationstep makes the missile track and hit it's target, but esp. in Multiplayer from other Players fov, the missile will spin out of control, whilst from the shooters own pov, it will still fly straight and hit it's target.


manueuvrability=30;
<syntaxhighlight lang="c">
maxControlRange = 5000;
</syntaxhighlight>


==manualControl==
====maxSpeed====
[[TokenNameValueTypes|Boolean]]
;Type: [[TokenNameValueTypes|Float]]
<br>'''Description:''' If 1, causes the projectile to be guided towards the firer's crosshairs: [http://en.wikipedia.org/wiki/SACLOS SACLOS] guidance behaviour, such as for TOW missiles.
;Description: Declares the maximum speed (metres per second).


manualControl=0;
<syntaxhighlight lang="c">
maxSpeed = 241;
</syntaxhighlight>


==maxControlRange==
====model====
[[TokenNameValueTypes|Float]]
;Type: [[TokenNameValueTypes|String]]
<br>'''Description:''' Declares in which distance to player ammo can be controlled during flight.
;Description: Declares path to model.
Using this on handheld Launchers causes the Missile to 'time-out' after approximately 1.5km, loosing all control of the warhead, which causes the Missile to spin around/take off into random directions (until it self-destructs, 'timetolive'), making higher Values useless.


Using this on any VEHICLE mounted Launchers (like the TOW, Hellfire or Maverick) allows the warhead to track AND turn/follow it's target even if said target is behind the player vehicle (and possibly AI-controlled ones too), which requires a high maneuverability value on the missile. That way, one can simply lock on, then pass the locked Target and shoot a missile, which will follow the target even without direct line of sight. NOTE that the missile follows the target regardless of obstacles, init-time or initspeed, meaning the missile might crash into the ground, esp. at lower heights.
<syntaxhighlight lang="c">
model = "\ca\weapons\bullet[.p3d]"
</syntaxhighlight>


maxControlRange=5000;
====min/mid/maxRange...====
;Description: These tokens are present in {{Name|ofp|short}} only. They were badly classed in {{Name|ofp|short}}, causing all weapons using this specific ''bullet'' to exhibit this behaviour rather than the behaviour of the ''rifle''. As such they were transferred to Arma's ''cfgWeapons''{{Clarify}}.


==maxSpeed==
'''Above statement is not true'''; Even in {{Name|arma2|short}} and {{Name|oa|short}}, these values still exist and affect the ''AI'' '''and only the AI''' in the following ways:
[[TokenNameValueTypes|Float]]
:The tokens are found/put on each weapons "''firing modes''", or on the gun itself, if it has no separate firing modes{{Clarify}}.
<br>'''Description:''' Declares the maximum speed (m/s).


maxSpeed=241;
=====minRange=====
;Type: [[TokenNameValueTypes|Float]]
;Description: ''Minimum'' engagement range for the ''AI''.


==model==
Below given values, the ''AI'' '''will not''' engage but just "''stare them down''", even if they get shot at, and (most likely) killed.
[[TokenNameValueTypes|String]]
<br>'''Description:''' Declares path to model.


model="\ca\weapons\bullet[.p3d]"
<syntaxhighlight lang="c">
Minrange = 5;
</syntaxhighlight>


==min/MaxRange...==
=====minRangeProbab=====
<br>'''Description:''' These tokens are present in ofp only. They were badly classed in ofp, causing all weapons using this specific 'bullet' to exhibit this behaviour rather than the behaviour of the 'rifle'. As such they were transferred to ArmA's cfgWeapons.
;Type: [[TokenNameValueTypes|Float]]
'''Above statement is not (!!!!) true'''; EVEN IN ARMA 2 and OA, these values STILL exist AND affect the AI (AND ONLY THE AI!!!) in the following ways:
;Description: ''Probability'' declaring how '''''high''''' the chance is that the ''AI'' will engage a target at ''minRange'' using ''this (current)'' firing mode.
(The tokens are found/put on each weapons "firing modes", or on the gun itself, if it has no seperate firing modes)


===minRange===
Values are <tt>0.0</tt> to <tt>1.0</tt> where <tt>1.0</tt> equates to a ''100% likelihood''.
[[TokenNameValueTypes|Float]]
<br>'''Description:''' Minimum engagement range for the AI. Below given values, the AI '''WON'T''' engage but just "stare them down", even if they get shot at, and -most likely- killed.
Minrange = 5;


===minRangeProbab===
<syntaxhighlight lang="c">
[[TokenNameValueTypes|Float]]
minRangeProbab = 0.02;
<br>'''Description:'''Probability declaring how high the chance is that the AI will engage a target at "MINRANGE" using ''this (current)'' firing mode. Values are 0.0 - 1.0 [NO chance -> 100% chance].
</syntaxhighlight>


minRangeProbab=0.02;
=====midRange=====
;Type: [[TokenNameValueTypes|Float]]
;Description: ''Mid-Range'' engagement range for ''AI'''s using ''this (current)'' firing mode.


===midRange===
<syntaxhighlight lang="c">
[[TokenNameValueTypes|Float]]
midRange = 150;
<br>'''Description:''' Mid-Range engagement range for AI's using this (current) firing mode.
</syntaxhighlight>


midRange=150;
=====midRangeProbab=====
;Type: [[TokenNameValueTypes|Float]]
;Description: ''Probability'' declaring how '''''high''''' the chance is that the ''AI'' will engage a target at ''midRange''.


===midRangeProbab===
Values are <tt>0.0</tt> to <tt>1.0</tt> where <tt>1.0</tt> equates to a ''100% likelihood''.
[[TokenNameValueTypes|Float]]
<br>'''Description:'''Probability declaring how high the chance is that the AI will engage a target at "MIDRANGE". Values are 0.0 - 1.0
midRangeProbab=0.7;


===maxRange===
<syntaxhighlight lang="c">
[[TokenNameValueTypes|Float]]
midRangeProbab = 0.7;
<br>'''Description:'''MAXIMUM range possible for the AI. Although AI's ''MAY'' engage targets slightly beyond MAXRANGE, this is how far the AI will try to shoot at targets. Targets definetly beyond MAXRANGE are ignored.
</syntaxhighlight>


maxRange=500;
=====maxRange=====
===maxRangeProbab===
;Type: [[TokenNameValueTypes|Float]]
[[TokenNameValueTypes|Float]]
;Description: ''Maximum'' range possible for the ''AI''.
<br>'''Description:'''How high the chance is that the AI will engage targets at MAXRANGE or slightly below. Values are 0.0 - 1.0
maxRangeProbab=0.51;


=P=
Although ''AI's'' '''may''' engage targets slightly beyond ''maxRange'', this is how far the ''AI'' will try to shoot at targets. Targets definitely beyond ''maxRange'' are ignored.


==proxyShape==
<syntaxhighlight lang="c">
[[TokenNameValueTypes|String]]
maxRange = 500;
<br>'''Description:''' Declares the model of this weapon used in proxies on vehicles. Note that proxies can be used only with air units.
</syntaxhighlight>


proxyShape="\ca\air\sidewinder_proxy";
=====maxRangeProbab=====
;Type: [[TokenNameValueTypes|Float]]
;Description: ''Probability'' declaring how '''''high''''' the chance is that the ''AI'' will engage a target at ''maxRange'' (or slightly below).


Values are <tt>0.0</tt> to <tt>1.0</tt> where <tt>1.0</tt> equates to a ''100% likelihood''.


<syntaxhighlight lang="c">
maxRangeProbab = 0.51;
</syntaxhighlight>


=S=
===P===
====proxyShape====
;Type: [[TokenNameValueTypes|String]]
;Description: Declares the model of ''this weapon'' used in ''proxies'' on ''vehicles''. Note that ''proxies'' can be used '''only''' with air units.


==sideAirFriction==
<syntaxhighlight lang="c">
[[TokenNameValueTypes|Float]]
proxyShape = "\ca\air\sidewinder_proxy";
<br>'''Description:''' Adjusts the drag of a projectile. Lower values decrease drag, higher values increase drag. When used with guided projectiles, higher values make it easier for the projectile to turn while lower values make it more difficult to turn.
</syntaxhighlight>


sideAirFriction=0.5;
===S===
====sideAirFriction====
;Type: [[TokenNameValueTypes|Float]]
;Description: Adjusts the drag of a projectile. Lower values decrease drag, higher values increase drag.


==simulation==
When used with ''guided projectiles'', ''higher values'' make it easier for the projectile to turn, while ''lower values'' make it more difficult to turn.
[[TokenNameValueTypes|String]]
<br>'''Description:''' Declares simulation type.
Also affects the behavior the projectile causes to the shooter/object hit;
changing "shotShell" to "shotBullet" makes a tank shell pass through more trees rather than being stopped by them, and also removes the recoil which usually affects the tank/vehicle the cannon is mounted to. Changing "shotBullet" to "shotSpread" (OA only) causes the changed ammo to behave like it is buckshot (again, OA only).
<br>'''Possible values:''' refer to [[Models & Classnames: Simulation Types]] for a list of all supported simulation types.


simulation="shotShell";
<syntaxhighlight lang="c">
sideAirFriction = 0.5;
</syntaxhighlight>


==simulationStep==
====simulation====
[[TokenNameValueTypes|Float]]
;Type: [[TokenNameValueTypes|String]]
<br>'''Description:''' ?
;Description: Declares simulation type.


==shadow==
Also affects the behaviour ''the projectile'' causes to the ''shooter/object hit'';
'''[[ArmaTokenNames|ArmA]]'''
:Changing "''shotShell''" to "''shotBullet''" makes a tank shell pass through more trees rather than being stopped by them, and also removes the recoil which usually affects the tank/vehicle the cannon is mounted to.
:Changing "''shotBullet''" to "''shotSpread''" (OA only) causes the changed ammo to behave like it is buckshot (again, OA only).


==sound...[]==
;Possible values: Refer to ''[[Models & Classnames: Simulation Types]]'' for a list of all supported simulation types.


===soundFly[]===
<syntaxhighlight lang="c">
===soundEngine[]===
simulation = "shotShell";
===soundHit[]===
</syntaxhighlight>


==supersonicCrackNear[]==
====simulationStep====
'''[[ArmA]]'''
;Type: [[TokenNameValueTypes|Float]]
<br>[[TokenNameValueTypes|Array]]
<br>'''Description:''' Declares sound and volume of the supersonic crack (near the player). Supersonic crack will only occur if ammo is flying with supersonic speed.


supersonicCrackNear[]={"\ca\Weapons\Data\Sound\supersonic_crack_close.wss",1,1};
====shadow====


==supersonicCrackFar[]==
====sound...[]====
'''[[ArmA]]'''
<br>[[TokenNameValueTypes|Array]]
<br>'''Description:''' Declares sound and volume of the supersonic crack (far). Supersonic crack will only occur if ammo is flying with supersonic speed.


supersonicCrackFar[]={"\ca\Weapons\Data\Sound\supersonic_crack_50meters.wss",1,1};
=====soundFly[]=====


=====soundEngine[]=====


=====soundHit[]=====


=T=
====supersonicCrackNear[]====
;Type: [[TokenNameValueTypes|Array]]
;Description: Declares sound and volume of the ''supersonic crack'' ('''near the player'''). Supersonic crack will only occur if ammo is flying with supersonic speed.


==thrust==
<syntaxhighlight lang="c">
[[TokenNameValueTypes|Float]]
supersonicCrackNear[] = {"\ca\Weapons\Data\Sound\supersonic_crack_close.wss", 1, 1};
<br>'''Description:''' Engine power for missiles and rockets.
</syntaxhighlight>


==thrustTime==
====supersonicCrackFar[]====
[[TokenNameValueTypes|Float]]
;Type: [[TokenNameValueTypes|Array]]
<br>'''Description:''' Engine burn time for missiles and rockets.
;Description: Declares sound and volume of the supersonic crack ('''far'''). Supersonic crack will only occur if ammo is flying with supersonic speed.


thrustTime=0.200000;
<syntaxhighlight lang="c">
supersonicCrackFar[] = {"\ca\Weapons\Data\Sound\supersonic_crack_50meters.wss", 1, 1};
</syntaxhighlight>


==timeToLive==
===T===
'''[[ArmA]]'''
====thrust====
<br>[[TokenNameValueTypes|Integer]]
;Type: [[TokenNameValueTypes|Float]]
<br>'''Description:''' Time before the ammo vanishes, used as optimization to avoid having to simulate stray bullets. Note that this parameter has no effect in OFP where timeToLive is predefined by simulation.
;Description: Engine power for ''missiles'' and ''rockets''.


timeToLive=4;
====thrustTime====
;Type: [[TokenNameValueTypes|Float]]
;Description: Engine burn time for ''missiles'' and ''rockets''.


==tracerColor[]==
<syntaxhighlight lang="c">
[[TokenNameValueTypes|Array]]
thrustTime = 0.200000;
<br>'''Description:''' Declares tracer colour with "easy" settings (tracers enabled), format is {Red, Green, Blue, Transparency}.
</syntaxhighlight>


==tracerColorR[]==
====timeToLive====
[[TokenNameValueTypes|Array]]
;Type: [[TokenNameValueTypes|Integer]]
<br>'''Description:''' Declares tracer colour with "realistic" settings (tracers disabled), format is {Red, Green, Blue, Transparency}.
;Description: Time before the ammo ''vanishes'', used as optimization to avoid having to simulate stray bullets.


==trackLead==
'''Note''' that this parameter has no effect in OFP where ''timeToLive'' is predefined by simulation.
'''[[ArmA]]'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' The amount of lead a guided weapon will use when tracking a target.


==trackOversteer==
<syntaxhighlight lang="c">
'''[[ArmA]]'''
timeToLive = 4;
<br>[[TokenNameValueTypes|Float]]
</syntaxhighlight>
<br>'''Description:''' The factor at which a guided weapon will steer to meet TrackLead.


==triggerTime==
====tracerColor[]====
'''[[Arma 2]]'''
;Type: [[TokenNameValueTypes|Array]]
<br>[[TokenNameValueTypes|Float]]
;Description: Declares ''tracer colour'' with "''easy''" settings (tracers enabled), format is <tt>{Red, Green, Blue, Transparency}</tt>.
<br>'''Description:''' Used in illumination flares.  The time in seconds before the projectile begins emitting light.


==typicalSpeed==
====tracerColorR[]====
'''[[ArmA]]'''
;Type: [[TokenNameValueTypes|Array]]
<br>[[TokenNameValueTypes|Integer]]
;Description: Declares ''tracer colour'' with "''realistic''" settings (tracers disabled), format is <tt>{Red, Green, Blue, Transparency}</tt>.
<br>'''Description:''' hit value is valid when projectile moves at this speed. With lower speed the hit caused by the ammo is lower as well.


====trackLead====
;Type: [[TokenNameValueTypes|Float]]
;Description: The amount of ''lead''{{Clarify}} a guided weapon will use when tracking a target.


====trackOversteer====
;Type: [[TokenNameValueTypes|Float]]
;Description: The factor at which a guided weapon will ''steer'' to meet ''trackLead''{{Clarify}}.


=V=
====triggerTime====
;Type: [[TokenNameValueTypes|Float]]
;Description: Used in ''illumination flares''. The time in seconds before the projectile ''begins emitting'' light.


==visibleFire==
====typicalSpeed====
[[TokenNameValueTypes|Float]]
;Type: [[TokenNameValueTypes|Integer]]
<br>'''Description:''' how much does AI see a unit firing this weapon
;Description: Hit value is valid when projectile moves at ''this speed''. With lower speed, the hit caused by ''the ammo'' is lower as well.


visibleFire=18;
===V===
====visibleFire====
;Type: [[TokenNameValueTypes|Float]]
;Description: How much does ''AI'' see a unit firing this weapon.


==visibleFireTime==
<syntaxhighlight lang="c">
[[TokenNameValueTypes|Integer]]
visibleFire = 18;
<br>'''Description:''' How long is one shot assumed to be noticeable by the AI. Values under 5 should be avoided, as AI can performs is cycles with 5s of no testing in between.
</syntaxhighlight>


visibleFireTime=18;
====visibleFireTime====
;Type: [[TokenNameValueTypes|Integer]]
;Description: How long is one shot assumed to be noticeable by the ''AI''.


Values under <tt>5</tt> should be avoided, as ''AI'' can perform in cycles with 5s of no testing in between.


<syntaxhighlight lang="c">
visibleFireTime = 18;
</syntaxhighlight>


=W=
===W===
====weaponLockSystem====
;Type: [[TokenNameValueTypes|Integer]] or [[TokenNameValueTypes|String]]
;Description: For ''countermeasures'', this defines the types of enemy countermeasures that it is effective against.


==weaponLockSystem==
For weapons, declares the type of ''guidance system'' that ''the projectile'' uses (and if one is ''spoofed'' it can fall back on another). This can be either an integer by itself, or a string containing a mathematical expression, ''normally a sum of flags added together''.
'''[[Arma 3]]'''
<br>[[TokenNameValueTypes|Integer]] or [[TokenNameValueTypes|String]]
<br>'''Description:''' For countermeasures, defines the types of enemy countermeasures that it is effective against.  For weapons, declares the type of guidance system that the projectile uses (and if one is spoofed it can fall back on another)This can be either an integer by itself, or a string containing a mathmatical expression, normally a sum of flags added together.


{|
{| class="bikitable"
|-
! Flag       !! Guidance Type
! Flag
! Guidance Type
|-
| 1
| ???
|-
|-
| 2
| <tt>1</tt>  || ???
| Infrared
|-
|-
| 4
| <tt>2</tt>  || Infra-red
| Laser-Guided
|-
|-
| 8
| <tt>4</tt>  || Laser-Guided
| Radar-Guided
|-
|-
| 16
| <tt>8</tt>  || Radar-Guided
| ???
|-
|-
| <tt>16</tt> || ???
|}
|}


weaponLockSystem = 2 //infrared guidance
<syntaxhighlight lang="c">
weaponLockSystem = "2 + 8" //infrared and radar guided
weaponLockSystem = 2; //infra-red guidance
weaponLockSystem = "2 + 8"; //infra-red and radar guided
</syntaxhighlight>
 
====whistleDist====
;Type: [[TokenNameValueTypes|Integer]]
;Description: The range at which ''the projectile'' is audible when moving through the air. Used for ''mortar shells'' and ''artillery shells''. Unknown units.


==whistleDist==
====whistleOnFire====
'''[[ArmA]]'''
;Type: [[TokenNameValueTypes|Integer]]
<br>[[TokenNameValueTypes|Integer]]
;Description: If <tt>1</tt>, ''the projectile'' should begin ''whistling'' immediately after launch.
<br>'''Description:''' The range at which the projectile is audible when moving through the air.  Used for mortar shells and artillery shells.  Unknown units.


==whistleOnFire==
{{Cfg ref|end}}
'''[[ArmA]]'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' If 1, the projectile should begin whistling immediately after launch.


[[category:Operation Flashpoint: Editing]]
[[category:Operation Flashpoint: Editing]]
[[Category:ArmA: Addon Configuration]]
[[Category:ArmA: Addon Configuration]]

Revision as of 07:41, 18 May 2014

Template:Cfg ref

Introduction

cfgAmmo, cfgMagazines, cfgWeapons and cfgVehicles are root classes defined in the engine's config.bin.

These classes can be subsequently added to by addons.

cfgAmmo defines the missile or projectile characteristics for ammunition held in a cfgMagazine which, in turn, is used by a cfgWeapon, which, in turn, is selected for use in a (series of) cfgVehicles or added as a portable weapon for a soldier.

The same ammunition can be used by multiple magazines, and the same magazine can be used by multiple weapons. Generally, the same ammunition and the same magazine are used where possible, for consistency amongst weapons and to allow tweaks and changes to any single cfgAmmo to propagate naturally through all sources that use it.

Note that engines accept integer values where a float would normally be expected.

OFP Legacy Behaviour

All Real Virtuality games since Arma use the root class cfgMagazines. In contrast, OFP/Arma: Cold War Assault relies on constructs within its cfgWeapons class to distinguish between weapon and magazine parameters.

The cfgAmmo class is similar across every game engine, and aside from incremental additions of tokens with new game versions, the overall structure has not changed significantly.

Modifications

access = 1;
  1. Ammunition classes can be added.
  2. Existing classes can (sometimes) be altered.

The default class for cfgAmmo specifies access = 3; - Almost all subsequent classes inherit this value, which means they cannot be altered in any way.

To allow YOUR addon to subsequently modify YOUR ammunition (should you wish other addons to do so), you must change the access= in YOUR ammunition.

CamShake

New to Arma 3 is the ability to introduce camera shake to the firing of weapons by including subclasses within each cfgAmmo definition. In all cases, CamShake only affects players (as obviously, AI have no screens to shake).

CamShakeFire applies to anyone within the specified distance of the firer.
CamShakePlayerFire applies to the firer directly, instead of the proximity effect.
CamShakeHit applies to anyone struck by or within the area of effect (indirectHitRange) of the projectile. Parameters are the same as the addCamShake command.

Example:

class myAmmo: BulletCore
{
	class CamShakeFire
	{
		power = 30;
		duration = 0.5;
		frequency = 20;
		distance = 30;
	};
	class CamShakePlayerFire
	{
		power = 0.06;
		duration = 0.1;
		frequency = 20;
	};
	class CamShakeHit
	{
		power = 100;
		duration = 1;
		frequency = 20;
	};
}

Alphabetical Order

Template:Cfg ref

A

airFriction

Type
Float
Description
As implied, how much the air friction slows down the projectile. Negative values.

airLock

Type
Boolean
Description
Declares if ammo can lock on air targets. Also makes AI to decide whether to engage air units with the particular ammo.

allowAgainstInfantry

Type
Integer
Description
Default 1. If 0, the AI will not (deliberately) employ this weapon against infantry targets. Used to override cost behaviour.

animated

audibleFire

Type
Float
Description
How much can AI hear when given weapon is fired.
audibleFire = 5.0;

autoSeekTarget

Description
Self-guided projectiles? Used in anti-tank artillery shells.

B

brightness

Type
Float
Description
The intensity of the light source. Used in illuminating flares.
brightness = 2;

C

canLock

Type
Integer
Description
Declares if ammo is able to lock (necessary for airLock, irLock and laserLock).
Possible values
0 = false, 1 = cadet mode only, and 2 = always.
canLock = 0;

cartridge

Type
String
Description
Declares the path to the cartridge P3D model, which may be ejected on each shot. Like all model specifications, .p3d is inferred.
cartridge = "FxCartridge[.p3d]";

cost

Type
Integer
Description
Cost-gain evaluation is performed to choose an appropriate weapon.
Gain includes self-preservation.
Cost includes time required to complete the attack.

As a result, weapons with high cost are unlikely to be used against common targets, esp. when low cost weapons are available. Still, there may be situation where AI may decide to use high cost weapon, esp. when it thinks it has little chance of survival and needs to attempt destroying enemy quickly.

cost = 5000;

cmImmunity

Type
Float
Description
Specifies a missile's resistance to countermeasures (such as chaff and flares).
Possible range
0.0 to 1.0
cmImmunity = 0.9;

CraterEffects

Type
String
Description
Declares which crater effect to spawn on hit on ground.
Possible values
BombCrater, ExploAmmoCrater, GrenadeCrater, ImpactEffectsBig, MissileCrater, and ShellCrater.
CraterEffects = "ExploAmmoCrater";

D

deflecting

Type
Integer
Description
Declares if ammo is deflecting and thus it's deflection angle.
deflecting = 10;

E

effectsFire

effectsMissile

effectsSmoke

explosionEffects

Type
String
Description
Declares which explosion effect to spawn on hit.
Possible values
BombExplosion, ExploAmmoExplosion, ExplosionEffects, and GrenadeExplosion.

explosionTime

Type
Integer
Description
Declares after how many seconds ammo will explode (e.g. used on timed hand grenades).
explosionTime = 5;

explosive

Type
Float
Description
Declares if ammo is explosive, and if it is, how much of the damage is done using explosion. The rest is assumed to be caused by kinetic impact.
1 means fully explosive, 0 means fully kinetic.

F

fuseDistance

Type
Float
Description
The minimum distance any explosive projectile has to travel, before it becomes armed and thus explodes on impact.

Missiles hitting short of the given range still visually explode, causing no damage or shockwave effects.

Grenades will stick into the ground for x amount of time and then disappear causing no damage, or (in case explosionTime= is set) explode after x seconds, causing damage.

H

hit

Type
Float
Description
Damage on hit. In OFP total damage is calculated as: Total damage = Hit damage - Indirect damage (while hit value is larger than indirectHit).
hit = 8;

HitEffects

class HitEffects
{
	vehicle = "ImpactMetal";
	object = "ImpactConcrete";
};

hit...[]

Description
The list of sound effects, themselves defined as sound...[] arrays, to play whenever the specified events occur, with the loudness or intensity of the sound following.

All array values are defaulted to:

hitBuilding[] = {"soundHit", 1};

Example:

hitGroundSoft[] = {
	"soundGroundSoft1", 0.2,
	"soundGroundSoft2", 0.2,
	"soundGroundSoft3", 0.1,
	"soundGroundSoft4", 0.1,
	"soundGroundSoft5", 0.1,
	"soundGroundSoft6", 0.1,
	"soundGroundSoft7", 0.1,
	"soundGroundSoft8", 0.1
};
hitArmor[]
hitBuilding[]
hitConcrete[]
hitDefault[]
hitFoliage[]
hitGlass[]
hitGlassArmored[]
hitGround[]
Description
OFP (only)
hitGroundHard[]
hitGroundSoft[]
hitIron[]
hitMan[]
hitMetal[]
hitMetalplate[]
hitPlastic[]
hitRubber[]
hitWood[]

I

indirectHit

Type
Float
Description
Damage in indirectHitRange.
indirectHit = 8;

indirectHitRange

Type
Float
Description
Radius in metres where indirectHit damage is caused.
indirectHitRange = 75;

initTime

Type
Float
Description
How long (in seconds) the projectile waits before starting it's motor.
initTime = 0.2;

irLock

Type
Boolean
Description
Declares if ammo can lock on IR-targets.

L

laserLock

Type
Boolean
Description
Declares if ammo can lock on laser designator.

lightColor[]

Type
Array
Description
Declares color of light (e.g. on flares).
lightColor[] = {1, 1, 1, 0};

M

maneuvrability

Type
Float
Description
Declares maneuvrability of guided missiles.

Higher values than 30-33 cause the missile (when locked on) to spin wildly and rarely hit the target.

Tweaking sideAirFriction and simulationStep makes the missile track and hit it's target, but (especially in multiplayer) from other player's POV the missile will spin out of control, whilst from the shooters own POV, it will still fly straight and hit it's target.

manueuvrability = 30;

manualControl

Type
Boolean
Description
If 1, causes the projectile to be guided towards the firer's crosshairs.

See: SACLOS guidance behaviour, such as for TOW missiles.

manualControl = 0;

maxControlRange

Type
Float
Description
Declares in which distance to player ammo can be controlled during flight.

Using this on handheld launchers causes the missile to time-out after approximately 1.5km, loosing all control of the warhead, which causes the missile to spin around/take off in random directions (until it self-destructs - timeToLive), making higher values useless.

Using this on any vehicle mounted launchers (like the TOW, Hellfire or Maverick) allows the warhead to track and turn to follow it's target even if said target is behind the player's vehicle (and possibly AI-controlled ones too), which requires a high manueuvrability value on the missile.

That way, one can simply lock on, then pass the locked target and shoot a missile, which will follow the target even without direct line of sight.

Note that The missile follows the target regardless of obstacles, init-time or initspeed, meaning the missile might crash into the ground, especially at lower heights.

maxControlRange = 5000;

maxSpeed

Type
Float
Description
Declares the maximum speed (metres per second).
maxSpeed = 241;

model

Type
String
Description
Declares path to model.
model = "\ca\weapons\bullet[.p3d]"

min/mid/maxRange...

Description
These tokens are present in OFP only. They were badly classed in OFP, causing all weapons using this specific bullet to exhibit this behaviour rather than the behaviour of the rifle. As such they were transferred to Arma's cfgWeaponsClarify.

Above statement is not true; Even in Arma 2 and oa, these values still exist and affect the AI and only the AI in the following ways:

The tokens are found/put on each weapons "firing modes", or on the gun itself, if it has no separate firing modesClarify.
minRange
Type
Float
Description
Minimum engagement range for the AI.

Below given values, the AI will not engage but just "stare them down", even if they get shot at, and (most likely) killed.

Minrange = 5;
minRangeProbab
Type
Float
Description
Probability declaring how high the chance is that the AI will engage a target at minRange using this (current) firing mode.

Values are 0.0 to 1.0 where 1.0 equates to a 100% likelihood.

minRangeProbab = 0.02;
midRange
Type
Float
Description
Mid-Range engagement range for AI's using this (current) firing mode.
midRange = 150;
midRangeProbab
Type
Float
Description
Probability declaring how high the chance is that the AI will engage a target at midRange.

Values are 0.0 to 1.0 where 1.0 equates to a 100% likelihood.

midRangeProbab = 0.7;
maxRange
Type
Float
Description
Maximum range possible for the AI.

Although AI's may engage targets slightly beyond maxRange, this is how far the AI will try to shoot at targets. Targets definitely beyond maxRange are ignored.

maxRange = 500;
maxRangeProbab
Type
Float
Description
Probability declaring how high the chance is that the AI will engage a target at maxRange (or slightly below).

Values are 0.0 to 1.0 where 1.0 equates to a 100% likelihood.

maxRangeProbab = 0.51;

P

proxyShape

Type
String
Description
Declares the model of this weapon used in proxies on vehicles. Note that proxies can be used only with air units.
proxyShape = "\ca\air\sidewinder_proxy";

S

sideAirFriction

Type
Float
Description
Adjusts the drag of a projectile. Lower values decrease drag, higher values increase drag.

When used with guided projectiles, higher values make it easier for the projectile to turn, while lower values make it more difficult to turn.

sideAirFriction = 0.5;

simulation

Type
String
Description
Declares simulation type.

Also affects the behaviour the projectile causes to the shooter/object hit;

Changing "shotShell" to "shotBullet" makes a tank shell pass through more trees rather than being stopped by them, and also removes the recoil which usually affects the tank/vehicle the cannon is mounted to.
Changing "shotBullet" to "shotSpread" (OA only) causes the changed ammo to behave like it is buckshot (again, OA only).
Possible values
Refer to Models & Classnames: Simulation Types for a list of all supported simulation types.
simulation = "shotShell";

simulationStep

Type
Float

shadow

sound...[]

soundFly[]
soundEngine[]
soundHit[]

supersonicCrackNear[]

Type
Array
Description
Declares sound and volume of the supersonic crack (near the player). Supersonic crack will only occur if ammo is flying with supersonic speed.
supersonicCrackNear[] = {"\ca\Weapons\Data\Sound\supersonic_crack_close.wss", 1, 1};

supersonicCrackFar[]

Type
Array
Description
Declares sound and volume of the supersonic crack (far). Supersonic crack will only occur if ammo is flying with supersonic speed.
supersonicCrackFar[] = {"\ca\Weapons\Data\Sound\supersonic_crack_50meters.wss", 1, 1};

T

thrust

Type
Float
Description
Engine power for missiles and rockets.

thrustTime

Type
Float
Description
Engine burn time for missiles and rockets.
thrustTime = 0.200000;

timeToLive

Type
Integer
Description
Time before the ammo vanishes, used as optimization to avoid having to simulate stray bullets.

Note that this parameter has no effect in OFP where timeToLive is predefined by simulation.

timeToLive = 4;

tracerColor[]

Type
Array
Description
Declares tracer colour with "easy" settings (tracers enabled), format is {Red, Green, Blue, Transparency}.

tracerColorR[]

Type
Array
Description
Declares tracer colour with "realistic" settings (tracers disabled), format is {Red, Green, Blue, Transparency}.

trackLead

Type
Float
Description
The amount of leadClarify a guided weapon will use when tracking a target.

trackOversteer

Type
Float
Description
The factor at which a guided weapon will steer to meet trackLeadClarify.

triggerTime

Type
Float
Description
Used in illumination flares. The time in seconds before the projectile begins emitting light.

typicalSpeed

Type
Integer
Description
Hit value is valid when projectile moves at this speed. With lower speed, the hit caused by the ammo is lower as well.

V

visibleFire

Type
Float
Description
How much does AI see a unit firing this weapon.
visibleFire = 18;

visibleFireTime

Type
Integer
Description
How long is one shot assumed to be noticeable by the AI.

Values under 5 should be avoided, as AI can perform in cycles with 5s of no testing in between.

visibleFireTime = 18;

W

weaponLockSystem

Type
Integer or String
Description
For countermeasures, this defines the types of enemy countermeasures that it is effective against.

For weapons, declares the type of guidance system that the projectile uses (and if one is spoofed it can fall back on another). This can be either an integer by itself, or a string containing a mathematical expression, normally a sum of flags added together.

Flag Guidance Type
1 ???
2 Infra-red
4 Laser-Guided
8 Radar-Guided
16 ???
weaponLockSystem = 2; //infra-red guidance
weaponLockSystem = "2 + 8"; //infra-red and radar guided

whistleDist

Type
Integer
Description
The range at which the projectile is audible when moving through the air. Used for mortar shells and artillery shells. Unknown units.

whistleOnFire

Type
Integer
Description
If 1, the projectile should begin whistling immediately after launch.

Template:Cfg ref