Advertisement
Guest User

CfgVehicles

a guest
Dec 14th, 2017
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 12.83 KB | None | 0 0
  1. /*  Vehicle classes */
  2. class CfgVehicles {
  3.     /*  A3 DEFAULT INHERITANCE TREE START */
  4.     // Do not modify the inheritance tree, unless you want to alter game's internal configs, or REALLY know what you're doing.
  5.     class LandVehicle;
  6.     class Tank: LandVehicle {
  7.         class NewTurret;
  8.         class Sounds;
  9.         class HitPoints;
  10.     };
  11.     class Tank_F: Tank {
  12.         class Turrets {
  13.             class MainTurret:NewTurret {
  14.                 class Turrets {
  15.                     class CommanderOptics;
  16.                 };
  17.             };
  18.         };
  19.         class AnimationSources;
  20.         class ViewPilot;
  21.         class ViewOptics;
  22.         class ViewCargo;
  23.         class HeadLimits;
  24.         class HitPoints: HitPoints {
  25.             class HitHull;
  26.             class HitEngine;
  27.             class HitLTrack;
  28.             class HitRTrack;
  29.         };
  30.         class Sounds: Sounds {
  31.             class Engine;
  32.             class Movement;
  33.         };
  34.     };
  35.     /*  A3 DEFAULT INHERITANCE TREE END */
  36.  
  37.     /*  Base class  */
  38.     // Include as many unique defines and classes common for all your vehicle classes as possible.
  39.     class Test_Tank_01_base: Tank_F {
  40.         // Basic defines: vehicle class in editor, name displayed, knowledge required to recognize this type of target
  41.         vehicleClass = "Armored";
  42.         displayName = "AMX-Leclerc";
  43.         accuracy = 0.3;
  44.  
  45.         // Model and look defines: paths to model, squad picture and map icon
  46.         model = "\Samples_f\Test_Tank_01\Test_Tank_01";
  47.         picture =   "\A3\armor_f_gamma\MBT_02\Data\UI\MBT_02_Base_ca.paa";
  48.         icon =  "\A3\armor_f_gamma\MBT_02\Data\UI\map_MBT_02_ca.paa";
  49.  
  50.         #include "sounds.hpp"
  51.         #include "physx.hpp"
  52.  
  53.         // AI references
  54.         cost = 1500000;
  55.         damageResistance = 0.02;
  56.         crewVulnerable = false;
  57.  
  58.         // Damage setup
  59.         armor = 500;
  60.         armorStructural = 6;    // Two hulls of same type should take same amount of damage. Use armorStructural to counter the effect of vehicle size on its armor.
  61.  
  62.         //  Weak spots parameters
  63.             //  name: selection in HitPoints LOD - create selections first!
  64.             //  radius: radius of weak spot spheres generated around vertices in HitPoints LOD, tweak before armor
  65.             //  armor: multiplier of total vehicle armor required to destroy given component, tweak after radius
  66.             //  explosionShielding: multiplier of damage caused by explosive rounds, tweak after armor
  67.             //  minimalHit: minimum hit required to receive damage, tweak after explosionSielding
  68.             //  passThrough: how much damage is passed to total vehicle damage
  69.             //  visual: section in Resource LODs and CfgModels section of model.cfg
  70.             //  material: unneeded, leave at -1
  71.  
  72.             // The values are sample. Every vehicle needs to be finetuned separately.
  73.         class HitPoints: HitPoints {
  74.             class HitHull: HitHull {    // Handle internal damage
  75.                 armor=0.8;
  76.                 material=-1;
  77.                 name="telo";
  78.                 visual="zbytek";
  79.                 passThrough=1;
  80.                 minimalHit = 0.14;
  81.                 explosionShielding = 2.0;
  82.                 radius = 0.25;
  83.             };
  84.             class HitEngine: HitEngine {
  85.                 armor=1;
  86.                 material=-1;
  87.                 name="motor";
  88.                 passThrough=0.8;
  89.                 minimalHit = 0.24;
  90.                 explosionShielding = 1;
  91.                 radius = 0.33;
  92.             };
  93.             class HitLTrack: HitLTrack {
  94.                 armor=0.5;
  95.                 material=-1;
  96.                 name="pas_L";
  97.                 passThrough=0;
  98.                 minimalHit = 0.08;
  99.                 explosionShielding = 1.44;
  100.                 radius = 0.3;
  101.             };
  102.             class HitRTrack: HitRTrack {
  103.                 armor=0.5;
  104.                 material=-1;
  105.                 name="pas_P";
  106.                 passThrough=0;
  107.                 minimalHit = 0.08;
  108.                 explosionShielding = 1.44;
  109.                 radius = 0.3;
  110.             };
  111.         };
  112.         class Turrets: Turrets {
  113.             class MainTurret: MainTurret {
  114.                 class Turrets: Turrets {
  115.                     class CommanderOptics: CommanderOptics {
  116.                         // Animation class
  117.                         body = "obsTurret";
  118.                         gun = "obsGun";
  119.  
  120.                         // Animation source
  121.                         animationSourceBody = "obsTurret";
  122.                         animationSourceGun = "obsGun";
  123.  
  124.                         // Servos
  125.                         maxHorizontalRotSpeed = 1.8;    // 1 = 45°/sec
  126.                         maxVerticalRotSpeed = 1.8;      // 1 = 45°/sec
  127.                         stabilizedInAxes = StabilizedInAxesBoth;
  128.                         soundServo[]= {"A3\Sounds_F\vehicles\armor\noises\servo_best", db-40, 1.0,50};
  129.                         minElev=-05;
  130.                         maxElev=+60;
  131.                         initElev=0;
  132.                         minTurn=-360;
  133.                         maxTurn=+360;
  134.                         initTurn=0;
  135.  
  136.                         // Weapon and magazines
  137.                         memoryPointGun = "usti hlavne3";
  138.                         gunBeg = "usti hlavne3";
  139.                         gunEnd = "konec hlavne3";
  140.                         weapons[] = {SmokeLauncher}; // you may need different weapon class to provide firing effects emit from proper position.
  141.                         magazines[] = {SmokeLauncherMag};
  142.  
  143.  
  144.                         // FCS
  145.                         turretInfoType = "RscWeaponRangeZeroing";
  146.                         discreteDistance[] = {100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500};
  147.                         discreteDistanceInitIndex = 0;
  148.  
  149.                         // Optics view
  150.                         memoryPointGunnerOutOptics = "commanderview";
  151.                         memoryPointGunnerOptics= "commanderview";
  152.                         gunnerOpticsModel = "\A3\weapons_f\reticle\Optics_Commander_02_F";
  153.                         gunnerOutOpticsModel = "";  // leave "" to disable optics view
  154.                         gunnerOpticsEffect[] = {};  // post processing effets
  155.                         gunnerHasFlares = 1;    // flare visual effect when looking at light source
  156.                         class ViewOptics: ViewOptics {
  157.                             initAngleX=0;
  158.                             minAngleX=-30;
  159.                             maxAngleX=+30;
  160.                             initAngleY=0;
  161.                             minAngleY=-100;
  162.                             maxAngleY=+100;
  163.                             // Field of view values: 1 = 120°
  164.                             initFov=0.155;
  165.                             minFov=0.034;
  166.                             maxFov=0.155;
  167.                             visionMode[] = {"Normal","NVG","TI"};
  168.                             thermalMode[] = {0,1};
  169.                         };
  170.  
  171.                         // Gunner operations
  172.                         gunnerAction = mbt2_slot2b_out;
  173.                         gunnerInAction = mbt2_slot2b_in;
  174.                         gunnerGetInAction = GetInHigh;
  175.                         gunnerGetOutAction = GetOutHigh;
  176.                         startEngine = 0;    // Turning this turret should not turn engine on.
  177.                         viewGunnerInExternal = 1; // Needed to make gunner possible to be killed with penetrating rounds.
  178.                         outGunnerMayFire = 1;   // Turn off to make player able to look around freely outside optics view.
  179.                         inGunnerMayFire = 1;    // Turn off to make player able to look around freely outside optics view.
  180.  
  181.                         class HitPoints {
  182.                             class HitTurret {
  183.                                 armor = 0.3;
  184.                                 material = -1;
  185.                                 name = "vezVelitele";
  186.                                 visual="vezVelitele";
  187.                                 passThrough = 0;
  188.                                 minimalHit = 0.03;
  189.                                 explosionShielding = 0.6;
  190.                                 radius = 0.25;
  191.                             };
  192.                             class HitGun    {
  193.                                 armor = 0.3;
  194.                                 material = -1;
  195.                                 name = "zbranVelitele";
  196.                                 visual="zbranVelitele";
  197.                                 passThrough = 0;
  198.                                 minimalHit = 0.03;
  199.                                 explosionShielding = 0.6;
  200.                                 radius = 0.25;
  201.                             };
  202.                         };
  203.                         selectionFireAnim = "zasleh3";
  204.                     };
  205.                 };
  206.  
  207.                 // Coaxial gun
  208.                 memoryPointGun = "usti hlavne2";
  209.                 selectionFireAnim = "zasleh2";
  210.  
  211.                 // Main gun
  212.                 gunBeg = "usti hlavne";
  213.                 gunEnd = "konec hlavne";
  214.  
  215.                 // Weapons and magazines
  216.                 weapons[]={cannon_120mm, HMG_NSVT};
  217.                 magazines[]={32Rnd_120mm_APFSDS_shells_Tracer_Red, 16Rnd_120mm_HE_shells_Tracer_Red, 450Rnd_127x108_Ball, 450Rnd_127x108_Ball};
  218.  
  219.                 // Turret servos
  220.                 minElev=-5;
  221.                 maxElev=+20;
  222.                 initElev=10;
  223.                 soundServo[]= {"A3\Sounds_F\vehicles\armor\noises\servo_best", db-40, 1.0,50};
  224.  
  225.                 // FCS
  226.                 turretInfoType = "RscWeaponZeroing";
  227.                 discreteDistance[] = {
  228.                     100,200,300,400,500,600,700,800,
  229.                     900,1000,1100,1200,1300,1400,1500,1600,
  230.                     1700,1800,1900,2000,2100,2200,2300,2400
  231.                 };
  232.                 discreteDistanceInitIndex = 5;
  233.  
  234.                 // Optics view
  235.                 memoryPointGunnerOptics= "gunnerview";
  236.                 gunnerOutOpticsModel = "";
  237.                 gunnerOutOpticsEffect[] = {};
  238.                 gunnerOpticsEffect[] = {};
  239.                 gunnerForceOptics = 1;
  240.  
  241.                 // Field of view values: 1 = 120°
  242.                 class OpticsIn {
  243.                     class Wide: ViewOptics {
  244.                         initAngleX=0;
  245.                         minAngleX=-5;
  246.                         maxAngleX=+20;
  247.                         initAngleY=0;
  248.                         minAngleY=-5;
  249.                         maxAngleY=+20;
  250.                         initFov=0.3;
  251.                         minFov=0.3;
  252.                         maxFov=0.3;
  253.                         visionMode[] = {"Normal","NVG","Ti"};
  254.                         thermalMode[] = {4,5}; //red hot chilli
  255.                         gunnerOpticsModel = "\A3\Weapons_F\Reticle\Optics_Gunner_MTB_02_w_F.p3d";
  256.                         gunnerOpticsEffect[] = {};
  257.                     };
  258.                     class Medium: Wide {
  259.                         gunnerOpticsModel = "\A3\Weapons_F\Reticle\Optics_Gunner_MTB_02_m_F.p3d";
  260.                         initFov=0.07;
  261.                         minFov=0.07;
  262.                         maxFov=0.07;
  263.                     };
  264.                     class Narrow: Wide {
  265.                         gunnerOpticsModel = "\A3\Weapons_F\Reticle\Optics_Gunner_MTB_02_n_F.p3d";
  266.                         initFov=0.028;
  267.                         minFov=0.028;
  268.                         maxFov=0.028;
  269.                     };
  270.                 };
  271.  
  272.                 // Gunner operations and animations
  273.                 gunnerAction = mbt2_slot2a_out;
  274.                 gunnerInAction = mbt2_slot2a_in;
  275.                 forceHideGunner = 0;
  276.                 inGunnerMayFire = 1;    // set to 0 to let gunner look around the internal compartment if modeled
  277.                 viewGunnerInExternal = 1; // Needed to make gunner possible to be killed with penetrating rounds.
  278.  
  279.                 class HitPoints {
  280.                     class HitTurret {
  281.                         armor = 0.8;
  282.                         material = -1;
  283.                         name = "vez";
  284.                         visual="vez";
  285.                         passThrough = 0;
  286.                         minimalHit = 0.02;
  287.                         explosionShielding = 0.3;
  288.                         radius = 0.25;
  289.                     };
  290.                     class HitGun    {
  291.                         armor = 0.3;
  292.                         material = -1;
  293.                         name = "zbran";
  294.                         visual="";
  295.                         passThrough = 0;
  296.                         minimalHit = 0;
  297.                         explosionShielding = 1;
  298.                         radius = 0.25;
  299.                     };
  300.                 };
  301.             };
  302.         };
  303.         /* RETEXTURABILITY  */
  304.         /*
  305.             hiddenSelections[] ={"Camo1","Camo2"};
  306.             hiddenSelectionsTextures[] = {"A3\armor_f_gamma\MBT_01\Data\MBT_01_body_CO.paa","A3\armor_f_gamma\MBT_01\Data\MBT_01_tow_CO.paa"};
  307.         */
  308.  
  309.  
  310.         class AnimationSources : AnimationSources
  311.         {
  312.             class muzzle_rot_cannon {source = "ammorandom"; weapon = "cannon_120mm";};
  313.             class muzzle_rot_coax {source = "ammorandom"; weapon = "HMG_NSVT";};
  314.             // class muzzle_rot_HMG {source = "ammorandom"; weapon = "HMG_NSVT";};
  315.             class recoil_source {source = "reload"; weapon = "cannon_120mm";};
  316.         };
  317.  
  318.         // Damage textures - for sections: zbytek, vez, zbran, vezVelitele, zbranVelitele,
  319.         class Damage {
  320.             tex[] = {};
  321.             mat[] = {
  322.                 "A3\Armor_F_Gamma\MBT_02\Data\MBT_02.rvmat",
  323.                 "A3\Armor_F_Gamma\MBT_02\Data\MBT_02_damage.rvmat",
  324.                 "A3\Armor_F_Gamma\MBT_02\Data\MBT_02_destruct.rvmat",
  325.  
  326.                 "A3\Armor_F_Gamma\MBT_02\Data\MBT_02_body.rvmat",
  327.                 "A3\Armor_F_Gamma\MBT_02\Data\MBT_02_body_damage.rvmat",
  328.                 "A3\Armor_F_Gamma\MBT_02\Data\MBT_02_body_destruct.rvmat",
  329.  
  330.                 "A3\Armor_F_Gamma\MBT_02\Data\MBT_02_tracks.rvmat",
  331.                 "A3\Armor_F_Gamma\MBT_02\Data\MBT_02_tracks_damage.rvmat",
  332.                 "A3\Armor_F_Gamma\MBT_02\Data\MBT_02_tracks_destruct.rvmat",
  333.  
  334.                 "A3\Armor_F_Gamma\MBT_02\Data\MBT_02_turret.rvmat",
  335.                 "A3\Armor_F_Gamma\MBT_02\Data\MBT_02_turret_damage.rvmat",
  336.                 "A3\Armor_F_Gamma\MBT_02\Data\MBT_02_turret_destruct.rvmat",
  337.  
  338.                 "A3\Armor_F_Gamma\MBT_01\Data\MBT_01_scorcher.rvmat",
  339.                 "A3\Armor_F_Gamma\MBT_01\Data\MBT_01_scorcher_damage.rvmat",
  340.                 "A3\Armor_F_Gamma\MBT_01\Data\MBT_01_scorcher_destruct.rvmat"
  341.             };
  342.         };
  343.  
  344.         smokeLauncherGrenadeCount = 8; //Number of smoke shells launched at once
  345.         smokeLauncherVelocity = 14; //Velocity which smoke shells are launched at
  346.         smokeLauncherOnTurret = 1; //0 if smoke launchers are on hull, 1 if on turret
  347.         smokeLauncherAngle = 120; //Angle within which smoke grenades are launched (actual spacing may end up smaller so use slighty higher number)
  348.  
  349.         class ViewOptics: ViewOptics {
  350.             visionMode[] = {"Normal","NVG","Ti"};
  351.         };
  352.  
  353.         class Exhausts {
  354.             class Exhaust1 {
  355.                 position = "exhaust";
  356.                 direction = "exhaust_dir";
  357.                 effect = "ExhaustEffectTankBack";
  358.             };
  359.         };
  360.  
  361.         class Reflectors {
  362.             class Left {
  363.                 color[]     = {1900, 1300, 950};
  364.                 ambient[]   = {5,5,5};
  365.                 position    = "Light_L";
  366.                 direction   = "Light_L_end";
  367.                 hitpoint    = "Light_L";
  368.                 selection   = "Light_L";
  369.                 size        = 1;
  370.                 innerAngle  = 100;
  371.                 outerAngle  = 179;
  372.                 coneFadeCoef = 10;
  373.                 intensity   = 1; //17.5
  374.                 useFlare    = 0;
  375.                 dayLight    = 0;
  376.                 flareSize   = 1.0;
  377.                 class Attenuation {
  378.                     start       = 1.0;
  379.                     constant    = 0;
  380.                     linear      = 0;
  381.                     quadratic   = 0.25;
  382.                     hardLimitStart = 30;
  383.                     hardLimitEnd = 60;
  384.                 };
  385.             };
  386.             class Right: Left {
  387.                 position    = "Light_R";
  388.                 direction   = "Light_R_end";
  389.                 hitpoint    = "Light_R";
  390.                 selection   = "Light_R";
  391.             };
  392.             class Right2: Right {
  393.                 position    = "light_R_flare";
  394.                 useFlare    = 1;
  395.             };
  396.             class Left2: Left {
  397.                 position    = "light_L_flare";
  398.                 useFlare    = 1;
  399.             };
  400.         };
  401.         aggregateReflectors[] = {{"Left","Right","Left2","Right2"}};
  402.     };
  403.  
  404.     /*  Faction variants    */
  405.     class O_Test_Tank_01_base: Test_Tank_01_base {
  406.         // Basic defines:knowledge required to recognize this type of target
  407.         accuracy = 0.5;
  408.         // Faction defines: side ID, faction class, crew, typical cargo
  409.         side = 0;
  410.         faction = "BIS_Tutorial";
  411.         crew = "O_crew_F";
  412.         typicalCargo[] = {"O_crew_F"};
  413.     };
  414.  
  415.     /*  Public class    */
  416.     class O_Test_Tank_01: O_Test_Tank_01_base {
  417.         scope = 2;
  418.         scopeCurator = 2;       // 2 means available from Zeus, whereas 0 means hidden
  419.         // Editor displayname
  420.         accuracy = 1000;    // accuracy > 4 is not possible to be fully recognized during game
  421.         displayName = "AMX-Leclerc";    // due to above will show only in editor
  422.     };
  423. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement