CfgVehicles Config Reference
Introduction
TokenName Reference
Simply put, Token Name & Value pairs are as follows
SomeName = SomeValue;
Token Names are used extensively throughout ofp 'text' files.
This article details the token-names available in Config.cpp , description.ext and mission.sqm. The primary focus of this document is the TokenNames used for various aspects of controlling models within Addons. Description.ext and mission.sqm are included because many of the 'tokens' are common to all.
For instance, when creating a model using class statements inside a Config.cpp, to access it later, via the mission editor
scope=2;
This article lists token names, their value ranges, and their type.
Where not specifcally specified, the 'useage'of the token name is within Config.cpp, class CfgVehicles.
Legend:
Integer: A signed value that will be held in 4 bytes.
Boolean: An Integer value of 0 or 1. This is a 'convenience type' in humanly readable text. The engine stores it as an integer.
String: Any string value. ALL STRINGS MUST BE ENCLOSED IN QUOTES for Elite. These strings are misinterpreted as #defines otherwise.
Array: An array []={...}
float Array: An array of floats only string Arrray: should be obvious integer Array: ditto Complex Array: A mixture of multiple types, includig embedded arrays.
Variable Array: the number of elements for this array in this class model can have a varying number of elements (depending on context)
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
A
...Action
commanderAction = "ManActTestDriver"; driverAction = "ManActTestDriver"; gunnerAction = "ManActAH1Gunner";
cargoAction
Variable String Array:
cargoAction[] = {"ManActM113Medic","ManActM113Medic","ManActM113Injured"};
note that unlike driverAction and gunnerAction this is an array. (for multiple positions)
The number of elements in this array correspond to the #transportSoldier value declared for this class.
...InAction
commanderInAction = "ManActTestDriver"; driverInAction = "ManActTestDriver"; gunnerInAction = "ManActTestDriver";
...AngleX
Integer Degrees
initAngleX = 0; minAngleX = -30; maxAngleX = 30;
...AngleY
Integer Degrees
initAngleY = 0; minAngleY = -30; maxAngleY = 30;
initCargoAngleY
Integer Degrees
initCargoAngleY = 185;
animPeriod
integer: This TokenName is used inside AnimationSources
animPeriod = 1;
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;
access
access = 1;
accuracy
accuracy = 0.5;
aileronSensitivity
aileronsensitivity = 0.66;
ambient
Array: Used by reflectors
ambient[] = {0.070000,0.070000,0.070000,1.000000};
animated
Bool : Used by class models that inherit an animated 'vehicle' to turn those aspects of the vehicle off.
animated = false;
animation...
String: These animation strings point to rtm files to create the movement.
animationFlag = "\AnyAddon\AnyRTM(.rtm)";// to wiggle flag in wind animationOpen = "\AnyAddon\AnyRTM(.rtm)";// to open or close doors (eg) animationDrop = "\AnyAddon\AnyRTM(.rtm)";
animationSource...
animationSourceBody
animationSourceBody = "Turret_2"; animationSourceGun = "Gun_2"; animationSourceHatch = "hatchCommander";
armor Integer
Integer: A strength value of how much external damage can be taken before 'destruction'.
armor = 50; // a helicopter armor = 900; // an Abrams tank
armor (float)
Float: The floating version of armor type is only used in Hit... classes, eg HitTurret HitBody
armor = 1.4; // a bee armor = 0.8;// a turret
armor...
armorBody = 0.4; armorFuel = 1.4; armorGlass = 0.5; armorLights = 0.4; armorWheels = 0.1;
attendant
Bool: Used for 'vehicles' to repair other vehicles. Thus a hospital has an attendant that can repair soldiers.
attendant = true;
audible
audible = 8;
autocenter
autocenter = false;
B
brightness
brightness = 1.000000;
body
body = "mainTurret";
C
..can
canBeShot
Used in: cfgNonAiVehicles Boolean: Declares whether bullets have any effect
canBeShot = true;
canFloat
Boolean: Used to allow vehicles (such as BMP) not to sink !
canFloat = true;
canLock
canLock = 0;
camouflage
camouflage = 4;
cast...Shadow
castCargoShadow = true; castDriverShadow = false; castGunnerShadow = true;
...CanSee
String (math formula)
gunnerCanSee = "4+8+16 +1"; commanderCanSee = 31; // this appears to be wrong
...CargoAngleY
Integer degrees
initCargoAngleY = 10; minCargoAngleY = -60; maxCargoAngleY = 120;
cargoIsCoDriver
cargoIsCoDriver[] = {false,false,false,false,true};// 5th position in this vehicle
The number of elements in this array correspond to the #transportSoldier value declared for this class model.
cast...Shadow
castCargoShadow
castCargoShadow = true;
castDriverShadow
castDriverShadow = 1;
castGunnerShadow
Boolean: part of Turret class
castGunnerShadow = 1;
cloud...
Various (Strings,Floats,Arrays)
cloud.. TokenNames are used inside the Smoke class of animation classes
cloudletDuration = 0.900000; cloudletAnimPeriod = 1.000000; cloudletSize = 0.100000; cloudletAlpha = 0.800000; cloudletGrowUp = 0.400000; cloudletFadeIn = 0.000000; cloudletFadeOut = 5.000000; cloudletAccY = -0.100000; cloudletMinYSpeed = 0.300000; cloudletMaxYSpeed = 1.500000; cloudletShape = "\ca\data\cl_basic"; cloudletColor[] = {1,1,1,0};
cobraLight
String : Used as a core model for all other 'air' craft.
cobraLight = "AnyAddon\AnyP3d(.p3d)";
coefInside...
coefInside = 0.5; coefInsideHeur = 0.8;
color
Array: of floats. Used by reflectors
color[] = {0.800000,0.800000,1.000000,1.000000};
commanding
Integer: part of Turret class
commanding = -1;
cost
Integer: This value reflects the attractiveness of the target to the enemu ai. _when_ all other considerations are equal. A soldier eg is not interested in Air, despite it's highly attractive cost values. On the other hand, he is interested in a medic, since a medic (in normal configs) has a (whiel small) a higher cost, than others in the group, including the officer.
cost = 10000000;// an air vehicle is tyoically this value cost = 8; // a medic; cost = 1; // a grunt cost = 4; // an officer cost = 0; // most buildings;
crew
String: Reflects whether vehicle is manned, and what.
crew = "SoldierWPilot";
count (string)
String: (math formula). Used in magazine class to declare amount (of bullets)
count = "30*1";
D
dammageHalf
Variable String Array:
dammageHalf[] = {"\AnyAddon\AnyPAA.paa","\AnyAddon\AnyOtherPAA.paa", ...};
When 'vehicle' is considered at least half way to destruction, the series of pictures is applied to the model.
dammageFull
Array: of varable number of strings
dammageFull[] = {"\AnyAddon\AnyPAA.paa","\AnyAddon\AnyOtherPAA.paa", ...};
see #dammageHalf for the self evident difference.
damper...
damperSize = 0.100000; damperForce = 1;
direction
direction = "konec L svetla";
displayName
String: This value is used to select the unit in the Mission Editor, as well as when pointing your team to an object in the game.
Ordinaruly it is good practice to acess the stringtable.csv that accompanies the addont so that
- all names and labels are in one place
- for language differences
displayName = "$STR_DN_AH1Z";
displayNameShort
displayNameShort = "$STR_DN_UH60";
deltaT
Integer: This TokenName is used inside the Smoke class of animation classes
deltaT = -500;
density
Float: This TokenName is used inside the Smoke class of animation classes
density = 0.5;
destrType
String: used for animation, sound, and final 'look' of vehicle.
destrType = "DestructBuilding"; destrType = "DestructNo"; destrType = "DestructEngine"; destrType = "DestructTree";
driverCanSee
String (math formula)
driverCanSee = "2+8";
driverIsCommander
driverIsCommander = true;
driverForceOptics
driverForceOptics = true;
E
...Elev
Integer:Degrees
initElev = -80; minElev = -60; maxElev = 10;
ejectDamageLimit
Float: You can get hurt, but you can't die with vals less than 1.0
ejectDamageLimit = 0.750000;
ejectSpeed
ejectSpeed[] = {0,0,0};
ejectDead...
ejectDeadGunner = false; ejectDeadCargo = true;
enableSweep
enableSweep = false;
envelope
envelope[] = {0.000000,0.000000,0.300000,1.000000,2.500000,3.300000,3.500000,3.200000,2.500000,2.000000,1.500000,1.000000};
elevatorSensitivity
elevatorSensitivity = 0.2;
extCameraPosition[]
extCameraPosition[] = {0,2,-15};
F
fired
fired = "_this exec ""\AnyAddon\AnySQS.sqs"""; // note the ""
flapsFrictionCoef
flapsFrictionCoef = 2;
forceHide...
forceHideDriver = true; forceHideGunner = false;
fov
fov = 0.500000;
...Fov
initFov = 0.100000; minFov = 0.030000; maxFov = 1.200000;
flySound
flySound[] = {"\AddonName\AnySound.wss",0.000000,1,1};
see #sound...
fuelCapacity
fuelCapacity = 246;
G
gun
gun = "mainGun";
gearRetracting
gearRetracting = 1;
gunAimDown
gunAimDown = 0.07;
gunBeg
gunBeg = "muzzle_1";
gunEnd
gunEnd = "chamber_1";
gunnerHasFlares
gunnerHasFlares = false;
...GunnerMayFire
outGunnerMayFire = true; inGunnerMayFire = false;
gunnerOutOptics...
gunnerOutOpticsModel = "";
gunnerOutOpticsColor[] = {0,0,0,1};
gunnerOutForceOptics = false;
gunnerOutOpticsShowCursor = false;
gunnerName
gunnerName = "$STR_POSITION_CREWCHIEF";
gunnerUsesPilotView
gunnerUsesPilotView = 1;
H
...Height
minHeight = 5; //Min height in metres above sealevel. maxHeight = 50;//max height above sea level. avgHeight = 10;
hideProxyInCombat
hideProxyInCombat = 0;
hiddenSelections[] = {"pruh"};
hitpoint
hitpoint = "L svetlo";
has...
hasGunner = false; hasCommander = true;
I
icon
This value us used exclusively by the map editor to show the building or vehicle when editing. It is not normally visible during game play.
The icon can be any jpg, paa, or pac file. paa is default.
icon = "\AnyAddon\AnyPAA(.paa)";
in
Float: This TokenName is used inside the Smoke class of animation classes
in= 0.0;
see #out
init
init = "[(_this select 0)] exec ""\AnyAddon\AnySqs.sqs"""; // note the ""
initT
Integer: This TokenName is used inside the Smoke class of animation classes
initT = 1000;
initYSpeed
Float: This TokenName is used inside the Smoke class of animation classes
initYSpeed = 1.7;
interval
Float: This TokenName is used inside the Smoke class of animation classes
interval = 0.010000;
irScanGround
irScanGround = 0;
irScanToEyeFactor
irScanToEyeFactor = 5;
irScanRange...
irScanRange = 4000; irScanRangeMin = 4000; // a vulcan irScanRangeMax = 10000; // a shilka
irTarget
Bool: Used for buildings so that they don't show up on tank radar
irTarget = false;
K
killed
killed = "[(_this select 0),1,1,0,0] exec ""\AnyAddon\AnySQS.sqs""";// note the ""
L
ladders[]
Embedded Array: The ladders array is used to declare one or more ladder pairs inside the model.
ladders[] = { {"start","end" } }; // a building wiht one ladder ladders[] = { {"start1","end1" } , {"start2","end2" } };// two ladder building //etc
Note that unfortunately, the 'start' and 'end' labels are arbitrary for each model. You cannot have a generic ladder building as such.
laserscanner
Boolean: Determines if a vehicle has laser capability.
laserScanner = true;
landingSpeed
landingSpeed = 75;
landingAoa
String (math formula) Landing Angle of Approach
landingAoa = "3.5*3.1415/180";
library
String: This TokenName is associated with the library class of a vehicle (if any). It is used to give a 'memo' style full screen info on the given object. Example of use:
class Library { libTextDesc = "$STR_LIB_AH1Z"; };
M
magazine
Array: used in TransportMagazines class this specifies the type of ammo in the magzine and the amount.
magazine = "30Rnd_556x45_Stanag"; count = "30*1";
mapSize
Float: Used for the map editor to show the icon associated with this model class. See #icon
There is no x y component to this, the meaurement units are meters.
To creat a circular, rectangular or other 'non sqaure' image, you need to make a pac file for the icon with, a transparent layer.
mapSize = 0.700000; // small object such as a tree
magazines
Array: variable strings
magazines[] = {"750Rnd_M197_AH1","38Rnd_FFAR","8Rnd_Hellfire"};
marker
String : used as a core for all other air craft when looking on map.
marker = "\AnyAddon\AnyP3d.(p3d")";
material
material = 50;
mainRotorSpeed
mainRotorSpeed = -1;
maxT
Integer: This TokenName is used inside the Smoke class of animation classes
maxT = 0;
backRotorSpeed
Float backRotorSpeed = 1.0;
hmmm, that's curious, it accepts floats or ints.
memoryPointExhaust...
memoryPointExhaust = "exhaust_start"; memoryPointExhaustDir = "exhaust_end";
memoryPointsGetIn...
memoryPointsGetInCargo = "pos_cargo"; memoryPointsGetInCoDriver = "pos_codriver"; memoryPointsGetInCommander = "pos_commander"; memoryPointsGetInDriver = "pos_driver"; memoryPointsGetInGunner = "pos gunner";
memoryPointsGetIn...Dir
memoryPointsGetInCargoDir = "pos_cargo_dir"; memoryPointsGetInCoDriverDir = "pos_codriver_dir"; memoryPointsGetInCommanderDir = "pos_commander_dir"; memoryPointsGetInDriverDir = "pos_driver_dir"; memoryPointsGetInGunnerDir = "pos gunner dir";
memoryPointGun
memoryPointGun = "machinegun";
memoryPointGunnerOptics
memoryPointGunnerOptics = "gunnerview";
memoryPointGunnerOutOptics
memoryPointGunnerOutOptics = "commander_weapon_view";
memoryPoint...Missile
memoryPointLMissile = "Missile_1"; memoryPointRMissile = "Missile_2";
memoryPoint...Rocket
memoryPointLRocket = "Rocket_1"; memoryPointRRocket = "Rocket_2";
memoryPointSupply
memoryPointSupply = "supply";
memoryPointTrack...
memoryPointTrackFLL = "tyreTrack_1_1l"; memoryPointTrackFLR = "tyreTrack_1_1r"; memoryPointTrackBLL = "tyreTrack_1_2l"; memoryPointTrackBLR = "tyreTrack_1_2r"; memoryPointTrackFRL = "tyreTrack_2_1l"; memoryPointTrackFRR = "tyreTrack_2_1r"; memoryPointTrackBRL = "tyreTrack_2_2l"; memoryPointTrackBRR = "tyreTrack_2_2r";
model
String: Location in the addon where the p3d model resides. Can be subfolder
model = "\AddonName\anyp3d(.p3d)"; // can be ""
N
name
name = "motor";
nameSound
String: Namesound is used by the AI audio to indicate verbally where to go, what 'vehicle' to attack. This the audio speech "move to 'rock' 3 o'clock' is derived from the namesound.
nameSound = "rock";
typically, a collection of buildings (eg) will be configured as follows
class GenBuilding : NonStrategic { scope=private; // internal use only VehicleClass="Some Editor Group Name"; namesound="house"; }; class YellowBuilding: GenBuilding { scope=public; name="YellowBuilding"; model="Some yellow building.p3d"; };
noseDownCoef
noseDownCoef = 0.025;
O
...OpticsModel
commanderOpticsModel
commanderOpticsModel= "\AnyPbo\AnyP3d(.p3d)";
driverOpticsModel
driverOpticsModel = "\AnyPbo\AnyP3d(.p3d)";
gunnerOptics...
gunnerOpticsModel
gunnerOpticsModel= "\AnyPbo\AnyP3d(.p3d)";
gunnerOpticsShowCursor
gunnerOpticsShowCursor = true;
out
Float: This TokenName is used inside the Smoke class of animation classes
out= 0.0;
see #in
P
passThrough
passThrough = 1;
picture
String: I think this is for briefing Information icon click
picture = "\AnyAddon\AnyPAA(.paa)";
position
Float: This TokenName is used inside the Light class of animation classes
position = "ohniste";
primary
Boolean: For models that can have, (but don't necessarily do have) multiple internal objects of the same type (turrets eg). One of them, is declated the main, or primary turret. There may indeed be only one 'turret'.
primary = true;
primary...
primaryGunner = false; primaryObserver = true;
proxyIndex
proxyIndex = 2;
proxyType
proxyType = "CPCommander";
position
position = "L svetlo";
R
reversed
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;
rotor...
rotorBig
rotorBig = "vrtule_velka";
rotorBigBlend
rotorBigBlend = "vrtule_velka_bl";
rotorSmall
rotorSmall = "vrtule_mala";
rotorSmallBlend
rotorSmallBlend = "vrtule_mala_bl";
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.
selection
selection = "L svetlo";
Selection...
selectionBackLights
selectionBackLights = "light_back";
selectionBrakeLights
selectionBrakeLights = "light_brake";
selectionFireAnim
selectionFireAnim = "muzzleflash";
selectionHRotorStill
selectionHRotorStill= "mainRotorStatic";
selectionHRotorMove
selectionHRotorMove = "mainRotorBlurred";
selectionVRotorStill
selectionVRotorStill = "tailRotorStatic";
selectionVRotorMove
selectionVRotorMove = "tailRotorBlurred";
shape
Float: This TokenName is used inside the Light class of animation classes
shape = "koulesvetlo";
size
Float: This TokenName is used inside the Smoke class of animation classes
size = 0.1;
side
Integer: The side, when declared, sets the 'vehicle' on east west resistance civilian. The effect differs according to the 'vehicle' itself. Eg soldiers, versus hospitals or repair trucks that can only be used by same side, if specifically sided.
Well written missions (and configs) use defines at top of file to make this more legible.
#define WEST 0 #define EAST 1 #define CIVILIAN 2 #define NOSIDE 3 etc... side = EAST;
simulation
String: Refers to the building's characteristics
simulation = "thing"; simulation = "fire";
simulation
String: The engine behaviour with this #model.
simulation = "SeaGull";// campfire,house, etc
singSound
Array: normally for a bird see #sound...
singSound[] = {"\AddonName\SoundFile.ogg",0.031623,1,1};
showgunneroptics
showgunneroptics = 0;
sound
NameTokenValueTypes:String : Used by animated objects (campfire eg) to give sound effect.
sound = "Fire";
sound[]
Complex Array:
sound[] = {"\anyPbo\AnySound(.wss)",10.000000,1};
sound...
also see #flySound , #singSound
soundCrash
soundCrash[] = {"\AnyAddon\AnySound(.wss)",0.010000,1};
soundDammage
soundDammage[] = {"\AnyAddon\AnySound(.wss)",0.010000,1};
soundEngine
soundEngine[] = {"\AnyAddon\AnySound(.wss)",5.623414,1};
soundEnviron
Array complex.
soundEnviron[] = {"\AnyAddon\AnySound(.wss)",0.100000,1.000000};
soundGear
Array complex.
soundGear[] = {"\AnyAddon\AnySound(.wss)",0.316228,1};
SoundGetIn
SoundGetIn[] = {"\AnyAddon\AnySound(.wss)",0.010000,1};
soundGetOut
soundGetOut[] = {"\AnyAddon\AnySound(.wss)",0.010000,1};
soundLandCrash
soundLandCrash[] = {"\AnyAddon\AnySound(.wss)",0.010000,1};
soundServo
soundServo[] = {"\AnyAddon\AnySound(.wss)",0.100000,1.000000};
soundWaterCrash
soundWaterCrash[] = {"\AnyAddon\AnySound(.wss)",0.010000,1};
source
String: found in animationSources
source = "reload"; source = "time";
sourceAddress
String: found in animationSources
sourceAddress = "loop";
...Speed
Float: In Kph.
minSpeed = -0.500000; //range 0->1 maxSpeed = 20;
straightDistance
Used in: cfgNonAiVehicles
straightDistance = 50;
supplyRadius
Float: new In meters. This token-name lets cars (eg) fill from petrol stations (eg) without having to bang into them, or be at 'exact' angles.
supplyRadius = 2.500000;
T
...Turn
Integer Degrees
initTurn = 90; minTurn= -70; maxTurn = 70;
turning
Used in: cfgNonAiVehicles
Boolean: (i think)
turning = 1;
turnCoef
turnCoef = 6.0;
terrainCoef
terrainCoef = 6.0;
threat
Array: This three element array reperesents the threat this 'vehicle' has to the enemy ai.
The 3 components of the 'threat' are land threat, air threat, sea threat. In the exampe below for a cobra. It is not too dangerous for land 'vehicles' (men and machines) bit deadly against other air vehicles and nasty to boats.
The ai for this model selects targets of opportunity, based on these values.
threat[] = {0.300000,1,0.800000};
see #type
timeToLive
Float: This TokenName is used inside the Smoke class of animation classes
timeToLive = 100000002004087730000.0;
transport...
transportAmmo
Integer: Used by ammo supply 'vehicles' to determine total amount avaialable for entire mission. Once depleted...
transportAmmo = 300000;
transportFuel
Integer: Used by refule 'vehicles' to determine total amount avaialable for entire mission. Once depleted...
transportFuel = 3000;
transportRepair
Integer: Used by repair 'vehicles' to determine total amount avaialable for entire mission. Once depleted...
transportRepair = 200000000;
transportSoldier
Integer: Number of units this vehicle can carry.
transportSoldier = 13;
transportMaxMagazines
transportMaxMagazines = 150;
transportMaxWeapons
transportMaxWeapons = 30;
typicalCargo
Array: variable strings. Preloads veicle with units (if auto)
typicalCargo[] = {"Soldier","Soldier","SoldierLAW","SoldierLAW"};
type
Integer: this indicates the threat type of the 'vehicle' in well written configs, the 3 possible values are declared as defines at top of file for legibility
#define LAND 0 #define SEA 1 #define AIR 2
type = AIR;
see #threat
U
unitInfoType
unitInfoType = "UnitInfoSoldier";
V
viewGunnerInExternal
Boolean: part of Turret class
viewGunnerInExternal = true;
viewCargoShadow
viewCargoShadow = true;
viewGunnerShadow
Boolean: part of Turret class
viewGunnerShadow = true;
vehicleClass
String: Used for Mission Editor basic category selection
vehicleClass = "Air";
W
weapon
String: found in animationSources
weapon = "M197";
weapons[]
Array: an array of selectable weaponry for the given 'vehicle'
weapons[] = {"FFARLauncher","TwinM134"};
wheelCircumference
wheelCircumference = 4.513000;
wheelSteeringSensitivity
wheelSteeringSensitivity = 0.500000;