CfgWeapons Config Reference: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
Line 84: Line 84:


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


Note that engines will accept integer values (or math strings) where a float would normally be expected.
*Default values are shown in the legend.
**OFP default values, '''if different''', are shown in examples


TokenNames marked '''[[ArmaTokenNames|ArmA]]''' were introduced from Xbox Elite and beyond.
*Usage
**'''OFP''' moved to ArmA's [[CfgMagazines Config Reference|cfgMagazines Class]] and generally 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.
**'''Blank''': used as described in both OFP, and, ArmA


==access=3==
*Dual Use TokenNames (such as picture=) moved to  ArmA's [[CfgMagazines Config Reference|cfgMagazines Class]] as appropriate.
[[TokenNameValueTypes|Integer]]<br>
'''Description:'''
#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)


aiDispersionCoefX = 7.1;
{|
 
|||Type||Usage||Desc||Example
==aiDispersionCoefY=1.0==
|-valign="top"
[[TokenNameValueTypes|Float]]<br>
|access=3||[[TokenNameValueTypes|Integer]]||||
'''Description:''' Dispersion multiplier for Ai units (axis Y - top-down)
#define ReadAndWrite 0 // any modifications enabled
 
#define ReadAndCreate 1 // only adding new class members is allowed
  aiDispersionCoefY = 2.1;
  #define ReadOnly 2 // no modifications enabled
 
#define ReadOnlyVerified 3 // no modifications enabled, CRC test applied
==aiRateOfFire=5.0==
|-
[[TokenNameValueTypes|Float]]<br>
|aiDispersionCoefX=1.0||[[TokenNameValueTypes|Float]]||||Dispersion  multiplier for Ai units (axis X - left to right)
'''Description:''' delay between shots at given distance (aiRateOfFireDistance)  
|-
 
|aiDispersionCoefY=1.0||[[TokenNameValueTypes|Float]]||||Dispersion multiplier for Ai units (axis Y - top-down)
aiRateOfFire = 0.3;
|-
 
|aiRateOfFire=5.0||[[TokenNameValueTypes|Float]]||ModeClass||delay between shots at given aiRateOfFireDistance
==aiRateOfFireDistance=500==
|-valign="top"
[[TokenNameValueTypes|Integer]]<br>
|aiRateOfFireDistance=500||[[TokenNameValueTypes|Integer]]||ModeClass||at shorter distance delay (aiRateOfFire) goes lineary to zero
'''Description:''' 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.
aiRateOfFireDistance = 600;
|| ammo = "TimeBomb";
 
|-
==ammo=""(ofp)==
|autoAimEnabled=true||[[TokenNameValueTypes|Boolean]]||||FALSE for all standard weapons   
[[TokenNameValueTypes|String]]<br>
|-valign="top"
'''Description:''' CfgAmmo class that this weapon fires. Note this is declared within the modes classes.
|autoFire=false||[[TokenNameValueTypes|Boolean]]||ModeClass||If true weapon will continue firing once you press fire button once until you release it.
Moved to [[CfgMagazines Config Reference|cfgMagazines]] in Arma.
|-valign="top"
 
|autoReload=true||[[TokenNameValueTypes|Boolean]]||||if true weapon will be reloaded automaticly once magazine is empty
ammo = "TimeBomb";
|-valign="top"
 
|backgroundReload=false||[[TokenNameValueTypes|Boolean]]||||Weapon automatically reloads magazines without player intervention or animation.
==autoAimEnabled=true==
|-valign="top"
[[TokenNameValueTypes|Boolean]]<br>
|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.
'''Description:''' FALSE for all standard weapons   
|-valign="top"
==autoFire=false==
|burst=1||[[TokenNameValueTypes|Integer]]||ModeClass||Number of shots actually fired each time the weapon is fired.
[[TokenNameValueTypes|Boolean]]<br>
|-
'''Description:''' If true weapon will continue firing once you press fire button once until you release it.
|cameraDir||[[TokenNameValueTypes|String]]||||||cameraDir = "GL look";
==autoReload=true==
|-valign="top"
[[TokenNameValueTypes|Boolean]]<br>
|canDrop=true||[[TokenNameValueTypes|Boolean]]||||Weapon can/not be dropped from Inventory Menu .
'''Description:''' if true weapon will be reloaded automaticly once magazine is empty
|-valign="top"
==backgroundReload=false==
|canLock=2||[[TokenNameValueTypes|Integer]]||||Defines if weapon can be locked on the target (white box appears)
[[TokenNameValueTypes|Boolean]]<br>
#define LockNo 0
'''Description:''' Weapon automatically reloads magazines without player intervention or animation.
#define LockCadet 1
==ballisticsComputer=false==
#define LockYes 2
'''[[ArmaTokenNames|ArmA]]''' [[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.
|cartridgePos="nabojnicestart"||[[TokenNameValueTypes|String]]
==burst=1==
|-
[[TokenNameValueTypes|Integer]]<br>
|cartridgeVel="nabojniceend"||[[TokenNameValueTypes|String]]  
'''Description:''' Number of shots actually fired each time the weapon is fired.
|-valign="top"
 
|count=0||[[TokenNameValueTypes|Integer]]||OFP||Number of shots weapon starts with. Moved to CfgMagazines in ArmA
burst = 5;
|-
==cameraDir==
|cursor=""||[[TokenNameValueTypes|String]]||||||cursor="w_weapon";// ofp default
[[TokenNameValueTypes|String]]<br>
|-valign="top"
'''Description:'''
|cursorAim=""||[[TokenNameValueTypes|String]]||||||cursorAim = "w_lock";//ofp default cursorAim = "\ca\Weapons\Data\cursor_target_locked_ca.paa";
 
|-
cameraDir = "GL look";
|cursorAimOn=""||[[TokenNameValueTypes|String]]||Arma
==canDrop=true==
|-
[[TokenNameValueTypes|Boolean]]<br>
|cursorSize=1.0||[[TokenNameValueTypes|Float]]||Arma
'''Description:''' Weapon cannot be dropped from Inventory Menu with this set to '''false'''.  
|-valign="top"
==canLock=2==
|dexterity??||[[TokenNameValueTypes|Float]]||||Ingame weapon handling value, lower value = takes more time to traverse a weapon
[[TokenNameValueTypes|Integer]]<br>
|| dexterity = 3.1;
'''Description:''' Defines if weapon can be locked on the target (white box appears)
|-valign="top"
Valid values: 0, 1, 2
|dispersion=0.002||[[TokenNameValueTypes|Float]]||ModeClass||Ingame weapon dispersion. Bigger value - more dispersion
#define LockNo 0
|-valign="top"
#define LockCadet 1
|displayName=""||[[TokenNameValueTypes|String]]||||*Name of the WEAPON *Name of the MODE  
#define LockYes 2
A 'displayname' exists for the weapon and is shown in a) gear selection and b) when selecting the weapon in game.A separate 'displayname' exists for each of the weapon's modes (if any). A weapon that only has a single mode *normally* has the same displayname, repeated in the mode class.
==cartridgePos="nabojnicestart"==
|-valign="top"
[[TokenNameValueTypes|String]]<br>
|displayNameMagazine=""||[[TokenNameValueTypes|String]]||OFP||
'''Description:'''
As the name implies, it is the 'displayname' of the magazine and shown when a) reloading a magazine, b) in gear selection. Replaced in Arma via the [[CfgMagazines Config Reference|cfgMagazines Class]]
==cartridgeVel="nabojniceend"==
|-valign="top"
[[TokenNameValueTypes|String]]<br>
|shortNameMagazine=""||[[TokenNameValueTypes|String]]||OFP||The ammo descriptive name in cfgAmmo. Replaced in Arma by ShortName in the [[CfgMagazines Config Reference|cfgMagazines Class]]
'''Description:'''
|-
==count=0==
|distanceZoomMax=400||[[TokenNameValueTypes|Integer]]
[[TokenNameValueTypes|Integer]]<br>
|-
'''Description:''' Number of shots weapon starts with. In ArmA, it is standard to define this in [[CfgMagazines]] instead.
|distanceZoomMin=400||[[TokenNameValueTypes|Integer]]
count = 8;
|-valign="top"
==cursor==
|descriptionShort=""||[[TokenNameValueTypes|String]]||ArmA
[[TokenNameValueTypes|String]]<br>
||This is the equivalent of ofp's ammunition label (shortNameMagazine) and is, strangely, declared in weapons
'''Description:'''
|-
cursor="w_weapon";// ofp
|drySound[]={"",1,1}||[[TokenNameValueTypes|Array]]||||click Sound  when empty weapon fired
cursor = ""; //arma
|| drySound[] = {"\ca\Weapons\Data\Sound\XMS_dry_v2",0.000316228,1};
 
|-
==cursorAim==
|enableAttack=true||[[TokenNameValueTypes|Boolean]]
[[TokenNameValueTypes|String]]<br>
|-
'''Description:'''
|emptySound[]={"",1,1}||[[TokenNameValueTypes|Array]]||Arma
  cursorAim = "w_lock";//ofp
|-
  cursorAim = "";//arma
|ffCount=1||[[TokenNameValueTypes|Integer]]||ModeClass
 
|-
cursorAim = "\ca\Weapons\Data\cursor_target_locked_ca.paa";
|ffFrequency=1||[[TokenNameValueTypes|Float]]||ModeClass
 
|-
==cursorAimOn=""==
|ffMagnitude=0.0||[[TokenNameValueTypes|Float]]||ModeClass
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|String]]<br>
|-
'''Description:'''
|fireLightDuration=0.05||[[TokenNameValueTypes|Float]]||Arma
 
|-
==cursorSize=1.0==
|fireLightIntensity=0.012||[[TokenNameValueTypes|Float]]||Arma
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Float]]<br>
|-flash=""||[[TokenNameValueTypes|String]]||||||flash = "gunfire";
'''Description:'''
|-
 
|flashSize=0.0||[[TokenNameValueTypes|Float]]||ModeClass||ofp only?
cursorSize = 4;
|-valign="top"
==D==
|forceOptics=0||[[TokenNameValueTypes|Integer]]||Valid values: 0, 1, 2, as per canLock
==dexterity??==
|-
[[TokenNameValueTypes|Float]]<br>
|handAnim[]={}||[[TokenNameValueTypes|Array]]||Arma
'''Description:''' Ingame weapon handling value, lower value = takes more time to traverse a weapon
|-valign="top"
 
|initSpeed=0||[[TokenNameValueTypes|Integer]]||||Initial speed of shot.Also present in cfgMagazines|| initSpeed = 900;
dexterity = 3.1;
|-
 
|laser=false||[[TokenNameValueTypes|Boolean]]||Arma
==dispersion=0.002==
|-valign="top"
[[TokenNameValueTypes|Float]]<br>
|Library||Class||Arma||
'''Description:''' Ingame weapon dispersion. Bigger value - more dispersion
 
==displayName=""==
[[TokenNameValueTypes|String]]
*Name of the WEAPON
*Name of the MODE
 
A 'displayname' exists for the weapon and is shown in a)gear selection and b) when selecting the weapon in game.
 
A separate 'displayname' exists for each of the weapon's modes (if any)
 
A weapon that only has a single mode *normally* has the same displayname, repeated in the mode class.
 
===displayNameMagazine=""(ofp)===
[[TokenNameValueTypes|String]]<br>
As the name implies, it is the 'displayname' of the magazine and shown when a) reloading a magazine, b) in gear selection.
 
replaced in Arma via the [[CfgMagazines Config Reference|cfgMagazines Class]]
 
===shortNameMagazine=""(ofp)===
[[TokenNameValueTypes|String]]<br>
 
The ammo descriptive name in cfgAmmo. Replaced in Arma by ShortName in the [[CfgMagazines Config Reference|cfgMagazines Class]]
 
==distanceZoomMax=400==
[[TokenNameValueTypes|Integer]]<br>
'''Description:'''
===distanceZoomMin=400===
[[TokenNameValueTypes|Integer]]<br>
'''Description:'''
 
==descriptionShort=""==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|String]]<br>
 
This is the equivalent of ofp's ammunition label (shortNameMagazine) and is, strangely, declared in weapons??
 
==drySound[]={"",1,1}==
 
see Sounds
 
==E==
 
==enableAttack=true==
[[TokenNameValueTypes|Boolean]]<br>
'''Description:'''
 
==emptySound[]={"",1,1}==
'''[[ArmaTokenNames|ArmA]]'''
 
==F==
 
==ffCount=1==
[[TokenNameValueTypes|Integer]]<br>
'''Description:'''
 
ffCount = 6;
 
==ffFrequency=1==
[[TokenNameValueTypes|Float]]<br>
'''Description:'''
 
ffFrequency = 11;
 
==ffMagnitude=0==
[[TokenNameValueTypes|Float]]<br>
'''Description:'''
 
ffMagnitude = 0.5;
 
==fireLightDuration=0.05==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Float]]<br>
'''Description:'''
==fireLightIntensity=0.012==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Float]]<br>
'''Description:'''
 
==flash=""==
[[TokenNameValueTypes|String]]<br>
'''Description:'''
ofp only?
flash = "gunfire";
 
==flashSize=0==
[[TokenNameValueTypes|Float]]<br>
'''Description:'''
ofp only?
flashSize = 1.2;
 
==forceOptics=0==
[[TokenNameValueTypes|Integer]]<br>
'''Description:''' Valid values: 0, 1, 2
 
forceOptics = 2;
 
==G==
==H==
==handAnim[] = {}==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Array]]<br>
 
 
==I==
==initSpeed=0==
[[TokenNameValueTypes|Integer]]<br>
'''Description:''' Initial speed of shot.
 
initSpeed = 900;
 
==J==
==K==
==L==
 
==laser=false==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Boolean]]<br>
'''Description:'''
 
==libTextDesc==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|String]]<br>
'''Description:'''
 
libTextDesc = "$STR_LIB_SVD";
 
==Library==
'''[[ArmaTokenNames|ArmA]]'''
   class Library
   class Library
   {
   {
   libTextDesc = "";
   libTextDesc = "";
   };
   };
 
|-
 
|libTextDesc||[[TokenNameValueTypes|String]]||ArmaClass||libTextDesc = "$STR_LIB_SVD";//eg
==M==
|-valign="top"
 
|magazineReloadTime=0||[[TokenNameValueTypes|Float]]||||Time delay when reloading the weapon (changing magazines).
==magazineReloadTime=0==
|-valign="top"
[[TokenNameValueTypes|Float]]<br>
|magazines[]={}||[[TokenNameValueTypes|StringArray]]||||
'''Description:''' Time delay when reloading the weapon (changing magazines).
Array of magazines compatible with this weapon. In ArmA, these are defined in CfgMagazines. In OFP they are (generally) the same Weapon class.||magazines[] = {"this"} ofp default
 
|-valign="top"
magazineReloadTime = 0.1;
|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"
==magazines[]==
|min/mid/maxRange...||[[TokenNameValueTypes|Integer]]||ArmAModeClass
[[TokenNameValueTypes|Array]]<br>
||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.
'''Description:''' Array of magazines compatible with this weapon. In ArmA, these are defined in [[CfgMagazines]]. In OFP they are (generally) the same Weapon class.
|-
 
|magazineType=0||[[TokenNameValueTypes|Integer]]||ofp||See Types below
magazines[] = {"this"};//ofp
|-
magazines[] = {};//arma
|minRange=1||[[TokenNameValueTypes|Integer]]
 
|-
 
|minRangeProbab=0.3||[[TokenNameValueTypes|Float]]
==maxLeadSpeed=50==
|-
[[TokenNameValueTypes|Integer]]<br>
|midRange=150||[[TokenNameValueTypes|Integer]]
'''Description:''' Maximimum speed of the target that can be shot with this weapon by AI. For OFP only, in ArmA this command has only effect in CfgMagazines.
|-
 
