CfgWeapons Config Reference: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(Converted table layout to a sections by alphabet layout like the CfgAmmo ref page.)
Line 108: Line 108:
----
----


{|
=Picture="[\][.pac]"=
|||Type||Usage||Desc||Example
|-valign="top"
|access=3||[[TokenNameValueTypes|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||[[TokenNameValueTypes|Float]]||||Dispersion  multiplier for Ai units (axis X - left to right)
|-
|aiDispersionCoefY=1.0||[[TokenNameValueTypes|Float]]||||Dispersion multiplier for Ai units (axis Y - top-down)
|-
|aiRateOfFire=5.0||[[TokenNameValueTypes|Float]]||ModeClass||delay between shots at given aiRateOfFireDistance
|-valign="top"
|aiRateOfFireDistance=500||[[TokenNameValueTypes|Integer]]||ModeClass||at shorter distance delay (aiRateOfFire) goes lineary to zero
|-valign="top"
|ammo=""||[[TokenNameValueTypes|String]]||OFPModeClass||CfgAmmo class that this weapon fires. Moved to [[CfgMagazines Config Reference|cfgMagazines]] in Arma.
|| ammo = "TimeBomb";
|-
|autoAimEnabled=true||[[TokenNameValueTypes|Boolean]]||||FALSE for all standard weapons   
|-valign="top"
|autoFire=false||[[TokenNameValueTypes|Boolean]]||ModeClass||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).
|-valign="top"
|autoReload=true||[[TokenNameValueTypes|Boolean]]||||if true weapon will be reloaded automaticly once magazine is empty
|-valign="top"
|backgroundReload=false||[[TokenNameValueTypes|Boolean]]||||Weapon automatically reloads magazines without player intervention or animation.
|-valign="top"
|ballisticsComputer=false||[[TokenNameValueTypes|Boolean]]||ArmA||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.
|-valign="top"
|burst=1||[[TokenNameValueTypes|Integer]]||ModeClass||Number of shots actually fired each time the weapon is fired.
|-
|cameraDir||[[TokenNameValueTypes|String]]||MuzzleClass||||cameraDir = "GL look";
|-valign="top"
|canDrop=true||[[TokenNameValueTypes|Boolean]]||||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.
 
 
|-valign="top"
|canLock=2||[[TokenNameValueTypes|Integer]]||||Defines if weapon can be locked on the target (white box appears)
#define LockNo 0
#define LockCadet 1
#define LockYes 2
|-
|cartridgePos="nabojnicestart"||[[TokenNameValueTypes|String]]
|-
|cartridgeVel="nabojniceend"||[[TokenNameValueTypes|String]]
|-valign="top"
|count=0||[[TokenNameValueTypes|Integer]]||OFP||Number of shots weapon starts with. Moved to CfgMagazines in ArmA
|-
|cursor=""||[[TokenNameValueTypes|String]]||ArmA
|-
|cursor="w_weapon"||[[TokenNameValueTypes|String]]||OFP
|-valign="top"
|cursorAim=""||[[TokenNameValueTypes|String]]||ArmA||||cursorAim = "\ca\Weapons\Data\cursor_target_locked_ca.paa";
|-
|cursorAim="w_lock"||[[TokenNameValueTypes|String]]||OFP
|-
|cursorAimOn=""||[[TokenNameValueTypes|String]]||Arma
|-
|cursorSize=1.0||[[TokenNameValueTypes|Float]]||Arma
|-valign="top"
|dexterity??||[[TokenNameValueTypes|Float]]||||Ingame weapon handling value, lower value = takes more time to traverse a weapon
|| dexterity = 3.1;
|-valign="top"
|dispersion=0.002||[[TokenNameValueTypes|Float]]||ModeClass||Ingame weapon dispersion in radians. Bigger value - more dispersion
|-valign="top"
|displayName=""||[[TokenNameValueTypes|String]]||MainBody||Name of the WEAPON. Declared in the main body. This string is shown in gear selection as the rifle's name.
|-valign="top"
|||||ModeClass||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.
 
|-valign="top"
|||||MuzzleClass||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.
 
 
|-valign="top"
|displayNameMagazine=""||[[TokenNameValueTypes|String]]||OFP||'displayname' of the magazine in gear selection. Replaced in Arma via the [[CfgMagazines Config Reference|cfgMagazines Class]] see also shortNameMagazine and descriptionShort
|-
|distanceZoomMax=400||[[TokenNameValueTypes|Integer]]
|-
|distanceZoomMin=400||[[TokenNameValueTypes|Integer]]
|-valign="top"
|descriptionShort=""||[[TokenNameValueTypes|String]]||ArmA
||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}||[[TokenNameValueTypes|Array]]||||click Sound  when empty weapon fired
|| drySound[] = {"\ca\Weapons\Data\Sound\XMS_dry_v2",0.000316228,1};
|-
|enableAttack=true||[[TokenNameValueTypes|Boolean]]
|-
|emptySound[]={"",1,1}||[[TokenNameValueTypes|Array]]||Arma
|-
|ffCount=1||[[TokenNameValueTypes|Integer]]||ModeClass
|-
|ffFrequency=1||[[TokenNameValueTypes|Float]]||ModeClass
|-
|ffMagnitude=0.0||[[TokenNameValueTypes|Float]]||ModeClass
|-
|fireLightDuration=0.05||[[TokenNameValueTypes|Float]]||Arma
|-
|fireLightIntensity=0.012||[[TokenNameValueTypes|Float]]||Arma
|-flash=""||[[TokenNameValueTypes|String]]||||||flash = "gunfire";
|-
|flashSize=0.0||[[TokenNameValueTypes|Float]]||ModeClass||ofp only?
|-valign="top"
|forceOptics=0||[[TokenNameValueTypes|Integer]]||||Valid values: 0, 1, 2, as per canLock
|-
|handAnim[]={}||[[TokenNameValueTypes|Array]]||Arma
|-valign="top"
|initSpeed=0||[[TokenNameValueTypes|Integer]]||||Initial speed of shot in meters per second.  Also present in cfgMagazines|| initSpeed = 900;
|-
|laser=false||[[TokenNameValueTypes|Boolean]]||Arma
|-valign="top"
|Library||Class||Arma||
  class Library
  {
  libTextDesc = "";
  };
|-
|libTextDesc||[[TokenNameValueTypes|String]]||ArmaClass||libTextDesc = "$STR_LIB_SVD";//eg
|-valign="top"
|magazineReloadTime=0||[[TokenNameValueTypes|Float]]||MuzzleClass||Time delay when reloading the weapon (changing magazines).
|-valign="top"
|magazines[]={"this"}||[[TokenNameValueTypes|StringArray]]||OFP
||Array of magazine classes compatible with this weapon. This very same Weapon class in cfgWeapons if not over-ridden
|-valign="top"
|magazines[]={}||[[TokenNameValueTypes|StringArray]]||ArmA
|| 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
|-valign="top"
|maxLeadSpeed=50||[[TokenNameValueTypes|Integer]]||Ofp||Maximimum speed of the target that can be shot with this weapon by AI. Moved to CfgMagazines in ArmA.
|-valign="top"
|min/mid/maxRange...||[[TokenNameValueTypes|Integer]]||ArmAModeClass
||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||[[TokenNameValueTypes|Integer]]||ofp||See Types below
|-
|minRange=1||[[TokenNameValueTypes|Integer]]
|-
|minRangeProbab=0.3||[[TokenNameValueTypes|Float]]
|-
|midRange=150||[[TokenNameValueTypes|Integer]]
|-
|midRangeProbab= 0.58||[[TokenNameValueTypes|Float]]
|-
|maxRange=500||[[TokenNameValueTypes|Integer]]
|-
|maxRangeProbab=0.04||[[TokenNameValueTypes|Float]]
|-
|memoryPointCamera="eye"||[[TokenNameValueTypes|String]]||Arma||MuzzleClass||memoryPointCamera = "GL eye";
|-
|model="[.p3d]"||[[TokenNameValueTypes|String]]||||
||model = "\ca\a10\AGM65";
|-
|modelMagazine="[.p3d]"||[[TokenNameValueTypes|String]]||ArmA
|-
|modelMagazine="\misc\mag_univ"||[[TokenNameValueTypes|String]]||OFP
|-valign="top"
|modelOptics="[.p3d]"||[[TokenNameValueTypes|String]]||MuzzleClass||Optic model used in game. "-" defines 3d view from the model (point "eye")
||
modelOptics = "\ca\Weapons\G36_optics";
modelOptics = "-";
|-
|modelSpecial=[.p3d]""||[[TokenNameValueTypes|String]]
|-valign="top"
|modes[]= {"this"}||[[TokenNameValueTypes|StringArray]]||||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"};
|-
|multiplier=1||[[TokenNameValueTypes|Integer]]||ModeClass||Ammunition used per shot.
|-
|muzzleEnd="konec hlavne"||[[TokenNameValueTypes|String]]
|-
|muzzlePos="usti hlavne"||[[TokenNameValueTypes|String]]
|-valign="top"
|muzzles[]={"this"}||[[TokenNameValueTypes|Array]]||||similar to modes, if not declared, assumed muzzle is 'this'
||muzzles[] = {"TimeBombMuzzle","PipeBombMuzzle","MineMuzzle","MineEMuzzle"};
|-valign="top"
|nameSound=""||[[TokenNameValueTypes|String]]||||sound classname played when vehicle commander switches to this weapon?
||nameSound = "smokeshell";
|-
|nameSound="weapon"||[[TokenNameValueTypes|String]]||OFP
|-
|optics=true||[[TokenNameValueTypes|Boolean]]
|-
|opticsDisablePeripherialVision=0.67||[[TokenNameValueTypes|Float]]||ArmA
|-
|opticsFlare=true||[[TokenNameValueTypes|Boolean]]
|-
|opticsPPEffects[] = {}||[[TokenNameValueTypes|Array]]||Arma
|-
|opticsZoomInit= 0.35||[[TokenNameValueTypes|Float]]||MuzzleClass||Optics field of view at default zoom in radians.
|-
|opticsZoomMax=0.35||[[TokenNameValueTypes|Float]]||MuzzleClass||Optics field of view at maximum zoom in radians.
|-
|opticsZoomMin=0.35||[[TokenNameValueTypes|Float]]||MuzzleClass||Optics field of view at minimum zoom in radians.
|-
|picture="[\][.pac]"||[[TokenNameValueTypes|String]]||||Defines weapon '''and''' magazine. See below
|-
|primary=10||[[TokenNameValueTypes|Integer]]
|-valign="top"
|recoil="Empty"||[[TokenNameValueTypes|String]]||ModeClass||Selects recoil defined in cfgRecoils class. ArmA differs substantially in Recoil ability. Much more of them, and very different names.
||recoil="AK74Recoil"
|-
|recoilProne=""||[[TokenNameValueTypes|String]]||ArmAModeClass||When prone, recoil can be set to slower values
||recoilProne = "AK74Recoil"
|-
|reloadAction=""||[[TokenNameValueTypes|String]]||Arma||enumerated list
|-
|reloadAction="ManActReloadMagazine"||[[TokenNameValueTypes|String]]||OFP
|-valign="top"
|reloadMagazineSound[]={"",1,1}||[[TokenNameValueTypes|Array]]||MuzzleClass||||Sound played while changing magazines.
||
reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload",0.000316228,1};
|-
|reloadSound[]={"",1,1}||[[TokenNameValueTypes|Array]]||||Sound played after each shot.
||reloadSound[] = {"\ca\Weapons\Data\Sound\gun125reload",1,1};
|-
|reloadTime=1.0||[[TokenNameValueTypes|Float]]||ModeClass||Time delay between each individual shot.
|-
||||||MuzzleClass
 
|-valign="top"
|scope=0||[[TokenNameValueTypes|Integer]]||ArmA||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.
|-
|scopeWeapon=0||[[TokenNameValueTypes|Integer]]||Ofp
|-
|scopeMagazine=0||[[TokenNameValueTypes|Integer]]||Ofp||used as couplets instead of scope
|-
|selectionFireAnim="zasleh"||[[TokenNameValueTypes|String]]||Arma
|-valign="top"
|shortNameMagazine=""||[[TokenNameValueTypes|String]]||OFP||The descriptive magazine paragraph. Replaced in Arma by descriptionShort in the [[CfgMagazines Config Reference|cfgMagazines Class]]
|-valign="top"
|shotFromTurret???||[[TokenNameValueTypes|Boolean]]||ArmA||meaning unknown. But "zasleh" animation is not working if set to 1
|--valign="top"
|showAimCursorInternal=true||[[TokenNameValueTypes|Boolean]]||ArmA
|-
|showEmpty=true||[[TokenNameValueTypes|Boolean]]||||If false weapon gets hidden from the player once there's no ammo left for it
|-showSwitchAction=false||[[TokenNameValueTypes|Boolean]]||ArmA
|--valign="top"
|showToPlayer=true||[[TokenNameValueTypes|Boolean]]||ModeClass||Some modes defined for Ai usage (ex. burst modes for full auto weapons) can be hidden from player with this parameter
|-
|simulation="Weapon"||[[TokenNameValueTypes|String]]||ArmA
|--valign="top"
|sound[]={"",1,1}||[[TokenNameValueTypes|Array]]||ModeClass|| There are several sound '''types''' Most are relevent to the weapon overall and specified in the main body, sound[]= is specific to each mode.
|| sound[] = {"\ca\Weapons\Data\Sound\AGS30_shot1",10,1};
The last parameter defines how fast the sound should be played. 1 means normal speed.
|--valign="top"
|soundBurst=true||[[TokenNameValueTypes|Boolean]]||ArmaModeClass||
When set to false single shot sound can be used with burst mode - it will be played several times
|-valign="top"
|soundContinuous=false||[[TokenNameValueTypes|Boolean]]||ModeClass
||If true sound for the next shot won't start before previous oe ends. Thus you can prevent sound overlapping.
|-valign="top"
|soundBegin[]={"sound",1}||[[TokenNameValueTypes|Array]]||ArmaModeClass
|-
|soundBullet[]={"emptySound",1}||[[TokenNameValueTypes|Array]]||ArmaModeClass
|-
|soundEnd[]={"sound",1}||[[TokenNameValueTypes|Array]]||ArmAModeClass
|--valign="top"
|soundLoop[]={"sound",1}||[[TokenNameValueTypes|Array]]||ArmaModeClass
||note that there is extensive use of soundloops in arma. Most weapons elaborate on this basic, essentially ofp, structure with begin1,2,3 loops etc.
|-
|-soundFly[]||[[TokenNameValueTypes|Array]]|||||| soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1",25.1189,0.8};
|-
|soundServo[]||[[TokenNameValueTypes|Array]]|||||| soundServo[] = {"",0.0001,1};
|-
|Type=WeaponHardMounted||[[TokenNameValueTypes|Integer]]||Arma
||Defines the equipment slots this '''WEAPON''' or '''MAGAZINE''' will occupy. See Types below
|-
|UiPicture="[\][.pac]"||[[TokenNameValueTypes|String]]||ArmA||||\CA\weapons\data\Ico\i_aa_CA.paa";
|-
|uiPicture="ivojak"||||ofp
|-
|useAction=false||[[TokenNameValueTypes|Boolean]]||ModeClass
|-
|useActionTitle=""||[[TokenNameValueTypes|String]]||ModeClass||||useActionTitle = "$STR_ACTION_PUTBOMB";
|-
|useAsBinocular=false||[[TokenNameValueTypes|Boolean]]
|-
|value=2||[[TokenNameValueTypes|Integer]]||ArmA
|-
|valueMagazine=2||[[TokenNameValueTypes|Integer]]||ofp
|-
|valueWeapon=2||[[TokenNameValueTypes|Integer]]||ofp
|-
|weaponType=WeaponHardMounted||[[TokenNameValueTypes|Integer]]||ofp||See Types below
|-
|}
 
 
===Picture="[\][.pac]"===
Defines WEAPON Picture '''and separately''' MAGAZINE Picture.
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.
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.
Line 434: Line 133:
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.
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==
=Types=
===type=WeaponHardMounted (ArmaOnly)===
===type=WeaponHardMounted (ArmaOnly)===
===magazineType=None (OfpOnly)===
===magazineType=None (OfpOnly)===
Line 547: Line 246:




----
=A=
==access=3==
[[TokenNameValueTypes|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==
[[TokenNameValueTypes|Float]]
<br>'''Description:''' Dispersion  multiplier for Ai units (axis X - left to right)
==aiDispersionCoefY=1.0==
[[TokenNameValueTypes|Float]]
<br>'''Description:''' Dispersion multiplier for Ai units (axis Y - top-down)
==aiRateOfFire=5.0==
'''ModeClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' delay between shots at given aiRateOfFireDistance
==aiRateOfFireDistance=500==
'''ModeClass'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' at shorter distance delay (aiRateOfFire) goes lineary to zero
==ammo=""==
'''OFPModeClass'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' CfgAmmo class that this weapon fires. Moved to [[CfgMagazines Config Reference|cfgMagazines]] in Arma.
ammo = "TimeBomb";
==autoAimEnabled=true==
[[TokenNameValueTypes|Boolean]]
<br>'''Description:''' FALSE for all standard weapons   
==autoFire=false==
'''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==
[[TokenNameValueTypes|Boolean]]
<br>'''Description:''' if true weapon will be reloaded automaticly once magazine is empty
=B=
==backgroundReload=false==
[[TokenNameValueTypes|Boolean]]
<br>'''Description:''' Weapon automatically reloads magazines without player intervention or animation.
==ballisticsComputer=false==
'''ArmA'''
<br>[[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.
==burst=1==
'''ModeClass'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' Number of shots actually fired each time the weapon is fired.
=C=
==cameraDir==
'''MuzzleClass'''
<br>[[TokenNameValueTypes|String]]
cameraDir = "GL look";
==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==
[[TokenNameValueTypes|Integer]]
<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"==
'''[[TokenNameValueTypes|String]]'''
==cartridgeVel="nabojniceend"==
'''[[TokenNameValueTypes|String]]'''
==count=0==
'''OFP'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' Number of shots weapon starts with. Moved to CfgMagazines in ArmA
==cursor=""==
'''ArmA'''
<br>[[TokenNameValueTypes|String]]
==cursor="w_weapon"==
'''OFP'''
<br>[[TokenNameValueTypes|String]]
==cursorAim=""==
'''ArmA'''
<br>[[TokenNameValueTypes|String]]
cursorAim = "\ca\Weapons\Data\cursor_target_locked_ca.paa";
==cursorAim="w_lock"==
'''OFP'''
<br>[[TokenNameValueTypes|String]]
==cursorAimOn=""==
'''Arma'''
<br>[[TokenNameValueTypes|String]]
==cursorSize=1.0==
'''Arma'''
<br>[[TokenNameValueTypes|Float]]
=D=
==dexterity=3.1==
[[TokenNameValueTypes|Float]]
<br>'''Description:''' Ingame weapon handling value, lower value = takes more time to traverse a weapon
dexterity = 3.1;
==dispersion=0.002==
'''ModeClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' Ingame weapon dispersion in radians. Bigger value - more dispersion
==displayName=""==
'''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.
'''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.
A weapon with no modes (modes={"this");  uses the weapon name for both.
'''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.
==displayNameMagazine=""==
'''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==
'''[[TokenNameValueTypes|Integer]]'''
==distanceZoomMin=400==
'''[[TokenNameValueTypes|Integer]]'''
==descriptionShort=""==
'''ArmA'''
<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
==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};
=E=
==enableAttack=true==
'''[[TokenNameValueTypes|Boolean]]'''
==emptySound[]={"",1,1}==
'''Arma'''
<br>[[TokenNameValueTypes|Array]]
=F=
==ffCount=1==
'''ModeClass'''
<br>[[TokenNameValueTypes|Integer]]
==ffFrequency=1==
'''ModeClass'''
<br>[[TokenNameValueTypes|Float]]
==ffMagnitude=0.0==
'''ModeClass'''
<br>[[TokenNameValueTypes|Float]]
==fireLightDuration=0.05==
'''Arma'''
<br>[[TokenNameValueTypes|Float]]
==fireLightIntensity=0.012==
'''Arma'''
<br>[[TokenNameValueTypes|Float]]
==flash=""==
'''[[TokenNameValueTypes|String]]'''
flash = "gunfire";
==flashSize=0.0==
'''ModeClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' ofp only?
==forceOptics=0==
[[TokenNameValueTypes|Integer]]
<br>'''Description:''' Valid values: 0, 1, 2, as per canLock
=H=
==handAnim[]={}==
'''Arma'''
<br>[[TokenNameValueTypes|Array]]
=I=
==initSpeed=0==
'''[[TokenNameValueTypes|Integer]]'''
<br>'''Description:''' Initial speed of shot in meters per second.  Also present in cfgMagazines
  initSpeed = 900;
=L=
==laser=false==
'''Arma'''
<br>[[TokenNameValueTypes|Boolean]]
==Library==
'''Arma'''
<br>Class
<br>'''Description:'''
  class Library
  {
  libTextDesc = "";
  };
==libTextDesc==
'''ArmaClass'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' libTextDesc = "$STR_LIB_SVD";//eg
=M=
==magazineReloadTime=0==
'''MuzzleClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' Time delay when reloading the weapon (changing magazines).
==magazines[]={"this"}==
'''OFP '''
<br>[[TokenNameValueTypes|StringArray]]
Array of magazine classes compatible with this weapon. This very same Weapon class in cfgWeapons if not over-ridden
==magazines[]={}==
'''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...==
'''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==
'''ofp'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' See Types below
==minRange=1==
'''[[TokenNameValueTypes|Integer]]'''
==minRangeProbab=0.3==
'''[[TokenNameValueTypes|Float]]'''
==midRange=150==
'''[[TokenNameValueTypes|Integer]]'''
==midRangeProbab= 0.58==
'''[[TokenNameValueTypes|Float]]'''
==maxRange=500==
'''[[TokenNameValueTypes|Integer]]'''
==maxRangeProbab=0.04==
'''[[TokenNameValueTypes|Float]]'''
==memoryPointCamera="eye"==
'''Arma'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' MuzzleClass
memoryPointCamera = "GL eye";
==model="[.p3d]"==
<br>[[TokenNameValueTypes|String]]
<br>'''Description:'''
model = "\ca\a10\AGM65";
==modelMagazine="[.p3d]"==
'''ArmA'''
<br>[[TokenNameValueTypes|String]]
==modelMagazine="\misc\mag_univ"==
'''OFP'''
<br>[[TokenNameValueTypes|String]]
==modelOptics="[.p3d]"==
'''MuzzleClass'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' Optic model used in game. "-" defines 3d view from the model (point "eye")
modelOptics = "\ca\Weapons\G36_optics";
modelOptics = "-";
==modelSpecial=[.p3d]""==
'''[[TokenNameValueTypes|String]]'''
==modes[]= {"this"}==
[[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"};
==multiplier=1==
'''ModeClass'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' Ammunition used per shot.
==muzzleEnd="konec hlavne"==
[[TokenNameValueTypes|String]]
==muzzlePos="usti hlavne"==
[[TokenNameValueTypes|String]]
==muzzles[]={"this"}==
[[TokenNameValueTypes|Array]]
<br>'''Description:''' similar to modes, if not declared, assumed muzzle is 'this'
muzzles[] = {"TimeBombMuzzle","PipeBombMuzzle","MineMuzzle","MineEMuzzle"};
=N=
==nameSound=""==
[[TokenNameValueTypes|String]]
<br>'''Description:''' sound classname played when vehicle commander switches to this weapon?
nameSound = "smokeshell";
==nameSound="weapon"==
'''OFP'''
<br>[[TokenNameValueTypes|String]]
=O=
==optics=true==
'''[[TokenNameValueTypes|Boolean]]'''
==opticsDisablePeripherialVision=0.67==
'''ArmA'''
<br>[[TokenNameValueTypes|Float]]
==opticsFlare=true==
'''[[TokenNameValueTypes|Boolean]]'''
==opticsPPEffects[] = {}==
'''Arma'''
<br>[[TokenNameValueTypes|Array]]
==opticsZoomInit= 0.35==
'''MuzzleClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' Optics field of view at default zoom in radians.
==opticsZoomMax=0.35==
'''MuzzleClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' Optics field of view at maximum zoom in radians.
==opticsZoomMin=0.35==
'''MuzzleClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' Optics field of view at minimum zoom in radians.
=P=
==picture="[\][.pac]"==
[[TokenNameValueTypes|String]]
<br>'''Description:''' Defines weapon '''and''' magazine. See below
==primary=10==
[[TokenNameValueTypes|Integer]]
=R=
==recoil="Empty"==
'''ModeClass'''
<br>[[TokenNameValueTypes|String]]
<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'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' When prone, recoil can be set to slower values
recoilProne = "AK74Recoil"
==reloadAction=""==
'''Arma'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' enumerated list
==reloadAction="ManActReloadMagazine"==
'''OFP'''
<br>[[TokenNameValueTypes|String]]
==reloadMagazineSound[]={"",1,1}==
'''MuzzleClass'''
<br>[[TokenNameValueTypes|Array]]
<br>'''Description:''' Sound played while changing magazines.
reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload",0.000316228,1};
==reloadSound[]={"",1,1}==
[[TokenNameValueTypes|Array]]
<br>'''Description:''' Sound played after each shot.
reloadSound[] = {"\ca\Weapons\Data\Sound\gun125reload",1,1};
==reloadTime=1.0==
'''ModeClass'''
<br>[[TokenNameValueTypes|Float]]
<br>'''Description:''' Time delay between each individual shot.
=S=
==scope=0==
'''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.
==scopeWeapon=0==
'''Ofp'''
<br>[[TokenNameValueTypes|Integer]]
==scopeMagazine=0==
'''Ofp'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' used as couplets instead of scope
==selectionFireAnim="zasleh"==
'''Arma'''
<br>[[TokenNameValueTypes|String]]
==shortNameMagazine=""==
'''OFP'''
<br>[[TokenNameValueTypes|String]]
<br>'''Description:''' The descriptive magazine paragraph. Replaced in Arma by descriptionShort in the [[CfgMagazines Config Reference|cfgMagazines Class]]
==shotFromTurret???==
'''ArmA'''
<br>[[TokenNameValueTypes|Boolean]]
<br>'''Description:''' meaning unknown. But "zasleh" animation is not working if set to 1
==showAimCursorInternal=true==
'''ArmA'''
<br>[[TokenNameValueTypes|Boolean]]
==showEmpty=true==
[[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==
'''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
==simulation="Weapon"==
'''ArmA'''
<br>[[TokenNameValueTypes|String]]
==sound[]={"",1,1}==
'''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};
==soundBurst=true==
'''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==
'''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}==
'''ArmaModeClass'''
<br>[[TokenNameValueTypes|Array]]
==soundBullet[]={"emptySound",1}==
'''ArmaModeClass'''
<br>[[TokenNameValueTypes|Array]]
==soundEnd[]={"sound",1}==
'''ArmAModeClass'''
<br>[[TokenNameValueTypes|Array]]
==soundLoop[]={"sound",1}==
'''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[]==
'''[[TokenNameValueTypes|Array]]'''
soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1",25.1189,0.8};
==soundServo[]==
'''[[TokenNameValueTypes|Array]]'''
soundServo[] = {"",0.0001,1};
=T=
==Type=WeaponHardMounted==
'''Arma'''
<br>[[TokenNameValueTypes|Integer]]
=U=
==UiPicture="[\][.pac]"==
'''ArmA'''
<br>[[TokenNameValueTypes|String]]
\CA\weapons\data\Ico\i_aa_CA.paa";
==uiPicture="ivojak"==
'''ofp'''
==useAction=false==
'''ModeClass'''
<br>[[TokenNameValueTypes|Boolean]]
==useActionTitle=""==
'''ModeClass'''
<br>[[TokenNameValueTypes|String]]
useActionTitle = "$STR_ACTION_PUTBOMB";
==useAsBinocular=false==
[[TokenNameValueTypes|Boolean]]
=V=
==value=2==
'''ArmA'''
<br>[[TokenNameValueTypes|Integer]]
==valueMagazine=2==
'''ofp'''
<br>[[TokenNameValueTypes|Integer]]
==valueWeapon=2==
'''ofp'''
<br>[[TokenNameValueTypes|Integer]]
=W=
==weaponType=WeaponHardMounted==
'''ofp'''
<br>[[TokenNameValueTypes|Integer]]
<br>'''Description:''' See Types below
----


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

Revision as of 04:17, 1 May 2014

Template:Stub

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 (eg) 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 thu the woods for the trees

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 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, 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 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.
  • 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 (sound[]= eg), 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 (eg)

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 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

Picture="[\][.pac]"

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.

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 preceeding 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, Bis were inconsistent.

Types

type=WeaponHardMounted (ArmaOnly)

magazineType=None (OfpOnly)

weaponType=WeaponHardMounted (OfpOnly)

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

Gear (equipment) selection consists of SlotTypes and one of 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.

  • 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. Ie 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 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 (PrimaryWeapon+SecondaryWeapon)



Magazine Sizes

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 bitfields > 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 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 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 relevent 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= 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'.

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 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

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 nMagazines for these weapons (AK47Mag) (or max size of shell eg)
HandGun+ Can carry a Handgun (Berreta eg)
2*WeaponSlotBinocular+ Can carry nslots of equipment
4*HandGunMagazines+ Can carry nHandgun Magazines (CZ75Mag)
12*SmallItems can carry nslots of SmallItems (Arma2)

--

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.


Magazine carrying ability altered markedly for ArmA2 vs ofp, is the reason for the nasty change to the bitfield, 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




A

access=3

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

Float
Description: Dispersion multiplier for Ai units (axis X - left to right)

aiDispersionCoefY=1.0

Float
Description: Dispersion multiplier for Ai units (axis Y - top-down)

aiRateOfFire=5.0

ModeClass
Float
Description: delay between shots at given aiRateOfFireDistance

aiRateOfFireDistance=500

ModeClass
Integer
Description: at shorter distance delay (aiRateOfFire) goes lineary to zero

ammo=""

OFPModeClass
String
Description: CfgAmmo class that this weapon fires. Moved to cfgMagazines in Arma.

ammo = "TimeBomb";

autoAimEnabled=true

Boolean
Description: FALSE for all standard weapons

autoFire=false

ModeClass
Boolean
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

Boolean
Description: if true weapon will be reloaded automaticly once magazine is empty


B

backgroundReload=false

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

ballisticsComputer=false

ArmA
Boolean
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.

burst=1

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


C

cameraDir

MuzzleClass
String

cameraDir = "GL look";

canDrop=true

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 non-sensical.

canLock=2

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"

String

cartridgeVel="nabojniceend"

String

count=0

OFP
Integer
Description: Number of shots weapon starts with. Moved to CfgMagazines in ArmA

cursor=""

ArmA
String

cursor="w_weapon"

OFP
String

cursorAim=""

ArmA
String

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

cursorAim="w_lock"

OFP
String

cursorAimOn=""

Arma
String

cursorSize=1.0

Arma
Float


D

dexterity=3.1

Float
Description: Ingame weapon handling value, lower value = takes more time to traverse a weapon

dexterity = 3.1;

dispersion=0.002

ModeClass
Float
Description: Ingame weapon dispersion in radians. Bigger value - more dispersion

displayName=""

MainBody
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 (muzzles={"this"); uses the weapon name.

displayNameMagazine=""

OFP
String
Description: 'displayname' of the magazine in gear selection. Replaced in Arma via the cfgMagazines Class see also shortNameMagazine and descriptionShort

distanceZoomMax=400

Integer

distanceZoomMin=400

Integer

descriptionShort=""

ArmA
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}


Array
Description: click Sound when empty weapon fired

drySound[] = {"\ca\Weapons\Data\Sound\XMS_dry_v2",0.000316228,1};


E

enableAttack=true

Boolean

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

Arma
Array


F

ffCount=1

ModeClass
Integer

ffFrequency=1

ModeClass
Float

ffMagnitude=0.0

ModeClass
Float

fireLightDuration=0.05

Arma
Float

fireLightIntensity=0.012

Arma
Float

flash=""

String

flash = "gunfire";

flashSize=0.0

ModeClass
Float
Description: ofp only?

forceOptics=0

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


H

handAnim[]={}

Arma
Array


I

initSpeed=0

Integer
Description: Initial speed of shot in meters per second. Also present in cfgMagazines

 initSpeed = 900;


L

laser=false

Arma
Boolean

Library

Arma
Class
Description:

 class Library
 {
  libTextDesc = "";
 };

libTextDesc

ArmaClass
String
Description: libTextDesc = "$STR_LIB_SVD";//eg


M

magazineReloadTime=0

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

magazines[]={"this"}

OFP
StringArray

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

magazines[]={}

ArmA
StringArray
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
Integer
Description: Maximimum speed of the target that can be shot with this weapon by AI. Moved to CfgMagazines in ArmA.

min/mid/maxRange...

ArmAModeClass
Integer
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

ofp
Integer
Description: See Types below

minRange=1

Integer

minRangeProbab=0.3

Float

midRange=150

Integer

midRangeProbab= 0.58

Float

maxRange=500

Integer

maxRangeProbab=0.04

Float

memoryPointCamera="eye"

Arma
String
Description: MuzzleClass

memoryPointCamera = "GL eye";

model="[.p3d]"


String
Description:

model = "\ca\a10\AGM65";

modelMagazine="[.p3d]"

ArmA
String

modelMagazine="\misc\mag_univ"

OFP
String

modelOptics="[.p3d]"

MuzzleClass
String
Description: Optic model used in game. "-" defines 3d view from the model (point "eye")

modelOptics = "\ca\Weapons\G36_optics"; 
modelOptics = "-";

modelSpecial=[.p3d]""

String

modes[]= {"this"}

StringArray
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"};

multiplier=1

ModeClass
Integer
Description: Ammunition used per shot.

muzzleEnd="konec hlavne"

String

muzzlePos="usti hlavne"

String

muzzles[]={"this"}

Array
Description: similar to modes, if not declared, assumed muzzle is 'this'

muzzles[] = {"TimeBombMuzzle","PipeBombMuzzle","MineMuzzle","MineEMuzzle"};


N

nameSound=""

String
Description: sound classname played when vehicle commander switches to this weapon?

nameSound = "smokeshell";

nameSound="weapon"

OFP
String


O

optics=true

Boolean


opticsDisablePeripherialVision=0.67

ArmA
Float

opticsFlare=true

Boolean

opticsPPEffects[] = {}

Arma
Array

opticsZoomInit= 0.35

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

opticsZoomMax=0.35

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

opticsZoomMin=0.35

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


P

picture="[\][.pac]"

String
Description: Defines weapon and magazine. See below

primary=10

Integer


R

recoil="Empty"

ModeClass
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
String
Description: When prone, recoil can be set to slower values

recoilProne = "AK74Recoil"

reloadAction=""

Arma
String
Description: enumerated list

reloadAction="ManActReloadMagazine"

OFP
String

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

MuzzleClass
Array
Description: Sound played while changing magazines.

reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload",0.000316228,1};

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

Array
Description: Sound played after each shot.

reloadSound[] = {"\ca\Weapons\Data\Sound\gun125reload",1,1};

reloadTime=1.0

ModeClass
Float
Description: Time delay between each individual shot.


S

scope=0

ArmA
Integer
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.

scopeWeapon=0

Ofp
Integer

scopeMagazine=0

Ofp
Integer
Description: used as couplets instead of scope

selectionFireAnim="zasleh"

Arma
String

shortNameMagazine=""

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

shotFromTurret???

ArmA
Boolean
Description: meaning unknown. But "zasleh" animation is not working if set to 1

showAimCursorInternal=true

ArmA
Boolean

showEmpty=true

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

showSwitchAction=false

ArmA
Boolean

showToPlayer=true

ModeClass
Boolean
Description: Some modes defined for Ai usage (ex. burst modes for full auto weapons) can be hidden from player with this parameter


simulation="Weapon"

ArmA
String

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

ModeClass
Array
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};

soundBurst=true

ArmaModeClass
Boolean
Description: When set to false single shot sound can be used with burst mode - it will be played several times

soundContinuous=false

ModeClass
Boolean
Description: If true sound for the next shot won't start before previous oe ends. Thus you can prevent sound overlapping.

soundBegin[]={"sound",1}

ArmaModeClass
Array

soundBullet[]={"emptySound",1}

ArmaModeClass
Array

soundEnd[]={"sound",1}

ArmAModeClass
Array

soundLoop[]={"sound",1}

ArmaModeClass
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[]

Array

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

soundServo[]

Array

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


T

Type=WeaponHardMounted

Arma
Integer


U

UiPicture="[\][.pac]"

ArmA
String

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

uiPicture="ivojak"

ofp

useAction=false

ModeClass
Boolean

useActionTitle=""

ModeClass
String

useActionTitle = "$STR_ACTION_PUTBOMB";

useAsBinocular=false

Boolean


V

value=2

ArmA
Integer

valueMagazine=2

ofp
Integer

valueWeapon=2

ofp
Integer


W

weaponType=WeaponHardMounted

ofp
Integer
Description: See Types below