CfgVehicles Config Reference: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
Line 95: Line 95:
   init = "[(_this select 0)] exec ""\AnyAddon\AnySqs.sqs"""; // note the ""
   init = "[(_this select 0)] exec ""\AnyAddon\AnySqs.sqs"""; // note the ""


<hr>
<hr>
====K====
<hr>
=====killed=====
''[[String]]'':
  killed = "[(_this select 0),1,1,0,0] exec ""\AnyAddon\AnySQS.sqs""";// note the ""
<hr>
<hr>
<hr>
<hr>

Revision as of 12:03, 30 June 2006

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};
armor

Float: A strenght value of how much external damage can be taken before 'destrunction'.

  armor = 1.400000;
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;
castGunnerShadow

Boolean: part of NewTurret class

   castGunnerShadow = 1;
commanding

Integer: part of NewTurret class

    commanding = -1;

F


fired

String:

fired = "_this exec ""\AnyAddon\AnySQS.sqs"""; // note the ""

flySound

Used in: cfgNonAiVehicles

Array:

flySound[] = {"\AddonName\AnySound.wss",0.000000,1,1};

Note: String can be empty, eg. ""



G


gunnerAction

String: part of NewTurret class

   gunnerAction = "ManActAH1Gunner";
gunnerOpticsModel

String: part of NewTurret class

   gunnerOpticsModel = "\AnyAddon\AnyP3d(.p3d)";


I


init

String:

  init = "[(_this select 0)] exec ""\AnyAddon\AnySqs.sqs"""; // note the ""


K


killed

String:

  killed = "[(_this select 0),1,1,0,0] exec ""\AnyAddon\AnySQS.sqs""";// note the ""


M


magazines

Array

 magazines[] = {};
material

Integer:

  material = 50;
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 ""
memoryPointsGetInGunner

String: part of NewTurret class

   memoryPointsGetInGunner = "pos gunner";
memoryPointsGetInGunnerDir

String: part of NewTurret class

   memoryPointsGetInGunnerDir = "pos gunner dir";
memoryPointGun

String: part of NewTurret class

   memoryPointGun = "machinegun";
memoryPointGunnerOptics

String: part of NewTurret class

   memoryPointGunnerOptics = "gunnerview";


N


name

String:

  name = "motor";


O


outGunnerMayFire

Boolean: partof NewTurrent class

 outGunnerMayFire = 1;


P


passThrough

Boolean:

 passThrough = 1;


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;
rotorBig

String:

 rotorBig = "vrtule_velka";
rotorBigBlend

String:

 rotorBigBlend = "vrtule_velka_bl";
rotorSmall

String:

 rotorSmall = "vrtule_mala";
rotorSmallBlend

String:

 rotorSmallBlend = "vrtule_mala_bl";

S


scope

Used in: cfgNonAiVehicles

INTEGER:

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.


=====selectionFireAnim = "zasleh"; String: part of NewTurret class

selectionFireAnim = "zasleh";
simulation

Used in: cfgNonAiVehicles

STRING: The engine behaviour with this #model.

simulation = "SeaGull";// campfire,house, etc
soundEngine

Array:

 soundEngine[] = {"\AnyAddon\AnySound(.wss)",5.623414,1};
soundEnviron

Array:

 soundEnviron[] = {"\AnyAddon\AnySound(.wss)",0.100000,1.000000};
soundDammage

Array:

 soundDammage[] = {"\AnyAddon\AnySound(.wss)",0.010000,1};
singSound

Used in: cfgNonAiVehicles

ARRAY: normally for a bird

singSound[] = {"\AddonName\SoundFile.ogg",0.031623,1,1};
straightDistance

Used in: cfgNonAiVehicles

INTEGER:

straightDistance = 50;

T


turning

Used in: cfgNonAiVehicles

BOOLEAN: (i think)

turning = 1;
type

Integer:

 type = 2;


V


viewGunnerShadow

Boolean: part of Turret class

  viewGunnerShadow = 1;


W


weapons[]

Array:

 weapons[] = {};