Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 11.40 KB | None | 0 0
  1. #include "basicdefines_A3.hpp"
  2. class DefaultEventhandlers;
  3. class WeaponFireGun;
  4. class WeaponCloudsGun;
  5. class WeaponFireMGun;
  6. class WeaponCloudsMGun;
  7. class CfgPatches
  8. {
  9.     class KawasakiKX_heisenberg_civ_AddOn_Cars
  10.     {
  11.         units[]= {"KawasakiKX_heisenberg_civ"};
  12.         weapons[]={};
  13.         requiredVersion=0.1;
  14.         requiredAddons[]={};
  15.     };
  16. };
  17. class cfgWeapons
  18. {
  19. };
  20. class CfgVehicles
  21. {
  22.     class Car;
  23.     class Car_F: Car
  24.     {
  25.         class HitPoints /// we want to use hitpoints predefined for all cars
  26.         {
  27.             class HitLFWheel;
  28.             class HitLF2Wheel;
  29.             class HitRFWheel;
  30.             class HitRF2Wheel;
  31.             class HitBody;
  32.             class HitGlass1;
  33.             class HitGlass2;
  34.             class HitGlass3;
  35.             class HitGlass4;
  36.         };
  37.         class EventHandlers;
  38.         class AnimationSources;
  39.     };
  40.  
  41.     class Kxheis_base_F: Car_F
  42.     {
  43.         model   = "\KawasakiKX_heisenberg\KawasakiKX_heisenberg";  /// simple path to model
  44.         picture = "\A3\soft_f_gamma\Hatchback_01\Data\UI\portrait_car_CA.paa";
  45.         Icon    = "\A3\soft_f_gamma\Hatchback_01\Data\UI\map_car_CA.paa";
  46.         selectionBrakeLights = "brzdove svetlo";
  47.         selectionBackLights = "zadni svetlo";
  48.         displayName = "Kxheis_base_F"; /// displayed in Editor
  49.         hiddenSelections[] = {"camo1","lb-left-front-corner","lb-left-takedown","lb-front-blue-1","lb-front-blue-2","lb-front-red-2","lb-front-red-1","lb-right-takedown","lb-right-front-corner","lb-right-back-corner","lb-back-red-1","lb-back-red-2","lb-back-red-3","lb-back-blue-3","lb-back-blue-2","lb-back-blue-1","lb-left-back-corner","lb-back-yellow-1","lb-back-yellow-2","lb-back-yellow-3","lb-back-yellow-4","lb-back-yellow-5","lb-back-yellow-6","lb-left-alley","lb-right-alley","lb-ion-blue","lb-ion-red","radar_patrol_c","radar_patrol_d","radar_patrol_u","radar_fast_c","radar_fast_d","radar_fast_u","radar_target_c","radar_target_d","radar_target_u"};
  50.         terrainCoef     = 2.0;  /// different surface affects this car more, stick to tarmac
  51.         turnCoef        = 0.7;  /// should match the wheel turn radius
  52.         precision       = 10;   /// how much freedom has the AI for its internal waypoints - lower number means more precise but slower approach to way
  53.         brakeDistance   = 3.0;  /// how many internal waypoints should the AI plan braking in advance
  54.         acceleration    = 15;   /// how fast acceleration does the AI think the car has
  55.  
  56.         fireResistance  = 5;    /// lesser protection against fire than tanks
  57.         armor           = 120;  /// just some protection against missiles, collisions and explosions
  58.         cost            = 50000; /// how likely is the enemy going to target this vehicle
  59.  
  60.         transportMaxBackpacks   = 3; /// just some backpacks fit the trunk by default
  61.         transportSoldier        = 0; /// number of cargo except driver
  62.  
  63.         /// some values from parent class to show how to set them up
  64.         wheelDamageRadiusCoef   = 0.9;          /// for precision tweaking of damaged wheel size
  65.         wheelDestroyRadiusCoef  = 0.4;          /// for tweaking of rims size to fit ground
  66.         maxFordingDepth         = 0.5;          /// how high water would damage the engine of the car
  67.         waterResistance         = 1;            /// if the depth of water is bigger than maxFordingDepth it starts to damage the engine after this time
  68.         crewCrashProtection     = 0.25;         /// multiplier of damage to crew of the vehicle => low number means better protection
  69.         driverLeftHandAnimName  = "drivewheel"; /// according to what bone in model of car does hand move
  70.         driverRightHandAnimName = "drivewheel"; /// beware, non-existent bones may cause game crashes (even if the bones are hidden during play)
  71.         weapons[]= {};
  72.        
  73.         class AnimationSources: AnimationSources
  74.         {
  75.             class Doors {
  76.                 source = "user";
  77.                 animPeriod = 2;
  78.                 initPhase = 0;
  79.             };
  80.             class HitLFWheel
  81.             {
  82.                 source = "Hit";
  83.                 hitpoint = "HitLFWheel";
  84.                 raw = 1;
  85.             };
  86.             class HitLBWheel
  87.             {
  88.                 source = "Hit";
  89.                 hitpoint = "HitLBWheel";
  90.                 raw = 1;
  91.             };
  92.             class HitRFWheel
  93.             {
  94.                 source = "Hit";
  95.                 hitpoint = "HitRFWheel";
  96.                 raw = 1;
  97.             };
  98.             class HitRBWheel
  99.             {
  100.                 source = "Hit";
  101.                 hitpoint = "HitRBWheel";
  102.                 raw = 1;
  103.             };
  104.             class rouarrier {
  105.                 source = "user";
  106.                 animPeriod = 1;
  107.                 initPhase = 0;
  108.             };
  109.         };
  110.        
  111.         class TransportItems /// some first aid kits in trunk according to safety regulations
  112.         {
  113.             item_xx(FirstAidKit,4);
  114.         };
  115.  
  116.         class Turrets{}; /// doesn't have any gunner nor commander
  117.         class HitPoints: HitPoints
  118.         {
  119.             class HitLFWheel: HitLFWheel    {armor=0.125; passThrough=0;}; /// it is easier to destroy wheels than hull of the vehicle
  120.             class HitLF2Wheel: HitLF2Wheel  {armor=0.125; passThrough=0;};
  121.  
  122.             class HitRFWheel: HitRFWheel    {armor=0.125; passThrough=0;};
  123.             class HitRF2Wheel: HitRF2Wheel  {armor=0.125; passThrough=0;};
  124.  
  125.             class HitFuel           {armor=0.50; material=-1; name="fueltank"; visual=""; passThrough=0.2;}; /// correct points for fuel tank, some of the damage is aFRLied to the whole
  126.             class HitEngine         {armor=0.50; material=-1; name="engine"; visual=""; passThrough=0.2;};
  127.             class HitBody: HitBody  {name = "body"; visual="camo1"; passThrough=1;}; /// all damage to the hull is aFRLied to total damage
  128.  
  129.             class HitGlass1: HitGlass1 {armor=0.25;}; /// it is pretty easy to puncture the glass but not so easy to remove it
  130.             class HitGlass2: HitGlass2 {armor=0.25;};
  131.             class HitGlass3: HitGlass3 {armor=0.25;};
  132.             class HitGlass4: HitGlass4 {armor=0.25;};
  133.         };
  134.  
  135.         driverAction        = ConducteurKX; /// what action is going the driver take inside the vehicle. Non-existent action makes the vehicle inaccessible
  136.         cargoAction[]=
  137.         {
  138.             ""
  139.         };
  140.         getInAction         = GetInLow;         /// how does driver look while getting in
  141.         getOutAction        = GetOutLow;        /// and out
  142.         cargoGetInAction[]  = {"GetInLow"};     /// and the same for the rest, if the array has fewer members than the count of crew, the last one is used for the rest
  143.         cargoGetOutAction[] = {"GetOutLow"};    /// that means all use the same in this case
  144.  
  145.         #include "sounds.hpp"   /// sounds are in a separate file to make this one simple
  146.         #include "pip.hpp"      /// PiPs are in a separate file to make this one simple
  147.         #include "physx.hpp"    /// PhysX settings are in a separate file to make this one simple
  148.  
  149.         class PlayerSteeringCoefficients /// steering sensitivity configuration
  150.         {
  151.             turnIncreaseConst  = 0.3; // basic sensitivity value, higher value = faster steering
  152.             turnIncreaseLinear = 1.0; // higher value means less sensitive steering in higher speed, more sensitive in lower speeds
  153.             turnIncreaseTime   = 1.0; // higher value means smoother steering around the center and more sensitive when the actual steering angle gets closer to the max. steering angle
  154.  
  155.             turnDecreaseConst  = 5.0; // basic caster effect value, higher value = the faster the wheels align in the direction of travel
  156.             turnDecreaseLinear = 3.0; // higher value means faster wheel re-centering in higher speed, slower in lower speeds
  157.             turnDecreaseTime   = 0.0; // higher value means stronger caster effect at the max. steering angle and weaker once the wheels are closer to centered position
  158.  
  159.             maxTurnHundred     = 0.7; // coefficient of the maximum turning angle @ 100km/h; limit goes linearly to the default max. turn. angle @ 0km/h
  160.         };
  161.  
  162.         /// memory points where do tracks of the wheel appear
  163.         // front left track, left offset
  164.         memoryPointTrackFLL = "TrackFLL";
  165.         // front left track, right offset
  166.         memoryPointTrackFLR = "TrackFLR";
  167.         // back left track, left offset
  168.         memoryPointTrackBLL = "TrackBLL";
  169.         // back left track, right offset
  170.         memoryPointTrackBLR = "TrackBLR";
  171.         // front right track, left offset
  172.         memoryPointTrackFRL = "TrackFRL";
  173.         // front right track, right offset
  174.         memoryPointTrackFRR = "TrackFRR";
  175.         // back right track, left offset
  176.         memoryPointTrackBRL = "TrackBRL";
  177.         // back right track, right offset
  178.         memoryPointTrackBRR = "TrackBRR";
  179.  
  180.         class Damage /// damage changes material in specific places (visual in hitPoint)
  181.         {
  182.             tex[]={};
  183.             mat[]=
  184.             {
  185.                 "A3\data_f\glass_veh_int.rvmat",        /// material mapped in model
  186.                 "A3\data_f\Glass_veh_damage.rvmat",     /// changes to this one once damage of the part reaches 0.5
  187.                 "A3\data_f\Glass_veh_damage.rvmat",     /// changes to this one once damage of the part reaches 1
  188.  
  189.                 "A3\data_f\glass_veh.rvmat",            /// another material
  190.                 "A3\data_f\Glass_veh_damage.rvmat",     /// changes into different ones
  191.                 "A3\data_f\Glass_veh_damage.rvmat"
  192.             };
  193.         };
  194.  
  195.         class Exhausts /// specific exhaust effects for the car
  196.         {
  197.             class Exhaust1 /// the car has two exhausts - each on one side
  198.             {
  199.                 position    = "exhaust";        /// name of initial memory point
  200.                 direction   = "exhaust_dir";    /// name of memory point for exhaust direction
  201.                 effect      = "ExhaustsEffect"; /// what particle effect is it going to use
  202.             };
  203.         };
  204.  
  205.         class Reflectors    /// only front lights are considered to be reflectors to save CPU
  206.         {
  207.         };
  208.  
  209.         aggregateReflectors[] = {}; /// aggregating reflectors helps the engine a lot
  210.         /// it might be even good to aggregate all lights into one source as it is done for most of the cars
  211.  
  212.  
  213.         // Must be kept as fail-safe in case of issue with the function
  214.  
  215.         // Definition of texture sources (skins), used for the VhC (Vehicle customization)
  216.         // Also, because the Garage uses the VhC, it will make them available from the garage
  217.         // [_textureSourceClass1, _probability1, _textureSourceClass2, _probability2, ...]
  218.         // Default behavior of the VhC is to select one of these sources, with a weighted random
  219.  
  220.         class MFD /// Clocks on the car board
  221.         {
  222.             class ClockHUD
  223.             {
  224.                 #include "cfgHUD.hpp"
  225.             };
  226.         };
  227.         class UserActions
  228.         {
  229.             class wheelief
  230.             {
  231.                 displayName = "Wheeling (G)";
  232.                 position = "drivewheel";
  233.                 radius = 2;
  234.                 onlyForPlayer = 0;
  235.                 condition = "player IN this && ((this animationSourcePhase 'rouarrier') < 0.5) && speed this > 20";
  236.                 shortcut="landGear";
  237.                 showWindow=0;
  238.                 statement="this animateSource [""rouarrier"",1]";
  239.             };
  240.             class wheelie
  241.             {
  242.                 displayName = "";
  243.                 position = "drivewheel";
  244.                 radius = 2;
  245.                 onlyForPlayer = 0;
  246.                 condition = "player IN this && ((this animationSourcePhase 'rouarrier') >= 0.5)";
  247.                 shortcut="commandBack";
  248.                 showWindow=0;
  249.                 statement="this animateSource [""rouarrier"",0]";
  250.             };
  251.         };
  252.     };
  253.  
  254.     class KawasakiKX_heisenberg_civ: Kxheis_base_F
  255.     {
  256.         model   = "\KawasakiKX_heisenberg\KawasakiKX_heisenberg";
  257.         scope = 2;
  258.         side = 3;
  259.         crew = "C_man_1";
  260.         displayName = "KAWASAKI KX";
  261.         author = "HeisenbergHzo";
  262.         hiddenSelectionsTextures[] = {"KawasakiKX_heisenberg\cars\data\textures\Body.paa"};
  263.     };
  264.     class SuzukiRM_heisenberg_civ: Kxheis_base_F
  265.     {
  266.         model   = "\KawasakiKX_heisenberg\KawasakiKX_heisenberg";
  267.         scope = 2;
  268.         side = 3;
  269.         crew = "C_man_1";
  270.         displayName = "Suzuki RM";
  271.         author = "HeisenbergHzo";
  272.         hiddenSelectionsTextures[] = {"KawasakiKX_heisenberg\cars\data\textures\RM.paa"};
  273.     };
  274.     class YamahaYZ_heisenberg_civ: Kxheis_base_F
  275.     {
  276.         model   = "\KawasakiKX_heisenberg\KawasakiKX_heisenberg";
  277.         scope = 2;
  278.         side = 3;
  279.         crew = "C_man_1";
  280.         displayName = "Yamaha YZ";
  281.         author = "HeisenbergHzo";
  282.         hiddenSelectionsTextures[] = {"KawasakiKX_heisenberg\cars\data\textures\YamahaYz.paa"};
  283.     };
  284. };
  285.  
  286.  
  287. class CfgMovesBasic
  288. {
  289.     class DefaultDie;   // External class reference
  290.  
  291.     class ManActions
  292.     {      
  293.     ConducteurKX = "ConducteurKX";
  294.     };
  295. };
  296.  
  297. class CfgMovesMaleSdr : CfgMovesBasic
  298. {
  299.     skeletonName = "OFP2_ManSkeleton";
  300.     gestures = "CfgGesturesMale";
  301.    
  302.     class States
  303.     {
  304.         class Crew; // External class reference
  305.         class ConducteurKX : Crew
  306.         {
  307.             file = "KawasakiKX_heisenberg\ConducteurKX.rtm";
  308.         };
  309.     };
  310. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement