CfgWeapons Config Reference: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Converted table layout to a sections by alphabet layout like the CfgAmmo ref page.)
(Many layout, spelling, punctuation, grammar, sense etc. fixes + wrapped in matching (Cfg* Config Reference) packaging > two more to go)
Line 1: Line 1:
{{Stub}}
{{Cfg ref|start}}


=Introduction=


CfgAmmo, cfgMagazines, cfgWeapons and cfgVehicles are root classes defined in the engine's config.bin.
==Introduction==
'''cfgAmmo''', '''cfgMagazines''', '''cfgWeapons''' and '''cfgVehicles''' are root classes defined in the engine's <tt>config.bin</tt>.


These classes can be subsequently added to by addons inherit in the game or provided by oem.  
These classes can be subsequently added to by addons inherit in the game or provided by ''oem''.  


CfgAmmo defines the missile 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. The same ammunition can be, and generally is, used by multiple magazines. The same magazine, can be, and generally is, used by multiple weapons. And so on.
''cfgAmmo'' defines the missile 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''.


cfgWepaons define the rifle (eg) characteristics. What muzzles it has, how many 'modes' (if any) it can use. What magazines are selectable.
The same ammunition can be, and generally is, used by multiple magazines. The same magazine, can be, and generally is, used by multiple weapons. And so on.


''cfgWepaons'' define the rifle ''e.g.'' characteristics. What muzzles it has, how many 'modes' (if any) it can use. What magazines are selectable.


==Arma Enhancement==


Arma introduced a new root class, cfgMagazines.
===Arma Enhancement===
{{Name|arma|short}} introduced a new root class, ''cfgMagazines''.


In contrast, OFP uses a rather tedious construct in it's cfgWeapons class to distinguish between weapon and magazine parameters.
In contrast, {{Name|ofp|short}} uses a rather tedious construct in it's ''cfgWeapons'' class to distinguish between weapon and magazine parameters.


The major alterations here are:
The major alterations here are:
{| class="bikitable"
|-
! {{Name|ofp|short}}              !! {{Name|arma|short}}
|-
| <tt>ammo=</tt>                  || moved to ''cfgMagazines''
|-
| <tt>cost=</tt>                  || moved to ''cfgMagazines''
|-
| <tt>displayNameMagazine=</tt>    || moved to ''cfgMagazines'' and renamed ''DisplayName'' (of course)
|-
| <tt>magazines[] = {"this"};</tt> || <tt>magazines[] = {};</tt>
|-
| <tt>magazineType=</tt>          || moved to ''cfgMagazines'' and renamed ''Type''
|-
| <tt>maxLeadSpeed=</tt>          || moved to ''cfgMagazines''
|-
| <tt>minRange=</tt>              || moved FROM ''cfgAmmo''
|-
| <tt>minRangeProbab=</tt>        ||
|-
| <tt>midRange=</tt>              ||
|-
| <tt>midRangeProbab=</tt>        ||
|-
| <tt>maxRange=</tt>              ||
|-
| <tt>maxRangeProbab=</tt>        ||
|-
| <tt>scopeWeapon=</tt>            || renamed ''scope''
|-
| <tt>scopeMagazine=</tt>          || moved to ''cfgMagazines'' and renamed ''scope''
|-
| <tt>shortNameMagazine=</tt>      || moved to ''cfgMagazines'' and renamed ''descriptionShort''?
|}


          OFP          ARMA
ammo=                  moved to cfgMagazines
cost=                  moved to cfgMagazines
displayNameMagazine=  moved to cfgMagazines and renamed DisplayName (of course)
magazines[] = {"this"};magazines[] = {};
magazineType=          moved to cfgMagazines and renamed Type
maxLeadSpeed=          moved to cfgMagazines
minRange =            moved FROM cfgAmmo
minRangeProbab =
midRange =
midRangeProbab =
maxRange =
maxRangeProbab =
scopeWeapon=          renamed scope
scopeMagazine=        moved to cfgMagazines and renamed scope
shortNameMagazine=    moved to cfgMagazines and renamed descriptionShort?


==Modifications==
===Modifications===
<syntaxhighlight lang="c">
cfgWeapons {
    access = 1;
    ...


cfgWeapons {
    //Weapon classes can be added.
  access=1;


*Weapon classes can be added.
    default {
        access = 3;
    ...
}
</syntaxhighlight>


  default {
Existing classes can (rarely) be altered.
    access=3;


*Existing classes can (rarely) be altered.
The default class of ''cfgWeapons'' specifies <tt>access = 3;</tt>. Almost all subsequent classes inherit this value, which means they cannot be altered in any way.


The default class of cfgWeapons 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 weapon (should you wish to with other addons), you must change the <tt>access=</tt> in YOUR Weapon.


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


==Navigation thu the woods for the trees==
===Navigation: The the wood for the trees===
''cfgWeapons'' can be a puzzling mess to the uninitiated.


CfgWeapons can be a puzzling mess to the un-initiated.
The ''tokenpairs'', their placement, and their constructs can be befuddled. This is not a reflection on {{Name|bi|short}}, the ultimate class structure is very, very, adaptive, but, it does confuse.


The tokenpairs, their placement, and their constructs can be befuddled. This is not a reflection on bi, the ultimate class structure is very, very, adaptive, but, it does confuse.
Essentially, {{Name|arma|short}} did open heart, and excellent, surgery to this class to distinguish between weapons and their magazines. {{Name|ofp|short}} had a common weapon/magazine class with variables declaring what to use and when. Variables only relevant to {{Name|ofp|short}}, are sometimes still encountered in {{Name|arma|short}}, simply because, they do no harm.


*Essentially, Arma did open heart, and excellent, surgery to this class to distinguish between weapons and their magazines. Ofp had a common weapon/magazine class with variables declaring what to use, when. Variables only relevent to ofp, are sometimes still encountered in arma, simply because, they do no harm.
Weapons come in two major flavors (with plenty of sub themes). A weapon either has, or does not have, a <tt>modes[]</tt> class or classes adding different behaviour like ''autofire'', ''burst'' or ''single shot''. Confusingly, a weapon with only one mode, is, equivalent to not declaring it at all. The tokens that would normally be in a ''modes'' class, are declared in the main body instead. This obfuscates what-goes-where.


*Weapons come in two major flavors (with plenty of subthemes). A weapon either has, or does not have, a modes[] class or classes adding different behaviour like autofire, burst, single shot. Confusingly, a weapon with only one mode, is, equivalent to not declaring it at all. The tokens that would normally be in a modes class, are declared in the main body instead. This obfuscates what-goes-where.
Weapons can have different muzzles, adding a further layer of modelling.


*Weapons can have different muzzles. adding a further layer of modelling.
The inherited tree structure for weapons vs their magazines, vs their ammo, is not always logical. This is a throwback to {{Name|ofp|short}} which (for instance) inherited ''RPG Ammo'' from an ''AT3'', but inherited the ''RPG weapon'' from a ''CarlGustav'', and so on. The end result being identical and good, since offending parameters were altered as necessary - but it does confuse what a ''HellfireHind'' really is, depending on who you are (''ammo'' vs ''mag'' vs ''weapon'').


*The inherited tree structure for weapons vs their magazines, vs their ammo, is not always logical. This is a throwback to OFP which (for instance) inherited RPG Ammo from an AT3, but inherited the RPG weapon from a CarlGustav, and so on. The end result being identical and good, since offending parameters were altered as necessary, but it does confuse what a HellfireHind really is, depending on who you are (ammo vs mag vs weapon)


===Modes===
Some ''TokenNames'' are relevant only within a ''mode'' class (''e.g.'' <tt>sound[]=</tt>), and stated as such.


==Modes==
'''All''' weapons, without exception, have at least one ''mode'' class.


Some TokenNames are relevant only within a mode class (sound[]= eg), and stated as such.
By default, the inherited ''mode'' for a weapon is:


'''All''' weapons, without exception, have at least one mode class.
<syntaxhighlight lang="c">
modes[] = {"this"};
</syntaxhighlight>


By default, the inherited mode for a weapon is
Which means the engine will treat the main body as also being a ''mode'' class unless over-ridden.


modes[]= {"this"};
Some weapons do not have a ''modes'' class specified, nor do they inherit a specified ''modes'' class via their parent(s). Under these circumstances, ''TokenNames'' stated to be ''ModeClass'' only must occur in the main body of that weapon (or it's parents) instead. The ''TokenNames'' themselves, remain, accurately described, as being ''mode'' class only.


Which means the engine will treat the main body as also being a mode class unless over-ridden.


Some weapons do not have a modes class specified, nor do they inherit a specified modes class via their parent(s). Under these circumstances, TokenNames stated to be ModeClass only must occur in the main body of that weapon (or it's parents) instead. The TokenNames themselves, remain, accurately described, as being mode class only.
===Muzzles===
Exact same comments as per [[#Modes|Modes]]. By default the inherited muzzle for a weapon is:


==Muzzles==
<syntaxhighlight lang="c">
muzzles[] = {"this"};
</syntaxhighlight>


exact same comments as per Modes. By default the inherited muzzle for a weapon is
Parameters belonging in muzzles are stated as such.


muzzles[]={"this");
Different muzzles are normally only encountered on grenade launcher weapons (?).


parameters belonging in muzzles are stated as such.


different muzzles are normally only encountered on grenade launcher weapons (eg)
===TokenNames===
All engines accept integer values (or math strings) where a float would normally be expected.


=TokenNames=
Default values are shown in the legend.
*All engines accept integer values (or math strings) where a float would normally be expected.


*Default values are shown in the legend.
; Usage
: {{Name|ofp|short}} generally moved to {{Name|arma|short}}'s ''[[CfgMagazines Config Reference|cfgMagazines Class]]'' and often renamed, else simply renamed.
: [[ArmaTokenNames|{{Name|arma|short}}]]: Introduced from {{Name|ofpe|short}} and beyond.
: ''ModesClass'': Any item marked as a ''ModesClass'' lives in a class <tt>Mode...</tt> body. It '''must''' be declared (or inherited) for '''each''' class.
: ''MuzzleClass'': Any item marked as a ''MuzzleClass'' lives in a class <tt>Muzzle...</tt> body. It '''must''' be declared (or inherited) for '''each''' class. Normally, except for grenade launchers, the muzzle IS the mainbody.
: ''Blank'': Used as described in both {{Name|ofp|short}}, and, {{Name|arma|short}}.


*Usage
Dual Use ''TokenNames'' (such as <tt>picture=</tt>) moved to {{Name|arma|short}}'s ''[[CfgMagazines Config Reference|cfgMagazines Class]]'' as appropriate.
**'''OFP''' generally moved to ArmA's [[CfgMagazines Config Reference|cfgMagazines Class]] and often renamed, else simply renamed.
**'''[[ArmaTokenNames|ArmA]]''' Introduced from Xbox Elite and beyond.
**'''ModesClass'''. Any item marked as a ModesClass lives in a class Mode... body. It '''must''' be declared (or inherited) for '''each''' class.
**'''MuzzleClass'''. Any item marked as a MuzzleClasslives in a class Muzzle... body. It '''must''' be declared (or inherited) for '''each''' class. Normally, except for grenadelaunchers, the muzzle IS the mainbody.
**'''Blank''': used as described in both OFP, and, ArmA


*Dual Use TokenNames (such as picture=) moved to  ArmA's [[CfgMagazines Config Reference|cfgMagazines Class]] as appropriate.


----
===Picture="[\][.pac]"===
Defines ''WEAPON Picture'' '''and separately''' ''MAGAZINE Picture''.
{{Name|ofp|short}} generally created two ''cfgWeapon'' classes. One for the weapon and one for the magazine. <tt>picture=</tt> was declared in each. In {{Name|arma|short}}, the ''magazine picture'' name has been moved to the ''cfgMagazines'' class as appropriate.


=Picture="[\][.pac]"=
Note that this is one of those irritating {{Name|bi|short}} path snafu's (when if ever will they start using relative addressing?). The following notes apply to most <tt>picture=</tt> references, not just ''cfgWeapons''.  
Defines WEAPON Picture '''and separately''' MAGAZINE Picture.
OFP ''generally'' created TWO cfgWeapon classes. One for the weapon, one for the magazine. picture= was declared in each. In Arma, the magazine picture name has been moved to the cfgMagazines class as appropriate.


Note that this is one of those irritating bis path snafu's. (when if ever will they start using relative addressing?). The following notes apply to most picture= references. Not just cfgWeapons.  
#'''The DEFAULT extension is <tt>.pac</tt>'''. The engine accepts <tt>.pac</tt> or <tt>.paa</tt>, but <tt>.pac</tt> is not supposed to exist. A <tt>.paa</tt> must be explicitly declared.
#'''Path must explicitly have a <tt>\</tt> leading.'''


1)'''The DEFAULT extension is .pac'''. The engine accepts pac or paa, but pac is not supposed to exist. A .paa must be explicitly declared.
This because in {{Name|ofp|short}} it was possible to '''not declare''' any picture at all.


2)'''Path must explicitly have a \leading.'''
In which case (in {{Name|ofp|short}}) the engine looks for the <tt>.paa</tt> file in <tt>\dta\dtaext\NameOfClass.paa</tt>


This because in ofp it was possible to NOT declare any picture at all.
The {{Name|arma|short}} engine appears to make a mess of it. Any picture reference without a preceding slash will look in a non-existent <tt>'equip.pbo'</tt>


In which case (in ofp) the engine looks for the paa file in \dta\dtaext\NameOfClass.paa
Specifically:


The arma engine appears to make a mess of it. ANY picture reference without a preceeding slash will look in a non-existent 'equip.pbo'
<syntaxhighlight lang="c">
equip\w\w_your\path\name  // for weapons and
equip\m\m_your\path\name  // for mags
</syntaxhighlight>


Specifically
If no picture is specified, then like {{Name|ofp|short}}, <tt>equip\w\w_NameOfClass</tt> is assumed.


equip\w\w_your\path\name  // for weapons and
Note also the 'convention' of naming weapon images with <tt>w_</tt> and magazine images with <tt>m_</tt> (and to a certain extent having <tt>data\equip</tt> file paths). This is rigidly followed in {{Name|arma|short}}. In {{Name|ofp|short}}, {{Name|bi|short}} were inconsistent.
equip\m\m_your\path\name  // for mags


if no picture is specified, then like ofp, equip\w\w_NameOfClass is assumed


note also the 'convention' of naming weapon images with '''w_''' and magazine images with '''m_''' (and to a certain extent having data\equip file paths). This is rigidly followed in arma. In OFP, Bis were inconsistent.
===Types===
 
====type=WeaponHardMounted (ArmaOnly)====
=Types=
{{Example needed}}
===type=WeaponHardMounted (ArmaOnly)===
====magazineType=None (OfpOnly)====
===magazineType=None (OfpOnly)===
{{Example needed}}
===weaponType=WeaponHardMounted (OfpOnly)===
====weaponType=WeaponHardMounted (OfpOnly)====
[[TokenNameValueTypes|Integers]] (Note this value is often held as a math [[TokenNameValueTypes|String]])
[[TokenNameValueTypes|Integers]] (Note this value is often held as a math [[TokenNameValueTypes|String]])


Gear (equipment) selection consists of ''SlotTypes'' and one of more ''slot positions'' '''of that type'''
Gear (equipment) selection consists of ''SlotTypes'' and one or more ''slot positions'' '''of that type'''.


This integer is a bitfield containing SlotType '''and count''' which defines which SlotType this 'item' will occupy in gear selection and how many slots '''of that type''' it requires. It does NOT define which slot ''position'' to occupy, only the Type of Slot. Various engines will show this item in positions of their own choosing.
This integer is a ''bit-field'' containing ''SlotType'' '''and count''' which defines which ''SlotType'' this '''''item''''' will occupy in gear selection and how many slots '''of that type''' it requires. It does NOT define which slot ''position'' to occupy, only the ''Type'' of Slot. Various engines will show this item in positions of their own choosing.


*An 'item' is defined as being a weapon, magazine, or 'equipment'.
* An ''item'' is defined as being a ''weapon, magazine, ''or'' equipment''.
**A 'weapon' is rifle, handgun, law launcher
** A ''weapon'' is ''rifle, handgun, LAW launcher''.
**A 'magazine' is a magazine, a shell ,a Law, a PipeBomb, a grenade. Ie a housing for the cfgAmmo explosive(s)
** A ''magazine'' is a ''magazine, a shell ,a LAW, a PipeBomb, a grenade'' - ''i.e.'' a housing for the ''cfgAmmo'' explosive(s).
**'equipment' are binoculars, nvg, etc.
** ''equipment'' are ''binoculars, NVG, etc''.


For ArmA, MagazineSlots and WeaponSlots are mutually exclusive. The classes occur in the cfgWeapons or cfgMagazines respectively. In ofp both types of class exist in cfgWeapons, and are often the same class. OFP does not have a 'Type='. Instead, it uses WeaponType= and MagazineType= couplets. The end result, and the intent, is identical.
For {{Name|arma|short}}, ''MagazineSlots'' and ''WeaponSlots'' are mutually exclusive. The classes occur in the ''cfgWeapons'' or ''cfgMagazines'' respectively. In {{Name|ofp|short}} both types of class exist in ''cfgWeapons'', and are often the same class. {{Name|ofp|short}} does not have a <tt>Type=</tt>; instead, it uses <tt>WeaponType=</tt> and <tt>MagazineType=</tt> couplets. The end result, and the intent, is identical.


*Note the quite serious alteration to SecondaryWeapon and Handgun mags that occurred in arma. This to allow for an increased count field in Handgun Magazines.
{{Important|Note: the quite serious alteration to ''SecondaryWeapon'' and ''Handgun'' mags that occurred in Arma. This to allow for an increased count field in ''Handgun Magazines''.}}


-----
{| class="bikitable"
 
! rowspan="2" | Slot: !! rowspan="2" | SlotType         !! colspan="2" | value/nbits             !! rowspan="2" | Example
{|
|Slot:||SlotType||value/nbits||||Example
|-  
|-  
||| ||OFP||ArmA
                                                        ! OFP               !! Arma
|-
|-
|either:||NoSlot||0/0||same ||'stroke' is a weapon, but it occupies no slots
| Either:                           || NoSlot           || <tt>0/0</tt>    || ''same''          || ''stroke'' is a weapon, but it occupies no slots
|-
|-
|Weapon:||PrimaryWeapon||1/1|| same ||AK47
| Weapon:                           || PrimaryWeapon   || <tt>1/1</tt>    || ''same''          || AK47
|-
|-
|Weapon:||HandGun||2/1|| same ||CZ75
| Weapon:                           || HandGun         || <tt>2/1</tt>    || ''same''          || CZ75
|-
|-
|Weapon:||SecondaryWeapon||16/1|| '''4'''/1 ||Law
| Weapon:                           || SecondaryWeapon || <tt>16/1</tt>    || <tt>4/1</tt>      || LAW
|-
|-
|Mag:||HandGunMagazines||32/3|| '''16/4''' ||CZ75Mag or GLMag
| Mag:                               || HandGunMagazines || <tt>32/3</tt>    || <tt>16/4</tt>    || CZ75Mag or GLMag
|-
|-
|Mag:||MainMagazines||256/4||same ||AK47Mag or explosives
| Mag:                               || MainMagazines   || <tt>256/4</tt>  || ''same''          || AK47Mag or explosives
|-
|-
|Weapon:||BinocularSlot||4096/4|| same ||or NVG, LD,etc
| Weapon:                           || BinocularSlot   || <tt>4096/4</tt>  || ''same''          || Binoculars or NVG, LD etc.
|-
|-
|Weapon:||HardMounted||65536/1||same
| Weapon:                           || HardMounted     || <tt>65536/1</tt> || ''same''          ||
|-
|-
|Mag:||SmallItems||||131072/4||(Arma 2) map, compass, small items (derived from ItemCore)
| Mag:                               || SmallItems       ||                 || <tt>131072/4</tt> || (Arma 2) map, compass, small items (derived from ''ItemCore'')
|}
|}
The specific combination for machine guns normally occupy both weapon slots (PrimaryWeapon+SecondaryWeapon)




----
The specific combination for machine guns normally occupy both weapon slots ''i.e. PrimaryWeapon + SecondaryWeapon''.
 
 
===Magazine Sizes===
===Magazine Sizes===
Architecturally, '''all''' ''bit-fields'' are counts. The fact that a ''PrimaryWeapon'' can only be <tt>1</tt>, still makes it ''a count'' of that ''SlotType''.


Architecturally, '''all''' bitfields are counts. The fact that a PrimaryWeapon can only be '1', still makes it a count of that SlotType.
In practical terms magazines are the only ''item'' ('''warning:''' ''currently'') to have bit-fields <tt>&gt; 1</tt>.


In practical terms magazines are the only 'item' (warning, currently) to have bitfields > 1.
''Most'' weapons use a single slot to declare a single magazine.


Most weapons use a single slot to declare a single magazine.
''Shell weapons'' such as the ''RPG'' require three slots to hold the ''magazine''. {{Name|ofp|short}} presented this by filling those slots with the image. Arma makes a mess of it with a somewhat ugly blank between slots. You are supposed to guess why it's blank.


Shell weapons such as the RPG require three slots to hold the 'magazine'. Ofp presented this by filling those slots with the image. Arma makes a mess of it with a somewhat ugly blank between slots. You are supposed to guess why it's blank.
No handgun magazine (''currently'') has a size <tt>&gt; 1</tt>. This could change on ''e.g.'' a remote controlled explosive. The bit-field is larger for reasons explained in [[#CfgVehicles: Joining the dots|Joining the dots]] (below).


No handgun magazine (currently) has a size > 1. This could change on say a remote controlled explosive (eg). The bitfield is larger for reasons explained in 'putting it all together'.
For ''MainWeapon Magazines'', specific bit-field identities between <tt>256</tt> and <tt>4096</tt> are frequently represented textually as:


For MainWeapon Magazines, specific bit-field identities between 256 and 4096 are frequently represented textually as
<syntaxhighlight lang="c">
"1 * 256" // main mags
"2 * 256" // m60,pk,mortars
"3 * 256" // law , rpg
"4 * 256" // 6g30 4 slots needed
"6 * 256" // carlgustav,stinger 6 slots needed
"8 * 256" // mm1 all slots needed
</syntaxhighlight>


"1 * 256" // main mags
And, of course, in Arma, these ''fields'' are only relevant in it's ''CfgWeapons''.
"2 * 256" // m60,pk,mortars
"3 * 256" // law , rpg
"4 * 256" // 6g30 4 slots needed
"6 * 256" // carlgustav,stinger 6 slots needed
"8 * 256" // mm1 all slots needed


And, of course, in Arma, these 'fields' are only relevent in it's CfgWeapons.


===CfgVehicles Joining the dots===
===CfgVehicles: Joining the dots===
A ''vehicle'', in this case ''a human'' or ''parachute'', has it's equipment slots defined in it's ''cfgVehicles Class''. The <tt>Weaponslots=</tt> ''bit-field'' declares whether or not a piece of equipment can be carried at all, and if so, how much, or max size of that equipment, measured in ''slots''.


A 'vehicle', in this case a human or parachute, has it's equipment slots defined in it's cfgVehicles Class. The weaponslots= bitfield declares whether or not a piece of equipment can be carried at all, and if so, how much, or max size of that equipment, measured in 'slots'.
<tt>cfgVehicles.Weaponslots=</tt> is deceptively similar to <tt>cfgWeapons.Type=</tt> (and vice versa). <tt>Weaponslots=</tt> defines the carrying capacity for equipment, <tt>type=</tt> defines the size of of that equipment.


cfgVehicles.Weaponslots= is deceptively similar to CfgWeapons.Type= (and vice versa). Weaponslots= defines the carrying capacity for equipment, type= defines the size of of that equipment.
Different ''humans'' have more or fewer slots than others. Clearly, ''medics, police, civilians'' and some ''resistance fighters'', cannot carry heavy armament. They're either not trained to, or, they're already implicitly carrying ''medical packs''. The disastrous {{Name|arma|short}} completely destroyed this distinction. {{Name|arma2|short}} enhances the distinction a little more than {{Name|ofp|short}}.


Different humans have less slots than others. Clearly, medics, police, civilians and some resistance fighters, cannot carry heavy armament. They're either not trained to, or, they're already implictly carrying medical packs. The disastrous ArmA1 completely destroyed this distinction. ArmA2 enhances the distinction a little more than ofp.
A generalised ''capacity'' declaration for humans is:


A generalised ''capacity'' declaration for humans is
{| class="bikitable"
 
! rowspan="8" | <tt>weaponSlots=</tt>
{|
|-
|weaponSlots=||PrimaryWeapon+||Can carry a Primary Weapon
| <tt>PrimaryWeapon+</tt>        || Can carry a Primary Weapon
|-
|-
|||SecondaryWeapon+||Sometimes able to carry a Secondary or even heavier Weapon (Law,mg,stinger)
| <tt>SecondaryWeapon+</tt>      || Sometimes able to carry a Secondary or even heavier Weapon (''LAW, MG, stinger'')
|-
|-
|||(4+6)*MainMagazines+||Can carry nMagazines for these weapons (AK47Mag) (or max size of shell eg)
| <tt>(4+6)*MainMagazines+</tt>  || Can carry n*Magazines for these weapons (AK47Mag) (or max ''size'' of shell)
|-
|-
|||HandGun+||Can carry a Handgun (Berreta eg)
| <tt>HandGun+</tt>              || Can carry a Handgun (''e.g.'' Beretta)
|-
|-
|||2*WeaponSlotBinocular+||Can carry nslots of equipment
| <tt>2*WeaponSlotBinocular+</tt> || Can carry n*slots of equipment
|-
|-
|||4*HandGunMagazines+||Can carry nHandgun Magazines (CZ75Mag)
| <tt>4*HandGunMagazines+</tt>    || Can carry n*Handgun Magazines (CZ75Mag)
|-
|-
|||12*SmallItems||can carry nslots of SmallItems (Arma2)
| <tt>12*SmallItems</tt>          || can carry n*slots of SmallItems (Arma 2)
|-
|-
|}
|}
--


These will later be filled out with specific weapons in the human's weapons[]= and magazines[]=arrays. Placing too many causes a ctd.


Note that specific ArmA2 women can only carry magazines and smallequipment (for their boyfriends?) and nothing else.
These will later be filled out with specific weapons in the human's <tt>weapons[]=</tt> and <tt>magazines[]=</tt> ''arrays''. Placing too many causes a ''ctd''{{Clarify}}.
----
 
Magazine carrying ability altered markedly for ArmA2 vs ofp, is the reason for the nasty change to the bitfield, and is as follows
Note that specific {{Name|arma2|short}} women can only carry magazines and small equipment (for their boyfriends?) and nothing else.


                    OFP        ARMA   
Magazine carrying ability altered markedly for {{Name|arma2|short}} vs {{Name|ofp|short}}; it's the reason for the nasty change to the ''bit-field'', and is as follows:
  Rifle Potential  : 15          15
        Actual    : 4 to 10      2 to 12
  Handgun Potential: 7          '''15'''
        Actual    : 4            4 or 8
  'Binoculars'    : 1 or 2      0 to 2


{| class="bikitable"
! colspan="2" |                      !! OFP                      !! Arma
|-
| rowspan="2" | Rifle  || Potential || <tt>15</tt>              || <tt>15</tt>
|-
                        | Actual    || <tt>4</tt> to <tt>10</tt> || <tt>2</tt> to <tt>12</tt>
|-
| rowspan="2" | Handgun || Potential || <tt>7</tt>                || <tt>15</tt>
|-
                        | Actual    || <tt>4</tt>                || <tt>4</tt> or <tt>8</tt>
|-
| colspan="2" | Binoculars          || <tt>1</tt> or <tt>2</tt>  || <tt>0</tt> to <tt>2</tt>
|}


----


==Alphabetical Order==
{{Cfg ref|abc}}
===A===
====access=3====
;Type: [[TokenNameValueTypes|Integer]]


<syntaxhighlight lang="c">
#define ReadAndWrite 0 // any modifications enabled
#define ReadAndCreate 1 // only adding new class members is allowed
#define ReadOnly 2 // no modifications enabled
#define ReadOnlyVerified 3 // no modifications enabled, CRC test applied
</syntaxhighlight>


=A=


==access=3==
====aiDispersionCoefX=1.0====
[[TokenNameValueTypes|Integer]]
;Type: [[TokenNameValueTypes|Float]]
;Description: Dispersion  multiplier for ''AI'' units (axis X - left to right).


#define ReadAndWrite 0 // any modifications enabled
#define ReadAndCreate 1 // only adding new class members is allowed
#define ReadOnly 2 // no modifications enabled
#define ReadOnlyVerified 3 // no modifications enabled, CRC test applied


==aiDispersionCoefX=1.0==
====aiDispersionCoefY=1.0====
[[TokenNameValueTypes|Float]]
;Type: [[TokenNameValueTypes|Float]]
<br>'''Description:''' Dispersion  multiplier for Ai units (axis X - left to right)
;Description: Dispersion multiplier for ''AI'' units (axis Y - top-down).


==aiDispersionCoefY=1.0==
[[TokenNameValueTypes|Float]]
<br>'''Description:''' Dispersion multiplier for Ai units (axis Y - top-down)


==aiRateOfFire=5.0==
====aiRateOfFire=5.0====
'''ModeClass'''
'''ModeClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' delay between shots at given aiRateOfFireDistance


==aiRateOfFireDistance=500==
;Type: [[TokenNameValueTypes|Float]]
;Description: Delay between shots at given ''aiRateOfFireDistance''.
 
 
====aiRateOfFireDistance=500====
'''ModeClass'''
'''ModeClass'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' at shorter distance delay (aiRateOfFire) goes lineary to zero


==ammo=""==
;Type: [[TokenNameValueTypes|Integer]]
;Description: At shorter distance delay (''aiRateOfFire'') goes linearly to zero.
 
 
====ammo=""====
'''OFPModeClass'''
'''OFPModeClass'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' CfgAmmo class that this weapon fires. Moved to [[CfgMagazines Config Reference|cfgMagazines]] in Arma.


ammo = "TimeBomb";
;Type: [[TokenNameValueTypes|String]]
;Description: ''cfgAmmo'' class that this weapon fires. Moved to [[CfgMagazines Config Reference|cfgMagazines]] in Arma.
 
<syntaxhighlight lang="c">
ammo = "TimeBomb";
</syntaxhighlight>
 
 
====autoAimEnabled=true====
;Type: [[TokenNameValueTypes|Boolean]]
;Description: <tt>false</tt> for all standard weapons.


==autoAimEnabled=true==
[[TokenNameValueTypes|Boolean]]
<br>'''Description:''' FALSE for all standard weapons   


==autoFire=false==
====autoFire=false====
'''ModeClass'''
'''ModeClass'''
<br>[[TokenNameValueTypes|Boolean]]
<br>'''Description:''' If true weapon will continue firing once you press fire button once until you release it. And if true the gunner can use the weapon on his own discretion (no commander fire order needed - like MG type).


==autoReload=true==
;Type: [[TokenNameValueTypes|Boolean]]
[[TokenNameValueTypes|Boolean]]
;Description: If <tt>true</tt>, weapon will fire repeatedly all the while you hold the fire button down.
<br>'''Description:''' if true weapon will be reloaded automaticly once magazine is empty


And if <tt>true</tt> the gunner can use the weapon on his own discretion (no ''commander'' fire order needed - like ''MG'' type).




=B=
====autoReload=true====
;Type: [[TokenNameValueTypes|Boolean]]
;Description: If <tt>true</tt> weapon will be reloaded automatically once magazine is empty.


==backgroundReload=false==
[[TokenNameValueTypes|Boolean]]
<br>'''Description:''' Weapon automatically reloads magazines without player intervention or animation.


==ballisticsComputer=false==
===B===
'''ArmA'''
====backgroundReload=false====
<br>[[TokenNameValueTypes|Boolean]]
;Type: [[TokenNameValueTypes|Boolean]]
<br>'''Description:''' Weapon attempts to calculate and shift the aimpoint to hit a locked target based on range, target movement, own movement, and ballistics of selected ammo type.
;Description: Weapon automatically reloads magazines without player intervention or animation.
 
 
====ballisticsComputer=false====
'''Arma'''
 
;Type: [[TokenNameValueTypes|Boolean]]
;Description: Weapon attempts to calculate and shift the ''aim-point'' to hit a locked target based on range, target movement, own movement, and ballistics of selected ammo type.
 


==burst=1==
====burst=1====
'''ModeClass'''
'''ModeClass'''
<br>[[TokenNameValueTypes|Integer]]
 
<br>'''Description:''' Number of shots actually fired each time the weapon is fired.
;Type: [[TokenNameValueTypes|Integer]]
;Description: Number of shots actually fired each time the weapon is fired.




===C===
====cameraDir====
'''MuzzleClass'''


=C=
;Type: [[TokenNameValueTypes|String]]


==cameraDir==
<syntaxhighlight lang="c">
'''MuzzleClass'''
cameraDir = "GL look";
<br>[[TokenNameValueTypes|String]]
</syntaxhighlight>
 
 
====canDrop=true====
;Type: [[TokenNameValueTypes|Boolean]]
;Description: Weapon can/not be dropped from Inventory Menu.
 
''canDrop'' is poorly implemented. It is normally associated with true vehicles such as air. For humans nothing in the ''GUI'' panel suggests that you can't drop a weapon, and yet, hidden-from-view, the drop action has no effect. ''canDrop'' should have also been implemented in ''cfgMagazines'', but isn't. You can always drop the magazine, and yet, for some weapons, such as a laser designator, this is nonsensical.
 
 
====canLock=2====
;Type: [[TokenNameValueTypes|Integer]]
;Description: Defines if weapon can be locked on the target (white box appears).


cameraDir = "GL look";
<syntaxhighlight lang="c">
#define LockNo 0
#define LockCadet 1
#define LockYes 2
</syntaxhighlight>


==canDrop=true==
[[TokenNameValueTypes|Boolean]]
<br>'''Description:''' Weapon can/not be dropped from Inventory Menu. CanDrop is poorly implemented. It is normally associated with true vehicles such as air. For humans nothing in the gui panel suggests that you can't drop a weapon, and yet, hidden-from-view, the drop action has no effect. Candrop should have also been implemented in cfgMagazines, but isn't. You can always drop the magazine, and yet, for some weapons, such as a laser designator, this is non-sensical.


==canLock=2==
====cartridgePos="nabojnicestart"====
[[TokenNameValueTypes|Integer]]
;Type: [[TokenNameValueTypes|String]]
<br>'''Description:''' Defines if weapon can be locked on the target (white box appears)


#define LockNo 0
#define LockCadet 1
#define LockYes 2


==cartridgePos="nabojnicestart"==
====cartridgeVel="nabojniceend"====
'''[[TokenNameValueTypes|String]]'''
;Type: [[TokenNameValueTypes|String]]


==cartridgeVel="nabojniceend"==
'''[[TokenNameValueTypes|String]]'''


==count=0==
====count=0====
'''OFP'''
'''OFP'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' Number of shots weapon starts with. Moved to CfgMagazines in ArmA


==cursor=""==
;Type: [[TokenNameValueTypes|Integer]]
'''ArmA'''
;Description: Number of shots weapon starts with. Moved to ''cfgMagazines'' in Arma.
<br>[[TokenNameValueTypes|String]]
 
 
====cursor=""====
'''Arma'''
 
;Type: [[TokenNameValueTypes|String]]
 


==cursor="w_weapon"==
====cursor="w_weapon"====
'''OFP'''
'''OFP'''
<br>[[TokenNameValueTypes|String]]


==cursorAim=""==
;Type: [[TokenNameValueTypes|String]]
'''ArmA'''
 
<br>[[TokenNameValueTypes|String]]
 
====cursorAim=""====
'''Arma'''
 
;Type: [[TokenNameValueTypes|String]]
 
<syntaxhighlight lang="c">
cursorAim = "\ca\Weapons\Data\cursor_target_locked_ca.paa";
</syntaxhighlight>


cursorAim = "\ca\Weapons\Data\cursor_target_locked_ca.paa";


==cursorAim="w_lock"==
====cursorAim="w_lock"====
'''OFP'''
'''OFP'''
<br>[[TokenNameValueTypes|String]]


==cursorAimOn=""==
;Type: [[TokenNameValueTypes|String]]
 
 
====cursorAimOn=""====
'''Arma'''
'''Arma'''
<br>[[TokenNameValueTypes|String]]


==cursorSize=1.0==
;Type: [[TokenNameValueTypes|String]]
 
 
====cursorSize=1.0====
'''Arma'''
'''Arma'''
<br>[[TokenNameValueTypes|Float]]


;Type: [[TokenNameValueTypes|Float]]




=D=
===D===
====dexterity=3.1====
;Type: [[TokenNameValueTypes|Float]]
;Description: In-game weapon handling value, lower value = takes more time to traverse a weapon.


==dexterity=3.1==
<syntaxhighlight lang="c">
[[TokenNameValueTypes|Float]]
dexterity = 3.1;
<br>'''Description:''' Ingame weapon handling value, lower value = takes more time to traverse a weapon
</syntaxhighlight>


  dexterity = 3.1;
   
====dispersion=0.002====
'''ModeClass'''
 
;Type: [[TokenNameValueTypes|Float]]
;Description: In-game weapon dispersion in radians. Bigger value = more dispersion.


==dispersion=0.002==
'''ModeClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' Ingame weapon dispersion in radians. Bigger value - more dispersion


==displayName=""==
====displayName=""====
'''MainBody'''
'''MainBody'''
<br>[[TokenNameValueTypes|String]]
 
<br>'''Description:''' Name of the WEAPON. Declared in the main body. This string is shown in gear selection as the rifle's name.
;Type: [[TokenNameValueTypes|String]]
;Description: Name of the WEAPON. Declared in the main body. This string is shown in gear selection as the rifle's name.




'''ModeClass'''
'''ModeClass'''
<br>
<br>'''Description:''' Name of the MODE. In '''every''' mode class. This string is shown in-game when selecting burst, single, auto etc.


A weapon that only has a single mode *normally* has the same displayname, repeated in the mode class. But, repeated, it must be.
;Description: Name of the MODE. In '''every''' mode class. This string is shown in-game when selecting burst, single, auto etc.
 
A weapon that only has a single mode '''''normally''''' has the same ''displayname'', repeated in the mode class. But, repeated, it must be.


A weapon with no modes (modes={"this");  uses the weapon name for both.
A weapon with no modes (modes={"this");  uses the weapon name for both.
Line 406: Line 491:


'''MuzzleClass'''
'''MuzzleClass'''
<br>
<br>'''Description:''' Name of the MUZZLE. In '''every''' muzzle class. This string is shown in-game similar to burst, single, auto etc. It is quite common for one of the muzzle classes to inherit a basic rifle muzzle. in which case, the name of the muzzle for THAT class is the inherited weapon name.


A weapon with no muzzles (muzzles={"this"); uses the weapon name.
;Description: Name of the MUZZLE. In '''every''' muzzle class.


==displayNameMagazine=""==
This string is shown in-game similar to burst, single, auto etc.
 
It is quite common for one of the muzzle classes to inherit a basic rifle muzzle, in which case, the name of the muzzle for ''THAT'' class is the inherited weapon name.
 
A weapon with no muzzles ''i.e.'' <tt>muzzles={"this"};</tt> uses the weapon name.
 
 
====displayNameMagazine=""====
'''OFP'''
'''OFP'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' 'displayname' of the magazine in gear selection. Replaced in Arma via the [[CfgMagazines Config Reference|cfgMagazines Class]] see also shortNameMagazine and descriptionShort


==distanceZoomMax=400==
;Type: [[TokenNameValueTypes|String]]
'''[[TokenNameValueTypes|Integer]]'''
;Description: ''displayname'' of the magazine in gear selection. Replaced in Arma via the ''[[CfgMagazines Config Reference|cfgMagazines Class]]''.
 
See also [[#shortNameMagazine|shortNameMagazine]] and [[#descriptionShort|descriptionShort]]
 
 
====distanceZoomMax=400====
;Type: [[TokenNameValueTypes|Integer]]


==distanceZoomMin=400==
'''[[TokenNameValueTypes|Integer]]'''


==descriptionShort=""==
====distanceZoomMin=400====
'''ArmA'''
;Type: [[TokenNameValueTypes|Integer]]
<br>[[TokenNameValueTypes|String]]
 
<br>'''Description:''' A paragraph or two describing the rifle in bottom left panel of in-game gear selection. This is NOT equivalent of ofp's short label (shortNameMagazine). ''That'' descriptionShort exists in cfgMagazines
 
====descriptionShort=""====
'''Arma'''
 
;Type: [[TokenNameValueTypes|String]]
;Description: A paragraph or two describing the rifle in bottom left panel of in-game gear selection.
 
This is NOT equivalent of {{Name|ofp|short}}'s short label (''shortNameMagazine''). '''''THAT''''' ''descriptionShort'' exists in ''cfgMagazines''.
 


==drySound[]={"",1,1}==
====drySound[]={"",1,1}====
<br>[[TokenNameValueTypes|Array]]
<br>'''Description:''' click Sound  when empty weapon fired


drySound[] = {"\ca\Weapons\Data\Sound\XMS_dry_v2",0.000316228,1};
;Type: [[TokenNameValueTypes|Array]]
;Description: Click Sound when empty weapon fired.


<syntaxhighlight lang="c">
drySound[] = {"\ca\Weapons\Data\Sound\XMS_dry_v2", 0.000316228, 1};
</syntaxhighlight>




=E=
===E===
====enableAttack=true====
;Type: [[TokenNameValueTypes|Boolean]]


==enableAttack=true==
'''[[TokenNameValueTypes|Boolean]]'''


==emptySound[]={"",1,1}==
====emptySound[]={"",1,1}====
'''Arma'''
'''Arma'''
<br>[[TokenNameValueTypes|Array]]


;Type: [[TokenNameValueTypes|Array]]




=F=
===F===
====ffCount=1====
'''ModeClass'''


==ffCount=1==
;Type: [[TokenNameValueTypes|Integer]]
 
 
====ffFrequency=1====
'''ModeClass'''
'''ModeClass'''
<br>[[TokenNameValueTypes|Integer]]


==ffFrequency=1==
;Type: [[TokenNameValueTypes|Float]]
 
 
====ffMagnitude=0.0====
'''ModeClass'''
'''ModeClass'''
<br>[[TokenNameValueTypes|Float]]


==ffMagnitude=0.0==
;Type: [[TokenNameValueTypes|Float]]
'''ModeClass'''
 
<br>[[TokenNameValueTypes|Float]]


==fireLightDuration=0.05==
====fireLightDuration=0.05====
'''Arma'''
'''Arma'''
<br>[[TokenNameValueTypes|Float]]


==fireLightIntensity=0.012==
;Type: [[TokenNameValueTypes|Float]]
 
 
====fireLightIntensity=0.012====
'''Arma'''
'''Arma'''
<br>[[TokenNameValueTypes|Float]]


==flash=""==
;Type: [[TokenNameValueTypes|Float]]
'''[[TokenNameValueTypes|String]]'''
 
 
====flash=""====
;Type: [[TokenNameValueTypes|String]]


flash = "gunfire";
<syntaxhighlight lang="c">
flash = "gunfire";
</syntaxhighlight>


==flashSize=0.0==
====flashSize=0.0====
'''ModeClass'''
'''ModeClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' ofp only?


==forceOptics=0==
;Type: [[TokenNameValueTypes|Float]]
[[TokenNameValueTypes|Integer]]
;Description: {{Name|ofp|short}} only?
<br>'''Description:''' Valid values: 0, 1, 2, as per canLock




====forceOptics=0====
;Type: [[TokenNameValueTypes|Integer]]
;Description: Valid values: <tt>0</tt>, <tt>1</tt>, <tt>2</tt> as per ''canLock''.


=H=


==handAnim[]={}==
===H===
====handAnim[]={}====
'''Arma'''
'''Arma'''
<br>[[TokenNameValueTypes|Array]]


;Type: [[TokenNameValueTypes|Array]]




=I=
===I===
====initSpeed=0====
;Type: [[TokenNameValueTypes|Integer]]
;Description: Initial speed of shot in meters per second.  Also present in ''cfgMagazines''.


==initSpeed=0==
<syntaxhighlight lang="c">
'''[[TokenNameValueTypes|Integer]]'''
initSpeed = 900;
<br>'''Description:''' Initial speed of shot in meters per second.  Also present in cfgMagazines
</syntaxhighlight>


  initSpeed = 900;


===L===
====laser=false====
'''Arma'''


;Type: [[TokenNameValueTypes|Boolean]]


=L=


==laser=false==
====Library====
'''Arma'''
'''Arma'''
<br>[[TokenNameValueTypes|Boolean]]


==Library==
<syntaxhighlight lang="c">
'''Arma'''
class Library
<br>Class
{
<br>'''Description:'''
libTextDesc = "";
};
</syntaxhighlight>


   class Library
    
  {
====libTextDesc====
  libTextDesc = "";
  };
 
==libTextDesc==
'''ArmaClass'''
'''ArmaClass'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' libTextDesc = "$STR_LIB_SVD";//eg


;Type: [[TokenNameValueTypes|String]]


<syntaxhighlight lang="c">
libTextDesc = "$STR_LIB_SVD";
</syntaxhighlight>


=M=


==magazineReloadTime=0==
===M===
====magazineReloadTime=0====
'''MuzzleClass'''
'''MuzzleClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' Time delay when reloading the weapon (changing magazines).


==magazines[]={"this"}==
;Type: [[TokenNameValueTypes|Float]]
;Description: Time delay when reloading the weapon (changing magazines).
 
 
====magazines[]={"this"}====
'''OFP '''
'''OFP '''
<br>[[TokenNameValueTypes|StringArray]]


Array of magazine classes compatible with this weapon. This very same Weapon class in cfgWeapons if not over-ridden
;Type: [[TokenNameValueTypes|StringArray]]
;Description: Array of magazine classes compatible with this weapon. This '''same''' ''Weapon class'' in ''cfgWeapons'' if not over-ridden.
 
====magazines[]={}====
'''Arma'''
 
;Type: [[TokenNameValueTypes|StringArray]]
;Description: These are declared here, same as {{Name|ofp|short}}, but defined in ''cfgMagazines''.
 
'''Note, with extreme caution''': ''Unlike'' {{Name|ofp|short}}, you cannot have identically named ''magazine'' classes. The in-game gear selection panel gets confused. Safe bet is to call all your magazine classes "''[rifle]Mag''".
 
 
====maxLeadSpeed=50====
'''OFP'''


==magazines[]={}==
;Type: [[TokenNameValueTypes|Integer]]
'''ArmA'''
;Description: Maximum speed of the target that can be shot with this weapon by ''AI''. Moved to ''cfgMagazines'' in Arma.
<br>[[TokenNameValueTypes|StringArray]]
<br>'''Description:''' These are declared here, same as ofp, but defined in CfgMagazines. Note with extreme caution, '''unlike''' ofp, you cannot have identical named mag classes. The in-game gear selection panel gets confused. Safe bet is to call all your magazine classes [rifle]Mag


==maxLeadSpeed=50==
'''Ofp'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' Maximimum speed of the target that can be shot with this weapon by AI. Moved to CfgMagazines in ArmA.


==min/mid/maxRange...==
====min/mid/maxRange...====
'''ArmAModeClass'''
'''ArmAModeClass'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' Together with *Range and *RangeProbab values defines probability to use this weapon for Ai units at given distance. For OFP these paramaters were specified in cfgAmmo, rendering all rifles the same.


==magazineType=0==
;Type: [[TokenNameValueTypes|Integer]]
'''ofp'''
;Description: Together with ''range'' and ''rangeProbab'' values, defines probability to use this weapon for ''AI'' units at given distance.
<br>[[TokenNameValueTypes|Integer]]
 
<br>'''Description:''' See Types below
For {{Name|ofp|short}} these parameters were specified in ''cfgAmmo'', rendering all rifles the same.
 
 
====magazineType=0====
'''OFP'''
 
;Type: [[TokenNameValueTypes|Integer]]
;Description: See Types below.
 
 
====minRange=1====
;Type: [[TokenNameValueTypes|Integer]]


==minRange=1==
'''[[TokenNameValueTypes|Integer]]'''


==minRangeProbab=0.3==
====minRangeProbab=0.3====
'''[[TokenNameValueTypes|Float]]'''
;Type: [[TokenNameValueTypes|Float]]


==midRange=150==
'''[[TokenNameValueTypes|Integer]]'''


==midRangeProbab= 0.58==
====midRange=150====
'''[[TokenNameValueTypes|Float]]'''
;Type: [[TokenNameValueTypes|Integer]]


==maxRange=500==
'''[[TokenNameValueTypes|Integer]]'''


==maxRangeProbab=0.04==
====midRangeProbab= 0.58====
'''[[TokenNameValueTypes|Float]]'''
;Type: [[TokenNameValueTypes|Float]]


==memoryPointCamera="eye"==
 
====maxRange=500====
;Type: [[TokenNameValueTypes|Integer]]
 
 
====maxRangeProbab=0.04====
;Type: [[TokenNameValueTypes|Float]]
 
 
====memoryPointCamera="eye"====
'''Arma'''
'''Arma'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' MuzzleClass


memoryPointCamera = "GL eye";
;Type: [[TokenNameValueTypes|String]]
;Description: MuzzleClass
 
<syntaxhighlight lang="c">
memoryPointCamera = "GL eye";
</syntaxhighlight>
 
====model="[.p3d]"====
;Type: [[TokenNameValueTypes|String]]


==model="[.p3d]"==
<syntaxhighlight lang="c">
<br>[[TokenNameValueTypes|String]]
model = "\ca\a10\AGM65";
<br>'''Description:'''
</syntaxhighlight>


  model = "\ca\a10\AGM65";
   
====modelMagazine="[.p3d]"====
'''Arma'''
 
;Type: [[TokenNameValueTypes|String]]


==modelMagazine="[.p3d]"==
'''ArmA'''
<br>[[TokenNameValueTypes|String]]


==modelMagazine="\misc\mag_univ"==
====modelMagazine="\misc\mag_univ"====
'''OFP'''
'''OFP'''
<br>[[TokenNameValueTypes|String]]


==modelOptics="[.p3d]"==
;Type: [[TokenNameValueTypes|String]]
 
 
====modelOptics="[.p3d]"====
'''MuzzleClass'''
'''MuzzleClass'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' Optic model used in game. "-" defines 3d view from the model (point "eye")


modelOptics = "\ca\Weapons\G36_optics";  
;Type: [[TokenNameValueTypes|String]]
modelOptics = "-";
;Description: Optic model used in game. "<tt>-</tt>" defines 3d view from the model (point "eye").
 
<syntaxhighlight lang="c">
modelOptics = "\ca\Weapons\G36_optics";  
modelOptics = "-";
</syntaxhighlight>
 
====modelSpecial=[.p3d]""====
;Type: [[TokenNameValueTypes|String]]
 


==modelSpecial=[.p3d]""==
====modes[]= {"this"}====
'''[[TokenNameValueTypes|String]]'''
;Type: [[TokenNameValueTypes|String]];Type: [[TokenNameValueTypes|Array]]
;Description: Anything you care to claim as a class ''xxx''.


==modes[]= {"this"}==
<tt>modes[]= {"this"};</tt> means all parameters necessary for the one and only mode are declared within the main body. Note this '''also''' gives the ''order'' of selection using the control key in-game.
[[TokenNameValueTypes|String]][[TokenNameValueTypes|Array]]
<br>'''Description:''' Anything you care to claim as a class xxx. modes[]= {"this"}; means all parms necessary for the one and only mode are declared within the main body. Note this '''also''' gives the ''order'' of selection using the control key in-game.


modes[] = {"single","burst","auto"};
<syntaxhighlight lang="c">
modes[] = {"single", "burst", "auto"};
</syntaxhighlight>


==multiplier=1==
====multiplier=1====
'''ModeClass'''
'''ModeClass'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' Ammunition used per shot.


==muzzleEnd="konec hlavne"==
;Type: [[TokenNameValueTypes|Integer]]
[[TokenNameValueTypes|String]]
;Description: Ammunition used per shot.
 
 
====muzzleEnd="konec hlavne"====
;Type: [[TokenNameValueTypes|String]]
 


==muzzlePos="usti hlavne"==
====muzzlePos="usti hlavne"====
[[TokenNameValueTypes|String]]
;Type: [[TokenNameValueTypes|String]]


==muzzles[]={"this"}==
[[TokenNameValueTypes|Array]]
<br>'''Description:''' similar to modes, if not declared, assumed muzzle is 'this'


muzzles[] = {"TimeBombMuzzle","PipeBombMuzzle","MineMuzzle","MineEMuzzle"};
====muzzles[]={"this"}====
;Type: [[TokenNameValueTypes|Array]]
;Description: Similarly to ''modes'', if not declared, the assumed muzzle is <tt>"this"</tt>.


<syntaxhighlight lang="c">
muzzles[] = {"TimeBombMuzzle", "PipeBombMuzzle", "MineMuzzle", "MineEMuzzle"};
</syntaxhighlight>




=N=
===N===
====nameSound=""====
;Type: [[TokenNameValueTypes|String]]
;Description: Sound ''classname'' played when ''vehicle commander'' switches to this weapon?


==nameSound=""==
<syntaxhighlight lang="c">
[[TokenNameValueTypes|String]]
nameSound = "smokeshell";
<br>'''Description:''' sound classname played when vehicle commander switches to this weapon?
</syntaxhighlight>


nameSound = "smokeshell";


==nameSound="weapon"==
====nameSound="weapon"====
'''OFP'''
'''OFP'''
<br>[[TokenNameValueTypes|String]]


;Type: [[TokenNameValueTypes|String]]
===O===
====optics=true====
;Type: [[TokenNameValueTypes|Boolean]]




=O=
====opticsDisablePeripherialVision=0.67====
'''Arma'''


==optics=true==
;Type: [[TokenNameValueTypes|Float]]
'''[[TokenNameValueTypes|Boolean]]'''




==opticsDisablePeripherialVision=0.67==
====opticsFlare=true====
'''ArmA'''
;Type: [[TokenNameValueTypes|Boolean]]
<br>[[TokenNameValueTypes|Float]]


==opticsFlare=true==
'''[[TokenNameValueTypes|Boolean]]'''


==opticsPPEffects[] = {}==
====opticsPPEffects[] = {}====
'''Arma'''
'''Arma'''
<br>[[TokenNameValueTypes|Array]]


==opticsZoomInit= 0.35==
;Type: [[TokenNameValueTypes|Array]]
 
 
====opticsZoomInit= 0.35====
'''MuzzleClass'''
'''MuzzleClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' Optics field of view at default zoom in radians.


==opticsZoomMax=0.35==
;Type: [[TokenNameValueTypes|Float]]
;Description: Optics field of view at default zoom in radians.
 
 
====opticsZoomMax=0.35====
'''MuzzleClass'''
'''MuzzleClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' Optics field of view at maximum zoom in radians.


==opticsZoomMin=0.35==
;Type: [[TokenNameValueTypes|Float]]
;Description: Optics field of view at maximum zoom in radians.
 
 
====opticsZoomMin=0.35====
'''MuzzleClass'''
'''MuzzleClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' Optics field of view at minimum zoom in radians.


;Type: [[TokenNameValueTypes|Float]]
;Description: Optics field of view at minimum zoom in radians.




=P=
===P===
====picture="[\][.pac]"====
;Type: [[TokenNameValueTypes|String]]
;Description: Defines ''weapon'' '''and''' ''magazine''. See below.


==picture="[\][.pac]"==
[[TokenNameValueTypes|String]]
<br>'''Description:''' Defines weapon '''and''' magazine. See below


==primary=10==
====primary=10====
[[TokenNameValueTypes|Integer]]  
;Type: [[TokenNameValueTypes|Integer]]




===R===
====recoil="Empty"====
'''ModeClass'''


=R=
;Type: [[TokenNameValueTypes|String]]
;Description: Selects recoil defined in ''cfgRecoils'' class. Arma differs substantially in Recoil ability; much more of them, and very different names.


==recoil="Empty"==
<syntaxhighlight lang="c">
'''ModeClass'''
recoil = "AK74Recoil"
<br>[[TokenNameValueTypes|String]]
</syntaxhighlight>
<br>'''Description:''' Selects recoil defined in cfgRecoils class. ArmA differs substantially in Recoil ability. Much more of them, and very different names.


  recoil="AK74Recoil"
   
====recoilProne=""====
'''ArmaModeClass'''


==recoilProne=""==
;Type: [[TokenNameValueTypes|String]]
'''ArmAModeClass'''
;Description: When prone, recoil can be set to slower values.
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' When prone, recoil can be set to slower values


recoilProne = "AK74Recoil"
<syntaxhighlight lang="c">
recoilProne = "AK74Recoil"
</syntaxhighlight>


==reloadAction=""==
====reloadAction=""====
'''Arma'''
'''Arma'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' enumerated list


==reloadAction="ManActReloadMagazine"==
;Type: [[TokenNameValueTypes|String]]
;Description: Enumerated list.
 
 
====reloadAction="ManActReloadMagazine"====
'''OFP'''
'''OFP'''
<br>[[TokenNameValueTypes|String]]


==reloadMagazineSound[]={"",1,1}==
;Type: [[TokenNameValueTypes|String]]
 
 
====reloadMagazineSound[]={"",1,1}====
'''MuzzleClass'''
'''MuzzleClass'''
<br>[[TokenNameValueTypes|Array]]
<br>'''Description:''' Sound played while changing magazines.


reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload",0.000316228,1};
;Type: [[TokenNameValueTypes|Array]]
;Description: Sound played while changing magazines.


==reloadSound[]={"",1,1}==
<syntaxhighlight lang="c">
[[TokenNameValueTypes|Array]]
reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload", 0.000316228, 1};
<br>'''Description:''' Sound played after each shot.
</syntaxhighlight>
====reloadSound[]={"",1,1}====
;Type: [[TokenNameValueTypes|Array]]
;Description: Sound played after each shot.


reloadSound[] = {"\ca\Weapons\Data\Sound\gun125reload",1,1};
<syntaxhighlight lang="c">
reloadSound[] = {"\ca\Weapons\Data\Sound\gun125reload", 1, 1};
</syntaxhighlight>
====reloadTime=1.0====
'''ModeClass'''


==reloadTime=1.0==
;Type: [[TokenNameValueTypes|Float]]
'''ModeClass'''
;Description: Time delay between each individual shot.
<br>[[TokenNameValueTypes|Float]]
 
<br>'''Description:''' Time delay between each individual shot.
 
===S===
====scope=0====
'''Arma'''
 
;Type: [[TokenNameValueTypes|Integer]]
;Description: {{Name|ofp|short}} had no scope token. Instead, it used ''scopeWeapon'' and ''scopeMagazine'' to distinguish who was what and when used.


<tt>2</tt> = ''can use'' in-game, with a picture in gear present. <tt>1</tt> = ''can use'' in-game with no picture in gear.




=S=
====scopeWeapon=0====
'''OFP'''


==scope=0==
;Type: [[TokenNameValueTypes|Integer]]
'''ArmA'''
 
<br>[[TokenNameValueTypes|Integer]]
 
<br>'''Description:''' OFP had no scope token. Instead, it used scopeWeapon and ScopeMagazine to distinguish who was what and when used. 2 = can use ingame, picture in gear present, 1 = can use ingame, no picture in gear.
====scopeMagazine=0====
'''OFP'''


==scopeWeapon=0==
;Type: [[TokenNameValueTypes|Integer]]
'''Ofp'''
;Description: Used as couplets instead of scope.
<br>[[TokenNameValueTypes|Integer]]


==scopeMagazine=0==
'''Ofp'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' used as couplets instead of scope


==selectionFireAnim="zasleh"==
====selectionFireAnim="zasleh"====
'''Arma'''
'''Arma'''
<br>[[TokenNameValueTypes|String]]


==shortNameMagazine=""==
;Type: [[TokenNameValueTypes|String]]
 
 
====shortNameMagazine=""====
'''OFP'''
'''OFP'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' The descriptive magazine paragraph. Replaced in Arma by descriptionShort in the [[CfgMagazines Config Reference|cfgMagazines Class]]


==shotFromTurret???==
;Type: [[TokenNameValueTypes|String]]
'''ArmA'''
;Description: The descriptive magazine paragraph. Replaced in Arma by ''descriptionShort'' in the [[CfgMagazines Config Reference|cfgMagazines Class]].
<br>[[TokenNameValueTypes|Boolean]]
 
<br>'''Description:''' meaning unknown. But "zasleh" animation is not working if set to 1
 
====shotFromTurret???====
'''Arma'''
 
;Type: [[TokenNameValueTypes|Boolean]]
;Description: Meaning unknown. But "''zasleh''" animation is not working if set to <tt>1</tt>.
 
 
====showAimCursorInternal=true====
'''Arma'''
 
;Type: [[TokenNameValueTypes|Boolean]]
 
 
====showEmpty=true====
;Type: [[TokenNameValueTypes|Boolean]]
 
'''Description:''' If false weapon gets hidden from the player once there's no ammo left for it
 


==showAimCursorInternal=true==
====showSwitchAction=false====
'''ArmA'''
'''Arma'''
<br>[[TokenNameValueTypes|Boolean]]


==showEmpty=true==
;Type: [[TokenNameValueTypes|Boolean]]
[[TokenNameValueTypes|Boolean]]
<br>'''Description:''' If false weapon gets hidden from the player once there's no ammo left for it


==showSwitchAction=false==
'''ArmA'''
<br>[[TokenNameValueTypes|Boolean]]


==showToPlayer=true==
====showToPlayer=true====
'''ModeClass'''
'''ModeClass'''
<br>[[TokenNameValueTypes|Boolean]]
<br>'''Description:''' Some modes defined for Ai usage (ex. burst modes for full auto weapons) can be hidden from player with this parameter


;Type: [[TokenNameValueTypes|Boolean]]
;Description: Some modes defined for ''AI'' usage (''e.g.'' burst modes for full auto weapons) can be hidden from player with this parameter.
====simulation="Weapon"====
'''Arma'''
;Type: [[TokenNameValueTypes|String]]


==simulation="Weapon"==
'''ArmA'''
<br>[[TokenNameValueTypes|String]]


==sound[]={"",1,1}==
====sound[]={"",1,1}====
'''ModeClass'''
'''ModeClass'''
<br>[[TokenNameValueTypes|Array]]
<br>'''Description:'''  There are several sound '''types''' Most are relevent to the weapon overall and specified in the main body, sound[]= is specific to each mode. The last parameter defines how fast the sound should be played. 1 means normal speed.


sound[] = {"\ca\Weapons\Data\Sound\AGS30_shot1",10,1};
;Type: [[TokenNameValueTypes|Array]]
;Description: There are several sound ''types''. Most are relevant to the weapon overall and specified in the main body, whilst <tt>sound[]=</tt> is specific to each mode.


==soundBurst=true==
The last parameter defines how fast the sound should be played. <tt>1</tt> means normal speed.
 
<syntaxhighlight lang="c">
sound[] = {"\ca\Weapons\Data\Sound\AGS30_shot1", 10, 1};
</syntaxhighlight>
 
====soundBurst=true====
'''ArmaModeClass'''
'''ArmaModeClass'''
<br>[[TokenNameValueTypes|Boolean]]
<br>'''Description:''' When set to false single shot sound can be used with burst mode - it will be played several times


==soundContinuous=false==
;Type: [[TokenNameValueTypes|Boolean]]
;Description: When set to <tt>false</tt>, the single shot sound can be used with burst mode - it will be played several times.
 
 
====soundContinuous=false====
'''ModeClass'''
'''ModeClass'''
<br>[[TokenNameValueTypes|Boolean]]
<br>'''Description:''' If true sound for the next shot won't start before previous oe ends. Thus you can prevent sound overlapping.


==soundBegin[]={"sound",1}==
;Type: [[TokenNameValueTypes|Boolean]]
;Description: If <tt>true</tt>, the sound for the next shot won't start before previous one ends. Thus you can prevent sound overlapping.
 
 
====soundBegin[]={"sound",1}====
'''ArmaModeClass'''
'''ArmaModeClass'''
<br>[[TokenNameValueTypes|Array]]


==soundBullet[]={"emptySound",1}==
;Type: [[TokenNameValueTypes|Array]]
 
 
====soundBullet[]={"emptySound",1}====
'''ArmaModeClass'''
'''ArmaModeClass'''
<br>[[TokenNameValueTypes|Array]]


==soundEnd[]={"sound",1}==
;Type: [[TokenNameValueTypes|Array]]
'''ArmAModeClass'''
 
<br>[[TokenNameValueTypes|Array]]


==soundLoop[]={"sound",1}==
====soundEnd[]={"sound",1}====
'''ArmaModeClass'''
'''ArmaModeClass'''
<br>[[TokenNameValueTypes|Array]]
<br>'''Description:''' note that there is extensive use of soundloops in arma. Most weapons elaborate on this basic, essentially ofp, structure with begin 1,2,3 loops etc.


==soundFly[]==
;Type: [[TokenNameValueTypes|Array]]
'''[[TokenNameValueTypes|Array]]'''
 


soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1",25.1189,0.8};
====soundLoop[]={"sound",1}====
'''ArmaModeClass'''


==soundServo[]==
;Type: [[TokenNameValueTypes|Array]]
'''[[TokenNameValueTypes|Array]]'''
;Description: Note that there is extensive use of ''soundloops'' in Arma. Most weapons elaborate on this basic, essentially {{Name|ofp|short}}, structure with begin <tt>1, 2, 3</tt> loops etc.


soundServo[] = {"",0.0001,1};


====soundFly[]====
;Type: [[TokenNameValueTypes|Array]]


<syntaxhighlight lang="c">
soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1", 25.1189, 0.8};
</syntaxhighlight>


=T=
====soundServo[]====
;Type: [[TokenNameValueTypes|Array]]


==Type=WeaponHardMounted==
<syntaxhighlight lang="c">
soundServo[] = {"", 0.0001, 1};
</syntaxhighlight>
===T===
====Type=WeaponHardMounted====
'''Arma'''
'''Arma'''
<br>[[TokenNameValueTypes|Integer]]


;Type: [[TokenNameValueTypes|Integer]]




=U=
===U===
====UiPicture="[\][.pac]"====
'''ArmA'''
 
;Type: [[TokenNameValueTypes|String]]


==UiPicture="[\][.pac]"==
<syntaxhighlight lang="c">
'''ArmA'''
\CA\weapons\data\Ico\i_aa_CA.paa";
<br>[[TokenNameValueTypes|String]]
</syntaxhighlight>


  \CA\weapons\data\Ico\i_aa_CA.paa";
   
====uiPicture="ivojak"====
'''OFP'''


==uiPicture="ivojak"==
'''ofp'''


==useAction=false==
====useAction=false====
'''ModeClass'''
'''ModeClass'''
<br>[[TokenNameValueTypes|Boolean]]


==useActionTitle=""==
;Type: [[TokenNameValueTypes|Boolean]]
 
 
====useActionTitle=""====
'''ModeClass'''
'''ModeClass'''
<br>[[TokenNameValueTypes|String]]


useActionTitle = "$STR_ACTION_PUTBOMB";
;Type: [[TokenNameValueTypes|String]]


==useAsBinocular=false==
<syntaxhighlight lang="c">
[[TokenNameValueTypes|Boolean]]
useActionTitle = "$STR_ACTION_PUTBOMB";
</syntaxhighlight>


====useAsBinocular=false====
;Type: [[TokenNameValueTypes|Boolean]]




=V=
===V===
====value=2====
'''Arma'''
 
;Type: [[TokenNameValueTypes|Integer]]
 
 
====valueMagazine=2====
'''OFP'''
 
;Type: [[TokenNameValueTypes|Integer]]


==value=2==
'''ArmA'''
<br>[[TokenNameValueTypes|Integer]]


==valueMagazine=2==
====valueWeapon=2====
'''ofp'''
'''OFP'''
<br>[[TokenNameValueTypes|Integer]]


==valueWeapon=2==
;Type: [[TokenNameValueTypes|Integer]]
'''ofp'''
<br>[[TokenNameValueTypes|Integer]]




===W===
====weaponType=WeaponHardMounted====
'''OFP'''


=W=
;Type: [[TokenNameValueTypes|Integer]]


==weaponType=WeaponHardMounted==
'''ofp'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' See Types below


----
{{Cfg ref|end}}


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

Revision as of 02:09, 15 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 inherit in the game or provided by oem.

cfgAmmo defines the missile 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.

The same ammunition can be, and generally is, used by multiple magazines. The same magazine, can be, and generally is, used by multiple weapons. And so on.

cfgWepaons define the rifle e.g. characteristics. What muzzles it has, how many 'modes' (if any) it can use. What magazines are selectable.


Arma Enhancement

Arma introduced a new root class, cfgMagazines.

In contrast, OFP uses a rather tedious construct in it's cfgWeapons class to distinguish between weapon and magazine parameters.

The major alterations here are:

OFP Arma
ammo= moved to cfgMagazines
cost= moved to cfgMagazines
displayNameMagazine= moved to cfgMagazines and renamed DisplayName (of course)
magazines[] = {"this"}; magazines[] = {};
magazineType= moved to cfgMagazines and renamed Type
maxLeadSpeed= moved to cfgMagazines
minRange= moved FROM cfgAmmo
minRangeProbab=
midRange=
midRangeProbab=
maxRange=
maxRangeProbab=
scopeWeapon= renamed scope
scopeMagazine= moved to cfgMagazines and renamed scope
shortNameMagazine= moved to cfgMagazines and renamed descriptionShort?


Modifications

cfgWeapons {
    access = 1;
    ...

    //Weapon classes can be added.

    default {
        access = 3;
    ...
}

Existing classes can (rarely) be altered.

The default class of cfgWeapons 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 weapon (should you wish to with other addons), you must change the access= in YOUR Weapon.


Navigation: The the wood for the trees

cfgWeapons can be a puzzling mess to the uninitiated.

The tokenpairs, their placement, and their constructs can be befuddled. This is not a reflection on BI, the ultimate class structure is very, very, adaptive, but, it does confuse.

Essentially, Arma did open heart, and excellent, surgery to this class to distinguish between weapons and their magazines. OFP had a common weapon/magazine class with variables declaring what to use and when. Variables only relevant to OFP, are sometimes still encountered in Arma, simply because, they do no harm.

Weapons come in two major flavors (with plenty of sub themes). A weapon either has, or does not have, a modes[] class or classes adding different behaviour like autofire, burst or single shot. Confusingly, a weapon with only one mode, is, equivalent to not declaring it at all. The tokens that would normally be in a modes class, are declared in the main body instead. This obfuscates what-goes-where.

Weapons can have different muzzles, adding a further layer of modelling.

The inherited tree structure for weapons vs their magazines, vs their ammo, is not always logical. This is a throwback to OFP which (for instance) inherited RPG Ammo from an AT3, but inherited the RPG weapon from a CarlGustav, and so on. The end result being identical and good, since offending parameters were altered as necessary - but it does confuse what a HellfireHind really is, depending on who you are (ammo vs mag vs weapon).


Modes

Some TokenNames are relevant only within a mode class (e.g. sound[]=), and stated as such.

All weapons, without exception, have at least one mode class.

By default, the inherited mode for a weapon is:

modes[] = {"this"};

Which means the engine will treat the main body as also being a mode class unless over-ridden.

Some weapons do not have a modes class specified, nor do they inherit a specified modes class via their parent(s). Under these circumstances, TokenNames stated to be ModeClass only must occur in the main body of that weapon (or it's parents) instead. The TokenNames themselves, remain, accurately described, as being mode class only.


Muzzles

Exact same comments as per Modes. By default the inherited muzzle for a weapon is:

muzzles[] = {"this"};

Parameters belonging in muzzles are stated as such.

Different muzzles are normally only encountered on grenade launcher weapons (?).


TokenNames

All engines accept integer values (or math strings) where a float would normally be expected.

Default values are shown in the legend.

Usage
OFP generally moved to Arma's cfgMagazines Class and often renamed, else simply renamed.
Arma: Introduced from OFP:E and beyond.
ModesClass: Any item marked as a ModesClass lives in a class Mode... body. It must be declared (or inherited) for each class.
MuzzleClass: Any item marked as a MuzzleClass lives in a class Muzzle... body. It must be declared (or inherited) for each class. Normally, except for grenade launchers, the muzzle IS the mainbody.
Blank: Used as described in both OFP, and, Arma.

Dual Use TokenNames (such as picture=) moved to Arma's cfgMagazines Class as appropriate.


Picture="[\][.pac]"

Defines WEAPON Picture and separately MAGAZINE Picture. OFP generally created two cfgWeapon classes. One for the weapon and one for the magazine. picture= was declared in each. In Arma, the magazine picture name has been moved to the cfgMagazines class as appropriate.

Note that this is one of those irritating BI path snafu's (when if ever will they start using relative addressing?). The following notes apply to most picture= references, not just cfgWeapons.

  1. The DEFAULT extension is .pac. The engine accepts .pac or .paa, but .pac is not supposed to exist. A .paa must be explicitly declared.
  2. Path must explicitly have a \ leading.

This because in OFP it was possible to not declare any picture at all.

In which case (in OFP) the engine looks for the .paa file in \dta\dtaext\NameOfClass.paa

The Arma engine appears to make a mess of it. Any picture reference without a preceding slash will look in a non-existent 'equip.pbo'

Specifically:

equip\w\w_your\path\name  // for weapons and
equip\m\m_your\path\name  // for mags

If no picture is specified, then like OFP, equip\w\w_NameOfClass is assumed.

Note also the 'convention' of naming weapon images with w_ and magazine images with m_ (and to a certain extent having data\equip file paths). This is rigidly followed in Arma. In OFP, BI were inconsistent.


Types

type=WeaponHardMounted (ArmaOnly)

Template:Example needed

magazineType=None (OfpOnly)

Template:Example needed

weaponType=WeaponHardMounted (OfpOnly)

Integers (Note this value is often held as a math String)

Gear (equipment) selection consists of SlotTypes and one or more slot positions of that type.

This integer is a bit-field containing SlotType and count which defines which SlotType this item will occupy in gear selection and how many slots of that type it requires. It does NOT define which slot position to occupy, only the Type of Slot. Various engines will show this item in positions of their own choosing.

  • An item is defined as being a weapon, magazine, or equipment.
    • A weapon is rifle, handgun, LAW launcher.
    • A magazine is a magazine, a shell ,a LAW, a PipeBomb, a grenade - i.e. a housing for the cfgAmmo explosive(s).
    • equipment are binoculars, NVG, etc.

For Arma, MagazineSlots and WeaponSlots are mutually exclusive. The classes occur in the cfgWeapons or cfgMagazines respectively. In OFP both types of class exist in cfgWeapons, and are often the same class. OFP does not have a Type=; instead, it uses WeaponType= and MagazineType= couplets. The end result, and the intent, is identical.

Note: the quite serious alteration to SecondaryWeapon and Handgun mags that occurred in Arma. This to allow for an increased count field in Handgun Magazines.
Slot: SlotType value/nbits Example
OFP Arma
Either: NoSlot 0/0 same stroke is a weapon, but it occupies no slots
Weapon: PrimaryWeapon 1/1 same AK47
Weapon: HandGun 2/1 same CZ75
Weapon: SecondaryWeapon 16/1 4/1 LAW
Mag: HandGunMagazines 32/3 16/4 CZ75Mag or GLMag
Mag: MainMagazines 256/4 same AK47Mag or explosives
Weapon: BinocularSlot 4096/4 same Binoculars or NVG, LD etc.
Weapon: HardMounted 65536/1 same
Mag: SmallItems 131072/4 (Arma 2) map, compass, small items (derived from ItemCore)


The specific combination for machine guns normally occupy both weapon slots i.e. PrimaryWeapon + SecondaryWeapon.


Magazine Sizes

Architecturally, all bit-fields are counts. The fact that a PrimaryWeapon can only be 1, still makes it a count of that SlotType.

In practical terms magazines are the only item (warning: currently) to have bit-fields > 1.

Most weapons use a single slot to declare a single magazine.

Shell weapons such as the RPG require three slots to hold the magazine. OFP presented this by filling those slots with the image. Arma makes a mess of it with a somewhat ugly blank between slots. You are supposed to guess why it's blank.

No handgun magazine (currently) has a size > 1. This could change on e.g. a remote controlled explosive. The bit-field is larger for reasons explained in Joining the dots (below).

For MainWeapon Magazines, specific bit-field identities between 256 and 4096 are frequently represented textually as:

"1 * 256" // main mags
"2 * 256" // m60,pk,mortars
"3 * 256" // law , rpg
"4 * 256" // 6g30 4 slots needed
"6 * 256" // carlgustav,stinger 6 slots needed
"8 * 256" // mm1 all slots needed

And, of course, in Arma, these fields are only relevant in it's CfgWeapons.


CfgVehicles: Joining the dots

A vehicle, in this case a human or parachute, has it's equipment slots defined in it's cfgVehicles Class. The Weaponslots= bit-field declares whether or not a piece of equipment can be carried at all, and if so, how much, or max size of that equipment, measured in slots.

cfgVehicles.Weaponslots= is deceptively similar to cfgWeapons.Type= (and vice versa). Weaponslots= defines the carrying capacity for equipment, type= defines the size of of that equipment.

Different humans have more or fewer slots than others. Clearly, medics, police, civilians and some resistance fighters, cannot carry heavy armament. They're either not trained to, or, they're already implicitly carrying medical packs. The disastrous Arma completely destroyed this distinction. Arma 2 enhances the distinction a little more than OFP.

A generalised capacity declaration for humans is:

weaponSlots=
PrimaryWeapon+ Can carry a Primary Weapon
SecondaryWeapon+ Sometimes able to carry a Secondary or even heavier Weapon (LAW, MG, stinger)
(4+6)*MainMagazines+ Can carry n*Magazines for these weapons (AK47Mag) (or max size of shell)
HandGun+ Can carry a Handgun (e.g. Beretta)
2*WeaponSlotBinocular+ Can carry n*slots of equipment
4*HandGunMagazines+ Can carry n*Handgun Magazines (CZ75Mag)
12*SmallItems can carry n*slots of SmallItems (Arma 2)


These will later be filled out with specific weapons in the human's weapons[]= and magazines[]= arrays. Placing too many causes a ctdClarify.

Note that specific Arma 2 women can only carry magazines and small equipment (for their boyfriends?) and nothing else.

Magazine carrying ability altered markedly for Arma 2 vs OFP; it's the reason for the nasty change to the bit-field, and is as follows:

OFP Arma
Rifle Potential 15 15
Actual 4 to 10 2 to 12
Handgun Potential 7 15
Actual 4 4 or 8
Binoculars 1 or 2 0 to 2


Alphabetical Order

Template:Cfg ref

A

access=3

Type
Integer
#define ReadAndWrite 0		// any modifications enabled
#define ReadAndCreate 1		// only adding new class members is allowed
#define ReadOnly 2			// no modifications enabled
#define ReadOnlyVerified 3	// no modifications enabled, CRC test applied


aiDispersionCoefX=1.0

Type
Float
Description
Dispersion multiplier for AI units (axis X - left to right).


aiDispersionCoefY=1.0

Type
Float
Description
Dispersion multiplier for AI units (axis Y - top-down).


aiRateOfFire=5.0

ModeClass

Type
Float
Description
Delay between shots at given aiRateOfFireDistance.


aiRateOfFireDistance=500

ModeClass

Type
Integer
Description
At shorter distance delay (aiRateOfFire) goes linearly to zero.


ammo=""

OFPModeClass

Type
String
Description
cfgAmmo class that this weapon fires. Moved to cfgMagazines in Arma.
ammo = "TimeBomb";


autoAimEnabled=true

Type
Boolean
Description
false for all standard weapons.


autoFire=false

ModeClass

Type
Boolean
Description
If true, weapon will fire repeatedly all the while you hold the fire button down.

And if true the gunner can use the weapon on his own discretion (no commander fire order needed - like MG type).


autoReload=true

Type
Boolean
Description
If true weapon will be reloaded automatically once magazine is empty.


B

backgroundReload=false

Type
Boolean
Description
Weapon automatically reloads magazines without player intervention or animation.


ballisticsComputer=false

Arma

Type
Boolean
Description
Weapon attempts to calculate and shift the aim-point to hit a locked target based on range, target movement, own movement, and ballistics of selected ammo type.


burst=1

ModeClass

Type
Integer
Description
Number of shots actually fired each time the weapon is fired.


C

cameraDir

MuzzleClass

Type
String
cameraDir = "GL look";


canDrop=true

Type
Boolean
Description
Weapon can/not be dropped from Inventory Menu.

canDrop is poorly implemented. It is normally associated with true vehicles such as air. For humans nothing in the GUI panel suggests that you can't drop a weapon, and yet, hidden-from-view, the drop action has no effect. canDrop should have also been implemented in cfgMagazines, but isn't. You can always drop the magazine, and yet, for some weapons, such as a laser designator, this is nonsensical.


canLock=2

Type
Integer
Description
Defines if weapon can be locked on the target (white box appears).
#define LockNo		0
#define LockCadet	1
#define LockYes		2


cartridgePos="nabojnicestart"

Type
String


cartridgeVel="nabojniceend"

Type
String


count=0

OFP

Type
Integer
Description
Number of shots weapon starts with. Moved to cfgMagazines in Arma.


cursor=""

Arma

Type
String


cursor="w_weapon"

OFP

Type
String


cursorAim=""

Arma

Type
String
cursorAim = "\ca\Weapons\Data\cursor_target_locked_ca.paa";


cursorAim="w_lock"

OFP

Type
String


cursorAimOn=""

Arma

Type
String


cursorSize=1.0

Arma

Type
Float


D

dexterity=3.1

Type
Float
Description
In-game weapon handling value, lower value = takes more time to traverse a weapon.
dexterity = 3.1;


dispersion=0.002

ModeClass

Type
Float
Description
In-game weapon dispersion in radians. Bigger value = more dispersion.


displayName=""

MainBody

Type
String
Description
Name of the WEAPON. Declared in the main body. This string is shown in gear selection as the rifle's name.


ModeClass

Description
Name of the MODE. In every mode class. This string is shown in-game when selecting burst, single, auto etc.

A weapon that only has a single mode normally has the same displayname, repeated in the mode class. But, repeated, it must be.

A weapon with no modes (modes={"this"); uses the weapon name for both.


MuzzleClass

Description
Name of the MUZZLE. In every muzzle class.

This string is shown in-game similar to burst, single, auto etc.

It is quite common for one of the muzzle classes to inherit a basic rifle muzzle, in which case, the name of the muzzle for THAT class is the inherited weapon name.

A weapon with no muzzles i.e. muzzles={"this"}; uses the weapon name.


displayNameMagazine=""

OFP

Type
String
Description
displayname of the magazine in gear selection. Replaced in Arma via the cfgMagazines Class.

See also shortNameMagazine and descriptionShort


distanceZoomMax=400

Type
Integer


distanceZoomMin=400

Type
Integer


descriptionShort=""

Arma

Type
String
Description
A paragraph or two describing the rifle in bottom left panel of in-game gear selection.

This is NOT equivalent of OFP's short label (shortNameMagazine). THAT descriptionShort exists in cfgMagazines.


drySound[]={"",1,1}

Type
Array
Description
Click Sound when empty weapon fired.
drySound[] = {"\ca\Weapons\Data\Sound\XMS_dry_v2", 0.000316228, 1};


E

enableAttack=true

Type
Boolean


emptySound[]={"",1,1}

Arma

Type
Array


F

ffCount=1

ModeClass

Type
Integer


ffFrequency=1

ModeClass

Type
Float


ffMagnitude=0.0

ModeClass

Type
Float


fireLightDuration=0.05

Arma

Type
Float


fireLightIntensity=0.012

Arma

Type
Float


flash=""

Type
String
flash = "gunfire";


flashSize=0.0

ModeClass

Type
Float
Description
OFP only?


forceOptics=0

Type
Integer
Description
Valid values: 0, 1, 2 as per canLock.


H

handAnim[]={}

Arma

Type
Array


I

initSpeed=0

Type
Integer
Description
Initial speed of shot in meters per second. Also present in cfgMagazines.
initSpeed = 900;


L

laser=false

Arma

Type
Boolean


Library

Arma

class Library
{
	libTextDesc = "";
};


libTextDesc

ArmaClass

Type
String
libTextDesc = "$STR_LIB_SVD";


M

magazineReloadTime=0

MuzzleClass

Type
Float
Description
Time delay when reloading the weapon (changing magazines).


magazines[]={"this"}

OFP

Type
StringArray
Description
Array of magazine classes compatible with this weapon. This same Weapon class in cfgWeapons if not over-ridden.


magazines[]={}

Arma

Type
StringArray
Description
These are declared here, same as OFP, but defined in cfgMagazines.

Note, with extreme caution: Unlike OFP, you cannot have identically named magazine classes. The in-game gear selection panel gets confused. Safe bet is to call all your magazine classes "[rifle]Mag".


maxLeadSpeed=50

OFP

Type
Integer
Description
Maximum speed of the target that can be shot with this weapon by AI. Moved to cfgMagazines in Arma.


min/mid/maxRange...

ArmAModeClass

Type
Integer
Description
Together with range and rangeProbab values, defines probability to use this weapon for AI units at given distance.

For OFP these parameters were specified in cfgAmmo, rendering all rifles the same.


magazineType=0

OFP

Type
Integer
Description
See Types below.


minRange=1

Type
Integer


minRangeProbab=0.3

Type
Float


midRange=150

Type
Integer


midRangeProbab= 0.58

Type
Float


maxRange=500

Type
Integer


maxRangeProbab=0.04

Type
Float


memoryPointCamera="eye"

Arma

Type
String
Description
MuzzleClass
memoryPointCamera = "GL eye";


model="[.p3d]"

Type
String
model = "\ca\a10\AGM65";


modelMagazine="[.p3d]"

Arma

Type
String


modelMagazine="\misc\mag_univ"

OFP

Type
String


modelOptics="[.p3d]"

MuzzleClass

Type
String
Description
Optic model used in game. "-" defines 3d view from the model (point "eye").
modelOptics = "\ca\Weapons\G36_optics"; 
modelOptics = "-";


modelSpecial=[.p3d]""

Type
String


modes[]= {"this"}

Type
String;Type: Array
Description
Anything you care to claim as a class xxx.

modes[]= {"this"}; means all parameters necessary for the one and only mode are declared within the main body. Note this also gives the order of selection using the control key in-game.

modes[] = {"single", "burst", "auto"};


multiplier=1

ModeClass

Type
Integer
Description
Ammunition used per shot.


muzzleEnd="konec hlavne"

Type
String


muzzlePos="usti hlavne"

Type
String


muzzles[]={"this"}

Type
Array
Description
Similarly to modes, if not declared, the assumed muzzle is "this".
muzzles[] = {"TimeBombMuzzle", "PipeBombMuzzle", "MineMuzzle", "MineEMuzzle"};


N

nameSound=""

Type
String
Description
Sound classname played when vehicle commander switches to this weapon?
nameSound = "smokeshell";


nameSound="weapon"

OFP

Type
String


O

optics=true

Type
Boolean


opticsDisablePeripherialVision=0.67

Arma

Type
Float


opticsFlare=true

Type
Boolean


opticsPPEffects[] = {}

Arma

Type
Array


opticsZoomInit= 0.35

MuzzleClass

Type
Float
Description
Optics field of view at default zoom in radians.


opticsZoomMax=0.35

MuzzleClass

Type
Float
Description
Optics field of view at maximum zoom in radians.


opticsZoomMin=0.35

MuzzleClass

Type
Float
Description
Optics field of view at minimum zoom in radians.


P

picture="[\][.pac]"

Type
String
Description
Defines weapon and magazine. See below.


primary=10

Type
Integer


R

recoil="Empty"

ModeClass

Type
String
Description
Selects recoil defined in cfgRecoils class. Arma differs substantially in Recoil ability; much more of them, and very different names.
recoil = "AK74Recoil"


recoilProne=""

ArmaModeClass

Type
String
Description
When prone, recoil can be set to slower values.
recoilProne = "AK74Recoil"


reloadAction=""

Arma

Type
String
Description
Enumerated list.


reloadAction="ManActReloadMagazine"

OFP

Type
String


reloadMagazineSound[]={"",1,1}

MuzzleClass

Type
Array
Description
Sound played while changing magazines.
reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload", 0.000316228, 1};


reloadSound[]={"",1,1}

Type
Array
Description
Sound played after each shot.
reloadSound[] = {"\ca\Weapons\Data\Sound\gun125reload", 1, 1};


reloadTime=1.0

ModeClass

Type
Float
Description
Time delay between each individual shot.


S

scope=0

Arma

Type
Integer
Description
OFP had no scope token. Instead, it used scopeWeapon and scopeMagazine to distinguish who was what and when used.

2 = can use in-game, with a picture in gear present. 1 = can use in-game with no picture in gear.


scopeWeapon=0

OFP

Type
Integer


scopeMagazine=0

OFP

Type
Integer
Description
Used as couplets instead of scope.


selectionFireAnim="zasleh"

Arma

Type
String


shortNameMagazine=""

OFP

Type
String
Description
The descriptive magazine paragraph. Replaced in Arma by descriptionShort in the cfgMagazines Class.


shotFromTurret???

Arma

Type
Boolean
Description
Meaning unknown. But "zasleh" animation is not working if set to 1.


showAimCursorInternal=true

Arma

Type
Boolean


showEmpty=true

Type
Boolean

Description: If false weapon gets hidden from the player once there's no ammo left for it


showSwitchAction=false

Arma

Type
Boolean


showToPlayer=true

ModeClass

Type
Boolean
Description
Some modes defined for AI usage (e.g. burst modes for full auto weapons) can be hidden from player with this parameter.


simulation="Weapon"

Arma

Type
String


sound[]={"",1,1}

ModeClass

Type
Array
Description
There are several sound types. Most are relevant to the weapon overall and specified in the main body, whilst sound[]= is specific to each mode.

The last parameter defines how fast the sound should be played. 1 means normal speed.

sound[] = {"\ca\Weapons\Data\Sound\AGS30_shot1", 10, 1};


soundBurst=true

ArmaModeClass

Type
Boolean
Description
When set to false, the single shot sound can be used with burst mode - it will be played several times.


soundContinuous=false

ModeClass

Type
Boolean
Description
If true, the sound for the next shot won't start before previous one ends. Thus you can prevent sound overlapping.


soundBegin[]={"sound",1}

ArmaModeClass

Type
Array


soundBullet[]={"emptySound",1}

ArmaModeClass

Type
Array


soundEnd[]={"sound",1}

ArmaModeClass

Type
Array


soundLoop[]={"sound",1}

ArmaModeClass

Type
Array
Description
Note that there is extensive use of soundloops in Arma. Most weapons elaborate on this basic, essentially OFP, structure with begin 1, 2, 3 loops etc.


soundFly[]

Type
Array
soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1", 25.1189, 0.8};


soundServo[]

Type
Array
soundServo[] = {"", 0.0001, 1};


T

Type=WeaponHardMounted

Arma

Type
Integer


U

UiPicture="[\][.pac]"

ArmA

Type
String
\CA\weapons\data\Ico\i_aa_CA.paa";


uiPicture="ivojak"

OFP


useAction=false

ModeClass

Type
Boolean


useActionTitle=""

ModeClass

Type
String
useActionTitle = "$STR_ACTION_PUTBOMB";


useAsBinocular=false

Type
Boolean


V

value=2

Arma

Type
Integer


valueMagazine=2

OFP

Type
Integer


valueWeapon=2

OFP

Type
Integer


W

weaponType=WeaponHardMounted

OFP

Type
Integer


Template:Cfg ref