CfgVehicles Config Reference
Introduction
Addon Command Reference
This article details the token-verbs available in Config.cpp for addons created in Operation FlashPoint, the Resistence upgrade, and of course, Elite.
Legend:
INTEGER: A signed, value to 65k.
BOOLEAN: An Integer value of 0, or 1
ARRAY: An arrey[]=
STRING: Any string value. ALL STRINGS MUST BE ENCLOSED IN QUOTES for Elite. These strings are misinterpreted as #defines otherwise.
Notes: For Models and other items using p3d files, the .p3d extension is not reguired. Similar comment for pac/paa files, and wss (sound) files where appropriate
General
A
airFriction
Used in: cfgNonAiVehicles
ARRAY: 3 separate tokens, airFriction0[],airFriction1[],airFriction2[] that define the X Y and Z component respectively.
airFriction2[] = {25,12,2.500000};
acceleration
Used in: cfgNonAiVehicles
INTEGER: metres per second
acceleration = 7;
avgHeight
Used in: cfgNonAiVehicles
INTEGER: height in metres above sealevel. See #minHeight , #maxHeight
avgHeight = 10;
B
C
canBeShot
Used in: cfgNonAiVehicles
BOOLEAN: Declares whether bullets have any effect
canBeShot = 1;
F
flySound
Used in: cfgNonAiVehicles
flySound[] = {"\AddonName\AnySound.wss",0.000000,1,1};
Note: String can be empty, eg. ""
M
maxHeight
Used in: cfgNonAiVehicles
INTEGER: max height above sea level. See #avgHeight , #minHeight
maxHeight = 50;
maxSpeed
Used in: cfgNonAiVehicles
INTEGER: In kph.
maxSpeed = 20;
minHeight
Used in: cfgNonAiVehicles
INTEGER: Min height in metres above sealevel. See #avgHeight , #maxHeight
minHeight = 5;
minSpeed
Used in: cfgNonAiVehicles
INTEGER: In Kph.
minSpeed = -0.500000; range 0->1
model
Used in: cfgNonAiVehicles
STRING: Location in the addon where the p3d model resides. Can be subfolder
model = "\AddonName\anyp3d"; // can be ""
R
Used in: cfgNonAiVehicles
BOOLEAN: Normally, models ARE reversed with respect to how they present on the screen after editing with tools like oxygen (eg) This overrides the default. See #model
reversed = 0;
S
scope
Used in: cfgNonAiVehicles
scope = public;
Scope in concept is the same as the C++ reserved words of public, protected and private.
defines normally exist at the top of a well written config.cpp to make meanings clearer.
#define private 0 #define protected 1 #define public 2
The meaning of each is as follows
private:
only other classes within the same config cpp can access, or 'inherit' this class.
protected:
Identical to public, except the class will not be listed in the mission editor. A very common form of use for this is
class vegetables { scope=protected; VehicleClass="Vegetables. namesound= whatever; icon= "vegetableIcon.paa"; /// put any other common characteristics in here }; class GreenOnions : vegetables { scope = public; name="Green Onion; } class PurpleOnion : vegetables { ....
The effect here is to reduce (considerably) not only the amount of tyoing, but memory storage too. It is only the public classes that are listed in the editor, and this, you would expect, that each one of these has a separate name=, wheras, they are ALL grouped' in the Editor's 'Vegetables'
Protected classes are CamCreatble in the mission.sqm.
Protected classes are immensely useful to 'hide' obsolete models that are still required to maintain compatibility with older missions.
public:
Any classes declared public are CamCreateabale, and selectable via the Editor.
simulation
Used in: cfgNonAiVehicles
STRING: The engine behaviour with this #model.
simulation = "SeaGull";// campfire,house, etc
singSound
Used in: cfgNonAiVehicles
ARRAY: normally for a bird
singSound[] = {"\AddonName\SoundFile.ogg",0.031623,1,1};
straightDistance
Used in: cfgNonAiVehicles
straightDistance = 50;
T
turning
Used in: cfgNonAiVehicles
BOOLEAN: (i think)
turning = 1;
type
type = 2;