CfgAmmo Config Reference: Difference between revisions
Sarogahtyp (talk | contribs) m (Changed description of "thrust" because it was misleading.) |
mNo edit summary |
||
(48 intermediate revisions by 12 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{ConfigPage|start}} | ||
==Introduction== | == Introduction == | ||
'''''cfgAmmo''''', '''''cfgMagazines''''', '''''cfgWeapons''''' and '''''cfgVehicles''''' are root classes defined in the engine's | '''''cfgAmmo''''', '''''cfgMagazines''''', '''''cfgWeapons''''' and '''''cfgVehicles''''' are root classes defined in the engine's {{hl|config.bin}}. | ||
These classes can be subsequently added to by addons. | These classes can be subsequently added to by addons. | ||
Line 11: | Line 11: | ||
'''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=== | === Modifications === | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
access = 1; | access = 1; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
#Ammunition classes can be added. | # Ammunition classes can be added. | ||
#Existing classes can (sometimes) be altered. | # Existing classes can (sometimes) be altered. | ||
The default ''class'' for ''cfgAmmo'' specifies | The default ''class'' for ''cfgAmmo'' specifies {{hl|c= 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 | To allow YOUR addon to subsequently modify YOUR ammunition (should you wish other addons to do so), you '''must''' change the {{hl|c= access=}} in YOUR ammunition. | ||
===CamShake=== | === CamShake === | ||
New to '' | New to ''{{GameCategory|arma3|link= y}}'' 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 shooter. | :'''CamShakeFire''' applies to anyone within the specified ''distance'' of the shooter. | ||
Line 37: | Line 37: | ||
Example: | Example: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
class myAmmo: BulletCore | class myAmmo : BulletCore | ||
{ | { | ||
class CamShakeFire | class CamShakeFire | ||
Line 62: | Line 62: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Alphabetical Order== | == Alphabetical Order == | ||
{{ | {{ConfigPage|abc}} | ||
===A=== | === A === | ||
====aiAmmoUsageFlags==== | {{ArgTitle|4|affectedByWind|{{GVI|arma3|2.04}}}} | ||
;Type: [[TokenNameValueTypes|Boolean]] | |||
;Description: For flares. Default {{hl|false}}. If set to {{hl|true}}, the flare will be carried away by the wind instead of falling down in a straight line. | |||
==== aiAmmoUsageFlags ==== | |||
;Type: [[TokenNameValueTypes|Integer]] | ;Type: [[TokenNameValueTypes|Integer]] | ||
;Description: Tells the AI how to use this Ammo. NOTE: Feature still WIP, some functions may not work yet or be removed later. See: | ;Description: Tells the AI how to use this Ammo. NOTE: Feature still WIP, some functions may not work yet or be removed later. See: {{Link|link= http://forums.bistudio.com/showthread.php?159711-Development-Branch-Captain-s-AI-Log&p=2945231&viewfull=1#post2945231|text= AI Devbranch}} | ||
{| class=" | {| class="wikitable" | ||
! Value !! Type | ! Value !! Type !! Description | ||
|- | |- | ||
| | | {{hl|0}} || None || ??? | ||
|- | |- | ||
| | | {{hl|1}} || Light || used for illumination | ||
|- | |- | ||
| | | {{hl|2}} || Marking || ??? | ||
|- | |- | ||
| | | {{hl|4}} || Concealment || used for smokes | ||
|- | |- | ||
| | | {{hl|8}} || CounterMeasures || ??? | ||
|- | |- | ||
| | | {{hl|16}} || Mine || ??? | ||
|- | |- | ||
| | | {{hl|32}} || Underwater || used in underwater environment | ||
|- | |- | ||
| | | {{hl|64}} || OffensiveInf || against infantry | ||
|- | |- | ||
| | | {{hl|128}} || OffensiveVeh || against vehicles | ||
|- | |- | ||
| | | {{hl|256}} || OffensiveAir || against air | ||
|- | |- | ||
| | | {{hl|512}} || OffensiveArmour || against armored vehicles | ||
|} | |} | ||
Multiple flags can be combined by adding the values together | Multiple flags can be combined by adding the values together | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
aiAmmoUsageFlags = 4; //for concealment only | aiAmmoUsageFlags = 4; //for concealment only | ||
aiAmmoUsageFlags = "64 + 128"; //against infantry and light vehicles | aiAmmoUsageFlags = "64 + 128"; //against infantry and light vehicles | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====airFriction==== | ==== airFriction ==== | ||
;Type:[[TokenNameValueTypes|Float]] | ;Type:[[TokenNameValueTypes|Float]] | ||
;Description: | ;Description: How much the air friction slows down the projectile (applies to the {{hl|Y}} component of [[velocityModelSpace|model-space velocity]]). Tiny negative values for bullets and bigger positive values for self-propelled missiles and rockets. | ||
:If the ammo class has artilleryLock = 1 set, the config value for airfriction gets ignored and airfriction=0 is assumed ingame. | |||
:airFriction is calculated differently for bullets and for missiles or rockets. | |||
:For bullets use this formula: | |||
:{{hl|c= f = a / v<sup>2</sup>}} | |||
:For self-propelled rockets and missiles use this one: | |||
:{{hl|c= f * -0.002 = a / v<sup>2</sup>}}{{Link|https://forums.bistudio.com/forums/topic/189449-solved-simulate-rocket-flight-airfriction-correction-thrust-in-cfgammo-is-equal-to-acceleration/?do{{=}}findComment&comment{{=}}3002852|link}} | |||
:f - airFriction | |||
:a - acceleration | |||
:v - velocity | |||
====airLock==== | ==== airLock ==== | ||
;Type: [[TokenNameValueTypes|Boolean]] | ;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. | ;Description: Declares if ammo can lock on air targets. Also makes ''AI'' to decide whether to engage air units with the particular ammo. | ||
====allowAgainstInfantry==== | ==== allowAgainstInfantry ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ;Type: [[TokenNameValueTypes|Integer]] | ||
;Description: Default | ;Description: Default {{hl|1}}. If {{hl|0}}, the ''AI'' will not (deliberately) employ this weapon against infantry targets. Used to override ''[[#cost|cost]]'' behaviour. | ||
====animated==== | ==== animated ==== | ||
====audibleFire==== | ==== audibleFire ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: How much can ''AI'' hear when given weapon is fired. | ;Description: How much can ''AI'' hear when given weapon is fired. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
audibleFire = 5.0; | audibleFire = 5.0; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====autoSeekTarget==== | ==== autoSeekTarget ==== | ||
;Description: Self-guided projectiles? Used in ''anti-tank'' artillery shells. | ;Description: Self-guided projectiles? Used in ''anti-tank'' artillery shells. | ||
===B=== | === B === | ||
====brightness==== | ==== brightness ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: The intensity of the light source. Used in ''illuminating flares''. | ;Description: The intensity of the light source. Used in ''illuminating flares''. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
brightness = 2; | brightness = 2; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===C=== | === C === | ||
====canLock==== | ==== caliber ==== | ||
;Type: [[TokenNameValueTypes|Float]] | |||
;Description: Acts as penetration multiplier for the projectile. | |||
;Penetration depth in mm: velocity[m/s] * caliber * penetrability / 1000. Penetrability is a material property (for RHA steel it is 15, for concrete 80, for meat 250). | |||
<syntaxhighlight lang="cpp"> | |||
caliber = 1.5; | |||
</syntaxhighlight> | |||
==== canLock ==== | |||
This config parameter does not exist for ''CfgAmmo'' in Arma 3 (only for ''CfgWeapons''). | This config parameter does not exist for ''CfgAmmo'' in Arma 3 (only for ''CfgWeapons''). | ||
;Type: [[TokenNameValueTypes|Integer]] | ;Type: [[TokenNameValueTypes|Integer]] | ||
;Description: Declares if ammo is able to lock (necessary for ''airLock'', ''irLock'' and ''laserLock''). | ;Description: Declares if ammo is able to lock (necessary for ''airLock'', ''irLock'' and ''laserLock''). | ||
;Possible values: | ;Possible values: {{hl|0}} = false, {{hl|1}} = cadet mode only, and {{hl|2}} = always. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
canLock = 0; | canLock = 0; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====cartridge==== | ==== cartridge ==== | ||
;Type: [[TokenNameValueTypes|String]] | ;Type: [[TokenNameValueTypes|String]] | ||
;Description: Declares the path to the cartridge ''P3D model'', which may be ejected on each shot. Like all model specifications, | ;Description: Declares the path to the cartridge ''P3D model'', which may be ejected on each shot. Like all model specifications, {{hl|.p3d}} is inferred. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
cartridge = "FxCartridge[.p3d]"; | cartridge = "FxCartridge[.p3d]"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====cmImmunity==== | ==== cmImmunity ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Specifies a missile's resistance to countermeasures (such as ''chaff'' and ''flares''). | ;Description: Specifies a missile's resistance to countermeasures (such as ''chaff'' and ''flares''). | ||
;Possible range: | ;Possible range: {{hl|0.0}} to {{hl|1.0}} | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
cmImmunity = 0.9; | cmImmunity = 0.9; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====coefGravity==== | ==== coefGravity ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Undocumented feature. Multiplier for gravity influence (0 = no gravity, 0.5 = half gravity). Unknown if it works for all simulation classes. | ;Description: Undocumented feature. Multiplier for gravity influence (0 = no gravity, 0.5 = half gravity). Unknown if it works for all simulation classes. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
coefGravity = 1.0; //default value | coefGravity = 1.0; //default value | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====cost==== | ==== cost ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ;Type: [[TokenNameValueTypes|Integer]] | ||
;Description: ''Cost-gain'' evaluation is performed to choose an appropriate weapon. | ;Description: ''Cost-gain'' evaluation is performed to choose an appropriate weapon. | ||
Line 178: | Line 199: | ||
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. | 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. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
cost = 5000; | cost = 5000; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====CraterEffects==== | ==== CraterEffects ==== | ||
;Type: [[TokenNameValueTypes|String]] | ;Type: [[TokenNameValueTypes|String]] | ||
;Description: Declares which crater effect to spawn on ''hit on ground''. | ;Description: Declares which crater effect to spawn on ''hit on ground''. | ||
;Possible values: | ;Possible values: {{hl|BombCrater}}, {{hl|ExploAmmoCrater}}, {{hl|GrenadeCrater}}, {{hl|ImpactEffectsBig}}, {{hl|MissileCrater}}, and {{hl|ShellCrater}}. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
CraterEffects = "ExploAmmoCrater"; | CraterEffects = "ExploAmmoCrater"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===D=== | === D === | ||
====dangerRadiusBulletClose==== | ==== dangerRadiusBulletClose ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ;Type: [[TokenNameValueTypes|Integer]] | ||
;Description: Defines how far in meters the AI gets alerted by the bullet's pass. Default value -1 disables the detection. (works only for bullets, no other projectiles). | ;Description: Defines how far in meters the AI gets alerted by the bullet's pass. Default value -1 disables the detection. (works only for bullets, no other projectiles). | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
deflecting = -1; | deflecting = -1; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====dangerRadiusHit==== | ==== dangerRadiusHit ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ;Type: [[TokenNameValueTypes|Integer]] | ||
;Description: Defines how far in meters the AI gets alerted by the projectile's impact or explosion. Default value -1 makes this distance be automatically derived from the hit and indirectHit properties (hit * 0.5 + indirectHit * indirectHitRange * 0.5 - but there's also an energy factor). | ;Description: Defines how far in meters the AI gets alerted by the projectile's impact or explosion. Default value -1 makes this distance be automatically derived from the hit and indirectHit properties (hit * 0.5 + indirectHit * indirectHitRange * 0.5 - but there's also an energy factor). | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
deflecting = -1; | deflecting = -1; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====deflecting==== | ==== deflecting ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Declares if ammo is deflecting and thus | ;Description: Declares if ammo is deflecting and thus its deflection angle. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
deflecting = 10; | deflecting = 10; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====deflectionSlowDown==== | ==== deflectionSlowDown ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Modifier applied to projectile velocity after a deflection occurred. | ;Description: Modifier applied to projectile velocity after a deflection occurred. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
deflectionSlowDown=1.0; | deflectionSlowDown=1.0; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | ==== deflectionDirDistribution ==== | ||
;Type: [[TokenNameValueTypes|Float]] | |||
;Description: Parameter for deflection direction randomization | |||
== | <syntaxhighlight lang="cpp"> | ||
deflectionDirDistribution=0.5; | |||
</syntaxhighlight> | |||
====explosionEffects==== | === E === | ||
==== effectsFire ==== | |||
==== effectsMissile ==== | |||
==== effectsSmoke ==== | |||
==== explosionEffects ==== | |||
;Type: [[TokenNameValueTypes|String]] | ;Type: [[TokenNameValueTypes|String]] | ||
;Description: Declares which explosion effect to spawn on ''hit''. | ;Description: Declares which explosion effect to spawn on ''hit''. | ||
;Possible values: | ;Possible values: {{hl|BombExplosion}}, {{hl|ExploAmmoExplosion}}, {{hl|ExplosionEffects}}, and {{hl|GrenadeExplosion}}. | ||
====explosionTime==== | ==== explosionTime ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ;Type: [[TokenNameValueTypes|Integer]] | ||
;Description: Declares after how many seconds ammo will explode (''e.g.'' used on ''timed hand grenades''). | ;Description: Declares after how many seconds ammo will explode (''e.g.'' used on ''timed hand grenades''). If set to -1, grenade will act as impact grenade. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
explosionTime = 5; | explosionTime = 5; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====explosive==== | ==== explosive ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[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. | ;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. | ||
: | :{{hl|1}} means fully explosive, {{hl|0}} means fully kinetic. | ||
===F=== | === F === | ||
====fuseDistance==== | ==== flareAirFriction ==== | ||
;Type: [[TokenNameValueTypes|Float]] | |||
;Description: Controls the descent rate of flares as though they are suspended by parachute. Default {{hl|-0.5}}. | |||
<syntaxhighlight lang="cpp"> | |||
flareAirFriction = 0; // Flare in free fall. | |||
</syntaxhighlight> | |||
==== fuseDistance ==== | |||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: The ''minimum'' distance any ''explosive projectile'' has to travel, before it becomes ''armed'' and thus explodes on impact. | ;Description: The ''minimum'' distance any ''explosive projectile'' has to travel, before it becomes ''armed'' and thus explodes on impact. | ||
Line 256: | Line 293: | ||
Missiles hitting short of the given range still visually explode, causing no damage or shockwave effects. | 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 | Grenades will stick into the ground for ''x'' amount of time and then disappear causing no damage, or (in case {{hl|c= ''explosionTime=''}} is set) explode after ''x'' seconds, causing damage. | ||
===H=== | === H === | ||
====hit==== | ==== hit ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Damage on hit. In OFP total damage is calculated as: | ;Description: Damage on hit. In OFP total damage is calculated as: {{hl|c= ''Total damage'' = ''Hit damage'' - ''Indirect damage''}} (while hit value is larger than ''indirectHit''). Note that in Arma 3 damage calculation is different. For bullets with caliber=0 the standard damage is dealt. For bullets with caliber > 0 only a fraction of the "hit" value is dealt when the bullet completely penetrates the firegeometry. The damage behaviour in this case is nonlinear (depending on firegeometry thickness) and currently not possible to predict. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
hit = 8; | hit = 8; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====HitEffects==== | ==== HitEffects ==== | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
class HitEffects | class HitEffects | ||
{ | { | ||
Line 276: | Line 313: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====hit...[]==== | ==== hit...[] ==== | ||
;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. | ;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: | All array values are defaulted to: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
hitBuilding[] = {"soundHit", 1}; | hitBuilding[] = {"soundHit", 1}; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 287: | Line 324: | ||
Example: | Example: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
hitGroundSoft[] = { | hitGroundSoft[] = { | ||
"soundGroundSoft1", 0.2, | "soundGroundSoft1", 0.2, | ||
Line 300: | Line 337: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=====hitArmor[]===== | ===== hitArmor[] ===== | ||
=====hitBuilding[]===== | ===== hitBuilding[] ===== | ||
=====hitConcrete[]===== | ===== hitConcrete[] ===== | ||
=====hitDefault[]===== | ===== hitDefault[] ===== | ||
=====hitFoliage[]===== | ===== hitFoliage[] ===== | ||
=====hitGlass[]===== | ===== hitGlass[] ===== | ||
=====hitGlassArmored[]===== | ===== hitGlassArmored[] ===== | ||
=====hitGround[]===== | ===== hitGround[] ===== | ||
;Description: OFP (only) | ;Description: OFP (only) | ||
=====hitGroundHard[]===== | ===== hitGroundHard[] ===== | ||
=====hitGroundSoft[]===== | ===== hitGroundSoft[] ===== | ||
=====hitIron[]===== | ===== hitIron[] ===== | ||
=====hitMan[]===== | ===== hitMan[] ===== | ||
=====hitMetal[]===== | ===== hitMetal[] ===== | ||
=====hitMetalplate[]===== | ===== hitMetalplate[] ===== | ||
=====hitPlastic[]===== | ===== hitPlastic[] ===== | ||
=====hitRubber[]===== | ===== hitRubber[] ===== | ||
===== | ===== hitWater[] ===== | ||
===I=== | ===== hitWood[] ===== | ||
====indirectHit==== | |||
=== I === | |||
==== indirectHit ==== | |||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Damage in ''indirectHitRange''. | ;Description: Damage in ''indirectHitRange''. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
indirectHit = 8; | indirectHit = 8; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====indirectHitRange==== | ==== indirectHitRange ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Radius in metres where ''indirectHit'' damage is caused. See [[Arma_3_Damage_Description#IndirectHit|Arma 3 Damage Description]] fore detailed description. | ;Description: Radius in metres where ''indirectHit'' damage is caused. See [[Arma_3_Damage_Description#IndirectHit|Arma 3 Damage Description]] fore detailed description. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
indirectHitRange = 75; | indirectHitRange = 75; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====initTime==== | ==== initTime ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: How long (in seconds) the projectile waits before starting it | ;Description: How long (in seconds) the projectile waits before starting it is ''motor''. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
initTime = 0.2; | initTime = 0.2; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====irLock==== | ==== irLock ==== | ||
;Type: [[TokenNameValueTypes|Boolean]] | ;Type: [[TokenNameValueTypes|Boolean]] | ||
;Description: Declares if ammo can lock on ''IR-targets''. | ;Description: Declares if ammo can lock on ''IR-targets''. | ||
===L=== | === L === | ||
====laserLock==== | ==== laserLock ==== | ||
;Type: [[TokenNameValueTypes|Boolean]] | ;Type: [[TokenNameValueTypes|Boolean]] | ||
;Description: Declares if ammo can lock on ''laser designator''. | ;Description: Declares if ammo can lock on ''laser designator''. | ||
====lightColor[]==== | ==== lightColor[] ==== | ||
;Type: [[TokenNameValueTypes|Array]] | ;Type: [[TokenNameValueTypes|Array]] | ||
;Description: Declares color of light (''e.g.'' on ''flares''). | ;Description: Declares color of light (''e.g.'' on ''flares''). | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
lightColor[] = {1, 1, 1, 0}; | lightColor[] = {1, 1, 1, 0}; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===M=== | === M === | ||
====maneuvrability==== | ==== maneuvrability ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Declares maneuvrability of guided missiles. | ;Description: Declares maneuvrability of guided missiles. | ||
Higher values than | Higher values than {{hl|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 | Tweaking ''sideAirFriction'' and ''simulationStep'' makes the missile track and hit it is 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 is target. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
manueuvrability = 30; | manueuvrability = 30; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====manualControl==== | ==== manualControl ==== | ||
;Type: [[TokenNameValueTypes|Boolean]] | ;Type: [[TokenNameValueTypes|Boolean]] | ||
;Description: If | ;Description: If {{hl|1}}, causes the projectile to be guided towards the firer's crosshairs. | ||
See: | See: {{Link|https://en.wikipedia.org/wiki/SACLOS|SACLOS guidance behaviour}}, such as for ''TOW'' missiles. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
manualControl = 0; | manualControl = 0; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====maxControlRange==== | ==== maxControlRange ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Declares in which distance to player ammo can be controlled during flight. | ;Description: Declares in which distance to player ammo can be controlled during flight. | ||
Line 406: | Line 445: | ||
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 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 | Using this on any ''vehicle mounted launchers'' (like the ''TOW'', ''Hellfire'' or ''Maverick'') allows the warhead to track '''and''' turn to follow it is 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. | 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. | ||
Line 412: | Line 451: | ||
'''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. | '''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. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
maxControlRange = 5000; | maxControlRange = 5000; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====maxSpeed==== | ==== maxSpeed ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Declares the maximum speed (metres per second). | ;Description: Declares the maximum speed (metres per second). | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
maxSpeed = 241; | maxSpeed = 241; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====model==== | ==== model ==== | ||
;Type: [[TokenNameValueTypes|String]] | ;Type: [[TokenNameValueTypes|String]] | ||
;Description: Declares path to model. For simulation="shotShell" the model gets displayed, but only up to a limit of somewhere between 390 and 450 m/s initspeed. Unknown if other simulationclasses behave different. The model does not get displayed when tracers are created [via the cfgmagazine token tracersevery=<number>; ]. Models for tracers get hardcode-deformed and scaled based on speed and ammo hit strength. | ;Description: Declares path to model. For simulation="shotShell" the model gets displayed, but only up to a limit of somewhere between 390 and 450 m/s initspeed. Unknown if other simulationclasses behave different. The model does not get displayed when tracers are created [via the cfgmagazine token tracersevery=<number>; ]. Models for tracers get hardcode-deformed and scaled based on speed and ammo hit strength. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
model = "\ca\weapons\bullet[.p3d]" | model = "\ca\weapons\bullet[.p3d]" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====min/mid/maxRange...==== | ==== 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}}. | ;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}}. | ||
'''Above statement is not true'''; Even in {{Name|arma2|short}} and {{Name| | '''Above statement is not true'''; Even in {{Name|arma2|short}} and {{Name|arma2oa|short}}, 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 modes{{Clarify}}. | :The tokens are found/put on each weapons "''firing modes''", or on the gun itself, if it has no separate firing modes{{Clarify}}. | ||
=====minRange===== | ===== mineTrigger ===== | ||
;Type: [[TokenNameValueTypes|String]] | |||
;Description: is a in [[CfgMineTriggers_Config_Reference|CfgMineTriggers]] defined class | |||
===== minRange ===== | |||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: ''Minimum'' engagement range for the ''AI''. | ;Description: ''Minimum'' engagement range for the ''AI''. | ||
Line 444: | Line 487: | ||
Below given values, the ''AI'' '''will not''' engage but just "''stare them down''", even if they get shot at, and (most likely) killed. | Below given values, the ''AI'' '''will not''' engage but just "''stare them down''", even if they get shot at, and (most likely) killed. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
Minrange = 5; | Minrange = 5; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=====minRangeProbab===== | ===== minRangeProbab ===== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: ''Probability'' declaring how '''''high''''' the chance is that the ''AI'' will engage a target at ''minRange'' using ''this (current)'' firing mode. | ;Description: ''Probability'' declaring how '''''high''''' the chance is that the ''AI'' will engage a target at ''minRange'' using ''this (current)'' firing mode. | ||
Values are | Values are {{hl|0.0}} to {{hl|1.0}} where {{hl|1.0}} equates to a ''100% likelihood''. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
minRangeProbab = 0.02; | minRangeProbab = 0.02; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=====midRange===== | ===== midRange ===== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: ''Mid-Range'' engagement range for ''AI'''s using ''this (current)'' firing mode. | ;Description: ''Mid-Range'' engagement range for ''AI'''s using ''this (current)'' firing mode. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
midRange = 150; | midRange = 150; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=====midRangeProbab===== | ===== midRangeProbab ===== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: ''Probability'' declaring how '''''high''''' the chance is that the ''AI'' will engage a target at ''midRange''. | ;Description: ''Probability'' declaring how '''''high''''' the chance is that the ''AI'' will engage a target at ''midRange''. | ||
Values are | Values are {{hl|0.0}} to {{hl|1.0}} where {{hl|1.0}} equates to a ''100% likelihood''. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
midRangeProbab = 0.7; | midRangeProbab = 0.7; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=====maxRange===== | ===== maxRange ===== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: ''Maximum'' range possible for the ''AI''. | ;Description: ''Maximum'' range possible for the ''AI''. | ||
Line 482: | Line 525: | ||
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. | 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. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
maxRange = 500; | maxRange = 500; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=====maxRangeProbab===== | ===== maxRangeProbab ===== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: ''Probability'' declaring how '''''high''''' the chance is that the ''AI'' will engage a target at ''maxRange'' (or slightly below). | ;Description: ''Probability'' declaring how '''''high''''' the chance is that the ''AI'' will engage a target at ''maxRange'' (or slightly below). | ||
Values are | Values are {{hl|0.0}} to {{hl|1.0}} where {{hl|1.0}} equates to a ''100% likelihood''. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
maxRangeProbab = 0.51; | maxRangeProbab = 0.51; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===P=== | === P === | ||
====proxyShape==== | ==== proxyShape ==== | ||
;Type: [[TokenNameValueTypes|String]] | ;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. | ;Description: Declares the model of ''this weapon'' used in ''proxies'' on ''vehicles''. Note that ''proxies'' can be used '''only''' with air units. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
proxyShape = "\ca\air\sidewinder_proxy"; | proxyShape = "\ca\air\sidewinder_proxy"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===S=== | ==== penetrationDirDistribution ==== | ||
====sideAirFriction==== | ;Type: [[TokenNameValueTypes|String]] | ||
;Description: Parameter for penetration direction randomization | |||
<syntaxhighlight lang="cpp"> | |||
penetrationDirDistribution = 0.25; | |||
</syntaxhighlight> | |||
=== S === | |||
==== shootDistraction ==== | |||
;Type: [[TokenNameValueTypes|Float]] | |||
;Description: below 0 means it decreases dynamic error (DCE) which each shot, above 0 increases DCE which each shot, if the parameter is -1, the value will be calculated as 0.01 * (audibleFire^2 + visibleFire^2) | |||
<syntaxhighlight lang="cpp"> | |||
shootDistraction = 1.0; | |||
</syntaxhighlight> | |||
==== sideAirFriction ==== | |||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Adjusts the drag of a projectile. Lower values decrease drag, higher values increase drag. | ;Description: Adjusts the drag of a projectile (applies to the {{hl|X}} and {{hl|Z}} components of [[velocityModelSpace|model-space velocity]]). 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. | 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 lang=" | <syntaxhighlight lang="cpp"> | ||
sideAirFriction = 0.5; | sideAirFriction = 0.5; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====simulation==== | ==== simulation ==== | ||
;Type: [[TokenNameValueTypes|String]] | ;Type: [[TokenNameValueTypes|String]] | ||
;Description: Declares simulation type. | ;Description: Declares simulation type. | ||
Line 526: | Line 585: | ||
;Possible values: Refer to ''[[Models & Classnames: Simulation Types]]'' for a list of all supported simulation types. | ;Possible values: Refer to ''[[Models & Classnames: Simulation Types]]'' for a list of all supported simulation types. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
simulation = "shotShell"; | simulation = "shotShell"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====simulationStep==== | ==== simulationStep ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
====shadow==== | ==== shadow ==== | ||
====sound...[]==== | ==== sound...[] ==== | ||
=====soundFly[]===== | ===== soundFly[] ===== | ||
Especially cool for missiles - sound that the projectile makes while it | Especially cool for missiles - sound that the projectile makes while it is in flight | ||
=====soundEngine[]===== | ===== soundEngine[] ===== | ||
Sound gets played while the rocket engine is running | Sound gets played while the rocket engine is running | ||
=====soundHit[]===== | ===== soundHit[] ===== | ||
====supersonicCrackNear[]==== | ==== supersonicCrackNear[] ==== | ||
;Type: [[TokenNameValueTypes|Array]] | ;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. | ;Description: Declares sound and volume of the ''supersonic crack'' ('''near the player'''). Supersonic crack will only occur if ammo is flying with supersonic speed. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
supersonicCrackNear[] = {"\ca\Weapons\Data\Sound\supersonic_crack_close.wss", 1, 1}; | supersonicCrackNear[] = {"\ca\Weapons\Data\Sound\supersonic_crack_close.wss", 1, 1}; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====supersonicCrackFar[]==== | ==== supersonicCrackFar[] ==== | ||
;Type: [[TokenNameValueTypes|Array]] | ;Type: [[TokenNameValueTypes|Array]] | ||
;Description: Declares sound and volume of the supersonic crack ('''far'''). Supersonic crack will only occur if ammo is flying with supersonic speed. | ;Description: Declares sound and volume of the supersonic crack ('''far'''). Supersonic crack will only occur if ammo is flying with supersonic speed. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
supersonicCrackFar[] = {"\ca\Weapons\Data\Sound\supersonic_crack_50meters.wss", 1, 1}; | supersonicCrackFar[] = {"\ca\Weapons\Data\Sound\supersonic_crack_50meters.wss", 1, 1}; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====suppressionRadiusBulletClose==== | ==== suppressionRadiusBulletClose ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ;Type: [[TokenNameValueTypes|Integer]] | ||
;Description: Defines the max. distance in meters at which the AI becomes suppressed by the bullet's pass. Default value -1 disables the suppressive effect (works only for bullets, no other projectiles). | ;Description: Defines the max. distance in meters at which the AI becomes suppressed by the bullet's pass. Default value -1 disables the suppressive effect (works only for bullets, no other projectiles). | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
suppressionRadiusBulletClose = -1; | suppressionRadiusBulletClose = -1; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====suppressionRadiusHit==== | ==== suppressionRadiusHit ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ;Type: [[TokenNameValueTypes|Integer]] | ||
;Description: Defines the max. distance in meters at which the AI becomes suppressed by the projectile's impact or explosion. Default value -1 disables the suppressive effect. | ;Description: Defines the max. distance in meters at which the AI becomes suppressed by the projectile's impact or explosion. Default value -1 disables the suppressive effect. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
suppressionRadiusHit = -1; | suppressionRadiusHit = -1; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===T=== | === T === | ||
====thrust==== | ==== thrust ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Engine power for ''missiles'' and ''rockets''. Thrust is acceleration in m/s². | ;Description: Engine power for ''missiles'' and ''rockets''. Thrust is acceleration in m/s². Thrust is at 100% for the first 75% of thrustTime. Then it linearly drops.</br> | ||
In other words: {{hl|thrust * (1 min (remainingThrustTime * 4 / thrustTime))}}, where {{hl|remainingThrustTime}} is initially the same as {{hl|thrustTime}} but it keeps decreasing with simulation (once it reaches zero, the projectile enters free flight mode) | |||
{{Link|https://forums.bistudio.com/forums/topic/189449-solved-simulate-rocket-flight-airfriction-correction-thrust-in-cfgammo-is-equal-to-acceleration/?do{{=}}findComment&comment{{=}}3001914|link}} | |||
====thrustTime==== | ==== thrustTime ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Engine burn time for ''missiles'' and ''rockets''. | ;Description: Engine burn time for ''missiles'' and ''rockets''. See [[#thrust|thrust]]. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
thrustTime = 0.200000; | thrustTime = 0.200000; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====timeToLive==== | ==== timeToLive ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ;Type: [[TokenNameValueTypes|Integer]] | ||
;Description: Time before the ammo ''vanishes'', used as optimization to avoid having to simulate stray bullets. | ;Description: Time before the ammo ''vanishes'', used as optimization to avoid having to simulate stray bullets. | ||
Line 594: | Line 655: | ||
'''Note''' that this parameter has no effect in OFP where ''timeToLive'' is predefined by simulation. | '''Note''' that this parameter has no effect in OFP where ''timeToLive'' is predefined by simulation. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
timeToLive = 4; | timeToLive = 4; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====tracerColor[]==== | ==== tracerColor[] ==== | ||
;Type: [[TokenNameValueTypes|Array]] | ;Type: [[TokenNameValueTypes|Array]] | ||
;Description: Declares ''tracer colour'' with "''easy''" settings (tracers enabled), format is | ;Description: Declares ''tracer colour'' with "''easy''" settings (tracers enabled), format is {{hl|{Red, Green, Blue, Transparency}}}. | ||
====tracerColorR[]==== | ==== tracerColorR[] ==== | ||
;Type: [[TokenNameValueTypes|Array]] | ;Type: [[TokenNameValueTypes|Array]] | ||
;Description: Declares ''tracer colour'' with "''realistic''" settings (tracers disabled), format is | ;Description: Declares ''tracer colour'' with "''realistic''" settings (tracers disabled), format is {{hl|{Red, Green, Blue, Transparency}}}. | ||
====trackLead==== | ==== trackLead ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: The amount of ''lead''{{Clarify}} a guided weapon will use when tracking a target. | ;Description: The amount of ''lead''{{Clarify}} a guided weapon will use when tracking a target. | ||
====trackOversteer==== | ==== trackOversteer ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: The factor at which a guided weapon will ''steer'' to meet ''trackLead''{{Clarify}}. | ;Description: The factor at which a guided weapon will ''steer'' to meet ''trackLead''{{Clarify}}. | ||
====triggerTime==== | ==== triggerTime ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: Used in ''illumination flares''. The time in seconds before the projectile ''begins emitting'' light. | ;Description: Used in ''illumination flares''. The time in seconds before the projectile ''begins emitting'' light. | ||
====typicalSpeed==== | ==== typicalSpeed ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ;Type: [[TokenNameValueTypes|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. | ;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=== | === V === | ||
====visibleFire==== | ==== visibleFire ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ;Type: [[TokenNameValueTypes|Float]] | ||
;Description: How much does ''AI'' see a unit firing this weapon. | ;Description: How much does ''AI'' see a unit firing this weapon. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
visibleFire = 18; | visibleFire = 18; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====visibleFireTime==== | ==== visibleFireTime ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ;Type: [[TokenNameValueTypes|Integer]] | ||
;Description: How long is one shot assumed to be noticeable by the ''AI''. | ;Description: How long is one shot assumed to be noticeable by the ''AI''. | ||
Values under | Values under {{hl|5}} should be avoided, as ''AI'' can perform in cycles with 5s of no testing in between. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
visibleFireTime = 18; | visibleFireTime = 18; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===W=== | === W === | ||
====weaponLockSystem==== | ==== weaponLockSystem ==== | ||
;Type: [[TokenNameValueTypes|Integer]] or [[TokenNameValueTypes|String]] | ;Type: [[TokenNameValueTypes|Integer]] or [[TokenNameValueTypes|String]] | ||
;Description: For ''countermeasures'', this defines the types of enemy countermeasures that it is effective against. | ;Description: For ''countermeasures'', this defines the types of enemy countermeasures that it is effective against. | ||
Line 648: | Line 709: | ||
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''. | 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''. | ||
{| class=" | {| class="wikitable" | ||
! Flag !! Guidance Type | ! Flag !! Guidance Type | ||
|- | |- | ||
| | | {{hl|0}} || Undetectable | ||
|- | |||
| {{hl|1}} || Visual/Contrast | |||
|- | |- | ||
| | | {{hl|2}} || Infra-red | ||
|- | |- | ||
| | | {{hl|4}} || Laser-Guided | ||
|- | |- | ||
| | | {{hl|8}} || Radar-Guided | ||
|- | |- | ||
| | | {{hl|16}} || Missile | ||
|} | |} | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
weaponLockSystem = 2; //infra-red guidance | weaponLockSystem = 2; //infra-red guidance | ||
weaponLockSystem = "2 + 8"; //infra-red and radar guided | weaponLockSystem = "2 + 8"; //infra-red and radar guided | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====weaponType==== | ==== weaponType ==== | ||
;Type: [[TokenNameValueTypes|String]] | ;Type: [[TokenNameValueTypes|String]] | ||
Overrides the engine determination of weapon type based on ammo simulation, for vehicle weapon grouping. | Overrides the engine determination of weapon type based on ammo simulation, for vehicle weapon grouping. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
weaponType = "cannon"; | weaponType = "cannon"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 685: | Line 748: | ||
"special"</pre> | "special"</pre> | ||
====whistleDist==== | ==== whistleDist ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ;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. | ;Description: The range at which ''the projectile'' is audible when moving through the air. Used for ''mortar shells'' and ''artillery shells''. Unknown units. | ||
====whistleOnFire==== | ==== whistleOnFire ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ;Type: [[TokenNameValueTypes|Integer]] | ||
;Description: If | ;Description: If {{hl|1}}, ''the projectile'' should begin ''whistling'' immediately after launch. | ||
{{ | {{ConfigPage|end}} | ||
{{GameCategory|ofp|Editing}} | |||
{{GameCategory|arma1|Addon Configuration}} | |||
{{GameCategory|ofp|Reference Lists}} |
Latest revision as of 18:21, 13 November 2024
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;
- Ammunition classes can be added.
- 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 shooter.
- CamShakePlayerFire applies to the shooter 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
A
affectedByWind
- Type
- Boolean
- Description
- For flares. Default false. If set to true, the flare will be carried away by the wind instead of falling down in a straight line.
aiAmmoUsageFlags
- Type
- Integer
- Description
- Tells the AI how to use this Ammo. NOTE: Feature still WIP, some functions may not work yet or be removed later. See: AI Devbranch
Value | Type | Description |
---|---|---|
0 | None | ??? |
1 | Light | used for illumination |
2 | Marking | ??? |
4 | Concealment | used for smokes |
8 | CounterMeasures | ??? |
16 | Mine | ??? |
32 | Underwater | used in underwater environment |
64 | OffensiveInf | against infantry |
128 | OffensiveVeh | against vehicles |
256 | OffensiveAir | against air |
512 | OffensiveArmour | against armored vehicles |
Multiple flags can be combined by adding the values together
aiAmmoUsageFlags = 4; //for concealment only
aiAmmoUsageFlags = "64 + 128"; //against infantry and light vehicles
airFriction
- Type
- Float
- Description
- How much the air friction slows down the projectile (applies to the Y component of model-space velocity). Tiny negative values for bullets and bigger positive values for self-propelled missiles and rockets.
- If the ammo class has artilleryLock = 1 set, the config value for airfriction gets ignored and airfriction=0 is assumed ingame.
- airFriction is calculated differently for bullets and for missiles or rockets.
- For bullets use this formula:
- f = a
/ v2 - For self-propelled rockets and missiles use this one:
- f * -0.002 = a
/ v2link - f - airFriction
- a - acceleration
- v - velocity
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
caliber
- Type
- Float
- Description
- Acts as penetration multiplier for the projectile.
- Penetration depth in mm
- velocity[m/s] * caliber * penetrability / 1000. Penetrability is a material property (for RHA steel it is 15, for concrete 80, for meat 250).
caliber = 1.5;
canLock
This config parameter does not exist for CfgAmmo in Arma 3 (only for CfgWeapons).
- 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]";
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;
coefGravity
- Type
- Float
- Description
- Undocumented feature. Multiplier for gravity influence (0 = no gravity, 0.5 = half gravity). Unknown if it works for all simulation classes.
coefGravity = 1.0; //default value
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;
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
dangerRadiusBulletClose
- Type
- Integer
- Description
- Defines how far in meters the AI gets alerted by the bullet's pass. Default value -1 disables the detection. (works only for bullets, no other projectiles).
deflecting = -1;
dangerRadiusHit
- Type
- Integer
- Description
- Defines how far in meters the AI gets alerted by the projectile's impact or explosion. Default value -1 makes this distance be automatically derived from the hit and indirectHit properties (hit * 0.5 + indirectHit * indirectHitRange * 0.5 - but there's also an energy factor).
deflecting = -1;
deflecting
- Type
- Float
- Description
- Declares if ammo is deflecting and thus its deflection angle.
deflecting = 10;
deflectionSlowDown
- Type
- Float
- Description
- Modifier applied to projectile velocity after a deflection occurred.
deflectionSlowDown=1.0;
deflectionDirDistribution
- Type
- Float
- Description
- Parameter for deflection direction randomization
deflectionDirDistribution=0.5;
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). If set to -1, grenade will act as impact grenade.
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
flareAirFriction
- Type
- Float
- Description
- Controls the descent rate of flares as though they are suspended by parachute. Default -0.5.
flareAirFriction = 0; // Flare in free fall.
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). Note that in Arma 3 damage calculation is different. For bullets with caliber=0 the standard damage is dealt. For bullets with caliber > 0 only a fraction of the "hit" value is dealt when the bullet completely penetrates the firegeometry. The damage behaviour in this case is nonlinear (depending on firegeometry thickness) and currently not possible to predict.
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[]
hitWater[]
hitWood[]
I
indirectHit
- Type
- Float
- Description
- Damage in indirectHitRange.
indirectHit = 8;
indirectHitRange
- Type
- Float
- Description
- Radius in metres where indirectHit damage is caused. See Arma 3 Damage Description fore detailed description.
indirectHitRange = 75;
initTime
- Type
- Float
- Description
- How long (in seconds) the projectile waits before starting it is 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 is 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 is 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 is 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. For simulation="shotShell" the model gets displayed, but only up to a limit of somewhere between 390 and 450 m/s initspeed. Unknown if other simulationclasses behave different. The model does not get displayed when tracers are created [via the cfgmagazine token tracersevery=<number>; ]. Models for tracers get hardcode-deformed and scaled based on speed and ammo hit strength.
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 Arma 2: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.
mineTrigger
- Type
- String
- Description
- is a in CfgMineTriggers defined class
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";
penetrationDirDistribution
- Type
- String
- Description
- Parameter for penetration direction randomization
penetrationDirDistribution = 0.25;
S
shootDistraction
- Type
- Float
- Description
- below 0 means it decreases dynamic error (DCE) which each shot, above 0 increases DCE which each shot, if the parameter is -1, the value will be calculated as 0.01 * (audibleFire^2 + visibleFire^2)
shootDistraction = 1.0;
sideAirFriction
- Type
- Float
- Description
- Adjusts the drag of a projectile (applies to the X and Z components of model-space velocity). 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[]
Especially cool for missiles - sound that the projectile makes while it is in flight
soundEngine[]
Sound gets played while the rocket engine is running
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};
suppressionRadiusBulletClose
- Type
- Integer
- Description
- Defines the max. distance in meters at which the AI becomes suppressed by the bullet's pass. Default value -1 disables the suppressive effect (works only for bullets, no other projectiles).
suppressionRadiusBulletClose = -1;
suppressionRadiusHit
- Type
- Integer
- Description
- Defines the max. distance in meters at which the AI becomes suppressed by the projectile's impact or explosion. Default value -1 disables the suppressive effect.
suppressionRadiusHit = -1;
T
thrust
- Type
- Float
- Description
- Engine power for missiles and rockets. Thrust is acceleration in m/s². Thrust is at 100% for the first 75% of thrustTime. Then it linearly drops.
In other words: thrust * (1 min (remainingThrustTime * 4
thrustTime
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
trackOversteer
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 |
---|---|
0 | Undetectable |
1 | Visual/Contrast |
2 | Infra-red |
4 | Laser-Guided |
8 | Radar-Guided |
16 | Missile |
weaponLockSystem = 2; //infra-red guidance
weaponLockSystem = "2 + 8"; //infra-red and radar guided
weaponType
- Type
- String
Overrides the engine determination of weapon type based on ammo simulation, for vehicle weapon grouping.
weaponType = "cannon";
Definitions:
"cannon" "mGun" "rocket" "missileAA" "missileAT" "missileAAAT" "bomb" "special"
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.