|midRangeProbab= 0.58||[[TokenNameValueTypes|Float]]
==min/mid/maxRange...==
|-
 
|maxRange=500||[[TokenNameValueTypes|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.
|-
 
|maxRangeProbab=0.04||[[TokenNameValueTypes|Float]]
===minRange=1===
|-
[[TokenNameValueTypes|Integer]]<br>
|memoryPointCamera="eye"||[[TokenNameValueTypes|String]]||Arma||||memoryPointCamera = "GL eye";
'''Description:'''
|-
===minRangeProbab=0.3===
|model="[.p3d]"||[[TokenNameValueTypes|String]]||||
[[TokenNameValueTypes|Float]]<br>
||model = "\ca\a10\AGM65";
'''Description:'''
|-
===midRange=150===
|modelMagazine="[.p3d]"||[[TokenNameValueTypes|String]]||||
[[TokenNameValueTypes|Integer]]<br>
||
'''Description:'''
  modelMagazine = "\misc\mag_univ.p3d";// ofp default
===midRangeProbab= 0.58===
|--valign="top"
[[TokenNameValueTypes|Float]]<br>
|modelOptics="[.p3d]"||[[TokenNameValueTypes|String]]||||Optic model used in game. "-" defines 3d view from the model (point "eye")
'''Description:'''
||
===maxRange=500===
  modelOptics = "\ca\Weapons\G36_optics";  
[[TokenNameValueTypes|Float]]<br>
===maxRangeProbab=0.04===
[[TokenNameValueTypes|Float]]<br>
'''Description:'''
 
==memoryPointCamera="eye"==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|String]]<br>
'''Description:'''
 
memoryPointCamera = "GL eye";
 
 
==model="[.p3d]"==
[[TokenNameValueTypes|String]]<br>
'''Description:'''
 
model = "\ca\a10\AGM65";
 
==modelMagazine="[.p3d]"==
[[TokenNameValueTypes|String]]<br>
'''Description:'''
  modelMagazine = "\misc\mag_univ.p3d";// ofp
modelMagazine = "";//arma
 
==modelOptics="[.p3d]"==
[[TokenNameValueTypes|String]]<br>
'''Description:''' Optic model used in game. "-" defines 3d view from the model (point "eye")
 
  modelOptics = "\ca\Weapons\G36_optics";
  modelOptics = "-";
  modelOptics = "-";
 
|-
==modelSpecial=""==
|modelSpecial=[.p3d]""||[[TokenNameValueTypes|String]]
[[TokenNameValueTypes|String]]<br>
|--valign="top"
 
|modes[]= {"this"}||[[TokenNameValueTypes|StringArray]]||||Anything you care to claim as a class xxx. if not specified, (modes[]= {"this"};) the engine assumes all parms necessary for mode, are declared within the main body
 
||modes[] = {"single","burst","auto"};
==modes[]= {"this"}==
|-
[[TokenNameValueTypes|Array]]<br>
|multiplier=1||[[TokenNameValueTypes|Integer]]||ModeClass||Ammunition used per shot.
'''Description:'''
|-
 
|muzzleEnd="konec hlavne"||[[TokenNameValueTypes|String]]
modes[] = {"single","burst","auto"};// or anything you care to claim as a class xxx
|-
 
|muzzlePos="usti hlavne"||[[TokenNameValueTypes|String]]
if not specified, (modes[]= {"this"};) the engine assumes all parms necessary for mode, are declared within the main body
|--valign="top"
 
|muzzles[]={"this"}||[[TokenNameValueTypes|Array]]||||similar to modes, if not declared, assumed muzzle is 'this'
==multiplier=1==
||muzzles[] = {"TimeBombMuzzle","PipeBombMuzzle","MineMuzzle","MineEMuzzle"};
[[TokenNameValueTypes|Integer]]<br>
|-
'''Description:''' Ammunition used per shot.
|nameSound=""||[[TokenNameValueTypes|String]]||||Classname of sound played when vehicle commander switches to this weapon?
 
||
multiplier = 5;
nameSound = "weapon";//ofp default
 
==muzzleEnd="konec hlavne"==
[[TokenNameValueTypes|String]]<br>
'''Description:'''
 
==muzzlePos="usti hlavne"==
[[TokenNameValueTypes|String]]<br>
'''Description:'''
 
==muzzles[]={"this"}==
[[TokenNameValueTypes|Array]]<br>
'''Description:''' similar to modes, if not declared, assumed muzzel is 'this'
 
muzzles[] = {"TimeBombMuzzle","PipeBombMuzzle","MineMuzzle","MineEMuzzle"};
 
==N==
 
==nameSound==
[[TokenNameValueTypes|String]]<br>
'''Description:''' classname of sound played when vehicle commander switches to this weapon?
  nameSound = "weapon";//ofp
  nameSound = "";//arma
 
  nameSound = "smokeshell";
  nameSound = "smokeshell";
