CfgWeapons Config Reference: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - " of of " to " of ") |
|||
(56 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{ConfigPage|start}} | ||
==Introduction== | == Introduction == | ||
'''''cfgAmmo''''', '''''cfgMagazines''''', '''''cfgWeapons''''' and '''''cfgVehicles''''' are root classes defined in the engine's | '''''cfgAmmo''''', '''''cfgMagazines''''', '''''cfgWeapons''''' and '''''cfgVehicles''''' are root classes defined in the engine's {{hl|config.bin}}. | ||
These classes can be subsequently added to by addons inherit in the game or provided by ''oem''. | These classes can be subsequently added to by addons inherit in the game or provided by ''oem''. | ||
Line 9: | Line 9: | ||
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. | 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. | ||
'' | ''cfgWeapons'' define the rifle ''e.g.'' characteristics. What muzzles it has, how many 'modes' (if any) it can use. What magazines are selectable. | ||
===Arma Enhancement=== | === Arma Enhancement === | ||
In contrast, {{Name|ofp|short}} uses a rather tedious construct in it | {{Name|arma1|short}} introduced a new root class, ''cfgMagazines''. | ||
In contrast, {{Name|ofp|short}} uses a rather tedious construct in it is ''cfgWeapons'' class to distinguish between weapon and magazine parameters. | |||
The major alterations here are: | The major alterations here are: | ||
{| class=" | {| class="wikitable" | ||
|- | |- | ||
! {{Name|ofp|short}} | ! {{Name|ofp|short}} | ||
! {{Name|arma1|short}} | |||
|- | |- | ||
| | | {{hl|c= ammo=}} | ||
| moved to ''cfgMagazines'' | |||
|- | |- | ||
| | | {{hl|c= cost=}} | ||
| moved to ''cfgMagazines'' | |||
|- | |- | ||
| | | {{hl|c= displayNameMagazine=}} | ||
| moved to ''cfgMagazines'' and renamed ''DisplayName'' (of course) | |||
|- | |- | ||
| | | {{hl|c= magazines[] = {"this"};}} || {{hl|c= magazines[] = {};}} | ||
|- | |- | ||
| | | {{hl|c= magazineType=}} | ||
| moved to ''cfgMagazines'' and renamed ''Type'' | |||
|- | |- | ||
| | | {{hl|c= maxLeadSpeed=}} | ||
| moved to ''cfgMagazines'' | |||
|- | |- | ||
| | | {{hl|c= minRange=}} | ||
| moved FROM ''cfgAmmo'' | |||
|- | |- | ||
| | | {{hl|c= minRangeProbab=}} | ||
| | |||
|- | |- | ||
| | | {{hl|c= midRange=}} | ||
| | |||
|- | |- | ||
| | | {{hl|c= midRangeProbab=}} | ||
| | |||
|- | |- | ||
| | | {{hl|c= maxRange=}} | ||
| | |||
|- | |- | ||
| | | {{hl|c= maxRangeProbab=}} | ||
| | |||
|- | |- | ||
| | | {{hl|c= scopeWeapon=}} | ||
| renamed ''scope'' | |||
|- | |- | ||
| | | {{hl|c= scopeMagazine=}} | ||
| moved to ''cfgMagazines'' and renamed ''scope'' | |||
|- | |- | ||
| | | {{hl|c= shortNameMagazine=}} | ||
| moved to ''cfgMagazines'' and renamed ''descriptionShort''? | |||
|} | |} | ||
===Modifications=== | === Modifications === | ||
<syntaxhighlight lang=" | |||
<syntaxhighlight lang="cpp"> | |||
cfgWeapons { | cfgWeapons { | ||
access = 1; | |||
... | |||
//Weapon classes can be added. | |||
default { | |||
access = 3; | |||
} | } | ||
... | ... | ||
Line 69: | Line 86: | ||
Existing classes can (rarely) be altered. | Existing classes can (rarely) be altered. | ||
The default class of ''cfgWeapons'' specifies | The default class of ''cfgWeapons'' specifies {{hl|c= access = 3;}}. Almost all subsequent classes inherit this value, which means they cannot be altered in any way. | ||
To allow YOUR addon to subsequently modify YOUR weapon (should you wish to with other addons), you must change the {{hl|c= access=}} in YOUR Weapon. | |||
=== Navigation: The wood for the trees === | |||
''cfgWeapons'' can be a puzzling mess to the uninitiated. | ''cfgWeapons'' can be a puzzling mess to the uninitiated. | ||
The ''tokenpairs'', their placement, and their constructs can be befuddled. This is not a reflection on {{Name|bi|short}}, the ultimate class structure is very, very, adaptive, but, it does confuse. | The ''tokenpairs'', their placement, and their constructs can be befuddled. This is not a reflection on {{Name|bi|short}}, the ultimate class structure is very, very, adaptive, but, it does confuse. | ||
Essentially, {{Name| | Essentially, {{Name|arma1|short}} did open heart, and excellent, surgery to this class to distinguish between weapons and their magazines. {{Name|ofp|short}} had a common weapon/magazine class with variables declaring what to use and when. Variables only relevant to {{Name|ofp|short}}, are sometimes still encountered in {{Name|arma1|short}}, simply because, they do no harm. | ||
Weapons come in two major flavors (with plenty of sub themes). A weapon either has, or does not have, a | Weapons come in two major flavors (with plenty of sub themes). A weapon either has, or does not have, a {{hl|modes[]}} class or classes adding different behaviour like ''autofire'', ''burst'' or ''single shot''. Confusingly, a weapon with only one mode, is, equivalent to not declaring it at all. The tokens that would normally be in a ''modes'' class, are declared in the main body instead. This obfuscates what-goes-where. | ||
Weapons can have different muzzles, adding a further layer of modelling. | Weapons can have different muzzles, adding a further layer of modelling. | ||
Line 86: | Line 104: | ||
The inherited tree structure for weapons vs their magazines, vs their ammo, is not always logical. This is a throwback to {{Name|ofp|short}} which (for instance) inherited ''RPG Ammo'' from an ''AT3'', but inherited the ''RPG weapon'' from a ''CarlGustav'', and so on. The end result being identical and good, since offending parameters were altered as necessary - but it does confuse what a ''HellfireHind'' really is, depending on who you are (''ammo'' vs ''mag'' vs ''weapon''). | The inherited tree structure for weapons vs their magazines, vs their ammo, is not always logical. This is a throwback to {{Name|ofp|short}} which (for instance) inherited ''RPG Ammo'' from an ''AT3'', but inherited the ''RPG weapon'' from a ''CarlGustav'', and so on. The end result being identical and good, since offending parameters were altered as necessary - but it does confuse what a ''HellfireHind'' really is, depending on who you are (''ammo'' vs ''mag'' vs ''weapon''). | ||
===Modes=== | === Modes === | ||
Some ''TokenNames'' are relevant only within a ''mode'' class (''e.g.'' | |||
Some ''TokenNames'' are relevant only within a ''mode'' class (''e.g.'' {{hl|c= sound[]=}}), and stated as such. | |||
'''All''' weapons, without exception, have at least one ''mode'' class. | '''All''' weapons, without exception, have at least one ''mode'' class. | ||
Line 93: | Line 112: | ||
By default, the inherited ''mode'' for a weapon is: | By default, the inherited ''mode'' for a weapon is: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
modes[] = {"this"}; | modes[] = {"this"}; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 99: | Line 118: | ||
Which means the engine will treat the main body as also being a ''mode'' class unless over-ridden. | 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 | 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 is parents) instead. The ''TokenNames'' themselves, remain, accurately described, as being ''mode'' class only. | ||
=== Muzzles === | |||
Exact same comments as per [[#Modes|Modes]]. By default the inherited muzzle for a weapon is: | Exact same comments as per [[#Modes|Modes]]. By default the inherited muzzle for a weapon is: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
muzzles[] = {"this"}; | muzzles[] = {"this"}; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 112: | Line 132: | ||
Different muzzles are normally only encountered on grenade launcher weapons (?). | Different muzzles are normally only encountered on grenade launcher weapons (?). | ||
===TokenNames=== | === TokenNames === | ||
All engines accept ''integer'' values (or math strings) where a ''float'' would normally be expected. | All engines accept ''integer'' values (or math strings) where a ''float'' would normally be expected. | ||
Line 118: | Line 139: | ||
; Usage | ; Usage | ||
: '''''{{Name|ofp|short}}''''': generally moved to {{Name| | : '''''{{Name|ofp|short}}''''': generally moved to {{Name|arma1|short}}'s ''[[CfgMagazines Config Reference|cfgMagazines Class]]'' and often renamed, else simply renamed. | ||
: '''''{{Name| | : '''''{{Name|arma1|short}}''''': Introduced from {{Name|ofpe|short}} and beyond. | ||
: '''''ModesClass''''': Any item marked as a ''ModeClass'' lives in a class | : '''''ModesClass''''': Any item marked as a ''ModeClass'' lives in a class {{hl|Mode...}} body. It '''must''' be declared (or inherited) for '''each''' class. | ||
: '''''MuzzleClass''''': Any item marked as a ''MuzzleClass'' lives in a class | : '''''MuzzleClass''''': Any item marked as a ''MuzzleClass'' lives in a class {{hl|Muzzle...}} body. It '''must''' be declared (or inherited) for '''each''' class. Normally, except for grenade launchers, the muzzle IS the mainbody. | ||
: ''Blank'': Used as described in both {{Name|ofp|short}}, and, {{Name| | : ''Blank'': Used as described in both {{Name|ofp|short}}, and, {{Name|arma1|short}}. | ||
Dual Use ''TokenNames'' (such as {{hl|c= picture=}}) moved to {{Name|arma1|short}}'s ''[[CfgMagazines Config Reference|cfgMagazines Class]]'' as appropriate. | |||
=== Picture="[\][.pac]" === | |||
Defines ''WEAPON Picture'' '''and separately''' ''MAGAZINE Picture''. | Defines ''WEAPON Picture'' '''and separately''' ''MAGAZINE Picture''. | ||
{{Name|ofp|short}} generally created two ''cfgWeapon'' classes. One for the weapon and one for the magazine. | {{Name|ofp|short}} generally created two ''cfgWeapon'' classes. One for the weapon and one for the magazine. {{hl|c= picture=}} was declared in each. In {{Name|arma1|short}}, the ''magazine picture'' name has been moved to the ''cfgMagazines'' class as appropriate. | ||
Note that this is one of those irritating {{Name|bi|short}} path snafu's (when if ever will they start using relative addressing?). The following notes apply to most | Note that this is one of those irritating {{Name|bi|short}} path snafu's (when if ever will they start using relative addressing?). The following notes apply to most {{hl|c= picture=}} references, not just ''cfgWeapons''. | ||
#'''The DEFAULT extension is | #'''The DEFAULT extension is {{hl|.pac}}'''. The engine accepts {{hl|.pac}} or {{hl|.paa}}, but {{hl|.pac}} is not supposed to exist. A {{hl|.paa}} must be explicitly declared. | ||
#'''Path must explicitly have a | #'''Path must explicitly have a {{hl|\}} leading.''' | ||
This because in {{Name|ofp|short}} it was possible to '''not declare''' any picture at all. | This because in {{Name|ofp|short}} it was possible to '''not declare''' any picture at all. | ||
In which case (in {{Name|ofp|short}}) the engine looks for the | In which case (in {{Name|ofp|short}}) the engine looks for the {{hl|.paa}} file in {{hl|\dta\dtaext\NameOfClass.paa}} | ||
The {{Name| | The {{Name|arma1|short}} engine appears to make a mess of it. Any picture reference without a preceding slash will look in a non-existent {{hl|'equip.pbo'}} | ||
Specifically: | Specifically: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
equip\w\w_your\path\name | equip\w\w_your\path\name // for weapons and | ||
equip\m\m_your\path\name | equip\m\m_your\path\name // for mags | ||
</syntaxhighlight> | </syntaxhighlight> | ||
If no picture is specified, then like {{Name|ofp|short}}, | If no picture is specified, then like {{Name|ofp|short}}, {{hl|equip\w\w_NameOfClass}} is assumed. | ||
Note also the 'convention' of naming weapon images with {{hl|w_}} and magazine images with {{hl|m_}} (and to a certain extent having {{hl|data\equip}} file paths). This is rigidly followed in {{Name|arma1|short}}. In {{Name|ofp|short}}, {{Name|bi|short}} were inconsistent. | |||
=== Types === | |||
==== type=WeaponHardMounted (ArmaOnly) ==== | |||
{{Wiki|stub}} | |||
==== magazineType=None (OfpOnly) ==== | |||
{{Wiki|stub}} | |||
==== weaponType=WeaponHardMounted (OfpOnly) ==== | |||
[[TokenNameValueTypes#Integers|Integers]] (Note this value is often held as a math [[TokenNameValueTypes#Strings|String]]) | |||
====weaponType=WeaponHardMounted (OfpOnly)==== | |||
[[TokenNameValueTypes|Integers]] (Note this value is often held as a math [[TokenNameValueTypes|String]]) | |||
Gear (equipment) selection consists of ''SlotTypes'' and one or more ''slot positions'' '''of that type'''. | Gear (equipment) selection consists of ''SlotTypes'' and one or more ''slot positions'' '''of that type'''. | ||
Line 169: | Line 194: | ||
:* ''equipment'' are ''binoculars, NVG, etc''. | :* ''equipment'' are ''binoculars, NVG, etc''. | ||
For {{Name| | For {{Name|arma1|short}}, ''MagazineSlots'' and ''WeaponSlots'' are mutually exclusive. The classes occur in the ''cfgWeapons'' or ''cfgMagazines'' respectively. In {{Name|ofp|short}} both types of class exist in ''cfgWeapons'', and are often the same class. {{Name|ofp|short}} does not have a {{hl|c= Type=}}; instead, it uses {{hl|c= WeaponType=}} and {{hl|c= MagazineType=}} couplets. The end result, and the intent, is identical. | ||
{{ | {{Feature|important|Note: the quite serious alteration to ''SecondaryWeapon'' and ''Handgun'' mags that occurred in Arma. This to allow for an increased count field in ''Handgun Magazines''.}} | ||
{| class=" | {| class="wikitable" | ||
! rowspan="2" | Slot: !! rowspan="2" | SlotType | ! rowspan="2" | Slot: !! rowspan="2" | SlotType | ||
! colspan="2" | value/nbits | |||
! rowspan="2" | Example | |||
|- | |- | ||
! OFP | |||
! Arma | |||
|- | |- | ||
| Either: | | Either: | ||
| NoSlot | |||
| {{hl|0/0}} | |||
| ''same'' | |||
| ''stroke'' is a weapon, but it occupies no slots | |||
|- | |- | ||
| Weapon: | | Weapon: | ||
| PrimaryWeapon | |||
| {{hl|1/1}} | |||
| ''same'' | |||
| AK47 | |||
|- | |- | ||
| Weapon: | | Weapon: | ||
| HandGun | |||
| {{hl|2/1}} | |||
| ''same'' | |||
| CZ75 | |||
|- | |- | ||
| Weapon: | | Weapon: | ||
| SecondaryWeapon | |||
| {{hl|16/1}} | |||
| {{hl|4/1}} | |||
| LAW | |||
|- | |- | ||
| Mag: | | Mag: | ||
| HandGunMagazines || {{hl|32/3}} | |||
| {{hl|16/4}} | |||
| CZ75Mag or GLMag | |||
|- | |- | ||
| Mag: | | Mag: | ||
| MainMagazines | |||
| {{hl|256/4}} | |||
| ''same'' | |||
| AK47Mag or explosives | |||
|- | |- | ||
| Weapon: | | Weapon: | ||
| BinocularSlot | |||
| {{hl|4096/4}} | |||
| ''same'' | |||
| Binoculars or NVG, LD etc. | |||
|- | |- | ||
| Weapon: | | Weapon: | ||
| HardMounted | |||
| {{hl|65536/1}} || ''same'' | |||
| | |||
|- | |- | ||
| Mag: | | Mag: | ||
| SmallItems | |||
| | |||
| {{hl|131072/4}} || (Arma 2) map, compass, small items (derived from ''ItemCore'') | |||
|} | |} | ||
The specific combination for machine guns normally occupy both weapon slots ''i.e. PrimaryWeapon + SecondaryWeapon''. | The specific combination for machine guns normally occupy both weapon slots ''i.e. PrimaryWeapon + SecondaryWeapon''. | ||
===Magazine Sizes=== | === Magazine Sizes === | ||
Architecturally, '''all''' ''bit-fields'' are counts. The fact that a ''PrimaryWeapon'' can only be | |||
Architecturally, '''all''' ''bit-fields'' are counts. The fact that a ''PrimaryWeapon'' can only be {{hl|1}}, still makes it ''a count'' of that ''SlotType''. | |||
In practical terms magazines are the only ''item'' ('''warning:''' ''currently'') to have bit-fields | In practical terms magazines are the only ''item'' ('''warning:''' ''currently'') to have bit-fields {{hl|> 1}}. | ||
''Most'' weapons use a single slot to declare a single magazine. | ''Most'' weapons use a single slot to declare a single magazine. | ||
''Shell weapons'' such as the ''RPG'' require three slots to hold the ''magazine''. {{Name|ofp|short}} presented this by filling those slots with the image. Arma makes a mess of it with a somewhat ugly blank between slots. You are supposed to guess why it | ''Shell weapons'' such as the ''RPG'' require three slots to hold the ''magazine''. {{Name|ofp|short}} presented this by filling those slots with the image. Arma makes a mess of it with a somewhat ugly blank between slots. You are supposed to guess why it is blank. | ||
No handgun magazine (''currently'') has a size | No handgun magazine (''currently'') has a size {{hl|> 1}}. This could change on ''e.g.'' a remote controlled explosive. The bit-field is larger for reasons explained in [[#CfgVehicles: Joining the dots|Joining the dots]] (below). | ||
For ''MainWeapon Magazines'', specific bit-field identities between | For ''MainWeapon Magazines'', specific bit-field identities between {{hl|256}} and {{hl|4096}} are frequently represented textually as: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
"1 * 256" // main mags | "1 * 256" // main mags | ||
"2 * 256" // m60,pk,mortars | "2 * 256" // m60,pk,mortars | ||
Line 221: | Line 283: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
And, of course, in Arma, these ''fields'' are only relevant in it | And, of course, in Arma, these ''fields'' are only relevant in it is ''CfgWeapons''. | ||
=== CfgVehicles: Joining the dots === | |||
A ''vehicle'', in this case ''a human'' or ''parachute'', has it is equipment slots defined in it is ''cfgVehicles Class''. The {{hl|c= Weaponslots=}} ''bit-field'' declares whether or not a piece of equipment can be carried at all, and if so, how much, or max size of that equipment, measured in ''slots''. | |||
A ''vehicle'', in this case ''a human'' or ''parachute'', has it | |||
{{hl|c= cfgVehicles.Weaponslots=}} is deceptively similar to {{hl|c= cfgWeapons.Type=}} (and vice versa). {{hl|c= Weaponslots=}} defines the carrying capacity for equipment, {{hl|c= type=}} defines the size of that equipment. | |||
Different ''humans'' have more or fewer slots than others. Clearly, ''medics, police, civilians'' and some ''resistance fighters'', cannot carry heavy armament. They're either not trained to, or, they're already implicitly carrying ''medical packs''. The disastrous {{Name| | Different ''humans'' have more or fewer slots than others. Clearly, ''medics, police, civilians'' and some ''resistance fighters'', cannot carry heavy armament. They're either not trained to, or, they're already implicitly carrying ''medical packs''. The disastrous {{Name|arma1|short}} completely destroyed this distinction. {{Name|arma2|short}} enhances the distinction a little more than {{Name|ofp|short}}. | ||
A generalised ''capacity'' declaration for humans is: | A generalised ''capacity'' declaration for humans is: | ||
{| class=" | {| class="wikitable" | ||
! rowspan="8" | | ! rowspan="8" | {{hl|c= weaponSlots=}} | ||
|- | |- | ||
| | | {{hl|PrimaryWeapon+}} | ||
| Can carry a Primary Weapon | |||
|- | |- | ||
| | | {{hl|SecondaryWeapon+}} | ||
| Sometimes able to carry a Secondary or even heavier Weapon (''LAW, MG, stinger'') | |||
|- | |- | ||
| | | {{hl|(4+6)*MainMagazines+}} | ||
| Can carry n*Magazines for these weapons (AK47Mag) (or max ''size'' of shell) | |||
|- | |- | ||
| | | {{hl|HandGun+}} | ||
| Can carry a Handgun (''e.g.'' Beretta) | |||
|- | |- | ||
| | | {{hl|2*WeaponSlotBinocular+}} || Can carry n*slots of equipment | ||
|- | |- | ||
| | | {{hl|4*HandGunMagazines+}} | ||
| Can carry n*Handgun Magazines (CZ75Mag) | |||
|- | |- | ||
| | | {{hl|12*SmallItems}} | ||
| can carry n*slots of SmallItems (Arma 2) | |||
|- | |- | ||
|} | |} | ||
These will later be filled out with specific weapons in the human's | These will later be filled out with specific weapons in the human's {{hl|c= weapons[]=}} and {{hl|c= magazines[]=}} ''arrays''. Placing too many causes a ''ctd''{{Clarify}}. | ||
Note that specific {{Name|arma2|short}} women can only carry magazines and small equipment (for their boyfriends?) and nothing else. | Note that specific {{Name|arma2|short}} women can only carry magazines and small equipment (for their boyfriends?) and nothing else. | ||
Magazine carrying ability altered markedly for {{Name|arma2|short}} vs {{Name|ofp|short}}; it | Magazine carrying ability altered markedly for {{Name|arma2|short}} vs {{Name|ofp|short}}; it is the reason for the nasty change to the ''bit-field'', and is as follows: | ||
{| class=" | {| class="wikitable" | ||
! colspan="2" | | ! colspan="2" | | ||
! OFP | |||
! Arma | |||
|- | |- | ||
| rowspan="2" | Rifle | | rowspan="2" | Rifle | ||
| Potential || {{hl|15}} | |||
| {{hl|15}} | |||
|- | |- | ||
| Actual | |||
| {{hl|4}} to {{hl|10}} || {{hl|2}} to {{hl|12}} | |||
|- | |- | ||
| rowspan="2" | Handgun || Potential || | | rowspan="2" | Handgun || Potential || {{hl|7}} | ||
| {{hl|15}} | |||
|- | |- | ||
| Actual | |||
| {{hl|4}} | |||
| {{hl|4}} or {{hl|8}} | |||
|- | |- | ||
| colspan="2" | Binoculars | | colspan="2" | Binoculars | ||
| {{hl|1}} or {{hl|2}} | |||
| {{hl|0}} to {{hl|2}} | |||
|} | |} | ||
<syntaxhighlight lang=" | == Alphabetical Order == | ||
{{ConfigPage|abc}} | |||
=== A === | |||
==== access=3 ==== | |||
; Type: [[TokenNameValueTypes#Integers|Integer]] | |||
<syntaxhighlight lang="cpp"> | |||
#define ReadAndWrite 0 // any modifications enabled | #define ReadAndWrite 0 // any modifications enabled | ||
#define ReadAndCreate 1 // only adding new class members is allowed | #define ReadAndCreate 1 // only adding new class members is allowed | ||
Line 284: | Line 367: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====aiDispersionCoefX=1.0==== | ==== aiBurstTerminable=false ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ; Class: ModeClass | ||
;Description: Dispersion | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
; Description: AI firemode parameter, when true, AI will terminate burst when target is dead or out of sight | |||
<syntaxhighlight lang="cpp"> | |||
class CfgWeapons | |||
{ | |||
class LMG_RCWS : MGun | |||
{ | |||
class close : manual | |||
{ | |||
burst = 12; | |||
aiBurstTerminable = 1; | |||
}; | |||
}; | |||
}; | |||
</syntaxhighlight> | |||
==== aiDispersionCoefX=1.0 ==== | |||
; Type: [[TokenNameValueTypes#Floats|Float]] | |||
; Description: Dispersion multiplier for ''AI'' units (axis X - left to right). | |||
==== aiDispersionCoefY=1.0 ==== | |||
; Type: [[TokenNameValueTypes#Floats|Float]] | |||
; Description: Dispersion multiplier for ''AI'' units (axis Y - top-down). | |||
==== aimTransitionSpeed=1.0 ==== | |||
; Type: [[TokenNameValueTypes#Floats|Float]] | |||
; Description: Speed for switching between normal mode and iron sights/optics. | |||
==== | ==== aiRateOfFire=5.0 ==== | ||
;Type: [[TokenNameValueTypes|Float]] | ; Class: ModeClass | ||
;Description: | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
; Description: Delay between shots at given ''aiRateOfFireDistance''. | |||
==== | ==== aiRateOfFireDistance=500 ==== | ||
;Class: ModeClass | ; Class: ModeClass | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: | ; Description: At shorter distance delay (''aiRateOfFire'') goes linearly to zero. | ||
==== | ==== aiRateOfFireDispersion=1 ==== | ||
;Class: ModeClass | ; Class: ModeClass | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
;Description: | ; Description: Property that affects the randomness of delay between shots. Value sets the maximum of the range in which a random number influencing the delay between shots is generated. 0 means the delay between shots will be the same (with given actual distance). The bigger the value the longer delay can be generated. | ||
<syntaxhighlight lang="cpp"> | |||
// randomized delay after shot | |||
timeToShot = aiRateOfFire + aiRateOfFireDispersion * Random<0,1> | |||
</syntaxhighlight> | |||
<syntaxhighlight lang=" | ==== allowedslots[]={} ==== | ||
; Class: Arma3 | |||
; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | |||
; Description: allowedSlots[] is an array of slot numbers where you may put the handweapon. 701 stands for vest, 801 stands for uniform, 901 stands for backpack | |||
<syntaxhighlight lang="cpp"> | |||
allowedslots[] = {701,901}; //item that can be put into vests and backpacks | |||
</syntaxhighlight> | |||
==== ammo="" ==== | |||
; Class: OFPModeClass | |||
; Type: [[TokenNameValueTypes#Strings|String]] | |||
; Description: ''cfgAmmo'' class that this weapon fires. Moved to [[CfgMagazines Config Reference|cfgMagazines]] in Arma. | |||
<syntaxhighlight lang="cpp"> | |||
ammo = "TimeBomb"; | ammo = "TimeBomb"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====autoAimEnabled=true==== | ==== autoAimEnabled=true ==== | ||
;Type: [[TokenNameValueTypes|Boolean]] | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
;Description: | ; Description: {{hl|false}} for all standard weapons. | ||
====autoFire=false==== | ==== autoFire=false ==== | ||
;Class: ModeClass | ; Class: ModeClass | ||
;Type: [[TokenNameValueTypes|Boolean]] | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
;Description: If | ; Description: If {{hl|true}}, weapon will fire repeatedly all the while you hold the fire button down. | ||
And if | And if {{hl|true}} the gunner can use the weapon on his own discretion (no ''commander'' fire order needed - like ''MG'' type). | ||
====autoReload=true==== | ==== autoReload=true ==== | ||
;Type: [[TokenNameValueTypes|Boolean]] | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
;Description: If | ; Description: If {{hl|true}} weapon will be reloaded automatically once magazine is empty. | ||
===B=== | === B === | ||
==== | ==== backgroundReload=false ==== | ||
; Type: [[TokenNameValueTypes#Boolean|Boolean]] | |||
;Type: [[TokenNameValueTypes|Boolean]] | ; Description: Weapon automatically reloads magazines without player intervention or animation. | ||
;Description: Weapon | |||
==== | ==== ballisticsComputer=false ==== | ||
;Class: | ; Class: Arma | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
;Description: | ; Description: Weapon attempts to calculate and shift the ''aim-point'' to hit a locked target based on range, target movement, own movement, and ballistics of selected ammo type. New updated information for A3: [[A3_Targeting_config_reference|Targeting reference]] | ||
=== | ==== burst=1 ==== | ||
; Class: ModeClass | |||
;Class: | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
;Type: [[TokenNameValueTypes| | ; Description: Number of shots actually fired each time the weapon is fired. | ||
<syntaxhighlight lang=" | ==== burstRangeMax=12 ==== | ||
; Class: ModeClass | |||
; Type: [[TokenNameValueTypes#Integers|Integer]] | |||
; Description: Randomized number of shots actually fired each time the weapon is fired. When > 0 number of shots will be randomize in range{burst, burstRangeMax}; | |||
=== C === | |||
==== cameraDir ==== | |||
; Class: MuzzleClass | |||
; Type: [[TokenNameValueTypes#Strings|String]] | |||
<syntaxhighlight lang="cpp"> | |||
cameraDir = "GL look"; | cameraDir = "GL look"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====canDrop=true==== | ==== canDrop=true ==== | ||
;Type: [[TokenNameValueTypes|Boolean]] | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
;Description: Weapon can/not be dropped from Inventory Menu. | ; Description: Weapon can/not be dropped from Inventory Menu. | ||
''canDrop'' is poorly implemented. It is normally associated with true vehicles such as air. For humans nothing in the ''GUI'' panel suggests that you can't drop a weapon, and yet, hidden-from-view, the drop action has no effect. ''canDrop'' should have also been implemented in ''cfgMagazines'', but isn't. You can always drop the magazine, and yet, for some weapons, such as a laser designator, this is nonsensical. | ''canDrop'' is poorly implemented. It is normally associated with true vehicles such as air. For humans nothing in the ''GUI'' panel suggests that you can't drop a weapon, and yet, hidden-from-view, the drop action has no effect. ''canDrop'' should have also been implemented in ''cfgMagazines'', but isn't. You can always drop the magazine, and yet, for some weapons, such as a laser designator, this is nonsensical. | ||
====canLock=2==== | ==== canLock=2 ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: Defines if weapon can be locked on the target (white box appears). | ; Description: Defines if weapon can be locked on the target (white box appears). | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
#define LockNo 0 | #define LockNo 0 | ||
#define LockCadet 1 | #define LockCadet 1 | ||
Line 366: | Line 498: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====cartridgePos="nabojnicestart"==== | ==== cartridgePos="nabojnicestart" ==== | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
====cartridgeVel="nabojniceend"==== | ==== cartridgeVel="nabojniceend" ==== | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
====count=0==== | ==== count=0 ==== | ||
;Class: OFP | ; Class: OFP | ||
;Type: [[TokenNameValueTypes|Integer]] | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: Number of shots weapon starts with. Moved to ''cfgMagazines'' in Arma. | ; Description: Number of shots weapon starts with. Moved to ''cfgMagazines'' in Arma. | ||
====cursor=""==== | ==== cursor="" ==== | ||
;Class: Arma | ; Class: Arma | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
====cursor="w_weapon"==== | ==== cursor="w_weapon" ==== | ||
;Class: OFP | ; Class: OFP | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
====cursorAim=""==== | ==== cursorAim="" ==== | ||
;Class: Arma | ; Class: Arma | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
cursorAim = "\ca\Weapons\Data\cursor_target_locked_ca.paa"; | cursorAim = "\ca\Weapons\Data\cursor_target_locked_ca.paa"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====cursorAim="w_lock"==== | ==== cursorAim="w_lock" ==== | ||
;Class: OFP | ; Class: OFP | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
====cursorAimOn=""==== | ==== cursorAimOn="" ==== | ||
;Class: Arma | ; Class: Arma | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
====cursorSize=1.0==== | ==== cursorSize=1.0 ==== | ||
;Class: Arma | ; Class: Arma | ||
;Type: [[TokenNameValueTypes|Float]] | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
===D=== | === D === | ||
<syntaxhighlight lang=" | ==== dexterity=3.1 ==== | ||
; Type: [[TokenNameValueTypes#Floats|Float]] | |||
; Description: In-game weapon handling value, lower value = takes more time to traverse a weapon. | |||
<syntaxhighlight lang="cpp"> | |||
dexterity = 3.1; | dexterity = 3.1; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====dispersion=0.002==== | ==== dispersion=0.002 ==== | ||
;Class: ModeClass | ; Class: ModeClass | ||
;Type: [[TokenNameValueTypes|Float]] | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
;Description: In-game weapon dispersion in radians. Bigger value = more dispersion. | ; Description: In-game weapon dispersion in radians. Bigger value = more dispersion. | ||
====displayName=""==== | ==== displayName="" ==== | ||
;Class: MainBody | ; Class: MainBody | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
;Description: Name of the WEAPON. Declared in the main body. This string is shown in gear selection as the rifle's name. | ; Description: Name of the WEAPON. Declared in the main body. This string is shown in gear selection as the rifle's name. | ||
;Class: ModeClass | ; Class: ModeClass | ||
;Description: Name of the MODE. In '''every''' mode class. This string is shown in-game when selecting burst, single, auto etc. | ; 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 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"); | A weapon with no modes (modes={"this"); uses the weapon name for both. | ||
;Class: MuzzleClass | ; Class: MuzzleClass | ||
;Description: Name of the MUZZLE. In '''every''' muzzle class. | ; Description: Name of the MUZZLE. In '''every''' muzzle class. | ||
This string is shown in-game similar to burst, single, auto etc. | This string is shown in-game similar to burst, single, auto etc. | ||
Line 440: | Line 573: | ||
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. | It is quite common for one of the muzzle classes to inherit a basic rifle muzzle, in which case, the name of the muzzle for ''THAT'' class is the inherited weapon name. | ||
A weapon with no muzzles ''i.e.'' | A weapon with no muzzles ''i.e.'' {{hl|c= muzzles={"this"};}} uses the weapon name. | ||
====displayNameMagazine=""==== | ==== displayNameMagazine="" ==== | ||
;Class: OFP | ; Class: OFP | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
;Description: ''displayname'' of the magazine in gear selection. Replaced in Arma via the ''[[CfgMagazines Config Reference|cfgMagazines Class]]''. | ; Description: ''displayname'' of the magazine in gear selection. Replaced in Arma via the ''[[CfgMagazines Config Reference|cfgMagazines Class]]''. | ||
See also [[#shortNameMagazine|shortNameMagazine]] and [[#descriptionShort|descriptionShort]] | See also [[#shortNameMagazine|shortNameMagazine]] and [[#descriptionShort|descriptionShort]] | ||
====distanceZoomMax=400==== | ==== distanceZoomMax=400 ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: Zeroing distance at [[#opticsZoomMax|opticsZoomMax]]. | ; Description: Zeroing distance at [[#opticsZoomMax|opticsZoomMax]]. | ||
====distanceZoomMin=400==== | ==== distanceZoomMin=400 ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: Zeroing distance at [[#opticsZoomMin|opticsZoomMin]]. | ; Description: Zeroing distance at [[#opticsZoomMin|opticsZoomMin]]. | ||
====descriptionShort=""==== | ==== descriptionShort="" ==== | ||
;Class: Arma | ; Class: Arma | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
;Description: A paragraph or two describing the rifle in bottom left panel of in-game gear selection. | ; Description: A paragraph or two describing the rifle in bottom left panel of in-game gear selection. | ||
This is NOT equivalent of {{Name|ofp|short}}'s short label (''shortNameMagazine''). '''''THAT''''' ''descriptionShort'' exists in ''cfgMagazines''. | This is NOT equivalent of {{Name|ofp|short}}'s short label (''shortNameMagazine''). '''''THAT''''' ''descriptionShort'' exists in ''cfgMagazines''. | ||
====drySound[]={"",1,1}==== | ==== drySound[]={"",1,1} ==== | ||
;Type: [[TokenNameValueTypes|Array]] | ; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: Click sound when empty weapon fired. | ; Description: Click sound when empty weapon fired. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
drySound[] = {"\ca\Weapons\Data\Sound\XMS_dry_v2", 0.000316228, 1}; | drySound[] = {"\ca\Weapons\Data\Sound\XMS_dry_v2", 0.000316228, 1}; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===E=== | === E === | ||
====enableAttack=true==== | |||
;Type: [[TokenNameValueTypes|Boolean]] | ==== enableAttack=true ==== | ||
; Type: [[TokenNameValueTypes#Boolean|Boolean]] | |||
==== emptySound[]={"",1,1} ==== | |||
; Class: Arma | |||
; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | |||
==== | === F === | ||
==== ffCount=1 ==== | |||
====ffCount=1==== | ; Class: ModeClass | ||
;Class: ModeClass | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
;Type: [[TokenNameValueTypes|Integer]] | ; Description: Force feedback. | ||
;Description: Force feedback. | |||
====ffFrequency=1==== | ==== ffFrequency=1 ==== | ||
;Class: ModeClass | ; Class: ModeClass | ||
;Type: [[TokenNameValueTypes|Float]] | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
;Description: Force feedback. | ; Description: Force feedback. | ||
====ffMagnitude=0.0==== | ==== ffMagnitude=0.0 ==== | ||
;Class: ModeClass | ; Class: ModeClass | ||
;Type: [[TokenNameValueTypes|Float]] | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
;Description: Force feedback. | ; Description: Force feedback. | ||
====fireLightDuration=0.05==== | ==== fireLightDuration=0.05 ==== | ||
;Class: Arma | ; Class: Arma | ||
;Type: [[TokenNameValueTypes|Float]] | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
;Description: Duration of light from muzzle flash. | ; Description: Duration of light from muzzle flash. | ||
====fireLightIntensity=0.012==== | ==== fireLightIntensity=0.012 ==== | ||
;Class: Arma | ; Class: Arma | ||
;Type: [[TokenNameValueTypes|Float]] | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
;Description: Intensity of light from muzzle flash. | ; Description: Intensity of light from muzzle flash. | ||
====flash=""==== | ==== flash="" ==== | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
flash = "gunfire"; | flash = "gunfire"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====flashSize=0.0==== | ==== flashSize=0.0 ==== | ||
;Class: ModeClass | ; Class: ModeClass | ||
;Type: [[TokenNameValueTypes|Float]] | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
;Description: {{Name|ofp|short}} only? | ; Description: {{Name|ofp|short}} only? | ||
==== forceOptics=0 ==== | |||
; Type: [[TokenNameValueTypes#Integers|Integer]] | |||
; Description: Valid values: {{hl|0}}, {{hl|1}}, {{hl|2}} as per ''canLock''. | |||
=== H === | |||
==== | ==== handAnim[]={} ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ; Class: Arma | ||
; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | |||
=== | === I === | ||
==== initSpeed=0 ==== | |||
====initSpeed=0==== | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
;Type: [[TokenNameValueTypes|Integer]] | ; Description: Initial speed of shot in meters per second. Also present in ''cfgMagazines''. | ||
;Description: Initial speed of shot in meters per second. | |||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
initSpeed = 900; | initSpeed = 900; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 538: | Line 675: | ||
In OFP this must be set in the class of the magazine, not that of the weapon. | In OFP this must be set in the class of the magazine, not that of the weapon. | ||
=== | In A3 this has multiple usages. positive values override magazine initspeed with the fixed number. Negative values act as modifier to the magazine's initispeed. | ||
=== | <syntaxhighlight lang="cpp"> | ||
initSpeed = 1050; //overwrites magazine's value with 1050m/s | |||
initSpeed = -1.1; //multiplies magazine's value by +1.1 | |||
</syntaxhighlight> | |||
=== L === | |||
==== | ==== laser=false ==== | ||
;Class: | ; Class: Arma | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
; Description: If the weapon is a laser designator, this should be true. | |||
<syntaxhighlight lang=" | ==== libTextDesc ==== | ||
; Class: ArmaClass | |||
; Type: [[TokenNameValueTypes#Strings|String]] | |||
<syntaxhighlight lang="cpp"> | |||
class Library { | class Library { | ||
libTextDesc = "The P07 is a semi-automatic pistol with an iron and reinforced polymer mix frame. Following the success of Glock, polymer based pistols became known as perfect handguns for both military use and self-defense and are available in various calibers. P07 allows easy mounting of suppressors."; | libTextDesc = "The P07 is a semi-automatic pistol with an iron and reinforced polymer mix frame. Following the success of Glock, polymer based pistols became known as perfect handguns for both military use and self-defense and are available in various calibers. P07 allows easy mounting of suppressors."; | ||
Line 554: | Line 698: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===M=== | === M === | ||
==== | ==== magazineReloadTime=0 ==== | ||
;Class: | ; Class: MuzzleClass | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
;Description: | ; Description: Time delay when reloading the weapon (changing magazines). | ||
====magazines[]={}==== | ==== magazines[]={"this"} ==== | ||
;Class: Arma | ; Class: OFP | ||
;Type: [[TokenNameValueTypes|StringArray]] | ; Type: [[TokenNameValueTypes|StringArray]] | ||
;Description: These are declared here, same as {{Name|ofp|short}}, but defined in ''cfgMagazines''. | ; Description: Array of magazine classes compatible with this weapon. This '''same''' ''Weapon class'' in ''cfgWeapons'' if not over-ridden. | ||
==== magazines[]={} ==== | |||
; Class: Arma | |||
; Type: [[TokenNameValueTypes|StringArray]] | |||
; Description: These are declared here, same as {{Name|ofp|short}}, but defined in ''cfgMagazines''. | |||
'''Note, with extreme caution''': ''Unlike'' {{Name|ofp|short}}, you cannot have identically named ''magazine'' classes. The in-game gear selection panel gets confused. Safe bet is to call all your magazine classes "''[rifle]Mag''". | '''Note, with extreme caution''': ''Unlike'' {{Name|ofp|short}}, you cannot have identically named ''magazine'' classes. The in-game gear selection panel gets confused. Safe bet is to call all your magazine classes "''[rifle]Mag''". | ||
====maxLeadSpeed=50==== | ==== maxLeadSpeed=50 ==== | ||
;Class: OFP | ; Class: OFP | ||
;Type: [[TokenNameValueTypes|Integer]] | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: Maximum speed of the target that can be shot with this weapon by ''AI''. Moved to ''cfgMagazines'' in Arma. | ; Description: Maximum speed of the target that can be shot with this weapon by ''AI''. Moved to ''cfgMagazines'' in Arma. | ||
====min/mid/maxRange...==== | ==== min/mid/maxRange... ==== | ||
;Class: ArmaModeClass | ; Class: ArmaModeClass | ||
;Type: [[TokenNameValueTypes|Integer]] | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: Together with ''range'' and ''rangeProbab'' values, defines probability to use this weapon for ''AI'' units at given distance. | ; Description: Together with ''range'' and ''rangeProbab'' values, defines probability to use this weapon for ''AI'' units at given distance. | ||
For {{Name|ofp|short}} these parameters were specified in ''cfgAmmo'', rendering all rifles the same. | For {{Name|ofp|short}} these parameters were specified in ''cfgAmmo'', rendering all rifles the same. | ||
==== | ===== minRange=1 ===== | ||
; Type: [[TokenNameValueTypes#Integers|Integer]] | |||
;Type: [[TokenNameValueTypes|Integer]] | |||
==== | ===== minRangeProbab=0.3 ===== | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
==== | ===== midRange=150 ===== | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
==== | ===== midRangeProbab= 0.58 ===== | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
==== | ===== maxRange=500 ===== | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
==== | ===== maxRangeProbab=0.04 ===== | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
==== | ==== magazineType=0 ==== | ||
;Type: [[TokenNameValueTypes| | ; Class: OFP | ||
; Type: [[TokenNameValueTypes#Integers|Integer]] | |||
; Description: See Types below. | |||
====memoryPointCamera="eye"==== | ==== memoryPointCamera="eye" ==== | ||
;Class: Arma | ; Class: Arma | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
;Description: MuzzleClass | ; Description: MuzzleClass | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
memoryPointCamera = "GL eye"; | memoryPointCamera = "GL eye"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====model="[.p3d]"==== | ==== model="[.p3d]" ==== | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
model = "\ca\a10\AGM65"; | model = "\ca\a10\AGM65"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====modelMagazine="[.p3d]"==== | ==== modelMagazine="[.p3d]" ==== | ||
;Class: Arma | ; Class: Arma | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
====modelMagazine="\misc\mag_univ"==== | ==== modelMagazine="\misc\mag_univ" ==== | ||
;Class: OFP | ; Class: OFP | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
====modelOptics="[.p3d]"==== | ==== modelOptics="[.p3d]" ==== | ||
;Class: MuzzleClass | ; Class: MuzzleClass | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
;Description: Optic model used in game. " | ; Description: Optic model used in game. "{{hl|-}}" defines 3d view from the model (point "eye"). | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
modelOptics = "\ca\Weapons\G36_optics"; | modelOptics = "\ca\Weapons\G36_optics"; | ||
modelOptics = "-"; | modelOptics = "-"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====modelSpecial=[.p3d]""==== | ==== modelSpecial=[.p3d]"" ==== | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
;Description: Model used when the weapon is loaded. This is typically only used for rocket launchers. | ; Description: Model used when the weapon is loaded. This is typically only used for rocket launchers. | ||
====modes[]= {"this"}==== | ==== modes[]= {"this"} ==== | ||
;Type: [[TokenNameValueTypes|String]];Type: [[TokenNameValueTypes|Array]] | ; Type: [[TokenNameValueTypes#Strings|String]]; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: Anything you care to claim as a class ''xxx''. | ; Description: Anything you care to claim as a class ''xxx''. | ||
{{hl|c= modes[]= {"this"};}} means all parameters necessary for the one and only mode are declared within the main body. Note this '''also''' gives the ''order'' of selection using the control key in-game. | |||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
modes[] = {"single", "burst", "auto"}; | modes[] = {"single", "burst", "auto"}; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====multiplier=1==== | ==== multiplier=1 ==== | ||
;Class: ModeClass | ; Class: ModeClass | ||
;Type: [[TokenNameValueTypes|Integer]] | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: Ammunition used per shot. | ; Description: Ammunition used per shot. | ||
====muzzleEnd="konec hlavne"==== | ==== muzzleEnd="konec hlavne" ==== | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
====muzzlePos="usti hlavne"==== | ==== muzzlePos="usti hlavne" ==== | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
====muzzles[]={"this"}==== | ==== muzzles[]={"this"} ==== | ||
;Type: [[TokenNameValueTypes|Array]] | ; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: Similarly to ''modes'', if not declared, the assumed muzzle is | ; Description: Similarly to ''modes'', if not declared, the assumed muzzle is {{hl|"this"}}. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
muzzles[] = {"TimeBombMuzzle", "PipeBombMuzzle", "MineMuzzle", "MineEMuzzle"}; | muzzles[] = {"TimeBombMuzzle", "PipeBombMuzzle", "MineMuzzle", "MineEMuzzle"}; //Standard definition | ||
muzzles[]+={"my_custom_muzzle"}; // When you want to add something to an already existing array (e.g. Muzzles to the "throw" weapon class) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
===N=== | === N === | ||
====nameSound=""==== | |||
;Type: [[TokenNameValueTypes|String]] | ==== nameSound="" ==== | ||
;Description: Sound ''classname'' played when ''vehicle commander'' switches to this weapon? | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
; Description: Sound ''classname'' played when ''vehicle commander'' switches to this weapon? | |||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
nameSound = "smokeshell"; | nameSound = "smokeshell"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====nameSound="weapon"==== | ==== nameSound="weapon" ==== | ||
;Class: OFP | ; Class: OFP | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
==== nFovLimit=0.05 ==== | |||
; Class: Arma2 | |||
; Type: [[TokenNameValueTypes#Floats|Float]] | |||
; Description: Defines when UI indicator switches from WFOV to NFOV. See Titan/Javelin UI | |||
===O=== | === O === | ||
==== | ==== optics=true ==== | ||
; Type: [[TokenNameValueTypes#Boolean|Boolean]] | |||
;Type: [[TokenNameValueTypes| | |||
==== | ==== opticsDisablePeripherialVision=0.67 ==== | ||
;Type: [[TokenNameValueTypes| | ; Class: Arma | ||
;Description: | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
; Description: Factor by which peripheral vision is reduced while using this optic. 0 has no effect and 1 disables it completely. | |||
==== | ==== opticsFlare=false ==== | ||
; Type: [[TokenNameValueTypes#Boolean|Boolean]] | |||
;Type: [[TokenNameValueTypes| | ; Description: Decides if lens flare should be shown while using this optic. | ||
;Description: | |||
==== | ==== opticsPPEffects[] = {"OpticsCHAbera5", "OpticsBlur5"} ==== | ||
;Class: | ; Class: Arma | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: | ; Description: Post-process effects applied while using this optic. | ||
==== | ==== opticsZoomInit= 0.75 ==== | ||
;Class: MuzzleClass | ; Class: MuzzleClass | ||
;Type: [[TokenNameValueTypes|Float]] | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
;Description: | ; Description: Optics field of view at default zoom in radians. | ||
==== | ==== opticsZoomMax=1.1 ==== | ||
;Class: MuzzleClass | ; Class: MuzzleClass | ||
;Type: [[TokenNameValueTypes|Float]] | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
; Description: FOV in radians. This and [[#opticsZoomMin|opticsZoomMin]] are counterintuitively named. opticsZoomMax is the ''maximum FOV'', which actually makes it the '''minimum zoom.''' | |||
=== | ==== opticsZoomMin=0.375 ==== | ||
; Class: MuzzleClass | |||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
==== | === P === | ||
=== | ==== picture="[\][.pac]" ==== | ||
; Type: [[TokenNameValueTypes#Strings|String]] | |||
; Description: Defines ''weapon'' '''and''' ''magazine''. See below. | |||
;Type: [[TokenNameValueTypes|String]] | |||
;Description: | |||
<syntaxhighlight lang=" | ==== primary=10 ==== | ||
; Type: [[TokenNameValueTypes#Integers|Integer]] | |||
=== R === | |||
==== recoil="Empty" ==== | |||
; Class: ModeClass | |||
; Type: [[TokenNameValueTypes#Strings|String]] | |||
; Description: Selects recoil defined in ''cfgRecoils'' class. Arma differs substantially in Recoil ability; much more of them, and very different names. | |||
<syntaxhighlight lang="cpp"> | |||
recoil = "AK74Recoil" | recoil = "AK74Recoil" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====recoilProne=""==== | ==== recoilProne="" ==== | ||
;Class: ArmaModeClass | ; Class: ArmaModeClass | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
;Description: When prone, recoil can be set to slower values. | ; Description: When prone, recoil can be set to slower values. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
recoilProne = "AK74Recoil" | recoilProne = "AK74Recoil" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====reloadAction=""==== | ==== reloadAction="" ==== | ||
;Class: Arma | ; Class: Arma | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
;Description: Enumerated list. | ; Description: Enumerated list. | ||
====reloadAction="ManActReloadMagazine"==== | ==== reloadAction="ManActReloadMagazine" ==== | ||
;Class: OFP | ; Class: OFP | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
====reloadMagazineSound[]={"",1,1}==== | ==== reloadMagazineSound[]={"",1,1} ==== | ||
;Class: MuzzleClass | ; Class: MuzzleClass | ||
;Type: [[TokenNameValueTypes|Array]] | ; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: Sound played while changing magazines. | ; Description: Sound played while changing magazines. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload", 0.000316228, 1}; | reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload", 0.000316228, 1}; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====reloadSound[]={"",1,1}==== | ==== reloadSound[]={"",1,1} ==== | ||
;Type: [[TokenNameValueTypes|Array]] | ; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: Sound played after each shot. | ; Description: Sound played after each shot. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
reloadSound[] = {"\ca\Weapons\Data\Sound\gun125reload", 1, 1}; | reloadSound[] = {"\ca\Weapons\Data\Sound\gun125reload", 1, 1}; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====reloadTime=1.0==== | ==== reloadTime=1.0 ==== | ||
;Class: ModeClass | ; Class: ModeClass | ||
;Type: [[TokenNameValueTypes|Float]] | ; Type: [[TokenNameValueTypes#Floats|Float]] | ||
;Description: Delay (in seconds) between each individual shot. | ; Description: Delay (in seconds) between each individual shot. | ||
==== requiredOpticType=-1 ==== | |||
; Class: ModeClass | |||
; Type: [[TokenNameValueTypes#Integers|Integer]] | |||
; Description: Required [[Arma_3_ItemInfo_Config_Reference#opticType|opticType]] for AI to be able to use this fire mode. It is mainly use to increase maximum engagement distance of AI depending on the optics it has mount on its rifle | |||
<syntaxhighlight lang="cpp"> | |||
class single_close_optics1 : Single // This optic mode will be used if AI unit has optic mounted on this weapon with opticType >= 1. AI will engage between | |||
{ | |||
requiredOpticType = 1; | |||
showToPlayer = 0; | |||
minRange = 2; | |||
minRangeProbab = 0.05; | |||
midRange = 300; | |||
midRangeProbab = 0.8; | |||
maxRange = 500; | |||
maxRangeProbab = 0.01; | |||
aiRateOfFire = 2; | |||
aiRateOfFireDistance = 300; | |||
}; | |||
class single_medium_optics1 : single_close_optics1 // Same as single_close_optics1 - requiredOpticType is inherited and therefore opticType >= 1 is required | |||
{ | |||
minRange = 300; | |||
minRangeProbab = 0.05; | |||
midRange = 500; | |||
midRangeProbab = 0.7; | |||
maxRange = 700; | |||
maxRangeProbab = 0.05; | |||
aiRateOfFire = 2; | |||
aiRateOfFireDistance = 500; | |||
}; | |||
class single_far_optics1 : single_medium_optics1 // this optic mode will be only used if AI unit has optic with opticType = 2 mounted. With this fire mode AI will engage enemies up to 1km | |||
{ | |||
requiredOpticType = 2; | |||
minRange = 300; | |||
minRangeProbab = 0.05; | |||
midRange = 700; | |||
midRangeProbab = 0.5; | |||
maxRange = 1000; | |||
maxRangeProbab = 0.05; | |||
aiRateOfFire = 4; | |||
aiRateOfFireDistance = 600; | |||
}; | |||
</syntaxhighlight> | |||
=== S === | |||
==== scope=0 ==== | |||
; Class: Arma | |||
; Type: [[TokenNameValueTypes#Integers|Integer]] | |||
; Description: {{Name|ofp|short}} had no scope token. Instead, it used ''scopeWeapon'' and ''scopeMagazine'' to distinguish who was what and when used. | |||
{{hl|2}} = ''can use'' in-game, with a picture in gear present. {{hl|1}} = ''can use'' in-game with no picture in gear. | |||
=== | ==== scopeWeapon=0 ==== | ||
; Class: OFP | |||
;Class: | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
;Type: [[TokenNameValueTypes|Integer]] | |||
==== scopeMagazine=0 ==== | |||
; Class: OFP | |||
; Type: [[TokenNameValueTypes#Integers|Integer]] | |||
; Description: Used as couplets instead of scope. | |||
==== | ==== selectionFireAnim="zasleh" ==== | ||
;Class: | ; Class: Arma | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
; Description: This defines the selection name for muzzleflash proxy. In czech the word "zasleh" is muzzleflash. | |||
==== | ==== shortNameMagazine="" ==== | ||
;Class: OFP | ; Class: OFP | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
;Description: | ; Description: The descriptive magazine paragraph. Replaced in Arma by ''descriptionShort'' in the [[CfgMagazines Config Reference|cfgMagazines Class]]. | ||
==== | ==== shotFromTurret=false ==== | ||
;Class: | ; Class: OFP | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
; Description: If true, it disables the muzzle flash completely ("''zasleh''" animation), and only smoke puffs are used. It also disables the lighting effects when firing the weapon at night. It only works with weapons defined as vehicle weapons. This value also dictates whether to use the legacy turret gunBeg/gunEnd settings (when shotFromTurret = 1), or the memoryPointGun[] array for tracer paths (when shotFromTurret = 0). | |||
==== | ==== showAimCursorInternal=true ==== | ||
;Class: | ; Class: Arma | ||
;Type: [[TokenNameValueTypes| | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
==== | ==== showEmpty=true ==== | ||
; Type: [[TokenNameValueTypes#Boolean|Boolean]] | |||
;Type: [[TokenNameValueTypes|Boolean]] | ; Description: If false weapon gets hidden from the player once there's no ammo left for it. | ||
;Description: If | |||
{{ArgTitle|4|showHandgunMagProxy|{{GVI|arma3|?}}}} | |||
; Type: [[TokenNameValueTypes#Boolean|Boolean]] | |||
;Type: [[TokenNameValueTypes|Boolean]] | ; Description: '''Vest config'''. Default {{hl|1}}. Renders magazine proxy when gun is in its holster. | ||
{{ArgTitle|4|showHolsterMagazineProxy|{{GVI|arma3|?}}}} | |||
;Type: [[TokenNameValueTypes|Boolean]] | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
;Description: | ; Description: '''Weapon config'''. Default {{hl|1}}. Renders magazine proxy when gun is in its holster. | ||
====showSwitchAction=false==== | ==== showSwitchAction=false ==== | ||
;Class: Arma | ; Class: Arma | ||
;Type: [[TokenNameValueTypes|Boolean]] | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
;Description: Show an option to switch to this weapon in the action menu. | ; Description: Show an option to switch to this weapon in the action menu. | ||
====showToPlayer=true==== | ==== showToPlayer=true ==== | ||
;Class: ModeClass | ; Class: ModeClass | ||
;Type: [[TokenNameValueTypes|Boolean]] | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
;Description: Some modes defined for ''AI'' usage (''e.g.'' burst modes for full auto weapons) can be hidden from player with this parameter. | ; Description: Some modes defined for ''AI'' usage (''e.g.'' burst modes for full auto weapons) can be hidden from player with this parameter. | ||
====simulation="Weapon"==== | ==== simulation="Weapon" ==== | ||
;Class: Arma | ; Class: Arma | ||
;Type: [[TokenNameValueTypes|String]] | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
====sound[]={"",1,1}==== | ==== sound[]={"",1,1} ==== | ||
;Class: ModeClass | ; Class: ModeClass | ||
;Type: [[TokenNameValueTypes|Array]] | ; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: There are several sound ''types''. Most are relevant to the weapon overall and specified in the main body, whilst | ; Description: There are several sound ''types''. Most are relevant to the weapon overall and specified in the main body, whilst {{hl|c= sound[]=}} is specific to each mode. | ||
The last parameter defines how fast the sound should be played. | The last parameter defines how fast the sound should be played. {{hl|1}} means normal speed. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
sound[] = {"\ca\Weapons\Data\Sound\AGS30_shot1", 10, 1}; | sound[] = {"\ca\Weapons\Data\Sound\AGS30_shot1", 10, 1}; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====soundBurst=true==== | ==== soundBurst=true ==== | ||
;Class: ArmaModeClass | ; Class: ArmaModeClass | ||
;Type: [[TokenNameValueTypes|Boolean]] | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
;Description: When set to | ; Description: When set to {{hl|false}}, the single shot sound can be used with burst mode - it will be played several times. | ||
====soundContinuous=false==== | ==== soundContinuous=false ==== | ||
;Class: ModeClass | ; Class: ModeClass | ||
;Type: [[TokenNameValueTypes|Boolean]] | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
;Description: If | ; Description: If {{hl|true}}, the sound for the next shot won't start before previous one ends. Thus you can prevent sound overlapping. | ||
====soundBegin[]={"begin1", 0.33, "begin2", 0.33, "begin3", 0.34}==== | ==== soundBegin[]={"begin1", 0.33, "begin2", 0.33, "begin3", 0.34} ==== | ||
;Class: ArmaModeClass | ; Class: ArmaModeClass | ||
;Type: [[TokenNameValueTypes|Array]] | ; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: The weapon's "firing" sound. An array of sounds and probabilities. | ; Description: The weapon's "firing" sound. An array of sounds and probabilities. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
begin1[] = {"A3\sounds_f\weapons\pistols\pistol_st_1", 1, 1, 700}; | begin1[] = {"A3\sounds_f\weapons\pistols\pistol_st_1", 1, 1, 700}; | ||
begin2[] = {"A3\sounds_f\weapons\pistols\pistol_st_2", 1, 1, 700}; | begin2[] = {"A3\sounds_f\weapons\pistols\pistol_st_2", 1, 1, 700}; | ||
Line 863: | Line 1,072: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====soundBullet[]={"emptySound",1}==== | ==== soundBullet[]={"emptySound",1} ==== | ||
;Class: ArmaModeClass | ; Class: ArmaModeClass | ||
;Type: [[TokenNameValueTypes|Array]] | ; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: The sound made when spent cases hit the ground | ; Description: The sound made when spent cases hit the ground | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
bullet1[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_01", 0.501187, 1, 15}; | bullet1[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_01", 0.501187, 1, 15}; | ||
bullet2[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_02", 0.501187, 1, 15}; | bullet2[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_02", 0.501187, 1, 15}; | ||
Line 875: | Line 1,084: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====soundEnd[]={"sound",1}==== | ==== soundEnd[]={"sound",1} ==== | ||
;Class: ArmaModeClass | ; Class: ArmaModeClass | ||
;Type: [[TokenNameValueTypes|Array]] | ; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | ||
====soundLoop[]={"sound",1}==== | ==== soundLoop[]={"sound",1} ==== | ||
;Class: ArmaModeClass | ; Class: ArmaModeClass | ||
;Type: [[TokenNameValueTypes|Array]] | ; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | ||
;Description: Note that there is extensive use of ''soundloops'' in Arma. Most weapons elaborate on this basic, essentially {{Name|ofp|short}}, structure with begin | ; Description: Note that there is extensive use of ''soundloops'' in Arma. Most weapons elaborate on this basic, essentially {{Name|ofp|short}}, structure with begin {{hl|1, 2, 3}} loops etc. | ||
====soundFly[]==== | ==== soundFly[] ==== | ||
;Type: [[TokenNameValueTypes|Array]] | ; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1", 25.1189, 0.8}; | soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1", 25.1189, 0.8}; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====soundServo[]==== | ==== soundServo[] ==== | ||
;Type: [[TokenNameValueTypes|Array]] | ; Type: [[TokenNameValueTypes#Arrays|Array]] of [[TokenNameValueTypes#Integers|Integer]] | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
soundServo[] = {"", 0.0001, 1}; | soundServo[] = {"", 0.0001, 1}; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===T=== | === T === | ||
====Type=WeaponHardMounted==== | |||
;Class: Arma | ==== Type=WeaponHardMounted ==== | ||
;Type: [[TokenNameValueTypes|Integer]] | ; Class: Arma | ||
; Type: [[TokenNameValueTypes#Integers|Integer]] | |||
; Description: See {{Link|#weaponType.3DWeaponHardMounted_.28OfpOnly.29|WeaponHardMounted}} | |||
=== U === | |||
==== UiPicture="[\][.pac]" ==== | |||
====UiPicture="[\][.pac]"==== | ; Class: Arma | ||
;Class: Arma | ; Type: [[TokenNameValueTypes#Strings|String]] | ||
;Type: [[TokenNameValueTypes|String]] | ; Description: Image used in the commander's interface to indicate weapon loadout of a unit. | ||
;Description: Image used in the commander's interface to indicate weapon loadout of a unit. | |||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
"\CA\weapons\data\Ico\i_aa_CA.paa"; | "\CA\weapons\data\Ico\i_aa_CA.paa"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====uiPicture="ivojak"==== | ==== uiPicture="ivojak" ==== | ||
;Class: OFP | ; Class: OFP | ||
==== | ==== uiModel="[.p3d]" ==== | ||
; Type: [[TokenNameValueTypes#Strings|String]] | |||
;Type: [[TokenNameValueTypes| | ; Description: Works only with watch & compass items (simulationWatch/simulationWatch). Replaces model which is visible in inventory with custom one. | ||
;Description: | |||
==== | <syntaxhighlight lang="cpp"> | ||
;Class: ModeClass | class ItemCompassRU : ItemCompass | ||
;Type: [[TokenNameValueTypes| | { | ||
;Description: | UImodel = "\A3\ui_f\objects\CompassRU.p3d"; | ||
}; | |||
class ItemWatchRU : ItemWatch | |||
{ | |||
UImodel = "\A3\ui_f\objects\WatchRU.p3d"; | |||
}; | |||
</syntaxhighlight> | |||
==== useAction=false ==== | |||
; Class: ModeClass | |||
; Type: [[TokenNameValueTypes#Boolean|Boolean]] | |||
; Description: Allows this mode to be activated with the action menu | |||
<syntaxhighlight lang=" | ==== useActionTitle="" ==== | ||
; Class: ModeClass | |||
; Type: [[TokenNameValueTypes#Strings|String]] | |||
; Description: Action title if [[#useAction|useAction]] is true | |||
<syntaxhighlight lang="cpp"> | |||
useActionTitle = "$STR_ACTION_PUTBOMB"; | useActionTitle = "$STR_ACTION_PUTBOMB"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====useAsBinocular=false==== | ==== useAsBinocular=false ==== | ||
;Type: [[TokenNameValueTypes|Boolean]] | ; Type: [[TokenNameValueTypes#Boolean|Boolean]] | ||
=== V === | |||
==== value=2 ==== | |||
; Class: Arma | |||
; Type: [[TokenNameValueTypes#Integers|Integer]] | |||
==== valueMagazine=2 ==== | |||
; Class: OFP | |||
; Type: [[TokenNameValueTypes#Integers|Integer]] | |||
=== | ==== valueWeapon=2 ==== | ||
; Class: OFP | |||
;Class: | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
;Type: [[TokenNameValueTypes|Integer]] | |||
==== | === W === | ||
==== | ==== weaponType=WeaponHardMounted ==== | ||
;Class: OFP | ; Class: OFP | ||
;Type: [[TokenNameValueTypes|Integer]] | ; Type: [[TokenNameValueTypes#Integers|Integer]] | ||
{{ConfigPage|end}} | |||
[[Category:CfgWeapons]] | |||
[[Category: |
Latest revision as of 18:24, 25 May 2024
Introduction
cfgAmmo, cfgMagazines, cfgWeapons and cfgVehicles are root classes defined in the engine's config.bin.
These classes can be subsequently added to by addons 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.
cfgWeapons define the rifle e.g. characteristics. What muzzles it has, how many 'modes' (if any) it can use. What magazines are selectable.
Arma Enhancement
ArmA introduced a new root class, cfgMagazines.
In contrast, OFP uses a rather tedious construct in it is 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.
cfgWeapons can be a puzzling mess to the uninitiated.
The tokenpairs, their placement, and their constructs can be befuddled. This is not a reflection on BI, the ultimate class structure is very, very, adaptive, but, it does confuse.
Essentially, ArmA did open heart, and excellent, surgery to this class to distinguish between weapons and their magazines. OFP had a common weapon/magazine class with variables declaring what to use and when. Variables only relevant to OFP, are sometimes still encountered in ArmA, simply because, they do no harm.
Weapons come in two major flavors (with plenty of sub themes). A weapon either has, or does not have, a modes[] class or classes adding different behaviour like autofire, burst or single shot. Confusingly, a weapon with only one mode, is, equivalent to not declaring it at all. The tokens that would normally be in a modes class, are declared in the main body instead. This obfuscates what-goes-where.
Weapons can have different muzzles, adding a further layer of modelling.
The inherited tree structure for weapons vs their magazines, vs their ammo, is not always logical. This is a throwback to OFP which (for instance) inherited RPG Ammo from an AT3, but inherited the RPG weapon from a CarlGustav, and so on. The end result being identical and good, since offending parameters were altered as necessary - but it does confuse what a HellfireHind really is, depending on who you are (ammo vs mag vs weapon).
Modes
Some TokenNames are relevant only within a mode class (e.g. sound[]=), and stated as such.
All weapons, without exception, have at least one mode class.
By default, the inherited mode for a weapon is:
modes[] = {"this"};
Which means the engine will treat the main body as also being a mode class unless over-ridden.
Some weapons do not have a modes class specified, nor do they inherit a specified modes class via their parent(s). Under these circumstances, TokenNames stated to be ModeClass only must occur in the main body of that weapon (or it is parents) instead. The TokenNames themselves, remain, accurately described, as being mode class only.
Muzzles
Exact same comments as per Modes. By default the inherited muzzle for a weapon is:
muzzles[] = {"this"};
Parameters belonging in muzzles are stated as such.
Different muzzles are normally only encountered on grenade launcher weapons (?).
TokenNames
All engines accept integer values (or math strings) where a float would normally be expected.
Default values are shown in the legend.
- Usage
- OFP: generally moved to ArmA's cfgMagazines Class and often renamed, else simply renamed.
- ArmA: Introduced from OFP:E and beyond.
- ModesClass: Any item marked as a ModeClass lives in a class Mode... body. It must be declared (or inherited) for each class.
- MuzzleClass: Any item marked as a MuzzleClass lives in a class Muzzle... body. It must be declared (or inherited) for each class. Normally, except for grenade launchers, the muzzle IS the mainbody.
- Blank: Used as described in both OFP, and, ArmA.
Dual Use TokenNames (such as picture=) moved to ArmA's cfgMagazines Class as appropriate.
Picture="[\][.pac]"
Defines WEAPON Picture and separately MAGAZINE Picture. OFP generally created two cfgWeapon classes. One for the weapon and one for the magazine. picture= was declared in each. In ArmA, the magazine picture name has been moved to the cfgMagazines class as appropriate.
Note that this is one of those irritating BI path snafu's (when if ever will they start using relative addressing?). The following notes apply to most picture= references, not just cfgWeapons.
- The DEFAULT extension is .pac. The engine accepts .pac or .paa, but .pac is not supposed to exist. A .paa must be explicitly declared.
- 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
The ArmA engine appears to make a mess of it. Any picture reference without a preceding slash will look in a non-existent 'equip.pbo'
Specifically:
equip\w\w_your\path\name // for weapons and
equip\m\m_your\path\name // for mags
If no picture is specified, then like OFP, equip
Note also the 'convention' of naming weapon images with w_ and magazine images with m_ (and to a certain extent having data
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 or more slot positions of that type.
This integer is a bit-field containing SlotType and count which defines which SlotType this item will occupy in gear selection and how many slots of that type it requires. It does NOT define which slot position to occupy, only the Type of Slot. Various engines will show this item in positions of their own choosing.
- An item is defined as being a weapon, magazine, or equipment.
- A weapon is rifle, handgun, LAW launcher.
- A magazine is a magazine, a shell ,a LAW, a PipeBomb, a grenade - i.e. a housing for the cfgAmmo explosive(s).
- equipment are binoculars, NVG, etc.
For ArmA, MagazineSlots and WeaponSlots are mutually exclusive. The classes occur in the cfgWeapons or cfgMagazines respectively. In OFP both types of class exist in cfgWeapons, and are often the same class. OFP does not have a Type=; instead, it uses WeaponType= and MagazineType= couplets. The end result, and the intent, is identical.
Slot: | SlotType | value/nbits | Example | |
---|---|---|---|---|
OFP | Arma | |||
Either: | NoSlot | 0 |
same | stroke is a weapon, but it occupies no slots |
Weapon: | PrimaryWeapon | 1 |
same | AK47 |
Weapon: | HandGun | 2 |
same | CZ75 |
Weapon: | SecondaryWeapon | 16 |
4 |
LAW |
Mag: | HandGunMagazines | 32 |
16 |
CZ75Mag or GLMag |
Mag: | MainMagazines | 256 |
same | AK47Mag or explosives |
Weapon: | BinocularSlot | 4096 |
same | Binoculars or NVG, LD etc. |
Weapon: | HardMounted | 65536 |
same | |
Mag: | SmallItems | 131072 |
(Arma 2) map, compass, small items (derived from ItemCore) |
The specific combination for machine guns normally occupy both weapon slots i.e. PrimaryWeapon + SecondaryWeapon.
Magazine Sizes
Architecturally, all bit-fields are counts. The fact that a PrimaryWeapon can only be 1, still makes it a count of that SlotType.
In practical terms magazines are the only item (warning: currently) to have bit-fields > 1.
Most weapons use a single slot to declare a single magazine.
Shell weapons such as the RPG require three slots to hold the magazine. OFP presented this by filling those slots with the image. Arma makes a mess of it with a somewhat ugly blank between slots. You are supposed to guess why it is blank.
No handgun magazine (currently) has a size > 1. This could change on e.g. a remote controlled explosive. The bit-field is larger for reasons explained in Joining the dots (below).
For MainWeapon Magazines, specific bit-field identities between 256 and 4096 are frequently represented textually as:
"1 * 256" // main mags
"2 * 256" // m60,pk,mortars
"3 * 256" // law , rpg
"4 * 256" // 6g30 4 slots needed
"6 * 256" // carlgustav,stinger 6 slots needed
"8 * 256" // mm1 all slots needed
And, of course, in Arma, these fields are only relevant in it is CfgWeapons.
CfgVehicles: Joining the dots
A vehicle, in this case a human or parachute, has it is equipment slots defined in it is cfgVehicles Class. The Weaponslots= bit-field declares whether or not a piece of equipment can be carried at all, and if so, how much, or max size of that equipment, measured in slots.
cfgVehicles.Weaponslots= is deceptively similar to cfgWeapons.Type= (and vice versa). Weaponslots= defines the carrying capacity for equipment, type= defines the size of that equipment.
Different humans have more or fewer slots than others. Clearly, medics, police, civilians and some resistance fighters, cannot carry heavy armament. They're either not trained to, or, they're already implicitly carrying medical packs. The disastrous ArmA completely destroyed this distinction. Arma 2 enhances the distinction a little more than OFP.
A generalised capacity declaration for humans is:
weaponSlots= | |
---|---|
PrimaryWeapon+ | Can carry a Primary Weapon |
SecondaryWeapon+ | Sometimes able to carry a Secondary or even heavier Weapon (LAW, MG, stinger) |
(4+6)*MainMagazines+ | Can carry n*Magazines for these weapons (AK47Mag) (or max size of shell) |
HandGun+ | Can carry a Handgun (e.g. Beretta) |
2*WeaponSlotBinocular+ | Can carry n*slots of equipment |
4*HandGunMagazines+ | Can carry n*Handgun Magazines (CZ75Mag) |
12*SmallItems | can carry n*slots of SmallItems (Arma 2) |
These will later be filled out with specific weapons in the human's weapons[]= and magazines[]= arrays. Placing too many causes a ctdClarify.
Note that specific Arma 2 women can only carry magazines and small equipment (for their boyfriends?) and nothing else.
Magazine carrying ability altered markedly for Arma 2 vs OFP; it is the reason for the nasty change to the bit-field, and is as follows:
OFP | Arma | ||
---|---|---|---|
Rifle | Potential | 15 | 15 |
Actual | 4 to 10 | 2 to 12 | |
Handgun | Potential | 7 | 15 |
Actual | 4 | 4 or 8 | |
Binoculars | 1 or 2 | 0 to 2 |
Alphabetical Order
A
access=3
- Type
- Integer
#define ReadAndWrite 0 // any modifications enabled
#define ReadAndCreate 1 // only adding new class members is allowed
#define ReadOnly 2 // no modifications enabled
#define ReadOnlyVerified 3 // no modifications enabled, CRC test applied
aiBurstTerminable=false
- Class
- ModeClass
- Type
- Boolean
- Description
- AI firemode parameter, when true, AI will terminate burst when target is dead or out of sight
class CfgWeapons
{
class LMG_RCWS : MGun
{
class close : manual
{
burst = 12;
aiBurstTerminable = 1;
};
};
};
aiDispersionCoefX=1.0
- Type
- Float
- Description
- Dispersion multiplier for AI units (axis X - left to right).
aiDispersionCoefY=1.0
- Type
- Float
- Description
- Dispersion multiplier for AI units (axis Y - top-down).
aimTransitionSpeed=1.0
- Type
- Float
- Description
- Speed for switching between normal mode and iron sights/optics.
aiRateOfFire=5.0
- Class
- ModeClass
- Type
- Float
- Description
- Delay between shots at given aiRateOfFireDistance.
aiRateOfFireDistance=500
- Class
- ModeClass
- Type
- Integer
- Description
- At shorter distance delay (aiRateOfFire) goes linearly to zero.
aiRateOfFireDispersion=1
- Class
- ModeClass
- Type
- Float
- Description
- Property that affects the randomness of delay between shots. Value sets the maximum of the range in which a random number influencing the delay between shots is generated. 0 means the delay between shots will be the same (with given actual distance). The bigger the value the longer delay can be generated.
// randomized delay after shot
timeToShot = aiRateOfFire + aiRateOfFireDispersion * Random<0,1>
allowedslots[]={}
- Class
- Arma3
- Type
- Array of Integer
- Description
- allowedSlots[] is an array of slot numbers where you may put the handweapon. 701 stands for vest, 801 stands for uniform, 901 stands for backpack
allowedslots[] = {701,901}; //item that can be put into vests and backpacks
ammo=""
- Class
- OFPModeClass
- Type
- String
- Description
- cfgAmmo class that this weapon fires. Moved to cfgMagazines in Arma.
ammo = "TimeBomb";
autoAimEnabled=true
- Type
- Boolean
- Description
- false for all standard weapons.
autoFire=false
- Class
- ModeClass
- Type
- Boolean
- Description
- If true, weapon will fire repeatedly all the while you hold the fire button down.
And if true the gunner can use the weapon on his own discretion (no commander fire order needed - like MG type).
autoReload=true
- Type
- Boolean
- Description
- If true weapon will be reloaded automatically once magazine is empty.
B
backgroundReload=false
- Type
- Boolean
- Description
- Weapon automatically reloads magazines without player intervention or animation.
ballisticsComputer=false
- Class
- Arma
- Type
- Boolean
- Description
- Weapon attempts to calculate and shift the aim-point to hit a locked target based on range, target movement, own movement, and ballistics of selected ammo type. New updated information for A3: Targeting reference
burst=1
- Class
- ModeClass
- Type
- Integer
- Description
- Number of shots actually fired each time the weapon is fired.
burstRangeMax=12
- Class
- ModeClass
- Type
- Integer
- Description
- Randomized number of shots actually fired each time the weapon is fired. When > 0 number of shots will be randomize in range{burst, burstRangeMax};
C
cameraDir
- Class
- MuzzleClass
- Type
- String
cameraDir = "GL look";
canDrop=true
- Type
- Boolean
- Description
- Weapon can/not be dropped from Inventory Menu.
canDrop is poorly implemented. It is normally associated with true vehicles such as air. For humans nothing in the GUI panel suggests that you can't drop a weapon, and yet, hidden-from-view, the drop action has no effect. canDrop should have also been implemented in cfgMagazines, but isn't. You can always drop the magazine, and yet, for some weapons, such as a laser designator, this is nonsensical.
canLock=2
- Type
- Integer
- Description
- Defines if weapon can be locked on the target (white box appears).
#define LockNo 0
#define LockCadet 1
#define LockYes 2
cartridgePos="nabojnicestart"
- Type
- String
cartridgeVel="nabojniceend"
- Type
- String
count=0
- Class
- OFP
- Type
- Integer
- Description
- Number of shots weapon starts with. Moved to cfgMagazines in Arma.
cursor=""
- Class
- Arma
- Type
- String
cursor="w_weapon"
- Class
- OFP
- Type
- String
cursorAim=""
- Class
- Arma
- Type
- String
cursorAim = "\ca\Weapons\Data\cursor_target_locked_ca.paa";
cursorAim="w_lock"
- Class
- OFP
- Type
- String
cursorAimOn=""
- Class
- Arma
- Type
- String
cursorSize=1.0
- Class
- Arma
- Type
- Float
D
dexterity=3.1
- Type
- Float
- Description
- In-game weapon handling value, lower value = takes more time to traverse a weapon.
dexterity = 3.1;
dispersion=0.002
- Class
- ModeClass
- Type
- Float
- Description
- In-game weapon dispersion in radians. Bigger value = more dispersion.
displayName=""
- Class
- MainBody
- Type
- String
- Description
- Name of the WEAPON. Declared in the main body. This string is shown in gear selection as the rifle's name.
- Class
- 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.
- Class
- MuzzleClass
- Description
- Name of the MUZZLE. In every muzzle class.
This string is shown in-game similar to burst, single, auto etc.
It is quite common for one of the muzzle classes to inherit a basic rifle muzzle, in which case, the name of the muzzle for THAT class is the inherited weapon name.
A weapon with no muzzles i.e. muzzles={"this"}; uses the weapon name.
displayNameMagazine=""
- Class
- OFP
- Type
- String
- Description
- displayname of the magazine in gear selection. Replaced in Arma via the cfgMagazines Class.
See also shortNameMagazine and descriptionShort
distanceZoomMax=400
- Type
- Integer
- Description
- Zeroing distance at opticsZoomMax.
distanceZoomMin=400
- Type
- Integer
- Description
- Zeroing distance at opticsZoomMin.
descriptionShort=""
- Class
- Arma
- Type
- String
- Description
- A paragraph or two describing the rifle in bottom left panel of in-game gear selection.
This is NOT equivalent of OFP's short label (shortNameMagazine). THAT descriptionShort exists in cfgMagazines.
drySound[]={"",1,1}
drySound[] = {"\ca\Weapons\Data\Sound\XMS_dry_v2", 0.000316228, 1};
E
enableAttack=true
- Type
- Boolean
emptySound[]={"",1,1}
F
ffCount=1
- Class
- ModeClass
- Type
- Integer
- Description
- Force feedback.
ffFrequency=1
- Class
- ModeClass
- Type
- Float
- Description
- Force feedback.
ffMagnitude=0.0
- Class
- ModeClass
- Type
- Float
- Description
- Force feedback.
fireLightDuration=0.05
- Class
- Arma
- Type
- Float
- Description
- Duration of light from muzzle flash.
fireLightIntensity=0.012
- Class
- Arma
- Type
- Float
- Description
- Intensity of light from muzzle flash.
flash=""
- Type
- String
flash = "gunfire";
flashSize=0.0
- Class
- ModeClass
- Type
- Float
- Description
- OFP only?
forceOptics=0
- Type
- Integer
- Description
- Valid values: 0, 1, 2 as per canLock.
H
handAnim[]={}
I
initSpeed=0
- Type
- Integer
- Description
- Initial speed of shot in meters per second. Also present in cfgMagazines.
initSpeed = 900;
In OFP this must be set in the class of the magazine, not that of the weapon.
In A3 this has multiple usages. positive values override magazine initspeed with the fixed number. Negative values act as modifier to the magazine's initispeed.
initSpeed = 1050; //overwrites magazine's value with 1050m/s
initSpeed = -1.1; //multiplies magazine's value by +1.1
L
laser=false
- Class
- Arma
- Type
- Boolean
- Description
- If the weapon is a laser designator, this should be true.
libTextDesc
- Class
- ArmaClass
- Type
- String
class Library {
libTextDesc = "The P07 is a semi-automatic pistol with an iron and reinforced polymer mix frame. Following the success of Glock, polymer based pistols became known as perfect handguns for both military use and self-defense and are available in various calibers. P07 allows easy mounting of suppressors.";
};
M
magazineReloadTime=0
- Class
- MuzzleClass
- Type
- Float
- Description
- Time delay when reloading the weapon (changing magazines).
magazines[]={"this"}
- Class
- OFP
- Type
- StringArray
- Description
- Array of magazine classes compatible with this weapon. This same Weapon class in cfgWeapons if not over-ridden.
magazines[]={}
- Class
- Arma
- Type
- StringArray
- Description
- These are declared here, same as OFP, but defined in cfgMagazines.
Note, with extreme caution: Unlike OFP, you cannot have identically named magazine classes. The in-game gear selection panel gets confused. Safe bet is to call all your magazine classes "[rifle]Mag".
maxLeadSpeed=50
- Class
- OFP
- Type
- Integer
- Description
- Maximum speed of the target that can be shot with this weapon by AI. Moved to cfgMagazines in Arma.
min/mid/maxRange...
- Class
- ArmaModeClass
- Type
- Integer
- Description
- Together with range and rangeProbab values, defines probability to use this weapon for AI units at given distance.
For OFP these parameters were specified in cfgAmmo, rendering all rifles the same.
minRange=1
- Type
- Integer
minRangeProbab=0.3
- Type
- Float
midRange=150
- Type
- Integer
midRangeProbab= 0.58
- Type
- Float
maxRange=500
- Type
- Integer
maxRangeProbab=0.04
- Type
- Float
magazineType=0
- Class
- OFP
- Type
- Integer
- Description
- See Types below.
memoryPointCamera="eye"
- Class
- Arma
- Type
- String
- Description
- MuzzleClass
memoryPointCamera = "GL eye";
model="[.p3d]"
- Type
- String
model = "\ca\a10\AGM65";
modelMagazine="[.p3d]"
- Class
- Arma
- Type
- String
modelMagazine="\misc\mag_univ"
- Class
- OFP
- Type
- String
modelOptics="[.p3d]"
- Class
- MuzzleClass
- Type
- String
- Description
- Optic model used in game. "-" defines 3d view from the model (point "eye").
modelOptics = "\ca\Weapons\G36_optics";
modelOptics = "-";
modelSpecial=[.p3d]""
- Type
- String
- Description
- Model used when the weapon is loaded. This is typically only used for rocket launchers.
modes[]= {"this"}
modes[]= {"this"}; means all parameters necessary for the one and only mode are declared within the main body. Note this also gives the order of selection using the control key in-game.
modes[] = {"single", "burst", "auto"};
multiplier=1
- Class
- ModeClass
- Type
- Integer
- Description
- Ammunition used per shot.
muzzleEnd="konec hlavne"
- Type
- String
muzzlePos="usti hlavne"
- Type
- String
muzzles[]={"this"}
- Type
- Array of Integer
- Description
- Similarly to modes, if not declared, the assumed muzzle is "this".
muzzles[] = {"TimeBombMuzzle", "PipeBombMuzzle", "MineMuzzle", "MineEMuzzle"}; //Standard definition
muzzles[]+={"my_custom_muzzle"}; // When you want to add something to an already existing array (e.g. Muzzles to the "throw" weapon class)
N
nameSound=""
- Type
- String
- Description
- Sound classname played when vehicle commander switches to this weapon?
nameSound = "smokeshell";
nameSound="weapon"
- Class
- OFP
- Type
- String
nFovLimit=0.05
- Class
- Arma2
- Type
- Float
- Description
- Defines when UI indicator switches from WFOV to NFOV. See Titan/Javelin UI
O
optics=true
- Type
- Boolean
opticsDisablePeripherialVision=0.67
- Class
- Arma
- Type
- Float
- Description
- Factor by which peripheral vision is reduced while using this optic. 0 has no effect and 1 disables it completely.
opticsFlare=false
- Type
- Boolean
- Description
- Decides if lens flare should be shown while using this optic.
opticsPPEffects[] = {"OpticsCHAbera5", "OpticsBlur5"}
opticsZoomInit= 0.75
- Class
- MuzzleClass
- Type
- Float
- Description
- Optics field of view at default zoom in radians.
opticsZoomMax=1.1
- Class
- MuzzleClass
- Type
- Float
- Description
- FOV in radians. This and opticsZoomMin are counterintuitively named. opticsZoomMax is the maximum FOV, which actually makes it the minimum zoom.
opticsZoomMin=0.375
- Class
- MuzzleClass
- Type
- Float
P
picture="[\][.pac]"
- Type
- String
- Description
- Defines weapon and magazine. See below.
primary=10
- Type
- Integer
R
recoil="Empty"
- Class
- ModeClass
- Type
- String
- Description
- Selects recoil defined in cfgRecoils class. Arma differs substantially in Recoil ability; much more of them, and very different names.
recoil = "AK74Recoil"
recoilProne=""
- Class
- ArmaModeClass
- Type
- String
- Description
- When prone, recoil can be set to slower values.
recoilProne = "AK74Recoil"
reloadAction=""
- Class
- Arma
- Type
- String
- Description
- Enumerated list.
reloadAction="ManActReloadMagazine"
- Class
- OFP
- Type
- String
reloadMagazineSound[]={"",1,1}
reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload", 0.000316228, 1};
reloadSound[]={"",1,1}
reloadSound[] = {"\ca\Weapons\Data\Sound\gun125reload", 1, 1};
reloadTime=1.0
- Class
- ModeClass
- Type
- Float
- Description
- Delay (in seconds) between each individual shot.
requiredOpticType=-1
- Class
- ModeClass
- Type
- Integer
- Description
- Required opticType for AI to be able to use this fire mode. It is mainly use to increase maximum engagement distance of AI depending on the optics it has mount on its rifle
class single_close_optics1 : Single // This optic mode will be used if AI unit has optic mounted on this weapon with opticType >= 1. AI will engage between
{
requiredOpticType = 1;
showToPlayer = 0;
minRange = 2;
minRangeProbab = 0.05;
midRange = 300;
midRangeProbab = 0.8;
maxRange = 500;
maxRangeProbab = 0.01;
aiRateOfFire = 2;
aiRateOfFireDistance = 300;
};
class single_medium_optics1 : single_close_optics1 // Same as single_close_optics1 - requiredOpticType is inherited and therefore opticType >= 1 is required
{
minRange = 300;
minRangeProbab = 0.05;
midRange = 500;
midRangeProbab = 0.7;
maxRange = 700;
maxRangeProbab = 0.05;
aiRateOfFire = 2;
aiRateOfFireDistance = 500;
};
class single_far_optics1 : single_medium_optics1 // this optic mode will be only used if AI unit has optic with opticType = 2 mounted. With this fire mode AI will engage enemies up to 1km
{
requiredOpticType = 2;
minRange = 300;
minRangeProbab = 0.05;
midRange = 700;
midRangeProbab = 0.5;
maxRange = 1000;
maxRangeProbab = 0.05;
aiRateOfFire = 4;
aiRateOfFireDistance = 600;
};
S
scope=0
- Class
- Arma
- Type
- Integer
- Description
- OFP had no scope token. Instead, it used scopeWeapon and scopeMagazine to distinguish who was what and when used.
2 = can use in-game, with a picture in gear present. 1 = can use in-game with no picture in gear.
scopeWeapon=0
- Class
- OFP
- Type
- Integer
scopeMagazine=0
- Class
- OFP
- Type
- Integer
- Description
- Used as couplets instead of scope.
selectionFireAnim="zasleh"
- Class
- Arma
- Type
- String
- Description
- This defines the selection name for muzzleflash proxy. In czech the word "zasleh" is muzzleflash.
shortNameMagazine=""
- Class
- OFP
- Type
- String
- Description
- The descriptive magazine paragraph. Replaced in Arma by descriptionShort in the cfgMagazines Class.
shotFromTurret=false
- Class
- OFP
- Type
- Boolean
- Description
- If true, it disables the muzzle flash completely ("zasleh" animation), and only smoke puffs are used. It also disables the lighting effects when firing the weapon at night. It only works with weapons defined as vehicle weapons. This value also dictates whether to use the legacy turret gunBeg/gunEnd settings (when shotFromTurret = 1), or the memoryPointGun[] array for tracer paths (when shotFromTurret = 0).
showAimCursorInternal=true
- Class
- Arma
- Type
- Boolean
showEmpty=true
- Type
- Boolean
- Description
- If false weapon gets hidden from the player once there's no ammo left for it.
showHandgunMagProxy
- Type
- Boolean
- Description
- Vest config. Default 1. Renders magazine proxy when gun is in its holster.
showHolsterMagazineProxy
- Type
- Boolean
- Description
- Weapon config. Default 1. Renders magazine proxy when gun is in its holster.
showSwitchAction=false
- Class
- Arma
- Type
- Boolean
- Description
- Show an option to switch to this weapon in the action menu.
showToPlayer=true
- Class
- ModeClass
- Type
- Boolean
- Description
- Some modes defined for AI usage (e.g. burst modes for full auto weapons) can be hidden from player with this parameter.
simulation="Weapon"
- Class
- Arma
- Type
- String
sound[]={"",1,1}
- Class
- ModeClass
- Type
- Array of Integer
- Description
- There are several sound types. Most are relevant to the weapon overall and specified in the main body, whilst sound[]= is specific to each mode.
The last parameter defines how fast the sound should be played. 1 means normal speed.
sound[] = {"\ca\Weapons\Data\Sound\AGS30_shot1", 10, 1};
soundBurst=true
- Class
- ArmaModeClass
- Type
- Boolean
- Description
- When set to false, the single shot sound can be used with burst mode - it will be played several times.
soundContinuous=false
- Class
- ModeClass
- Type
- Boolean
- Description
- If true, the sound for the next shot won't start before previous one ends. Thus you can prevent sound overlapping.
soundBegin[]={"begin1", 0.33, "begin2", 0.33, "begin3", 0.34}
- Class
- ArmaModeClass
- Type
- Array of Integer
- Description
- The weapon's "firing" sound. An array of sounds and probabilities.
begin1[] = {"A3\sounds_f\weapons\pistols\pistol_st_1", 1, 1, 700};
begin2[] = {"A3\sounds_f\weapons\pistols\pistol_st_2", 1, 1, 700};
begin3[] = {"A3\sounds_f\weapons\pistols\pistol_st_3", 1, 1, 700};
soundBegin[] = {"begin1", 0.33, "begin2", 0.33, "begin3", 0.33}
soundBullet[]={"emptySound",1}
- Class
- ArmaModeClass
- Type
- Array of Integer
- Description
- The sound made when spent cases hit the ground
bullet1[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_01", 0.501187, 1, 15};
bullet2[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_02", 0.501187, 1, 15};
bullet3[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_03", 0.501187, 1, 15};
soundBullet[] = {"bullet1", 0.33, "bullet2", 0.33, "bullet3", 0.33}
soundEnd[]={"sound",1}
soundLoop[]={"sound",1}
- Class
- ArmaModeClass
- Type
- Array of Integer
- 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[]
soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1", 25.1189, 0.8};
soundServo[]
soundServo[] = {"", 0.0001, 1};
T
Type=WeaponHardMounted
- Class
- Arma
- Type
- Integer
- Description
- See WeaponHardMounted
U
UiPicture="[\][.pac]"
- Class
- Arma
- Type
- String
- Description
- Image used in the commander's interface to indicate weapon loadout of a unit.
"\CA\weapons\data\Ico\i_aa_CA.paa";
uiPicture="ivojak"
- Class
- OFP
uiModel="[.p3d]"
- Type
- String
- Description
- Works only with watch & compass items (simulationWatch/simulationWatch). Replaces model which is visible in inventory with custom one.
class ItemCompassRU : ItemCompass
{
UImodel = "\A3\ui_f\objects\CompassRU.p3d";
};
class ItemWatchRU : ItemWatch
{
UImodel = "\A3\ui_f\objects\WatchRU.p3d";
};
useAction=false
- Class
- ModeClass
- Type
- Boolean
- Description
- Allows this mode to be activated with the action menu
useActionTitle=""
useActionTitle = "$STR_ACTION_PUTBOMB";
useAsBinocular=false
- Type
- Boolean
V
value=2
- Class
- Arma
- Type
- Integer
valueMagazine=2
- Class
- OFP
- Type
- Integer
valueWeapon=2
- Class
- OFP
- Type
- Integer
W
weaponType=WeaponHardMounted
- Class
- OFP
- Type
- Integer