CfgMagazines Config Reference: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fixed table)
m (Layout update)
Line 1: Line 1:
{{Cfg ref|start}}
{{Cfg ref|start}}
==Introduction==
==Introduction==
'''''cfgAmmo''''', '''''cfgMagazines''''', '''''cfgWeapons''''' and '''''cfgVehicles''''' are root classes defined in the engine's <tt>config.bin</tt>
'''''cfgAmmo''''', '''''cfgMagazines''''', '''''cfgWeapons''''' and '''''cfgVehicles''''' are root classes defined in the engine's <tt>config.bin</tt>
Line 15: Line 13:
Nearly all values are identical to their {{Name|ofp|short}} equivalent.
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.
'''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.


''TokenNames'' marked ''{{Name|arma|short}}'' were introduced from {{Name|ofpe|short}} and beyond.


===Arma Enhancement===
===Arma Enhancement===
Line 50: Line 47:
| <tt>shortNameMagazine=</tt>      || moved to ''cfgMagazines'' and renamed ''descriptionShort''?
| <tt>shortNameMagazine=</tt>      || moved to ''cfgMagazines'' and renamed ''descriptionShort''?
|}
|}


===Modifications===
===Modifications===
Line 60: Line 56:
:Unlike {{Name|ofp|short}}, you cannot have the '''same''' <tt>cfgMagazines.ClassName</tt>
: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.
: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==
==Alphabetical Order==
Line 72: Line 67:
ammo = B_30mm_HE; //eg
ammo = B_30mm_HE; //eg
</syntaxhighlight>
</syntaxhighlight>


===C===
===C===
====class InventoryPlacements{}====
====class InventoryPlacements{}====
{{Example needed}}
{{Example needed}}


====class Library====
====class Library====
Line 86: Line 79:
};
};
</syntaxhighlight>
</syntaxhighlight>


====count=30====
====count=30====
;Type: [[TokenNameValueTypes|Integer]]
;Type: [[TokenNameValueTypes|Integer]]
;Description: The amount of ammo this magazine holds.
;Description: The amount of ammo this magazine holds.


===D===
===D===
Line 102: Line 93:
descriptionShort = "Beretta Ammo";
descriptionShort = "Beretta Ammo";
</syntaxhighlight>
</syntaxhighlight>


====displayName=""====
====displayName=""====
;Type: [[TokenNameValueTypes|String]]
;Type: [[TokenNameValueTypes|String]]
;Description: The descriptive Name of the magazine. In {{Name|ofp|short}}, this was called ''DisplayNameMagazine''.
;Description: The descriptive Name of the magazine. In {{Name|ofp|short}}, this was called ''DisplayNameMagazine''.


===I===
===I===
Line 113: Line 102:
;Type: [[TokenNameValueTypes|Integer]]
;Type: [[TokenNameValueTypes|Integer]]
;Description: Starting speed of missile.
;Description: Starting speed of missile.


===M===
===M===
====maxLeadSpeed = 23;====
====maxLeadSpeed = 23;====
;Type: [[TokenNameValueTypes|Integer]]
;Type: [[TokenNameValueTypes|Integer]]


====model="\ca\weapons\mag_univ[.p3d]"====
====model="\ca\weapons\mag_univ[.p3d]"====
;Type: [[TokenNameValueTypes|String]]
;Type: [[TokenNameValueTypes|String]]
;Description: The mag model. Identical to {{Name|ofp|short}}.
;Description: The mag model. Identical to {{Name|ofp|short}}.


====modelSpecial="[.p3d]"====
====modelSpecial="[.p3d]"====
;Type: [[TokenNameValueTypes|String]]
;Type: [[TokenNameValueTypes|String]]


===N===
===N===
====nameSound="magazine"====
====nameSound="magazine"====
;Type: [[TokenNameValueTypes|String]]
;Type: [[TokenNameValueTypes|String]]


===P===
===P===
Line 138: Line 122:
;Type: [[TokenNameValueTypes|String]]
;Type: [[TokenNameValueTypes|String]]
;Description: Picture shown in gear for this mag. See ''cfgAmmo'' for warnings about picture paths.
;Description: Picture shown in gear for this mag. See ''cfgAmmo'' for warnings about picture paths.


===R===
===R===
====reloadAction="ManActReloadMagazine"====
====reloadAction="ManActReloadMagazine"====
;Type: [[TokenNameValueTypes|String]]
;Type: [[TokenNameValueTypes|String]]


===S===
===S===
Line 150: Line 132:
;Description: {{Name|ofp|short}} name was ''ScopeMagazine''.
;Description: {{Name|ofp|short}} name was ''ScopeMagazine''.
Values: <tt>private</tt>, <tt>protected</tt>, <tt>public</tt>.
Values: <tt>private</tt>, <tt>protected</tt>, <tt>public</tt>.


====selectionFireAnim="zasleh"====
====selectionFireAnim="zasleh"====
;Type: [[TokenNameValueTypes|String]]
;Type: [[TokenNameValueTypes|String]]


====simulation="ProxyMagazines"====
====simulation="ProxyMagazines"====
;Type: [[TokenNameValueTypes|String]]
;Type: [[TokenNameValueTypes|String]]


===T===
===T===
Line 164: Line 143:
;Type: [[TokenNameValueTypes|Integer]]
;Type: [[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.
;Description: {{Name|ofp|short}} name was ''MagazineType''. See ''cfgWeapons'' for the CHANGES between {{Name|ofp|short}} and {{Name|arma|short}} for this value.


===U===
===U===
====useAction=0====
====useAction=0====
;Type: [[TokenNameValueTypes|Integer]]
;Type: [[TokenNameValueTypes|Integer]]


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


===V===
===V===
Line 179: Line 155:
;Type: [[TokenNameValueTypes|Integer]]
;Type: [[TokenNameValueTypes|Integer]]
;Description: Formerly known as ''ValueMagazine'' in {{Name|ofp|short}}.
;Description: Formerly known as ''ValueMagazine'' in {{Name|ofp|short}}.


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


==Additional Values==
==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>.
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====
====lastRoundsTracer=4====
{{Example needed}}
{{Example needed}}


====tracersEvery=4====
====tracersEvery=4====
{{Example needed}}
{{Example needed}}


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

Revision as of 07:35, 18 May 2014

Template:Cfg ref

Introduction

cfgAmmo, cfgMagazines, cfgWeapons and cfgVehicles are root classes defined in the engine's config.bin

These classes can be subsequently added to by addons 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

Template:Cfg ref

A

ammo=""

Type
String
Description
Name of the cfgAmmo class which this magazine holds.
ammo = B_30mm_HE; //eg

C

class InventoryPlacements{}

Template:Example needed

class Library

class Library
{
    libTextDesc = "";
};

count=30

Type
Integer
Description
The amount of ammo this magazine holds.

D

descriptionShort=""

Type
String
Description
The descriptive Name of the ammunition.
descriptionShort = $STR_SN_MAVERICK;
descriptionShort = "Beretta Ammo";

displayName=""

Type
String
Description
The descriptive Name of the magazine. In OFP, this was called DisplayNameMagazine.

I

initSpeed=900

Type
Integer
Description
Starting speed of missile.

M

maxLeadSpeed = 23;

Type
Integer

model="\ca\weapons\mag_univ[.p3d]"

Type
String
Description
The mag model. Identical to OFP.

modelSpecial="[.p3d]"

Type
String

N

nameSound="magazine"

Type
String

P

picture="[\][[.pac]"

Type
String
Description
Picture shown in gear for this mag. See cfgAmmo for warnings about picture paths.

R

reloadAction="ManActReloadMagazine"

Type
String

S

scope=protected

Type
Integer
Description
OFP name was ScopeMagazine.

Values: private, protected, public.

selectionFireAnim="zasleh"

Type
String

simulation="ProxyMagazines"

Type
String

T

type=256

Type
Integer
Description
OFP name was MagazineType. See cfgWeapons for the CHANGES between OFP and Arma for this value.

U

useAction=0

Type
Integer

useActionTitle=""

Type
String

V

value=1

Type
Integer
Description
Formerly known as ValueMagazine in OFP.

W

weight=0

Type
Integer

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

Template:Example needed

tracersEvery=4

Template:Example needed

Template:Cfg ref