|-
|optics=true||[[TokenNameValueTypes|Boolean]]
|-
|opticsDisablePeripherialVision=0.67||[[TokenNameValueTypes|Float]]||ArmA
|-
|opticsFlare=true||[[TokenNameValueTypes|Boolean]]
|-
|opticsPPEffects[] = {}||[[TokenNameValueTypes|Array]]||Arma
|-
|opticsZoomInit= 0.35||[[TokenNameValueTypes|Float]]
|-
|opticsZoomMax=0.35||[[TokenNameValueTypes|Float]]
|-
|opticsZoomMin=0.35||[[TokenNameValueTypes|Float]]
|-
|picture="[\][.pac]"||[[TokenNameValueTypes|String]]||||Defines weapon '''and''' magazine. See below
|-
|primary=10||[[TokenNameValueTypes|Integer]]
|-
|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]]||enumerated list||desc
||
reloadAction = ManActReloadMagazine;//ofp default
|--valign="top"
|-
|reloadMagazineSound[]={"",1,1}||[[TokenNameValueTypes|Array]]|||| 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.
|--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.
|-
|scopeWeapon=0||[[TokenNameValueTypes|Integer]]||Ofp
|-
|scopeMagazine=0||[[TokenNameValueTypes|Integer]]||Ofp||used as couplets instead of scope
|-
|selectionFireAnim="zasleh"||[[TokenNameValueTypes|String]]||Arma
|--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
|-
|}


==O==
==optics=true==
[[TokenNameValueTypes|Boolean]]<br>
'''Description:'''
==opticsDisablePeripherialVision=0.67==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Float]]<br>
'''Description:'''
==opticsFlare=true==
[[TokenNameValueTypes|Boolean]]<br>
'''Description:'''
==opticsPPEffects[] = {}==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Array]]<br>
'''Description:'''


==opticsZoomInit= 0.35==
===Picture="[\][.p3d]"===
[[TokenNameValueTypes|Float]]<br>
Defines WEAPON Picture '''and separately''' MAGAZINE Picture.
'''Description:'''
OFP ''generally'' created TWO cfgWeapon classes. One for the weapon, one for the magazine. picture= was declared in each. In Arma, the picture name has been moved to the cfgMagazines class proper.
==opticsZoomMax=0.35==
[[TokenNameValueTypes|Float]]<br>
'''Description:'''  
==opticsZoomMin=0.35==
[[TokenNameValueTypes|Float]]<br>
'''Description:'''
 
==P==
 
==picture="[\][.pac]"==
[[TokenNameValueTypes|String]]<br>
'''Description:'''


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 ALL picture= references. Not just cfgWeapons.
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 ALL picture= references. Not just cfgWeapons.
Line 486: Line 380:
*Secondly, it must explicitly have a \leading. This, possibly in an attempt by bis to start using relative addressing. Without which, textures are presumed to be in \w_equip\neverland.
*Secondly, it must explicitly have a \leading. This, possibly in an attempt by bis to start using relative addressing. Without which, textures are presumed to be in \w_equip\neverland.


 
==Types==
==primary=10==
===type=WeaponHardMounted(ArmaOnly)===
[[TokenNameValueTypes|Integer]]<br>
'''Description:'''
 
==Q==
 
==R==
 
==recoil="Empty"===-
[[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=""==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|String]]<br>
'''Description:''' When prone, recoil can be set to slower values
 
recoilProne = "AK74Recoil";
 
==reloadAction==
[[TokenNameValueTypes|String]]enumerated list<br>
'''Description:'''
 
  reloadAction = ManActReloadMagazine;//ofp
  reloadAction = "";//arma
 
==reloadTime=1.0===
[[TokenNameValueTypes|Float]]<br>
'''Description:''' Time delay between each individual shot.
 
==S==
 
==scope=0==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Integer]]<br>
'''Description:'''
 
Note:  Refers to the [http://en.wikipedia.org/wiki/Scope_%28programming%29 accessibility of the variable], not a rifle scope.
 
OFP had no scope token. Instead, it used scopeWeapon and ScopeMagazine to distinction who was what and when used.
===scopeWeapon=0(ofp)===
===scopeMagazine=0(ofp)===
OFP only used as couplets instead of scope
 
==selectionFireAnim="zasleh"==
 
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|String]]<br>
'''Description:'''
 
 
==shotFromTurret???==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Boolean]]<br>
'''Description:''' meaning unknown. But "zasleh" animation is not working if set to 1
 
shotFromTurret = 1;
 
==showAimCursorInternal=true==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Boolean]]<br>
'''Description:'''
 
==showEmpty=true==
[[TokenNameValueTypes|Boolean]]<br>
'''Description:''' If false weapon gets hidden from the player once there's no ammo left for it
 
 
==showSwitchAction=false==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Boolean]]<br>
'''Description:'''
 
==showToPlayer=true==
'''[[ArmaTokenNames|ArmA]]''' [[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"==
'''[[ArmaTokenNames|ArmA]]'''
 
==Sounds==
 
There are several sound '''types'''
 
Most are relevent to the weapon overall and specified in the main body, sound[]= is specific to each mode.
 
==drySound[]={"",1,1}==
[[TokenNameValueTypes|Array]]<br>
'''Description:''' click Sound  when empty weapon fired
 
drySound[] = {"\ca\Weapons\Data\Sound\XMS_dry_v2",0.000316228,1};
 
===reloadMagazineSound[]={"",1,1}===
[[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};
 
===sound[]={"",1,1}===
[[TokenNameValueTypes|Array]]<br>
'''Description:''' This is a ModeClass TokenName. It must be stated for each mode defined since it is the different sounds the weapon makes for 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.
 
==soundBurst=true==
'''[[ArmaTokenNames|ArmA]]''' [[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==
[[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}==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Array]]<br>
==soundBullet[]={"emptySound",1}==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Array]]<br>
==soundEnd[]={"sound",1}==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Array]]<br>
==soundLoop[]={"sound",1}==
'''[[ArmaTokenNames|ArmA]]''' [[TokenNameValueTypes|Array]]<br>
 
 
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]]<br>
'''Description:'''
 
soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1",25.1189,0.8};
 
==soundServo[]??==
[[TokenNameValueTypes|Array]]<br>
'''Description:'''
 
soundServo[] = {"",0.0001,1};
 
==T==
 
==type=WeaponHardMounted(ArmaOnly)==
===magazineType=0(OfpOnly)===
===magazineType=0(OfpOnly)===
===weaponType=WeaponHardMounted(OfpOnly)===
===weaponType=WeaponHardMounted(OfpOnly)===
[[TokenNameValueTypes|Integer]]<br>
[[TokenNameValueTypes|Integer|Integers]]<br>


'''Description:''' Defines the equipment slots this '''WEAPON''' or '''MAGAZINE''' will occupy.
'''Description:''' Defines the equipment slots this '''WEAPON''' or '''MAGAZINE''' will occupy.
Line 646: Line 392:
OFP does not have a 'Type='. Instead, it uses WeaponType= and MagazineType= couplets. The end result, and the intent, is identical.
OFP does not have a 'Type='. Instead, it uses WeaponType= and MagazineType= couplets. The end result, and the intent, is identical.


The naming conventions for this token is misleading. In all cases we are talking about slots available in the equipment (gear) selection. OFP Commented Config confused the issue further by #definining 'types' as weaponslots. They are Weapon,  equipment and Magazine slots.
The naming conventions for this token is misleading. In all cases we are talking about slots available in the equipment (gear) selection. OFP Commented Config confused the issue further by #defining 'types' as weaponslots... They are Weapon,  Equipment and Magazine slots.




Line 665: Line 411:




*Note the quite serious alteration to SecondaryWeapon and Handgun mags that occurred in arma. This to allow for an expanded count field in the magazine types.
*Note the quite serious alteration to SecondaryWeapon and Handgun mags that occurred in arma. This to allow for an expanded count field in the respective types. Hindsight being that wonderful thing, this serious incompatibility with ofp migration was uneccessary. Magazine bitfields do not occur in Arma's cfgWeapons, and a handgun's magazine slot count is always considerably less than main. The secondaryWeapon field could have expanded from it's ofp postion, since, again, magazine bitfields dont exist in arma's cfgWeapons.


-----
-----
Line 674: Line 420:
|either:||NoSlot||0|| same ||dummy weapon or mag 'stroke' eg
|either:||NoSlot||0|| same ||dummy weapon or mag 'stroke' eg
|-
|-
|Weapon:||PrimaryWeapon||same || 1 ||AK47
|Weapon:||PrimaryWeapon||1|| same ||AK47
|-
|-
|Weapon:||HandGun||2|| same ||CZ75
|Weapon:||HandGun||2|| same ||CZ75
Line 708: Line 454:
  "8 * 256" // mm1 all slots needed
  "8 * 256" // mm1 all slots needed


==U==
----------
 
==UiPicture==
[[TokenNameValueTypes|String]]<br>
'''Description:'''
  uiPicture = "ivojak";//ofp
uiPicture = "";//arma
UiPicture = "\CA\weapons\data\Ico\i_aa_CA.paa";
 
==useAction=false==
[[TokenNameValueTypes|Boolean]]<br>
'''Description:'''
 
==useActionTitle=""==
[[TokenNameValueTypes|String]]<br>
'''Description:'''
 
useActionTitle = "$STR_ACTION_PUTBOMB";
 
==useAsBinocular=false==
[[TokenNameValueTypes|Boolean]]<br>
'''Description:'''
 


==V==


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


==valueMagazine = 2==
==valueWeapon = 2==
ofp only as above


==X==
==Y==
==Z==


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

Revision as of 12:24, 16 August 2010

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 characterstics 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) characterstics. 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 paramaters.

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 rennamed Type
maxLeadSpeed=          moved to cfgMagazines
minRange =             moved FROM cfgAmmo
minRangeProbab =
midRange =
midRangeProbab =
maxRange = 
maxRangeProbab = 
scopeWeapon=          renamed scope
scopeMagazine=        moved to cfgMagazines and rennamed scope
shortNameMagazine=    moved to cfgMagazines and rennamed 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 paramaters 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 relevent 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.


TokenNames

  • All engines accept integer values (or math strings) where a float would normally be expected.
  • Default values are shown in the legend.
    • OFP default values, if different, are shown in examples
  • Usage
    • OFP moved to ArmA's cfgMagazines Class and generally 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.
    • Blank: used as described in both OFP, and, ArmA

