Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.69 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 FPT_MAN_AddOn_Cars
  10. {
  11. units[]= {"FPT_MAN"};
  12. weapons[]={};
  13. requiredVersion=0.1;
  14. requiredAddons[]={};
  15. };
  16. };
  17. class CfgVehicles
  18. {
  19. class Car;
  20. class Car_F: Car
  21. {
  22. class HitPoints /// we want to use hitpoints predefined for all cars
  23. {
  24. class HitLFWheel;
  25. class HitLF2Wheel;
  26. class HitRFWheel;
  27. class HitRF2Wheel;
  28. class HitBody;
  29. class HitGlass1;
  30. class HitGlass2;
  31. class HitGlass3;
  32. class HitGlass4;
  33. };
  34. class EventHandlers;
  35. class AnimationSources;
  36. };
  37. class FPT_MAN_base_F: Car_F
  38. {
  39. model = "\Charlieco89_FPT_MAN\fpt_man_m"; /// simple path to model
  40. picture = "\Charlieco89_FPT_MAN\cars\data\textures\portrait_fpt.paa";
  41. Icon = "\Charlieco89_FPT_MAN\cars\data\textures\map_fpt.paa";
  42. selectionBrakeLights = "brzdove svetlo";
  43. selectionBackLights = "zadni svetlo";
  44. displayName = "FPT MAN"; /// displayed in Editor
  45.  
  46. hiddenSelections[] = {"camo1","camo2","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"};
  47. terrainCoef = 2.0; /// different surface affects this car more, stick to tarmac
  48. turnCoef = 3.7; /// should match the wheel turn radius
  49. precision = 10; /// how much freedom has the AI for its internal waypoints - lower number means more precise but slower approach to way
  50. brakeDistance = 3.0; /// how many internal waypoints should the AI plan braking in advance
  51. acceleration = 15; /// how fast acceleration does the AI think the car has
  52.  
  53. fireResistance = 5; /// lesser protection against fire than tanks
  54. armor = 120; /// just some protection against missiles, collisions and explosions
  55. cost = 50000; /// how likely is the enemy going to target this vehicle
  56. weapons[]=
  57. {
  58. "TruckHorn3"
  59. };
  60. transportMaxBackpacks = 6; /// just some backpacks fit the trunk by default
  61. transportSoldier = 6; /// 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.  
  72. class AnimationSources;
  73.  
  74. class TransportItems /// some first aid kits in trunk according to safety regulations
  75. {
  76. item_xx(FirstAidKit,4);
  77. };
  78.  
  79. class Turrets{}; /// doesn't have any gunner nor commander
  80. class HitPoints: HitPoints
  81. {
  82. class HitLFWheel: HitLFWheel {armor=0.125; passThrough=0;}; /// it is easier to destroy wheels than hull of the vehicle
  83. class HitLF2Wheel: HitLF2Wheel {armor=0.125; passThrough=0;};
  84.  
  85. class HitRFWheel: HitRFWheel {armor=0.125; passThrough=0;};
  86. class HitRF2Wheel: HitRF2Wheel {armor=0.125; passThrough=0;};
  87.  
  88. 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
  89. class HitEngine {armor=0.50; material=-1; name="engine"; visual=""; passThrough=0.2;};
  90. class HitBody: HitBody {name = "body"; visual="camo1"; passThrough=1;}; /// all damage to the hull is aFRLied to total damage
  91.  
  92. class HitGlass1: HitGlass1 {armor=0.25;}; /// it is pretty easy to puncture the glass but not so easy to remove it
  93. class HitGlass2: HitGlass2 {armor=0.25;};
  94. class HitGlass3: HitGlass3 {armor=0.25;};
  95. class HitGlass4: HitGlass4 {armor=0.25;};
  96. };
  97.  
  98. driverAction = driver_high01; /// what action is going the driver take inside the vehicle. Non-existent action makes the vehicle inaccessible
  99. cargoAction[]=
  100. {
  101. "passenger_low01",
  102. "passenger_apc_generic01",
  103. "passenger_apc_generic01",
  104. "passenger_apc_generic01",
  105. "passenger_apc_generic01",
  106. "passenger_apc_generic01"
  107. };
  108. getInAction = GetInLow; /// how does driver look while getting in
  109. getOutAction = GetOutLow; /// and out
  110. 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
  111. cargoGetOutAction[] = {"GetOutLow"}; /// that means all use the same in this case
  112.  
  113. #include "sounds.hpp" /// sounds are in a separate file to make this one simple
  114. #include "pip.hpp" /// PiPs are in a separate file to make this one simple
  115. #include "physx.hpp" /// PhysX settings are in a separate file to make this one simple
  116.  
  117. class PlayerSteeringCoefficients /// steering sensitivity configuration
  118. {
  119. turnIncreaseConst = 0.3; // basic sensitivity value, higher value = faster steering
  120. turnIncreaseLinear = 1.0; // higher value means less sensitive steering in higher speed, more sensitive in lower speeds
  121. 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
  122.  
  123. turnDecreaseConst = 5.0; // basic caster effect value, higher value = the faster the wheels align in the direction of travel
  124. turnDecreaseLinear = 3.0; // higher value means faster wheel re-centering in higher speed, slower in lower speeds
  125. turnDecreaseTime = 0.0; // higher value means stronger caster effect at the max. steering angle and weaker once the wheels are closer to centered position
  126.  
  127. maxTurnHundred = 0.7; // coefficient of the maximum turning angle @ 100km/h; limit goes linearly to the default max. turn. angle @ 0km/h
  128. };
  129.  
  130. /// memory points where do tracks of the wheel appear
  131. // front left track, left offset
  132. memoryPointTrackFLL = "TrackFLL";
  133. // front left track, right offset
  134. memoryPointTrackFLR = "TrackFLR";
  135. // back left track, left offset
  136. memoryPointTrackBLL = "TrackBLL";
  137. // back left track, right offset
  138. memoryPointTrackBLR = "TrackBLR";
  139. // front right track, left offset
  140. memoryPointTrackFRL = "TrackFRL";
  141. // front right track, right offset
  142. memoryPointTrackFRR = "TrackFRR";
  143. // back right track, left offset
  144. memoryPointTrackBRL = "TrackBRL";
  145. // back right track, right offset
  146. memoryPointTrackBRR = "TrackBRR";
  147.  
  148. class Damage /// damage changes material in specific places (visual in hitPoint)
  149. {
  150. tex[]={};
  151. mat[]=
  152. {
  153. "A3\data_f\glass_veh_int.rvmat", /// material mapped in model
  154. "A3\data_f\Glass_veh_damage.rvmat", /// changes to this one once damage of the part reaches 0.5
  155. "A3\data_f\Glass_veh_damage.rvmat", /// changes to this one once damage of the part reaches 1
  156.  
  157. "A3\data_f\glass_veh.rvmat", /// another material
  158. "A3\data_f\Glass_veh_damage.rvmat", /// changes into different ones
  159. "A3\data_f\Glass_veh_damage.rvmat"
  160. };
  161. };
  162.  
  163. class Exhausts /// specific exhaust effects for the car
  164. {
  165. class Exhaust1 /// the car has two exhausts - each on one side
  166. {
  167. position = "exhaust"; /// name of initial memory point
  168. direction = "exhaust_dir"; /// name of memory point for exhaust direction
  169. effect = "ExhaustsEffect"; /// what particle effect is it going to use
  170. };
  171. };
  172.  
  173. class Reflectors /// only front lights are considered to be reflectors to save CPU
  174. {
  175. class LightCarHeadL01 /// lights on each side consist of two bulbs with different flares
  176. {
  177. color[] = {1900, 1800, 1700}; /// approximate colour of standard lights
  178. ambient[] = {5, 5, 5}; /// nearly a white one
  179. position = "LightCarHeadL01"; /// memory point for start of the light and flare
  180. direction = "LightCarHeadL01_end"; /// memory point for the light direction
  181. hitpoint = "Light_L"; /// point(s) in hitpoint lod for the light (hitPoints are created by engine)
  182. selection = "Light_L"; /// selection for artificial glow around the bulb, not much used any more
  183. size = 1; /// size of the light point seen from distance
  184. innerAngle = 100; /// angle of full light
  185. outerAngle = 179; /// angle of some light
  186. coneFadeCoef = 10; /// attenuation of light between the above angles
  187. intensity = 1; /// strength of the light
  188. useFlare = true; /// does the light use flare?
  189. dayLight = false; /// switching light off during day saves CPU a lot
  190. flareSize = 1.0; /// how big is the flare
  191.  
  192. class Attenuation
  193. {
  194. start = 1.0;
  195. constant = 0;
  196. linear = 0;
  197. quadratic = 0.25;
  198. hardLimitStart = 30; /// it is good to have some limit otherwise the light would shine to infinite distance
  199. hardLimitEnd = 60; /// this allows adding more lights into scene
  200. };
  201. };
  202.  
  203. class LightCarHeadL02: LightCarHeadL01
  204. {
  205. position = "LightCarHeadL02";
  206. direction = "LightCarHeadL02_end";
  207. FlareSize = 0.5; /// side bulbs aren't that strong
  208. };
  209.  
  210. class LightCarHeadR01: LightCarHeadL01
  211. {
  212. position = "LightCarHeadR01";
  213. direction = "LightCarHeadR01_end";
  214. hitpoint = "Light_R";
  215. selection = "Light_R";
  216. };
  217.  
  218. class LightCarHeadR02: LightCarHeadR01
  219. {
  220. position = "LightCarHeadR02";
  221. direction = "LightCarHeadR02_end";
  222. FlareSize = 0.5;
  223. };
  224. class gyro1
  225. {
  226. color[] = {0, 0, 2500};
  227. ambient[] = {5, 5, 5};
  228. intensity = 1;
  229. size = 0.5; /// size of the light point seen from distance
  230. innerAngle = 50; /// angle of full light
  231. outerAngle = 100; /// angle of some light
  232. coneFadeCoef = 4; /// attenuation of light between the above angles
  233.  
  234. position = "gyropos1"; /// memory point for start of the light and flare
  235. direction = "gyrodir1"; /// memory point for the light direction
  236. hitpoint = "Light_R"; /// point(s) in hitpoint lod for the light (hitPoints are created by engine)
  237. selection = "gyro1"; /// selection for artificial glow around the bulb, not much used any more
  238.  
  239. useFlare = true;
  240. flareSize = 1.0;
  241. flareMaxDistance = 100;
  242. activeLight = false; /// engine counts this one as an active light into limit of lights
  243. dayLight = false; /// it doesn't shine during the day
  244. drawLight = false;
  245.  
  246. class Attenuation
  247. {
  248. start = 0;
  249. constant = 0;
  250. linear = 0;
  251. quadratic = 0.3;
  252.  
  253. hardLimitStart = 25;
  254. hardLimitEnd = 35;
  255. };
  256. };
  257. class gyro2: gyro1
  258. {
  259. position = "gyropos2";
  260. direction = "gyrodir2";
  261. };
  262. class gyro3: gyro1
  263. {
  264. position = "gyropos3";
  265. direction = "gyrodir3";
  266. };
  267. class gyro4: gyro1
  268. {
  269. position = "gyropos4";
  270. direction = "gyrodir4";
  271. };
  272. class gyro5: gyro1
  273. {
  274. position = "gyropos5";
  275. direction = "gyrodir5";
  276. selection = "gyro2";
  277.  
  278. };
  279. class gyro6: gyro1
  280. {
  281. position = "gyropos6";
  282. direction = "gyrodir6";
  283. selection = "gyro2";
  284. };
  285. class gyro7: gyro1
  286. {
  287. position = "gyropos7";
  288. direction = "gyrodir7";
  289. selection = "gyro2";
  290. };
  291. class gyro8: gyro1
  292. {
  293. position = "gyropos8";
  294. direction = "gyrodir8";
  295. selection = "gyro2";
  296. };
  297. class gyro9: gyro1
  298. {
  299. position = "gyropos9";
  300. direction = "gyrodir9";
  301. };
  302. class gyro10: gyro1
  303. {
  304. position = "gyropos9";
  305. direction = "gyrodir10";
  306. };
  307. class gyro11: gyro1
  308. {
  309. position = "gyropos9";
  310. direction = "gyrodir11";
  311. };
  312. class gyro12: gyro1
  313. {
  314. position = "gyropos9";
  315. direction = "gyrodir12";
  316. };
  317. class gyro13: gyro1
  318. {
  319. position = "gyropos10";
  320. direction = "gyrodir13";
  321. selection = "gyro2";
  322. };
  323. class gyro14: gyro1
  324. {
  325. position = "gyropos11";
  326. direction = "gyrodir14";
  327. };
  328. };
  329.  
  330. aggregateReflectors[] = {{"gyro1"},{"gyro2"},{"gyro3"},{"gyro4"},{"gyro5"},{"gyro6"},{"gyro7"},{"gyro8"},{"gyro9"},{"gyro10"},{"gyro11"},{"gyro12"},{"gyro13"},{"gyro14"}, {"LightCarHeadL01", "LightCarHeadL02"}, {"LightCarHeadR01", "LightCarHeadR02"}}; /// aggregating reflectors helps the engine a lot
  331. /// it might be even good to aggregate all lights into one source as it is done for most of the cars
  332.  
  333.  
  334. // Must be kept as fail-safe in case of issue with the function
  335.  
  336. // Definition of texture sources (skins), used for the VhC (Vehicle customization)
  337. // Also, because the Garage uses the VhC, it will make them available from the garage
  338. // [_textureSourceClass1, _probability1, _textureSourceClass2, _probability2, ...]
  339. // Default behavior of the VhC is to select one of these sources, with a weighted random
  340.  
  341. class UserActions
  342. {
  343. class ClignotantsGaucheAllumer
  344. {
  345. displayName="<t color='#fff000'>Allumer les clignotants gauches (A)</t>";
  346. displayNameDefault="<t color='#fff000'>Allumer les clignotants gauches</t>";
  347. priority=3;
  348. radius=20;
  349. position="drivewheel";
  350. showWindow=0;
  351. onlyForPlayer=1;
  352. shortcut="LeanLeft";
  353. condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsGaucheStart"" == 0) && isEngineOn this";
  354. statement="vehicle player animate [""ClignotantsGaucheStart"", 1];";
  355. };
  356. class ClignotantsGaucheEteindre
  357. {
  358. displayName="<t color='#fff000'>Eteindre les clignotants gauches (A)</t>";
  359. displayNameDefault="<t color='#fff000'>Eteindre les clignotants gauches</t>";
  360. priority=3;
  361. radius=20;
  362. position="drivewheel";
  363. showWindow=0;
  364. onlyForPlayer=1;
  365. shortcut="LeanLeft";
  366. condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsGaucheStart"" != 0)";
  367. statement="vehicle player animate [""ClignotantsGaucheStart"", 0];";
  368. };
  369. class ClignotantsDroitAllumer
  370. {
  371. displayName="<t color='#fff000'>Allumer les clignotants droits (E)</t>";
  372. displayNameDefault="<t color='#fff000'>Allumer les clignotants droits</t>";
  373. priority=3;
  374. radius=20;
  375. position="drivewheel";
  376. showWindow=0;
  377. onlyForPlayer=1;
  378. shortcut="LeanRight";
  379. condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsDroitStart"" == 0) && isEngineOn this";
  380. statement="vehicle player animate [""ClignotantsDroitStart"", 1];";
  381. };
  382. class ClignotantsDroitEteindre
  383. {
  384. displayName="<t color='#fff000'>Eteindre les clignotants droits (E)</t>";
  385. displayNameDefault="<t color='#fff000'>Eteindre les clignotants droits</t>";
  386. priority=3;
  387. radius=20;
  388. position="drivewheel";
  389. showWindow=0;
  390. onlyForPlayer=1;
  391. shortcut="LeanRight";
  392. condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsDroitStart"" != 0)";
  393. statement="vehicle player animate [""ClignotantsDroitStart"", 0];";
  394. };
  395. class gyropharef
  396. {
  397. displayName = "<t color='#0000ff'>Gyrophares ON</t>";
  398. position = "drivewheel";
  399. radius = 2;
  400. onlyForPlayer = 0;
  401. condition = "this animationPhase ""lamp1"" <= 0.5";
  402. statement = "this animate [""lamp1"",1];this animate [""lamp2"",1]";
  403. };
  404. class gyrophare
  405. {
  406. displayName = "<t color='#0000ff'>Gyrophares OFF</t>";
  407. position = "drivewheel";
  408. radius = 2;
  409. onlyForPlayer = 0;
  410. condition = "this animationPhase ""lamp1"" > 0.5";
  411. statement = "this animate [""lamp1"",0];this animate [""lamp2"",0]";
  412. };
  413. class Warning {
  414. displayName = "<t color='#ff5500'>Feux Avertissements</t>";
  415. position = "drivewheel";
  416. radius = 1000;
  417. condition = "driver this == player";
  418. statement = "this execVM '\Charlieco89_FPT_MAN\cars\data\scripts\avertissement.sqf';";
  419. onlyForplayer = 0;
  420. };
  421. };
  422. };
  423.  
  424. class FPT_MAN: FPT_MAN_base_F
  425. {
  426. scope = 2;
  427. side = 3;
  428. faction = CIV_F;
  429. crew = "C_man_1";
  430. hiddenSelectionsTextures[] = {"Charlieco89_FPT_MAN\cars\data\textures\cabine.paa","Charlieco89_FPT_MAN\cars\data\textures\cellule.paa"};
  431. };
  432. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement