Turret Config Reference: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 3: Line 3:
=Introduction=
=Introduction=


OFP used an optional turret class for some, few, models.
ARMA uses a '''Turrets''' (plural) class.
Generally, there is only a single "MainTurret" in the turrets class of any model that wants to have one. Or put another way, any model that has any turrets at all, will have a MainTurret class plus additionals if any.
This (often empty) Turrets class is embedded in the class heirarchy of many generic base models. A generic base model == Tank eg. Ie, a generic class that all real tanks inherit. For the given tank (a T80 eg), it is expected, that values will be filled into the (often empty) Turrets class already provided. Some model families (HMMV_Base eg) flesh out this turrets class for all their children, others don't. The principle being, that many child models will inherit a Turrets class whether they want it or not.
As a consequence, '''many''' models that don't have turrets require
class Turrets{};
Ie, their parent (or parents) have inherited a Turret class that needs to be ignored (for this model and it's children). It is good practice to put the above statement in your model (if you dont use turrets). A later change by you to a 'better' (tm) parent might introduce unexpected errors if that parent has a turrets class and you didn't want one anyway.
== Creating ==
Creating any turret (singular) class for your model involves the use of
class cfgVehicles
{
  class SomeModel //AllVehicles eg
  {
  class NewTurret;  // derive from your base base base class
  };
  class MyGreatModel:SomeModel // AllVehicles eg
  {
  class Turrets
  {
    class MainTurret : NewTurret // build (or overwrite) a completely new turret
    {
        ...
    };
    class MoreTurrets :NewTurret // if any
  };
};
AllVehicles is the lowest possible base class where you can obtain a pristine NewTurret class. It would be an unusual model to inherit directly from AllVehicles (you might derive NewTurret from there, again, unusual), but you are unlikely to INHERIT AllVehicles directly. More likely, you've got some other generic class that fills in much of the donkey work. For the purposes of obtaining a NewTurret, it matters diddly squat where it comes from. ALL models have one. Used, or not.
== Inheriting ==
There are of course, derivations on the theme, aka
class cfgVehicles
{
  class Ship;
  class Boat: Ship
  {
  class Turrets;    // your model has to inerit from somewhere!!!
  class NewTurret;  // create an entirely new animal OR
  class MainTurret;  // twiddle what's aleady there IF THERE !!!
  };
  class MyGreatModel:Boat
  {
  class Turrets::Turrets
  {
    class MainTurret : NewTurret  //create an entirely new one OR
    class MainTurret : MainTurret // just twiddle a few things from the generic class
    {
        ....
    };
  };
};
The bottom line is that, ultimately, your turret will attach a '''NewTurret class''' (whether inherited, or, created right then)
'''ALL''' models, ultimately, derive their turret(s), from this one, singular, NewTurret class.
The NewTurret class is embedded in '''ALL''' Vehicle classes (via the bin/config.bin). It can be used, or ignored, but it's unconditially there.
The following alphabetical sort describes all values that can be set in YOUR derived NewTurret (eg your MainTurret)
==Notes==
*In the following list, the default value is declared. Ie the value that comes from the (sometimes inherited) NewTurret class. There should be no requirement to restate a default value unless the class you inherit from has done so.
*Some values cannot be known by the NewTurret class and are defaulted to empty. They need you, to fill them in. They are of course string values pertaining to YOUR model.
Very fortunately, these values (memory points eg), are almost universal. It is a strange and wonderful model indeed that strays from the standard Czech names for these points.
In General, an inherited model will have already had these standard Czech names supplied by the parent. So at best, they are *generally* not required to be stated, and at worst, using the 'example' name supplied in the alpabetic list below is a fairly sage bet. (if you haven't got an OctoVez in your model,it's your problem, isn't it)
= Alpahbetic =
=A=
=A=


== animationSourceBody ==
== animationSourceBody= "mainTurret" ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes|String]]: Creates a new animation source for use with this turret's body in the cfgModels class.
'''Description:''' Creates a new animation source for use with this turrets body in the cfgModels class.
animationSourceBody="mainTurret";


== animationSourceGun ==
== animationSourceGun= "mainGun" ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes|String]]: Creates a new animation source for use with this turret's gun in the cfgModels class.
'''Description:''' Creates a new animation source for use with this turrets gun in the cfgModels class.
animationSourceGun="mainGun";


== animationSourceHatch ==
== animationSourceHatch= "hatchGunner" ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes|String]] :Creates a new animation source for use with this turret's gunner hatch in the cfgModels class.
'''Description:''' Creates a new animation source for use with this turrets gunner hatch in the cfgModels class.
animationSourceHatch="hatchGunner";


=B=
=B=


== body ==
== body= "mainTurret" ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes|String]] :The horizontally moving selection of the turret.
'''Description:''' The horizontally moving selection of the turret.
body="mainTurret";


=C=
=C=
== castGunnerShadow ==
== canHideGunner= true ==
[[TokenNameValueTypes|Boolean]]<br>
[[TokenNameValueTypes#Boolean|Boolean]]
'''Description:''' ???
 
  castGunnerShadow=true;
== castGunnerShadow= false ==
[[TokenNameValueTypes#Boolean|Boolean]]
 
== class GunFire: WeaponFireGun{} ==
== class GunClouds: WeaponCloudsGun{} ==
== class MGunClouds: WeaponCloudsMGun{} ==
 
These all inherit the default external class
 
== class HitPoints ==
  class HitPoints
{
    class HitTurret
    {
    armor = 0.8;
    material = 51;
    name = "turret";
    visual = "turret";
    passThrough = 1;
    };
    class HitGun
    {
    armor = 0.6;
    material = 52;
    name = "gun";
    visual = "gun";
    passThrough = 1;
    };
  };
== class Turrets{} ==
 
no embedded turret(s)
 
== class ViewGunner ==
== class ViewGunner ==
  class ViewGunner
  class ViewGunner
  {
  {
  initAngleX = 5;
    initAngleX = 5;
  minAngleX = -30;
    minAngleX = -85;
  maxAngleX = 30;
    maxAngleX = 85;
  initAngleY = 0;
    initAngleY = 0;
  minAngleY = 0;
    minAngleY = -150;
  maxAngleY = 0;
    maxAngleY = 150;
  initFov = 0.7;
    initFov = 0.7;
  minFov = 0.42;
    minFov = 0.42;
  maxFov = 0.85;
    maxFov = 0.85;
  };
  };
== class ViewOptics ==
== class ViewOptics ==
class ViewOptics
  class ViewOptics
{
  {
  initAngleX = 0;
    initAngleX = 0;
  minAngleX = -30;
    minAngleX = -30;
  maxAngleX = 30;
    maxAngleX = 30;
  initAngleY = 0;
    initAngleY = 0;
  minAngleY = -100;
    minAngleY = -100;
  maxAngleY = 100;
    maxAngleY = 100;
  initFov = 0.6;
    initFov = 0.3;
  minFov = 0.6;
    minFov = 0.07;
  maxFov = 0.6;
    maxFov = 0.35;
};
  };
== commanding ==
 
[[TokenNameValueTypes|Integer]]<br>
== commanding= 1 ==
'''Description:''' The commanding number defines who is in command of the vehicle. The turret with the highest number will be the vehicles commander. If he dies, the crew of the turret with the nearest smaller number will take over command, etc.
[[TokenNameValueTypes#Integer|Integer]] The commanding number defines who is in command of the vehicle. The turret with the highest number will be the vehicles commander. If he dies, the crew of the turret with the nearest smaller number will take over command, etc.
commanding=1;


=E=
=E=


== ejectDeadGunner ==
== ejectDeadGunner= false ==
[[TokenNameValueTypes|Boolean]]<br>
[[TokenNameValueTypes#Boolean|Boolean]] If true, the gunner's body will be ejected when killed.
'''Description:''' If true, the gunners body will be ejected when killed.
ejectDeadGunner=0;


=F=
=F=


== forceHideGunner ==
== forceHideGunner= false ==
[[TokenNameValueTypes|Boolean]]<br>
[[TokenNameValueTypes#Boolean|Boolean]] If true, the gunner will not be able to turn out.
'''Description:''' If true, the gunner will not be able to turn out.
forceHideGunner=0;


=G=
=G=
==  gun= "mainGun" ==
[[TokenNameValueTypes#String|String]]: The verticaly moving selection of the turret. This is, in most cases, the gun itself.
== gunAxis ==
[[TokenNameValueTypes#String|String]]<br>
'''Description:''' Axis selectionname in MemoryLOD (for the gun axis, ie mouse up and down input).
gunAxis="OsaHlavne";


== gun ==
== gunBeg= "" ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes#String|String]] The name of the barrel's front point in the model.
  gun="mainGun";
  '''example''': gunBeg="usti hlavne";
== gunEnd= "" ==
[[TokenNameValueTypes|String]] The name of the barrel's rear point in the model.
'''example''': gunEnd="konec hlavne";
 
== gunnerAction= "" ==
[[TokenNameValueTypes#String|String]] The name of the animation the gunner is using while turned out.
 
== gunnerCompartments= "Compartment1" ==
[[TokenNameValueTypes#String|String]] Only units sharing a compartment can switch seats.
 
==gunnerFireAlsoInInternalCamera= true ==
[[TokenNameValueTypes#Boolean|Boolean]]
 
== gunnerForceOptics= true ==
[[TokenNameValueTypes#Boolean|Boolean]]  Forces the gunner to use optics while turned in.
 
==gunnerGetInAction= "" ==
[[TokenNameValueTypes#String|String]] ???
 
==gunnerGetOutAction= "" ==
[[TokenNameValueTypes#String|String]] ???
 
== gunnerInAction= "" ==
[[TokenNameValueTypes#String|String]] The name of the animation the gunner is using while turned in.


'''Description:''' The verticaly moving selection of the turret. This is, in most cases, the gun itself.
== gunnerName= "Gunner" ==
[[TokenNameValueTypes#String|String]] Allows to use a custom string for the name of the turret.


== gunnerAction ==
'''example''' gunnerName="Rear Gunner";
[[TokenNameValueTypes|String]]<br>
'''Description:''' The name of the animation the gunner is using while turned out.
gunnerAction="";


== gunAxis ==
== gunnerOpticsColor[]= {0,0,0,1} ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes#Array|Array]]
'''Description:''' Axis selectionname in MemoryLOD (for the gun axis, ie mouse up and down input).
gunAxis="OsaHlavne";


== gunBeg ==
== gunnerOpticsEffect[]= {} ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes#Array|Array]]  
'''Description:''' The name of the barrels front point in the model.
gunBeg="usti hlavne";


== gunnerCompartments ==
== gunnerOpticsModel= "" ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes#String|String]] The optics model used when gunner is not turned out.
'''Description:''' Only units sharing a compartment can switch seats.
gunnerCompartments="Compartment1";


== gunEnd ==
'''example''': gunnerOpticsModel="\ca\Tracked\optika_tank_gunner";
[[TokenNameValueTypes|String]]<br>
'''Description:''' The name of the barrels rear point in the model.
gunEnd="konec hlavne";


== gunnerInAction ==
== gunnerOutFireAlsoInInternalCamera= true ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes#Boolean|Boolean]]
'''Description:''' The name of the animation the gunner is using while turned in.
gunnerInAction="";


== gunnerName ==
== gunnerOutForceOptics= false ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes#Boolean|Boolean]] Forces the gunner to use optics while turned out.
'''Description:''' Allows to use a custom string for the name of the turret.
gunnerName="Rear Gunner";


== gunnerOpticsModel ==
== gunnerOutOpticsColor[]= {0,0,0,1} ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes#Array|Array]]
'''Description:''' The optics model used when gunner is not turned out.
gunnerOpticsModel="\ca\Tracked\optika_tank_gunner";


== gunnerForceOptics ==
== gunnerOutOpticsEffect[]= {} ==
[[TokenNameValueTypes|Boolean]]<br>
[[TokenNameValueTypes#Array|Array]]  
'''Description:''' Forces the gunner to use optics while turned in.
gunnerForceOptics=1;


== gunnerOutOpticsModel ==
== gunnerOutOpticsModel= "" ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes|String]]<br>
'''Description:''' The optics model used when gunner is turned out.
'''Description:''' The optics model used when gunner is turned out.
  gunnerOutOpticsModel="\ca\Weapons\optika_empty";
  gunnerOutOpticsModel="\ca\Weapons\optika_empty";


== gunnerOutForceOptics ==
[[TokenNameValueTypes|Boolean]]<br>
'''Description:''' Forces the gunner to use optics while turned out.
gunnerForceOutOptics=1;


== gunnerUsesPilotView ==
== gunnerOutOpticsShowCursor= false ==
[[TokenNameValueTypes|Boolean]]<br>
[[TokenNameValueTypes#Boolean|Boolean]]
'''Description:''' The gunner will use the View LOD - Pilot if true.
 
gunnerUsesPilotView=1;
== gunnerUsesPilotView= false ==
[[TokenNameValueTypes#Boolean|Boolean]] The gunner will use the View LOD - Pilot if true.
 


=H=
=H=


== hasGunner ==
== hasGunner= true ==
[[TokenNameValueTypes|Boolean]]<br>
[[TokenNameValueTypes#Boolean|Boolean]] If true, the turret will be manned when the vehicle is placed in the editor.
'''Description:''' If true, the turret will be manned when the vehicle is placed in the editor.
hasGunner=1;


== hideWeaponsGunner ==
== hideWeaponsGunner= true ==
[[TokenNameValueTypes|Boolean]]<br>
[[TokenNameValueTypes#Boolean|Boolean]] If true, the gunners weapons (his rifle) will not be displayed.
'''Description:''' If true, the gunners weapons (his rifle) will not be displayed.
hideWeaponsGunner=1;


=I=
=I=


== InGunnerMayFire ==
== InGunnerMayFire= true ==
[[TokenNameValueTypes|Boolean]]<br>
[[TokenNameValueTypes#Boolean|Boolean]] If true, the gunner will be able to fire the turrets weapons while inside the vehicle.
'''Description:''' If true, the gunner will be able to fire the turrets weapons while inside the vehicle.
 
inGunnerMayFire=1;
== initElev= 0 ==
[[TokenNameValueTypes#Degrees|Degrees]] The initial elevation of the gun.
== initTurn= 0 ==
[[TokenNameValueTypes#Degrees|Degrees]] The initial turn of the turret.
 
=L=


== initElev ==
== lockWhenDriverOut= false ==
[[TokenNameValueTypes|Float]]<br>
[[TokenNameValueTypes#Boolean|Boolean]] If true, the turret can not be moved while the driver is turned out.
'''Description:''' The initial elevation of the gun.
initElev=0;


== initTurn ==
== lockWhenVehicleSpeed= -1 ==
[[TokenNameValueTypes|Float]]<br>
[[TokenNameValueTypes#Integers|Integer]]
'''Description:''' The initial turn of the turret, unit is deegres
InitTurn=0;


=L=
== LODTurnedIn= -1 ==
[[TokenNameValueTypes#Integers|Integer]]


== lockWhenDriverOut ==
== LODTurnedOut= -1 ==
[[TokenNameValueTypes|Boolean]]<br>
[[TokenNameValueTypes#Integers|Integer]]
'''Description:''' If true, the turret can not be moved while the driver is turned out.
lockWhenDriverOut=0;


=M=
=M=


== magazines[] ==
== magazines[]= {} ==
[[TokenNameValueTypes|Array]]<br>
[[TokenNameValueTypes|Array]] An array made of all magazines this turret is equipped with.
'''Description:''' An array made of all magazines this turret is equipped with.
magazines[]={"BigGunMagazine","SmallGunMagazine"};


== maxElev ==
'''example''' magazines[]={"BigGunMagazine","SmallGunMagazine"};
[[TokenNameValueTypes|Float]]<br>
'''Description:''' The maximum elevation of the gun.
maxElev=20;


== maxHorizontalRotSpeed ==
== maxElev= 20 ==
[[TokenNameValueTypes|Float]]<br>
[[TokenNameValueTypes#Degrees|Degrees]] The maximum elevation of the gun.
'''Description:''' The maximum horizontal speed of the turret, unit unknown.
maxHorizontalRotSpeed=1.200000;


== maxTurn ==
== maxHorizontalRotSpeed= 1.2 ==
[[TokenNameValueTypes|Float]]<br>
[[TokenNameValueTypes|Float]] The maximum horizontal speed of the turret, unit unknown.
'''Description:''' The maximum turn of the turret, unit is deegres.
maxTurn=+360;


== maxVerticalRotSpeed ==
== maxTurn= 360 ==
[[TokenNameValueTypes|Float]]<br>
[[TokenNameValueTypes#Degrees|Degrees] The maximum turn of the turret, unit is deegres.
'''Description:''' The maximum vertical speed of the turret, unit unknown. Bigger value - bigger rotation speed
maxVerticalRotSpeed=1.200000;


== memoryPointsGetInGunner ==
== maxVerticalRotSpeed= 1.2 ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes|Float]] The maximum vertical speed of the turret, unit unknown. Bigger value - bigger rotation speed
'''Description:''' The name of the get in-point selection for this turret, located in the Memory-LOD of the model.
 
  memoryPointsGetInGunner="pos gunner";
== memoryPointsGetInGunner= "" ==
[[TokenNameValueTypes#Strings|String]] The name of the get in-point selection for this turret, located in the Memory-LOD of the model.
  '''example''': memoryPointsGetInGunner="pos gunner";


== memoryPointsGetInGunnerDir ==
== memoryPointsGetInGunnerDir= "" ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes#Strings|String]] The name of the dir-point selection for this turret, located in the Memory-LOD of the model. It is used to make the gunner face a special direction while entering the vehicle.
'''Description:''' The name of the dir-point selection for this turret, located in the Memory-LOD of the model. It is used to make the gunner face a special direction while entering the vehicle.
  memoryPointsGetInGunnerDir="pos gunner dir";
  memoryPointsGetInGunnerDir="pos gunner dir";


== memoryPointGun ==
== memoryPointGun= "" ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes#Strings|String]] The point in the model where the MG fire of this turret will come from.
'''Description:''' The point in the model where the MG fire of this turret will come from.
  memoryPointGun="machineGun";
  memoryPointGun="machineGun";


== memoryPointGunnerOptics ==
== memoryPointGunnerOptics= "" ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes#String|String]] The point in the model that defines gunner view point.
'''Description:''' The point in the model that defines gunner view point.
  '''example''': memoryPointGunnerOptics="gunnerview";
  memoryPointGunnerOptics="gunnerview";
 
==memoryPointGunnerOutOptics= "" ==
[[TokenNameValueTypes#String|String]]
 
== minElev= -4 ==
[[TokenNameValueTypes#Degrees|Degrees]] The minimal elevation of the gun.
 
== minTurn= -360 ==
[[TokenNameValueTypes#Degrees|Degrees]] The minimal turn of the turret, unit is deegres.


== minElev ==
== missileBeg= "spice rakety" ==
[[TokenNameValueTypes|Float]]<br>
[[TokenNameValueTypes#Strings|String]]  
'''Description:''' The minimal elevation of the gun.
minElev=-4;


== minTurn ==
== missileEnd= "konec rakety" ==
[[TokenNameValueTypes|Float]]<br>
[[TokenNameValueTypes#Strings|String]]  
'''Description:''' The minimal turn of the turret, unit is deegres.
minTurn=-360;


=O=
=O=


== outGunnerMayFire ==
== outGunnerMayFire =false ==
[[TokenNameValueTypes|Boolean]]<br>
[[TokenNameValueTypes#Boolean|Boolean]] If true, the gunner will be able to fire and move(!) the turret while turned out.
'''Description:''' If true, the gunner will be able to fire and move(!) the turret while turned out.
outGunnerMayFire=1;


=P=
=P=


== primaryGunner ==
== primary= 1 ==
[[TokenNameValueTypes|Boolean]]<br>
Unknown: ??
'''Description:''' True if this turret is used by the primary gunner, false else. (!ATT! There can be only ONE primary gunner on a vehicle, else you might get CTD often! If you want to addMagazine smth then it will be ALWAYS on the primaryGunner weapons ONLY!).
== primaryGunner= true ==
primaryGunner=1;
[[TokenNameValueTypes#Boolean|Boolean]] True if this turret is used by the primary gunner, false else. (!ATT! There can be only ONE primary gunner on a vehicle, else you might get CTD often! If you want to addMagazine smth then it will be ALWAYS on the primaryGunner weapons ONLY!).


== primaryObserver ==
== primaryObserver= false ==
[[TokenNameValueTypes|Boolean]]<br>
[[TokenNameValueTypes#Boolean|Boolean]] True if this turret is used by the primary observer (e.g. tank commander), false else.
'''Description:''' True if this turret is used by the primary observer (e.g. tank commander), false else.
primaryObserver=1;


== proxyType ==
== proxyType= "CPGunner" ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes#String|String]]: The proxy type of the turrets gunner, this may be CPGunner or CPCommander. The proxies have to be named according to this setting, so either "proxy:Gunner.XX" or "proxy:Commander.XX".
'''Description:''' The proxy type of the turrets gunner, this may be CPGunner or CPCommander. The proxies have to be named according to this setting, so either "proxy:Gunner.XX" or "proxy:Commander.XX".
proxyType="CPGunner";


== proxyIndex ==
== proxyIndex= 1 ==
[[TokenNameValueTypes|Integer]]<br>
[[TokenNameValueTypes|Integer]]: The proxy index of the turrets gunner. If your proxyType is "CPGunner" and proxyIndex=1, the proxyname must be "proxy:Gunner.01", etc.
'''Description:''' The proxy index of the turrets gunner. If your proxyType is "CPGunner" and proxyIndex=1, the proxyname must be "proxy:Gunner.01", etc.
proxyIndex=1;


=S=
=S=


== selectionFireAnim ==
== selectionFireAnim= "" ==
[[TokenNameValueTypes|String]]<br>
[[TokenNameValueTypes#Strings|String]]  
'''Description:'''
selectionFireAnim="";


== showgunneroptics ==
== showgunneroptics ==
Line 279: Line 372:
  showgunneroptics=true;
  showgunneroptics=true;


== soundServo[] ==
== soundServo[]= {"",0.003162,1.0} ==
[[TokenNameValueTypes|Array]]<br>
[[TokenNameValueTypes|Array]] Sound of the turrets servo, this is played whenever the turret is moving.
'''Description:''' Sound of the turrets servo, this is played whenever the turret is moving.
soundServo[]={"",0.003162,1.000000};


== startEngine ==
== stabilizedInAxes= "StabilizedInAxesBoth" ==
[[TokenNameValueTypes|Boolean]]<br>
[[TokenNameValueTypes#String|String]]
'''Description:''' If true, moving the turret will start the vehicles engine. The engine will stop automatically once the turret stops moving.
 
startEngine=0;
== startEngine= true ==
[[TokenNameValueTypes#Boolean|Boolean]] If true, moving the turret will start the vehicles engine. The engine will stop automatically once the turret stops moving.


=T=
=T=
Line 298: Line 390:
=V=
=V=


== viewGunnerInExternal ==
== viewGunnerInExternal= false ==
[[TokenNameValueTypes|Boolean]]<br>
[[TokenNameValueTypes#Boolean|Boolean]] View gunner in external.
'''Description:''' View gunner in external.
 
viewGunnerInExternal=1;
== viewGunnerShadow= true ==
[[TokenNameValueTypes#Boolean|Boolean]]
 
== viewGunnerShadowDiff= 1.0 ==
[[TokenNameValueTypes#Float|Float]]
 
== viewGunnerShadowAmb= 1.0 ==
[[TokenNameValueTypes#Float|Float]]
 


=W=
=W=


== weapons[] ==
== weapons[]= {} ==
[[TokenNameValueTypes|Array]]<br>
[[TokenNameValueTypes|Array]] An array made of all weapons this turret is armed with.
'''Description:''' An array made of all weapons this turret is armed with.
 
  weapons[]={"BWMod_L55","BWMod_MG3_veh"};
'''example''': weapons[]={"BWMod_L55","BWMod_MG3_veh"};


[[Category:ArmA: Addon Configuration]]
[[Category:ArmA: Addon Configuration]]

Revision as of 11:45, 4 June 2010

Template:Stub

Introduction

OFP used an optional turret class for some, few, models.

ARMA uses a Turrets (plural) class.

Generally, there is only a single "MainTurret" in the turrets class of any model that wants to have one. Or put another way, any model that has any turrets at all, will have a MainTurret class plus additionals if any.

This (often empty) Turrets class is embedded in the class heirarchy of many generic base models. A generic base model == Tank eg. Ie, a generic class that all real tanks inherit. For the given tank (a T80 eg), it is expected, that values will be filled into the (often empty) Turrets class already provided. Some model families (HMMV_Base eg) flesh out this turrets class for all their children, others don't. The principle being, that many child models will inherit a Turrets class whether they want it or not.

As a consequence, many models that don't have turrets require

class Turrets{};

Ie, their parent (or parents) have inherited a Turret class that needs to be ignored (for this model and it's children). It is good practice to put the above statement in your model (if you dont use turrets). A later change by you to a 'better' (tm) parent might introduce unexpected errors if that parent has a turrets class and you didn't want one anyway.

Creating

Creating any turret (singular) class for your model involves the use of

class cfgVehicles
{
 class SomeModel //AllVehicles eg
 {
  class NewTurret;   // derive from your base base base class
 };
 class MyGreatModel:SomeModel // AllVehicles eg
 {
  class Turrets
  {
   class MainTurret : NewTurret // build (or overwrite) a completely new turret
   {
       ...
   };
   class MoreTurrets :NewTurret // if any
  };
};

AllVehicles is the lowest possible base class where you can obtain a pristine NewTurret class. It would be an unusual model to inherit directly from AllVehicles (you might derive NewTurret from there, again, unusual), but you are unlikely to INHERIT AllVehicles directly. More likely, you've got some other generic class that fills in much of the donkey work. For the purposes of obtaining a NewTurret, it matters diddly squat where it comes from. ALL models have one. Used, or not.


Inheriting

There are of course, derivations on the theme, aka

class cfgVehicles
{
 class Ship;
 class Boat: Ship
 {
  class Turrets;     // your model has to inerit from somewhere!!!
  class NewTurret;   // create an entirely new animal OR
  class MainTurret;  // twiddle what's aleady there IF THERE !!!
 };
 class MyGreatModel:Boat
 {
  class Turrets::Turrets
  {
   class MainTurret : NewTurret   //create an entirely new one OR
   class MainTurret : MainTurret // just twiddle a few things from the generic class
   {
       ....
   };
 };
};

The bottom line is that, ultimately, your turret will attach a NewTurret class (whether inherited, or, created right then)


ALL models, ultimately, derive their turret(s), from this one, singular, NewTurret class.

The NewTurret class is embedded in ALL Vehicle classes (via the bin/config.bin). It can be used, or ignored, but it's unconditially there.

The following alphabetical sort describes all values that can be set in YOUR derived NewTurret (eg your MainTurret)

Notes

  • In the following list, the default value is declared. Ie the value that comes from the (sometimes inherited) NewTurret class. There should be no requirement to restate a default value unless the class you inherit from has done so.
  • Some values cannot be known by the NewTurret class and are defaulted to empty. They need you, to fill them in. They are of course string values pertaining to YOUR model.

Very fortunately, these values (memory points eg), are almost universal. It is a strange and wonderful model indeed that strays from the standard Czech names for these points.

In General, an inherited model will have already had these standard Czech names supplied by the parent. So at best, they are *generally* not required to be stated, and at worst, using the 'example' name supplied in the alpabetic list below is a fairly sage bet. (if you haven't got an OctoVez in your model,it's your problem, isn't it)


Alpahbetic

A

animationSourceBody= "mainTurret"

String: Creates a new animation source for use with this turret's body in the cfgModels class.

animationSourceGun= "mainGun"

String: Creates a new animation source for use with this turret's gun in the cfgModels class.

animationSourceHatch= "hatchGunner"

String :Creates a new animation source for use with this turret's gunner hatch in the cfgModels class.

B

body= "mainTurret"

String :The horizontally moving selection of the turret.

C

canHideGunner= true

Boolean

castGunnerShadow= false

Boolean

class GunFire: WeaponFireGun{}

class GunClouds: WeaponCloudsGun{}

class MGunClouds: WeaponCloudsMGun{}

These all inherit the default external class

class HitPoints

class HitPoints
{
   class HitTurret
   {
    armor = 0.8;
    material = 51;
    name = "turret";
    visual = "turret";
    passThrough = 1;
   };
   class HitGun
   {
    armor = 0.6;
    material = 52;
    name = "gun";
    visual = "gun";
    passThrough = 1;
   };
 };

class Turrets{}

no embedded turret(s)

class ViewGunner

class ViewGunner
{
   initAngleX = 5;
   minAngleX = -85;
   maxAngleX = 85;
   initAngleY = 0;
   minAngleY = -150;
   maxAngleY = 150;
   initFov = 0.7;
   minFov = 0.42;
   maxFov = 0.85;
};


class ViewOptics

  class ViewOptics
  {
   initAngleX = 0;
   minAngleX = -30;
   maxAngleX = 30;
   initAngleY = 0;
   minAngleY = -100;
   maxAngleY = 100;
   initFov = 0.3;
   minFov = 0.07;
   maxFov = 0.35;
  };

commanding= 1

Integer The commanding number defines who is in command of the vehicle. The turret with the highest number will be the vehicles commander. If he dies, the crew of the turret with the nearest smaller number will take over command, etc.

E

ejectDeadGunner= false

Boolean If true, the gunner's body will be ejected when killed.

F

forceHideGunner= false

Boolean If true, the gunner will not be able to turn out.

G

gun= "mainGun"

String: The verticaly moving selection of the turret. This is, in most cases, the gun itself.

gunAxis

String
Description: Axis selectionname in MemoryLOD (for the gun axis, ie mouse up and down input).

gunAxis="OsaHlavne";

gunBeg= ""

String The name of the barrel's front point in the model.

example: gunBeg="usti hlavne";

gunEnd= ""

String The name of the barrel's rear point in the model.

example: gunEnd="konec hlavne";

gunnerAction= ""

String The name of the animation the gunner is using while turned out.

gunnerCompartments= "Compartment1"

String Only units sharing a compartment can switch seats.

gunnerFireAlsoInInternalCamera= true

Boolean

gunnerForceOptics= true

Boolean Forces the gunner to use optics while turned in.

gunnerGetInAction= ""

String ???

gunnerGetOutAction= ""

String ???

gunnerInAction= ""

String The name of the animation the gunner is using while turned in.

gunnerName= "Gunner"

String Allows to use a custom string for the name of the turret.

example gunnerName="Rear Gunner";

gunnerOpticsColor[]= {0,0,0,1}

Array

gunnerOpticsEffect[]= {}

Array

gunnerOpticsModel= ""

String The optics model used when gunner is not turned out.

example: gunnerOpticsModel="\ca\Tracked\optika_tank_gunner";

gunnerOutFireAlsoInInternalCamera= true

Boolean

gunnerOutForceOptics= false

Boolean Forces the gunner to use optics while turned out.

gunnerOutOpticsColor[]= {0,0,0,1}

Array

gunnerOutOpticsEffect[]= {}

Array

gunnerOutOpticsModel= ""

String
Description: The optics model used when gunner is turned out.

gunnerOutOpticsModel="\ca\Weapons\optika_empty";


gunnerOutOpticsShowCursor= false

Boolean

gunnerUsesPilotView= false

Boolean The gunner will use the View LOD - Pilot if true.


H

hasGunner= true

Boolean If true, the turret will be manned when the vehicle is placed in the editor.

hideWeaponsGunner= true

Boolean If true, the gunners weapons (his rifle) will not be displayed.

I

InGunnerMayFire= true

Boolean If true, the gunner will be able to fire the turrets weapons while inside the vehicle.

initElev= 0

Degrees The initial elevation of the gun.

initTurn= 0

Degrees The initial turn of the turret.

L

lockWhenDriverOut= false

Boolean If true, the turret can not be moved while the driver is turned out.

lockWhenVehicleSpeed= -1

Integer

LODTurnedIn= -1

Integer

LODTurnedOut= -1

Integer

M

magazines[]= {}

Array An array made of all magazines this turret is equipped with.

example magazines[]={"BigGunMagazine","SmallGunMagazine"};

maxElev= 20

Degrees The maximum elevation of the gun.

maxHorizontalRotSpeed= 1.2

Float The maximum horizontal speed of the turret, unit unknown.

maxTurn= 360

[[TokenNameValueTypes#Degrees|Degrees] The maximum turn of the turret, unit is deegres.

maxVerticalRotSpeed= 1.2

Float The maximum vertical speed of the turret, unit unknown. Bigger value - bigger rotation speed

memoryPointsGetInGunner= ""

String The name of the get in-point selection for this turret, located in the Memory-LOD of the model.

example: memoryPointsGetInGunner="pos gunner";

memoryPointsGetInGunnerDir= ""

String The name of the dir-point selection for this turret, located in the Memory-LOD of the model. It is used to make the gunner face a special direction while entering the vehicle.

memoryPointsGetInGunnerDir="pos gunner dir";

memoryPointGun= ""

String The point in the model where the MG fire of this turret will come from.

memoryPointGun="machineGun";

memoryPointGunnerOptics= ""

String The point in the model that defines gunner view point.

example: memoryPointGunnerOptics="gunnerview";

memoryPointGunnerOutOptics= ""

String

minElev= -4

Degrees The minimal elevation of the gun.

minTurn= -360

Degrees The minimal turn of the turret, unit is deegres.

missileBeg= "spice rakety"

String

missileEnd= "konec rakety"

String

O

outGunnerMayFire =false

Boolean If true, the gunner will be able to fire and move(!) the turret while turned out.

P

primary= 1

Unknown: ??

primaryGunner= true

Boolean True if this turret is used by the primary gunner, false else. (!ATT! There can be only ONE primary gunner on a vehicle, else you might get CTD often! If you want to addMagazine smth then it will be ALWAYS on the primaryGunner weapons ONLY!).

primaryObserver= false

Boolean True if this turret is used by the primary observer (e.g. tank commander), false else.

proxyType= "CPGunner"

String: The proxy type of the turrets gunner, this may be CPGunner or CPCommander. The proxies have to be named according to this setting, so either "proxy:Gunner.XX" or "proxy:Commander.XX".

proxyIndex= 1

Integer: The proxy index of the turrets gunner. If your proxyType is "CPGunner" and proxyIndex=1, the proxyname must be "proxy:Gunner.01", etc.

S

selectionFireAnim= ""

String

showgunneroptics

Boolean
Description: ???

showgunneroptics=true;

soundServo[]= {"",0.003162,1.0}

Array Sound of the turrets servo, this is played whenever the turret is moving.

stabilizedInAxes= "StabilizedInAxesBoth"

String

startEngine= true

Boolean If true, moving the turret will start the vehicles engine. The engine will stop automatically once the turret stops moving.

T

turretAxis

String
Description: Axis selectionname in MemoryLOD (for the turret axis, ie mouse left and right input).

turretAxis="OsaVeze";

V

viewGunnerInExternal= false

Boolean View gunner in external.

viewGunnerShadow= true

Boolean

viewGunnerShadowDiff= 1.0

Float

viewGunnerShadowAmb= 1.0

Float


W

weapons[]= {}

Array An array made of all weapons this turret is armed with.

example: weapons[]={"BWMod_L55","BWMod_MG3_veh"};