CfgMagazines Config Reference: Difference between revisions
Fred Gandt (talk | contribs) (One (second) of a set (see top of this) of pages relatively radically restyled. HOWEVER - The styling can be removed easily, leaving A LOT of general fixes in place, rather than undoing if disliked.) |
|||
Line 1: | Line 1: | ||
{{ | {{Cfg ref|start}} | ||
==Introduction== | |||
'''''cfgAmmo''''', '''''cfgMagazines''''', '''''cfgWeapons''''' and '''''cfgVehicles''''' are root classes defined in the engine's <tt>config.bin</tt> | |||
These classes can be subsequently added to by addons | These classes can be subsequently added to by addons inherent 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. | |||
''Default'' values are shown in the legend. They come from the derived class <tt>CA_Magazine</tt> rather than the true <tt>default{}</tt> since almost everything derives from this class. | |||
'Default' values are shown in the legend. They come from the derived class CA_Magazine rather than the true default{} since almost everything derives from this class | |||
Nearly all values are identical to their {{Name|ofp|short}} equivalent. | |||
'''Note''' that engines will accept integer values (or math strings) where a float would normally be expected. | |||
''TokenNames'' marked ''[[ArmaTokenNames|{{Name|arma|short}}]]'' were introduced from {{Name|ofpe|short}} and beyond. | |||
===Arma Enhancement=== | |||
Arma introduced a new root class, ''cfgMagazines''. | |||
The magazines it declares are selected for use by specific ''cfgWeapons''. | |||
Any given magazine can (obviously) only hold a specific ''cfgAmmo'' class. | |||
In contrast, | In contrast, {{Name|ofp|short}} uses a rather tedious construct in it's ''cfgWeapons'' class to distinguish between weapon and magazine parameters. | ||
The major alterations here are: | The major alterations here are: | ||
{| class="operators" | |||
|- | |||
! {{Name|ofp|short}} !! {{Name|arma|short}} | |||
|- | |||
| <tt>ammo=</tt> || moved to ''cfgMagazines'' | |||
|- | |||
| <tt>displayNameMagazine=</tt> || moved to ''cfgMagazines'' and renamed ''DisplayName'' (of course) | |||
|- | |||
| <tt>magazines[] = {"this"};</tt> || <tt>magazines[] = {};</tt> | |||
|- | |||
| <tt>magazineType=</tt> || moved to ''cfgMagazines'' and renamed ''Type'' | |||
|- | |||
| <tt>maxLeadSpeed=</tt> || moved to ''cfgMagazines'' | |||
|- | |||
| <tt>scopeWeapon=</tt> || renamed ''scope'' | |||
|- | |||
| <tt>scopeMagazine=</tt> || moved to ''cfgMagazines'' and renamed ''scope'' | |||
|- | |||
| <tt>shortNameMagazine=</tt> || moved to ''cfgMagazines'' and renamed ''descriptionShort''? | |||
|} | |||
==Modifications== | ===Modifications=== | ||
Unlike it's ''cfgAmmo'' and ''cfgWeapon'' cousins: all bets are off. There is, a default class (the substance of this document), but it, and all other classes in ''cfgMagazines'' are deletable/erasable/modifiable. | |||
Caution should be exercised about 'expected' default values when inheriting. ANY added ''pbo'' can alter them substantially before your very eyes. | |||
;Warning | |||
:Unlike {{Name|ofp|short}}, you cannot have the '''same''' <tt>cfgMagazines.ClassName</tt> | |||
:If you specify a rifle, and it's magazine with the same classname, the in-game gear selection dialog get's mightily confused. It's a noisy, awful display to begin with. Don't, make it worse. | |||
==Alphabetical Order== | |||
{{Cfg ref|abc}} | |||
===A=== | |||
====ammo=""==== | |||
[[TokenNameValueTypes|String]] | |||
'''Description:''' Name of the ''cfgAmmo'' class which this magazine holds. | |||
<syntaxhighlight lang="c"> | |||
ammo = B_30mm_HE; //eg | |||
</syntaxhighlight> | |||
== | ===C=== | ||
====class InventoryPlacements{}==== | |||
'''Description:''' {{Example needed}} | |||
== | ====class Library==== | ||
'''Description:''' {{Example needed}} | |||
= | <syntaxhighlight lang="c"> | ||
class Library | |||
{ | |||
libTextDesc = ""; | |||
}; | |||
</syntaxhighlight> | |||
== | ====count=30==== | ||
== | [[TokenNameValueTypes|Integer]] | ||
'''Description:''' The amount of ammo this magazine holds. | |||
===D=== | |||
====descriptionShort=""==== | |||
[[TokenNameValueTypes|String]] | |||
'''Description:''' The descriptive Name of the ammunition. | |||
<syntaxhighlight lang="c"> | |||
descriptionShort = $STR_SN_MAVERICK; | |||
descriptionShort = "Beretta Ammo"; | |||
</syntaxhighlight> | |||
====displayName=""==== | |||
[[TokenNameValueTypes|String]] | |||
'''Description:''' The descriptive Name of the magazine. In {{Name|ofp|short}}, this was called ''DisplayNameMagazine''. | |||
===I=== | |||
====initSpeed=900==== | |||
[[TokenNameValueTypes|Integer]] | |||
'''Description:''' Starting speed of missile. | |||
===M=== | |||
====maxLeadSpeed = 23;==== | |||
[[TokenNameValueTypes|Integer]] | |||
'''Description:''' {{Example needed}} | |||
====model="\ca\weapons\mag_univ[.p3d]"==== | |||
[[TokenNameValueTypes|String]] | |||
'''Description:''' The mag model. Identical to {{Name|ofp|short}}. | |||
====modelSpecial="[.p3d]"==== | |||
[[TokenNameValueTypes|String]] | |||
'''Description:''' {{Example needed}} | |||
===N=== | |||
====nameSound="magazine"==== | |||
[[TokenNameValueTypes|String]] | |||
'''Description:''' {{Example needed}} | |||
===P=== | |||
====picture="[\][[.pac]"==== | |||
[[TokenNameValueTypes|String]] | |||
'''Description:''' Picture shown in gear for this mag. See ''cfgAmmo'' for warnings about picture paths. | |||
===R=== | |||
====reloadAction="ManActReloadMagazine"==== | |||
[[TokenNameValueTypes|String]] | |||
'''Description:''' {{Example needed}} | |||
===S=== | |||
====scope=protected==== | |||
[[TokenNameValueTypes|Integer]] | |||
'''Description:''' {{Name|ofp|short}} name was ''ScopeMagazine''. | |||
;values | |||
:private | |||
:protected | |||
:public | |||
====selectionFireAnim="zasleh"==== | |||
[[TokenNameValueTypes|String]] | |||
'''Description:''' {{Example needed}} | |||
====simulation="ProxyMagazines"==== | |||
[[TokenNameValueTypes|String]] | |||
'''Description:''' {{Example needed}} | |||
===T=== | |||
====type=256==== | |||
[[TokenNameValueTypes|Integer]] | |||
'''Description:''' {{Name|ofp|short}} name was ''MagazineType''. See ''cfgWeapons'' for the CHANGES between {{Name|ofp|short}} and {{Name|arma|short}} for this value. | |||
===U=== | |||
====useAction=0==== | |||
[[TokenNameValueTypes|Integer]] | |||
'''Description:''' {{Example needed}} | |||
====useActionTitle=""==== | |||
[[TokenNameValueTypes|String]] | |||
'''Description:''' {{Example needed}} | |||
===V=== | |||
====value=1==== | |||
[[TokenNameValueTypes|Integer]] | |||
'''Description:''' Formerly known as ''ValueMagazine'' in {{Name|ofp|short}}. | |||
===W=== | |||
====weight=0==== | |||
[[TokenNameValueTypes|Integer]] | |||
'''Description:''' {{Example needed}} | |||
==Additional Values== | |||
Because just about anything can be added to these classes it is not overly useful to attempt to define most of them. For whatever reason, and unlike other root classes, the engine doesn't need these tokens declared in <tt>default{}</tt>. | |||
====lastRoundsTracer=4==== | |||
'''Description:''' {{Example needed}} | |||
====tracersEvery=4==== | |||
'''Description:''' {{Example needed}} | |||
{{Cfg ref|end}} | |||
[[category:Operation Flashpoint: Editing]] | [[category:Operation Flashpoint: Editing]] | ||
[[Category:ArmA: Addon Configuration]] | [[Category:ArmA: Addon Configuration]] |
Revision as of 23:50, 6 May 2014
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 inherent 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.
Default values are shown in the legend. They come from the derived class CA_Magazine rather than the true default{} since almost everything derives from this class.
Nearly all values are identical to their OFP equivalent.
Note that engines will accept integer values (or math strings) where a float would normally be expected.
TokenNames marked Arma were introduced from OFP:E and beyond.
Arma Enhancement
Arma introduced a new root class, cfgMagazines.
The magazines it declares are selected for use by specific cfgWeapons.
Any given magazine can (obviously) only hold a specific cfgAmmo class.
In contrast, OFP uses a rather tedious construct in it's cfgWeapons class to distinguish between weapon and magazine parameters.
The major alterations here are:
OFP | Arma |
---|---|
ammo= | moved to cfgMagazines |
displayNameMagazine= | moved to cfgMagazines and renamed DisplayName (of course) |
magazines[] = {"this"}; | magazines[] = {}; |
magazineType= | moved to cfgMagazines and renamed Type |
maxLeadSpeed= | moved to cfgMagazines |
scopeWeapon= | renamed scope |
scopeMagazine= | moved to cfgMagazines and renamed scope |
shortNameMagazine= | moved to cfgMagazines and renamed descriptionShort? |
Modifications
Unlike it's cfgAmmo and cfgWeapon cousins: all bets are off. There is, a default class (the substance of this document), but it, and all other classes in cfgMagazines are deletable/erasable/modifiable.
Caution should be exercised about 'expected' default values when inheriting. ANY added pbo can alter them substantially before your very eyes.
- Warning
- Unlike OFP, you cannot have the same cfgMagazines.ClassName
- If you specify a rifle, and it's magazine with the same classname, the in-game gear selection dialog get's mightily confused. It's a noisy, awful display to begin with. Don't, make it worse.
Alphabetical Order
A
ammo=""
Description: Name of the cfgAmmo class which this magazine holds.
ammo = B_30mm_HE; //eg
C
class InventoryPlacements{}
Description: Template:Example needed
class Library
Description: Template:Example needed
class Library
{
libTextDesc = "";
};
count=30
Description: The amount of ammo this magazine holds.
D
descriptionShort=""
Description: The descriptive Name of the ammunition.
descriptionShort = $STR_SN_MAVERICK;
descriptionShort = "Beretta Ammo";
displayName=""
Description: The descriptive Name of the magazine. In OFP, this was called DisplayNameMagazine.
I
initSpeed=900
Description: Starting speed of missile.
M
maxLeadSpeed = 23;
Description: Template:Example needed
model="\ca\weapons\mag_univ[.p3d]"
Description: The mag model. Identical to OFP.
modelSpecial="[.p3d]"
Description: Template:Example needed
N
nameSound="magazine"
Description: Template:Example needed
P
picture="[\][[.pac]"
Description: Picture shown in gear for this mag. See cfgAmmo for warnings about picture paths.
R
reloadAction="ManActReloadMagazine"
Description: Template:Example needed
S
scope=protected
Description: OFP name was ScopeMagazine.
- values
- private
- protected
- public
selectionFireAnim="zasleh"
Description: Template:Example needed
simulation="ProxyMagazines"
Description: Template:Example needed
T
type=256
Description: OFP name was MagazineType. See cfgWeapons for the CHANGES between OFP and Arma for this value.
U
useAction=0
Description: Template:Example needed
useActionTitle=""
Description: Template:Example needed
V
value=1
Description: Formerly known as ValueMagazine in OFP.
W
weight=0
Description: Template:Example needed
Additional Values
Because just about anything can be added to these classes it is not overly useful to attempt to define most of them. For whatever reason, and unlike other root classes, the engine doesn't need these tokens declared in default{}.
lastRoundsTracer=4
Description: Template:Example needed
tracersEvery=4
Description: Template:Example needed