Type Usage Desc Example
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 Dispersion multiplier for Ai units (axis X - left to right)
aiDispersionCoefY=1.0 Float Dispersion multiplier for Ai units (axis Y - top-down)
aiRateOfFire=5.0 Float ModeClass delay between shots at given aiRateOfFireDistance
aiRateOfFireDistance=500 Integer ModeClass at shorter distance delay (aiRateOfFire) goes lineary to zero
ammo="" String OFPModeClass CfgAmmo class that this weapon fires. Moved to cfgMagazines in Arma. ammo = "TimeBomb";
autoAimEnabled=true Boolean FALSE for all standard weapons
autoFire=false Boolean ModeClass If true weapon will continue firing once you press fire button once until you release it.
autoReload=true Boolean if true weapon will be reloaded automaticly once magazine is empty
backgroundReload=false Boolean Weapon automatically reloads magazines without player intervention or animation.
ballisticsComputer=false 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.
burst=1 Integer ModeClass Number of shots actually fired each time the weapon is fired.
cameraDir String cameraDir = "GL look";
canDrop=true Boolean Weapon can/not be dropped from Inventory Menu .
canLock=2 Integer 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 Integer OFP Number of shots weapon starts with. Moved to CfgMagazines in ArmA
cursor="" String cursor="w_weapon";// ofp default
cursorAim="" String cursorAim = "w_lock";//ofp default cursorAim = "\ca\Weapons\Data\cursor_target_locked_ca.paa";
cursorAimOn="" String Arma
cursorSize=1.0 Float Arma
dexterity?? Float Ingame weapon handling value, lower value = takes more time to traverse a weapon dexterity = 3.1;
dispersion=0.002 Float ModeClass Ingame weapon dispersion. Bigger value - more dispersion
displayName="" String *Name of the WEAPON *Name of the MODE

A 'displayname' exists for the weapon and is shown in a) gear selection and b) when selecting the weapon in game.A separate 'displayname' exists for each of the weapon's modes (if any). A weapon that only has a single mode *normally* has the same displayname, repeated in the mode class.

displayNameMagazine="" String OFP

As the name implies, it is the 'displayname' of the magazine and shown when a) reloading a magazine, b) in gear selection. Replaced in Arma via the cfgMagazines Class

shortNameMagazine="" String OFP The ammo descriptive name in cfgAmmo. Replaced in Arma by ShortName in the cfgMagazines Class
distanceZoomMax=400 Integer
distanceZoomMin=400 Integer
descriptionShort="" String ArmA This is the equivalent of ofp's ammunition label (shortNameMagazine) and is, strangely, declared in weapons
drySound[]={"",1,1} Array click Sound when empty weapon fired drySound[] = {"\ca\Weapons\Data\Sound\XMS_dry_v2",0.000316228,1};
enableAttack=true Boolean
emptySound[]={"",1,1} Array Arma
ffCount=1 Integer ModeClass
ffFrequency=1 Float ModeClass
ffMagnitude=0.0 Float ModeClass
fireLightDuration=0.05 Float Arma
fireLightIntensity=0.012 Float Arma
flashSize=0.0 Float ModeClass ofp only?
forceOptics=0 Integer Valid values: 0, 1, 2, as per canLock
handAnim[]={} Array Arma
initSpeed=0 Integer Initial speed of shot.Also present in cfgMagazines initSpeed = 900;
laser=false Boolean Arma
Library Class Arma
 class Library
 {
  libTextDesc = "";
 };
libTextDesc String ArmaClass libTextDesc = "$STR_LIB_SVD";//eg
magazineReloadTime=0 Float Time delay when reloading the weapon (changing magazines).
magazines[]={} StringArray

Array of magazines compatible with this weapon. In ArmA, these are defined in CfgMagazines. In OFP they are (generally) the same Weapon class.||magazines[] = {"this"} ofp default

maxLeadSpeed=50 Integer Ofp Maximimum speed of the target that can be shot with this weapon by AI. Moved to CfgMagazines in ArmA.
min/mid/maxRange... 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 Integer ofp 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" String Arma memoryPointCamera = "GL eye";
model="[.p3d]" String model = "\ca\a10\AGM65";
modelMagazine="[.p3d]" String
modelMagazine = "\misc\mag_univ.p3d";// ofp default
modelOptics="[.p3d]" String 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 Anything you care to claim as a class xxx. if not specified, (modes[]= {"this"};) the engine assumes all parms necessary for mode, are declared within the main body modes[] = {"single","burst","auto"};
multiplier=1 Integer ModeClass Ammunition used per shot.
muzzleEnd="konec hlavne" String
muzzlePos="usti hlavne" String
muzzles[]={"this"} Array similar to modes, if not declared, assumed muzzle is 'this' muzzles[] = {"TimeBombMuzzle","PipeBombMuzzle","MineMuzzle","MineEMuzzle"};
nameSound="" String Classname of sound played when vehicle commander switches to this weapon?
nameSound = "weapon";//ofp default
nameSound = "smokeshell";
optics=true Boolean
opticsDisablePeripherialVision=0.67 Float ArmA
opticsFlare=true Boolean
opticsPPEffects[] = {} Array Arma
opticsZoomInit= 0.35 Float
opticsZoomMax=0.35 Float
opticsZoomMin=0.35 Float
picture="[\][.pac]" String Defines weapon and magazine. See below
primary=10 Integer
recoil="Empty" 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="" String ArmAModeClass When prone, recoil can be set to slower values recoilProne = "AK74Recoil"
reloadAction="" String enumerated list desc
reloadAction = ManActReloadMagazine;//ofp default
reloadMagazineSound[]={"",1,1} Array Sound played while changing magazines. reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload",0.000316228,1};
reloadSound[]={"",1,1} Array Sound played after each shot. reloadSound[] = {"\ca\Weapons\Data\Sound\gun125reload",1,1};
reloadTime=1.0 Float ModeClass Time delay between each individual shot.
scope=0 Integer ArmA OFP had no scope token. Instead, it used scopeWeapon and ScopeMagazine to distinguish who was what and when used.
scopeWeapon=0 Integer Ofp
scopeMagazine=0 Integer Ofp used as couplets instead of scope
selectionFireAnim="zasleh" String Arma
shotFromTurret??? Boolean ArmA meaning unknown. But "zasleh" animation is not working if set to 1
showAimCursorInternal=true Boolean ArmA
showEmpty=true Boolean If false weapon gets hidden from the player once there's no ammo left for it
showToPlayer=true 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" String ArmA
sound[]={"",1,1} 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.

soundBurst=true Boolean ArmaModeClass

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

soundContinuous=false Boolean ModeClass If true sound for the next shot won't start before previous oe ends. Thus you can prevent sound overlapping.
soundBegin[]={"sound",1} Array ArmaModeClass
soundBullet[]={"emptySound",1} Array ArmaModeClass
soundEnd[]={"sound",1} Array ArmAModeClass
soundLoop[]={"sound",1} 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.
soundServo[] Array soundServo[] = {"",0.0001,1};
Type=WeaponHardMounted Integer Arma Defines the equipment slots this WEAPON or MAGAZINE will occupy. See Types below
UiPicture="[\][.pac]" String ArmA \CA\weapons\data\Ico\i_aa_CA.paa";
uiPicture="ivojak" ofp
useAction=false Boolean ModeClass
useActionTitle="" String ModeClass useActionTitle = "$STR_ACTION_PUTBOMB";
useAsBinocular=false Boolean
value=2 Integer ArmA
valueMagazine=2 Integer ofp
valueWeapon=2 Integer ofp
weaponType=WeaponHardMounted Integer ofp See Types below


Picture="[\][.p3d]"

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 picture name has been moved to the cfgMagazines class proper.

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 ALL picture= references. Not just cfgWeapons.

  • Firstly, the DEFAULT extension is .pac. (There is not intended to be 'pac' in arma), a .paa must be explicitly declared.
  • Secondly, it must explicitly have a \leading. This, possibly in an attempt by bis to start using relative addressing. Without which, textures are presumed to be in \w_equip\neverland.

Types

type=WeaponHardMounted(ArmaOnly)

magazineType=0(OfpOnly)

weaponType=WeaponHardMounted(OfpOnly)

Integer|Integers

Description: Defines the equipment slots this WEAPON or MAGAZINE will occupy.

A magazine is defined as being a true magazine, or shell. Bi refer to this as an 'item'.

OFP does not have a 'Type='. Instead, it uses WeaponType= and MagazineType= couplets. The end result, and the intent, is identical.

The naming conventions for this token is misleading. In all cases we are talking about slots available in the equipment (gear) selection. OFP Commented Config confused the issue further by #defining 'types' as weaponslots... They are Weapon, Equipment and Magazine slots.


A 'vehicle', in this case a human, has it's equipment slots defined in the cfgVehicles Class. In general it consists of placements for:

  • A 'slot' for a Primary Weapon (rifle eg)
  • A 'slot' for a Secondary Weapon (Law Launcher)
    • Magazine slots for these weapons (AK47Mag)
  • A Handgun slot (Berreta eg)
    • Magazine slots for this weapon (CZ75Mag)
  • Equipment slots (binoculars)

For arma, Magazine 'slots' and Weapon 'slots' are mutually exclusive. They only occur in the cfgWeapons or cfgMagazines respectively

The specific combination for machine guns normally occupy both weapon slots (PrimaryWeapon+SecondaryWeapon)

Some humans have less slots than others. Arma1 seriously degraded this distinction and destroyed it, An ofp medic (or civilian) cannot hope to carry as much 'equipment'. Many well crafted missions rely on the fact that civilans are not, a 4th army grouping by another name but have distinct (and unique) characterstics.


  • Note the quite serious alteration to SecondaryWeapon and Handgun mags that occurred in arma. This to allow for an expanded count field in the respective types. Hindsight being that wonderful thing, this serious incompatibility with ofp migration was uneccessary. Magazine bitfields do not occur in Arma's cfgWeapons, and a handgun's magazine slot count is always considerably less than main. The secondaryWeapon field could have expanded from it's ofp postion, since, again, magazine bitfields dont exist in arma's cfgWeapons.

Slot: OFP ARMA Example
either: NoSlot 0 same dummy weapon or mag 'stroke' eg
Weapon: PrimaryWeapon 1 same AK47
Weapon: HandGun 2 same CZ75
Weapon: SecondaryWeapon 16 4 Law
Mag: HandGunMagazines 32 see note 16 CZ75Mag or GLMag
Mag: MainMagazines 256 see note same AK47Mag or explosives
Weapon: BinocularSlot 4096 same or NVG, LD,etc
Weapon: HardMounted 65536 same
Mag: SmallItems 131072 (Arma 2) map, compass, small items (derived from ItemCore)

MainMagazines

Main and Handgun Magazines are bitwise 'count' fields. Either field can potentially have have up to 31 'slots'.

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

Some weapons such as the RPG require two slots to hold the 'magazine', ie the shell itself. 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.

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,law 2 slots needed
"4 * 256" // 6g30 4 slots needed
"6 * 256" // carlgustav,stinger 6 slots needed
"8 * 256" // mm1 all slots needed