Advertisement
Guest User

Untitled

a guest
Feb 14th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.42 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 Misko_Fiat_Punto
  10. {
  11. units[]= {"Misko_Fiat_Punto"};
  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.  
  38. class Misko_Fiat_Punto_base: Car_F
  39. {
  40. model = "Misko_Fiat_Punto\Misko_Fiat_Punto"; /// simple path to model
  41. picture = "\A3\soft_f_gamma\Hatchback_01\Data\UI\portrait_car_CA.paa";
  42. Icon = "\A3\soft_f_gamma\Hatchback_01\Data\UI\map_car_CA.paa";
  43. selectionBrakeLights = "brzdove svetlo";
  44. selectionBackLights = "zadni svetlo";
  45. displayName = "Misko_Fiat_Punto"; /// displayed in Editor
  46.  
  47. hiddenSelections[] = {"camo1"};
  48.  
  49. terrainCoef = 0.5; /// different surface affects this car more, stick to tarmac
  50. turnCoef = 2.5; /// should match the wheel turn radius
  51. precision = 10; /// how much freedom has the AI for its internal waypoints - lower number means more precise but slower approach to way
  52. brakeDistance = 3.0; /// how many internal waypoints should the AI plan braking in advance
  53. acceleration = 25; /// how fast acceleration does the AI think the car has
  54.  
  55. fireResistance = 5; /// lesser protection against fire than tanks
  56. armor = 120; /// just some protection against missiles, collisions and explosions
  57. cost = 50000; /// how likely is the enemy going to target this vehicle
  58.  
  59. transportMaxBackpacks = 3; /// just some backpacks fit the trunk by default
  60. transportSoldier = 2; /// number of cargo except driver
  61.  
  62. /// some values from parent class to show how to set them up
  63. wheelDamageRadiusCoef = 0.9; /// for precision tweaking of damaged wheel size
  64. wheelDestroyRadiusCoef = 0.4; /// for tweaking of rims size to fit ground
  65. maxFordingDepth = 0.5; /// how high water would damage the engine of the car
  66. waterResistance = 1; /// if the depth of water is bigger than maxFordingDepth it starts to damage the engine after this time
  67. crewCrashProtection = 0.25; /// multiplier of damage to crew of the vehicle => low number means better protection
  68. driverLeftHandAnimName = "drivewheel"; /// according to what bone in model of car does hand move
  69. driverRightHandAnimName = "drivewheel"; /// beware, non-existent bones may cause game crashes (even if the bones are hidden during play)
  70.  
  71. class AnimationSources;
  72.  
  73. class TransportItems /// some first aid kits in trunk according to safety regulations
  74. {
  75. item_xx(FirstAidKit,4);
  76. };
  77.  
  78. class Turrets{}; /// doesn't have any gunner nor commander
  79. class HitPoints: HitPoints
  80. {
  81. class HitLFWheel: HitLFWheel {armor=0.125; passThrough=0;}; /// it is easier to destroy wheels than hull of the vehicle
  82. class HitLF2Wheel: HitLF2Wheel {armor=0.125; passThrough=0;};
  83.  
  84. class HitRFWheel: HitRFWheel {armor=0.125; passThrough=0;};
  85. class HitRF2Wheel: HitRF2Wheel {armor=0.125; passThrough=0;};
  86.  
  87. 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
  88. class HitEngine {armor=0.50; material=-1; name="engine"; visual=""; passThrough=0.2;};
  89. class HitBody: HitBody {name = "body"; visual="camo1"; passThrough=1;}; /// all damage to the hull is aFRLied to total damage
  90.  
  91. class HitGlass1: HitGlass1 {armor=0.25;}; /// it is pretty easy to puncture the glass but not so easy to remove it
  92. class HitGlass2: HitGlass2 {armor=0.25;};
  93. class HitGlass3: HitGlass3 {armor=0.25;};
  94. class HitGlass4: HitGlass4 {armor=0.25;};
  95. };
  96.  
  97. driverAction = driver_offroad01; /// what action is going the driver take inside the vehicle. Non-existent action makes the vehicle inaccessible
  98. cargoAction[]= {"passenger_low01"};
  99. getInAction = GetInLow; /// how does driver look while getting in
  100. getOutAction = GetOutLow; /// and out
  101. 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
  102. cargoGetOutAction[] = {"GetOutLow"}; /// that means all use the same in this case
  103.  
  104. #include "sounds.hpp"
  105. #include "pip.hpp" /// PiPs are in a separate file to make this one simple
  106. #include "physx.hpp" /// PhysX settings are in a separate file to make this one simple
  107.  
  108. class PlayerSteeringCoefficients /// steering sensitivity configuration
  109. {
  110. turnIncreaseConst = 0.3; // basic sensitivity value, higher value = faster steering
  111. turnIncreaseLinear = 1.0; // higher value means less sensitive steering in higher speed, more sensitive in lower speeds
  112. 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
  113.  
  114. turnDecreaseConst = 5.0; // basic caster effect value, higher value = the faster the wheels align in the direction of travel
  115. turnDecreaseLinear = 3.0; // higher value means faster wheel re-centering in higher speed, slower in lower speeds
  116. turnDecreaseTime = 0.0; // higher value means stronger caster effect at the max. steering angle and weaker once the wheels are closer to centered position
  117.  
  118. maxTurnHundred = 0.7; // coefficient of the maximum turning angle @ 100km/h; limit goes linearly to the default max. turn. angle @ 0km/h
  119. };
  120.  
  121. /// memory points where do tracks of the wheel appear
  122. // front left track, left offset
  123. memoryPointTrackFLL = "TrackFLL";
  124. // front left track, right offset
  125. memoryPointTrackFLR = "TrackFLR";
  126. // back left track, left offset
  127. memoryPointTrackBLL = "TrackBLL";
  128. // back left track, right offset
  129. memoryPointTrackBLR = "TrackBLR";
  130. // front right track, left offset
  131. memoryPointTrackFRL = "TrackFRL";
  132. // front right track, right offset
  133. memoryPointTrackFRR = "TrackFRR";
  134. // back right track, left offset
  135. memoryPointTrackBRL = "TrackBRL";
  136. // back right track, right offset
  137. memoryPointTrackBRR = "TrackBRR";
  138.  
  139. class Damage /// damage changes material in specific places (visual in hitPoint)
  140. {
  141. tex[]={};
  142. mat[]=
  143. {
  144. "A3\data_f\glass_veh_int.rvmat", /// material mapped in model
  145. "A3\data_f\Glass_veh_damage.rvmat", /// changes to this one once damage of the part reaches 0.5
  146. "A3\data_f\Glass_veh_damage.rvmat", /// changes to this one once damage of the part reaches 1
  147.  
  148. "A3\data_f\glass_veh.rvmat", /// another material
  149. "A3\data_f\Glass_veh_damage.rvmat", /// changes into different ones
  150. "A3\data_f\Glass_veh_damage.rvmat"
  151. };
  152. };
  153.  
  154. class Exhausts /// specific exhaust effects for the car
  155. {
  156. class Exhaust1 /// the car has two exhausts - each on one side
  157. {
  158. position = "exhaust1_pos"; /// name of initial memory point
  159. direction = "exhaust1_dir"; /// name of memory point for exhaust direction
  160. effect = "ExhaustsEffect"; /// what particle effect is it going to use
  161. };
  162.  
  163. class Exhaust2 /// the car has two exhausts - each on one side
  164. {
  165. position = "exhaust2_pos"; /// name of initial memory point
  166. direction = "exhaust2_dir"; /// name of memory point for exhaust direction
  167. effect = "ExhaustsEffect"; /// what particle effect is it going to use
  168. };
  169. };
  170.  
  171. class Reflectors /// only front lights are considered to be reflectors to save CPU
  172. {
  173. class LightCarHeadL01 /// lights on each side consist of two bulbs with different flares
  174. {
  175. color[] = {1900, 1800, 1700}; /// approximate colour of standard lights
  176. ambient[] = {5, 5, 5}; /// nearly a white one
  177. position = "LightCarHeadL01"; /// memory point for start of the light and flare
  178. direction = "LightCarHeadL01_end"; /// memory point for the light direction
  179. hitpoint = "Light_L"; /// point(s) in hitpoint lod for the light (hitPoints are created by engine)
  180. selection = "Light_L"; /// selection for artificial glow around the bulb, not much used any more
  181. size = 1; /// size of the light point seen from distance
  182. innerAngle = 100; /// angle of full light
  183. outerAngle = 179; /// angle of some light
  184. coneFadeCoef = 10; /// attenuation of light between the above angles
  185. intensity = 1; /// strength of the light
  186. useFlare = true; /// does the light use flare?
  187. dayLight = false; /// switching light off during day saves CPU a lot
  188. flareSize = 1.0; /// how big is the flare
  189.  
  190. class Attenuation
  191. {
  192. start = 1.0;
  193. constant = 0;
  194. linear = 0;
  195. quadratic = 0.25;
  196. hardLimitStart = 30; /// it is good to have some limit otherwise the light would shine to infinite distance
  197. hardLimitEnd = 60; /// this allows adding more lights into scene
  198. };
  199. };
  200.  
  201.  
  202. class LightCarHeadR01: LightCarHeadL01
  203. {
  204. position = "LightCarHeadR01";
  205. direction = "LightCarHeadR01_end";
  206. hitpoint = "Light_R";
  207. selection = "Light_R";
  208. };
  209.  
  210. };
  211.  
  212. aggregateReflectors[] = {{"LightCarHeadL01", "LightCarHeadL02"}, {"LightCarHeadR01", "LightCarHeadR02"}}; /// aggregating reflectors helps the engine a lot
  213. /// it might be even good to aggregate all lights into one source as it is done for most of the cars
  214. class UserActions {
  215.  
  216. class BlinkerLinksAN
  217. {
  218. displayName="<t color='#fff000'>Blinker Links AN</t>";
  219. displayNameDefault="<t color='#fff000'>Blinker Links AN</t>";
  220. priority=3;
  221. radius=20;
  222. position="drivewheel";
  223. showWindow=0;
  224. onlyForPlayer=1;
  225. shortcut="LeanLeft";
  226. condition="(driver this == player) && (alive this) && (this animationPhase ""BlinkerLinksStart"" == 0) && isEngineOn this";
  227. statement="vehicle player animate [""BlinkerLinksStart"", 1];";
  228. };
  229. class BlinkerLinksAUS
  230. {
  231. displayName="<t color='#fff000'>Blinker Links AUS</t>";
  232. displayNameDefault="<t color='#fff000'>Blinker Links AUS</t>";
  233. priority=3;
  234. radius=20;
  235. position="drivewheel";
  236. showWindow=0;
  237. onlyForPlayer=1;
  238. shortcut="LeanLeft";
  239. condition="(driver this == player) && (alive this) && (this animationPhase ""BlinkerLinksStart"" != 0)";
  240. statement="vehicle player animate [""BlinkerLinksStart"", 0];";
  241. };
  242. class BlinkerRechtsAN
  243. {
  244. displayName="<t color='#fff000'>Blinker Rechts AN</t>";
  245. displayNameDefault="<t color='#fff000'>Blinker Rechts AN</t>";
  246. priority=3;
  247. radius=20;
  248. position="drivewheel";
  249. showWindow=0;
  250. onlyForPlayer=1;
  251. shortcut="LeanRight";
  252. condition="(driver this == player) && (alive this) && (this animationPhase ""BlinkerRechtsStart"" == 0) && isEngineOn this";
  253. statement="vehicle player animate [""BlinkerRechtsStart"", 1];";
  254. };
  255. class BlinkerRechtsAUS
  256. {
  257. displayName="<t color='#fff000'>Blinker Rechts AUS</t>";
  258. displayNameDefault="<t color='#fff000'>Blinker Rechts AUS</t>";
  259. priority=3;
  260. radius=20;
  261. position="drivewheel";
  262. showWindow=0;
  263. onlyForPlayer=1;
  264. shortcut="LeanRight";
  265. condition="(driver this == player) && (alive this) && (this animationPhase ""BlinkerRechtsStart"" != 0)";
  266. statement="vehicle player animate [""BlinkerRechtsStart"", 0];";
  267. };
  268. };
  269.  
  270. // Must be kept as fail-safe in case of issue with the function
  271.  
  272. // Definition of texture sources (skins), used for the VhC (Vehicle customization)
  273. // Also, because the Garage uses the VhC, it will make them available from the garage
  274. // [_textureSourceClass1, _probability1, _textureSourceClass2, _probability2, ...]
  275. // Default behavior of the VhC is to select one of these sources, with a weighted random
  276.  
  277. class MFD /// Clocks on the car board
  278. {
  279. class ClockHUD
  280. {
  281. #include "cfgHUD.hpp"
  282. };
  283. };
  284. };
  285. class Misko_Fiat_Punto : Misko_Fiat_Punto_base {
  286. scope = 2;
  287. scopecurator = 2;
  288. crew = "C_man_1";
  289. side = 3;
  290. faction = CIV_F;
  291. displayName = "McLaren MP4";
  292. vehicleClass="Misko_Fiat_Punto";
  293. author = "Misko Jones";
  294. hiddenSelectionsTextures[] = {"Misko_Base\colores\classic\turqouise.paa"};
  295. };
  296. class Misko_Fiat_Punto_Negro : Misko_Fiat_Punto_base {
  297.  
  298. scope = 2; /// makes the car visible in editor
  299. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  300. crew = "C_man_1"; /// we need someone to fit into the car
  301. side = 3; /// civilian car should be on civilian side
  302. faction = CIV_F; /// and with civilian faction
  303. displayName = "McLaren MP4 Negro";
  304. author = "Misko Jones";
  305. hiddenSelectionsTextures[] = {"Misko_Base\colores\black.paa"};
  306. };
  307. class Misko_Fiat_Punto_Aqua : Misko_Fiat_Punto_base {
  308.  
  309. scope = 2; /// makes the car visible in editor
  310. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  311. crew = "C_man_1"; /// we need someone to fit into the car
  312. side = 3; /// civilian car should be on civilian side
  313. faction = CIV_F; /// and with civilian faction
  314. displayName = "McLaren MP4 Aqua";
  315. author = "Misko Jones";
  316. hiddenSelectionsTextures[] = {"Misko_Base\colores\aqua.paa"};
  317. };
  318. class Misko_Fiat_Punto_Azul : Misko_Fiat_Punto_base {
  319.  
  320. scope = 2; /// makes the car visible in editor
  321. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  322. crew = "C_man_1"; /// we need someone to fit into the car
  323. side = 3; /// civilian car should be on civilian side
  324. faction = CIV_F; /// and with civilian faction
  325. displayName = "McLaren MP4 Azul";
  326. author = "Misko Jones";
  327. hiddenSelectionsTextures[] = {"Misko_Base\colores\blue.paa"};
  328. };
  329. class Misko_Fiat_Punto_AzulOscuro : Misko_Fiat_Punto_base {
  330.  
  331. scope = 2; /// makes the car visible in editor
  332. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  333. crew = "C_man_1"; /// we need someone to fit into the car
  334. side = 3; /// civilian car should be on civilian side
  335. faction = CIV_F; /// and with civilian faction
  336. displayName = "McLaren MP4 Azul Oscuro";
  337. author = "Misko Jones";
  338. hiddenSelectionsTextures[] = {"Misko_Base\colores\darkblue.paa"};
  339. };
  340. class Misko_Fiat_Punto_VerdeOscuro : Misko_Fiat_Punto_base {
  341.  
  342. scope = 2; /// makes the car visible in editor
  343. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  344. crew = "C_man_1"; /// we need someone to fit into the car
  345. side = 3; /// civilian car should be on civilian side
  346. faction = CIV_F; /// and with civilian faction
  347. displayName = "McLaren MP4 Verde Oscuro";
  348. author = "Misko Jones";
  349. hiddenSelectionsTextures[] = {"Misko_Base\colores\darkgreen.paa"};
  350. };
  351. class Misko_Fiat_Punto_RojoOscuro : Misko_Fiat_Punto_base {
  352.  
  353. scope = 2; /// makes the car visible in editor
  354. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  355. crew = "C_man_1"; /// we need someone to fit into the car
  356. side = 3; /// civilian car should be on civilian side
  357. faction = CIV_F; /// and with civilian faction
  358. displayName = "McLaren MP4 Rojo Oscuro";
  359. author = "Misko Jones";
  360. hiddenSelectionsTextures[] = {"Misko_Base\colores\darkred.paa"};
  361. };
  362. class Misko_Fiat_Punto_Red : Misko_Fiat_Punto_base {
  363.  
  364. scope = 2; /// makes the car visible in editor
  365. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  366. crew = "C_man_1"; /// we need someone to fit into the car
  367. side = 3; /// civilian car should be on civilian side
  368. faction = CIV_F; /// and with civilian faction
  369. displayName = "McLaren MP4 Rojo";
  370. author = "Misko Jones";
  371. hiddenSelectionsTextures[] = {"#(argb,8,8,3)color(0.882353,0,0.0196078,1.0,CO)"};
  372. };
  373. class Misko_Fiat_Punto_White : Misko_Fiat_Punto_base {
  374.  
  375. scope = 2; /// makes the car visible in editor
  376. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  377. crew = "C_man_1"; /// we need someone to fit into the car
  378. side = 3; /// civilian car should be on civilian side
  379. faction = CIV_F; /// and with civilian faction
  380. displayName = "McLaren MP4 Blanco";
  381. author = "Misko Jones";
  382. hiddenSelectionsTextures[] = {"Misko_Base\colores\white.paa"};
  383. };
  384. class Misko_Fiat_Punto_Yellow : Misko_Fiat_Punto_base {
  385.  
  386. scope = 2; /// makes the car visible in editor
  387. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  388. crew = "C_man_1"; /// we need someone to fit into the car
  389. side = 3; /// civilian car should be on civilian side
  390. faction = CIV_F; /// and with civilian faction
  391. displayName = "McLaren MP4 Amarillo";
  392. author = "Misko Jones";
  393. hiddenSelectionsTextures[] = {"Misko_Base\colores\yellow.paa"};
  394. };
  395. class Misko_Fiat_Punto_Purple : Misko_Fiat_Punto_base {
  396.  
  397. scope = 2; /// makes the car visible in editor
  398. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  399. crew = "C_man_1"; /// we need someone to fit into the car
  400. side = 3; /// civilian car should be on civilian side
  401. faction = CIV_F; /// and with civilian faction
  402. displayName = "McLaren MP4 Violeta";
  403. author = "Misko Jones";
  404. hiddenSelectionsTextures[] = {"Misko_Base\colores\purple.paa"};
  405. };
  406. class Misko_Fiat_Punto_Pink : Misko_Fiat_Punto_base {
  407.  
  408. scope = 2; /// makes the car visible in editor
  409. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  410. crew = "C_man_1"; /// we need someone to fit into the car
  411. side = 3; /// civilian car should be on civilian side
  412. faction = CIV_F; /// and with civilian faction
  413. displayName = "McLaren MP4 Rosa";
  414. author = "Misko Jones";
  415. hiddenSelectionsTextures[] = {"Misko_Base\colores\pink.paa"};
  416. };
  417. class Misko_Fiat_Punto_Orange : Misko_Fiat_Punto_base {
  418.  
  419. scope = 2; /// makes the car visible in editor
  420. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  421. crew = "C_man_1"; /// we need someone to fit into the car
  422. side = 3; /// civilian car should be on civilian side
  423. faction = CIV_F; /// and with civilian faction
  424. displayName = "McLaren MP4 Naranja";
  425. author = "Misko Jones";
  426. hiddenSelectionsTextures[] = {"Misko_Base\colores\orange.paa"};
  427. };
  428. class Misko_Fiat_Punto_Green : Misko_Fiat_Punto_base {
  429.  
  430. scope = 2; /// makes the car visible in editor
  431. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  432. crew = "C_man_1"; /// we need someone to fit into the car
  433. side = 3; /// civilian car should be on civilian side
  434. faction = CIV_F; /// and with civilian faction
  435. displayName = "McLaren MP4 Verde";
  436. author = "Misko Jones";
  437. hiddenSelectionsTextures[] = {"Misko_Base\colores\green.paa"};
  438. };
  439. class Misko_Fiat_Punto_Grey : Misko_Fiat_Punto_base {
  440.  
  441. scope = 2; /// makes the car visible in editor
  442. scopeCurator=2; // scope 2 means it's available in Zeus mode (0 means hidden)
  443. crew = "C_man_1"; /// we need someone to fit into the car
  444. side = 3; /// civilian car should be on civilian side
  445. faction = CIV_F; /// and with civilian faction
  446. displayName = "McLaren MP4 Gris";
  447. author = "Misko Jones";
  448. hiddenSelectionsTextures[] = {"Misko_Base\colores\grey.paa"};
  449. };
  450. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement