config.cpp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. //Get this addons macro
  2. //get the macro for the air subaddon
  3. //get generlized macros
  4. #include "../../../RD501_main/config_macros.hpp"
  5. //General name of the vehicle
  6. #define vehicle_addon LAAT
  7. #define patch_name MODNAME##vehicle_addon##_Patches
  8. #define vehicle_classname MODNAME##_##vehicle_addon
  9. #define macro_new_vehicle(laat,name) vehicle_classname##_##name
  10. #define reskined_laat_mk3(classname,displayname,texturebody,texturewing)\
  11. class macro_new_vehicle(laat,classname):macro_new_vehicle(laat,Mk3)\
  12. {\
  13. forceInGarage = 0;\
  14. displayName=LAAT/I MK.III - ('##displayname##') ;\
  15. hiddenSelectionsTextures[]={macro_vehicle_textures##\LAAT\##texturebody,macro_vehicle_textures##\LAAT\##texturewing};\
  16. };
  17. #define reskined_laat_mk4_full_path(classname,displayname,texturebody,texturewing)\
  18. class macro_new_vehicle(laat,classname):macro_new_vehicle(laat,Mk4)\
  19. {\
  20. forceInGarage = 0;\
  21. displayName=LAAT/I MK.IV - ('##displayname##') ;\
  22. hiddenSelectionsTextures[]={texturebody,texturewing};\
  23. };
  24. class CfgPatches
  25. {
  26. class macro_patch_name(LAAT)
  27. {
  28. addonRootClass=macro_patch_name(vehicles)
  29. requiredAddons[]=
  30. {
  31. macro_patch_name(vehicles)
  32. };
  33. requiredVersion=0.1;
  34. units[]=
  35. {
  36. macro_new_vehicle(laat,Mk1),
  37. macro_new_vehicle(laat,Mk1_lights),
  38. macro_new_vehicle(laat,Mk2),
  39. macro_new_vehicle(laat,Mk2_lights),
  40. macro_new_vehicle(laat,Mk3),
  41. macro_new_vehicle(laat,Mk4),
  42. macro_new_vehicle(laat,mk4_skin),
  43. macro_new_vehicle(laat,mk4_501st_cxc),
  44. macro_new_vehicle(laat,mk4_501st_cxx),
  45. macro_new_vehicle(laat,mk4_501st_cxp),
  46. macro_new_vehicle(laat,mk4_501st_cxs),
  47. macro_new_vehicle(laat,mk4_501st_cx),
  48. macro_new_vehicle(laat,cargo_Mk2),
  49. macro_new_vehicle(laat,spec_ops),
  50. macro_new_vehicle(laat,muunilinst),
  51. macro_new_vehicle(laat,blue)
  52. };
  53. weapons[]=
  54. {
  55. };
  56. };
  57. };
  58. class DefaultEventhandlers;
  59. class CfgVehicles
  60. {
  61. #include "inheritance.hpp"
  62. class macro_new_vehicle(laat,Mk1):3as_LAAT_Mk1
  63. {
  64. displayName="LAAT/I MK.I";
  65. transportSoldier=28;
  66. #include "common_stuff_tcw.hpp"
  67. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  68. class UserActions: UserActions
  69. {
  70. #include "user_action.hpp"
  71. };
  72. hiddenSelectionsTextures[]=
  73. {
  74. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  75. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa"
  76. };
  77. class Turrets: Turrets
  78. {
  79. class Gunner: Copilot
  80. {
  81. minelev=-60;
  82. minturn=-240;
  83. maxelev=40;
  84. maxturn=-120;
  85. };
  86. class LeftDoorgun: LeftDoorgun
  87. {
  88. #include "ball_turret_weapons.hpp"
  89. };
  90. class RightDoorGun: RightDoorGun
  91. {
  92. #include "ball_turret_weapons.hpp"
  93. };
  94. class CargoTurret_01: CargoTurret_01{};
  95. class CargoTurret_02: CargoTurret_02{};
  96. class CargoTurret_03: CargoTurret_03{};
  97. class CargoTurret_04: CargoTurret_04{};
  98. class CargoTurret_05: CargoTurret_05{};
  99. class CargoTurret_06: CargoTurret_06{};
  100. };
  101. };
  102. class macro_new_vehicle(laat,Mk1_lights):3as_LAAT_Mk3
  103. {
  104. displayName="LAAT/I MK.I (Lights)";
  105. transportSoldier=28;
  106. #include "common_stuff_tcw.hpp"
  107. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  108. class UserActions: UserActions
  109. {
  110. #include "user_action.hpp"
  111. };
  112. hiddenSelectionsTextures[]=
  113. {
  114. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  115. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa"
  116. };
  117. class Turrets: Turrets
  118. {
  119. class Gunner: Copilot
  120. {
  121. minelev=-60;
  122. minturn=-240;
  123. maxelev=40;
  124. maxturn=-120;
  125. };
  126. class CargoTurret_01: CargoTurret_01{};
  127. class CargoTurret_02: CargoTurret_02{};
  128. class CargoTurret_03: CargoTurret_03{};
  129. class CargoTurret_04: CargoTurret_04{};
  130. class CargoTurret_05: CargoTurret_05{};
  131. class CargoTurret_06: CargoTurret_06{};
  132. };
  133. };
  134. class macro_new_vehicle(laat,Mk2):3as_LAAT_Mk2
  135. {
  136. displayName="LAAT/I MK.II";
  137. transportSoldier=28;
  138. #include "common_stuff_tcw.hpp"
  139. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  140. class UserActions: UserActions
  141. {
  142. #include "user_action.hpp"
  143. };
  144. hiddenSelectionsTextures[]=
  145. {
  146. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  147. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa"
  148. };
  149. class Turrets: Turrets
  150. {
  151. class Gunner: Copilot
  152. {
  153. minelev=-60;
  154. minturn=-240;
  155. maxelev=40;
  156. maxturn=-120;
  157. };
  158. class CargoTurret_01: CargoTurret_01{};
  159. class CargoTurret_02: CargoTurret_02{};
  160. };
  161. };
  162. class macro_new_vehicle(laat,Mk2_lights):3as_LAAT_Mk2Lights
  163. {
  164. displayName="LAAT/I MK.II (Lights)";
  165. transportSoldier=28;
  166. #include "common_stuff_tcw.hpp"
  167. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  168. class UserActions: UserActions
  169. {
  170. #include "user_action.hpp"
  171. };
  172. hiddenSelectionsTextures[]=
  173. {
  174. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  175. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa"
  176. };
  177. class Turrets: Turrets
  178. {
  179. class Gunner: Copilot
  180. {
  181. minelev=-60;
  182. minturn=-240;
  183. maxelev=40;
  184. maxturn=-120;
  185. };
  186. class CargoTurret_01: CargoTurret_01{};
  187. class CargoTurret_02: CargoTurret_02{};
  188. };
  189. };
  190. // SWOP START HERE
  191. class macro_new_vehicle(laat,Mk3):swop_LAAT
  192. {
  193. scope=2;
  194. displayName="LAAT/I MK.III";
  195. author="RD501"
  196. side=1;
  197. crew="SWOP_Clonetrooper_P1";
  198. transportSoldier=24;
  199. forceInGarage = 1;
  200. crewExplosionProtection = 0;
  201. crewCrashProtection = 0;
  202. slingLoadMemoryPoint = "slingload0";
  203. //typing hard
  204. #include "ace_stuff.hpp"
  205. #include "flight_model.hpp"
  206. #include "common_stuff_swop.hpp"
  207. RD501_magclamp_small_1[] = {0.0,1.0,-4.5};
  208. class UserActions
  209. {
  210. #include "user_action.hpp"
  211. };
  212. class ACE_SelfActions:ACE_SelfActions
  213. {
  214. #include "../../common/universal_hud_color_changer.hpp"
  215. };
  216. #include "../../common/universal_mfd.hpp"
  217. class Turrets: Turrets
  218. {
  219. class CopilotTurret: CopilotTurret
  220. {
  221. #include "common_copilot.hpp"
  222. };
  223. class GunnerTurret1:GunnerTurret1
  224. {
  225. #include "ball_turret_weapons.hpp"
  226. };
  227. class GunnerTurret2:GunnerTurret2
  228. {
  229. #include "ball_turret_weapons.hpp"
  230. };
  231. class CargoTurret_01:CargoTurret_01{};
  232. class CargoTurret_02:CargoTurret_02{};
  233. class CargoTurret_03:CargoTurret_03{};
  234. class CargoTurret_04:CargoTurret_04{};
  235. class CargoTurret_05:CargoTurret_05{};
  236. class CargoTurret_06:CargoTurret_06{};
  237. };
  238. };
  239. class macro_new_vehicle(laat,Mk4):swop_LAATmk2
  240. {
  241. scope=2;
  242. displayName="LAAT/I MK.IV";
  243. author="RD501"
  244. side=1;
  245. crew="SWOP_Clonetrooper_P1";
  246. transportSoldier=24;
  247. forceInGarage = 1;
  248. crewExplosionProtection = 0;
  249. crewCrashProtection = 0;
  250. slingLoadMemoryPoint = "slingLoad0";
  251. angleRangeHorizontal = 360;
  252. angleRangeVertical = 360;
  253. //typing hard
  254. #include "ace_stuff.hpp"
  255. #include "flight_model.hpp"
  256. #include "common_stuff_swop.hpp"
  257. RD501_magclamp_small_1[] = {0.0,-2.0,-2.5};
  258. class UserActions
  259. {
  260. #include "user_action.hpp"
  261. class OpenCargoDoor
  262. {
  263. displayName = "<t color='#F64747'>[Open Doors]</t>";
  264. displayNameDefault = "<t color='#F64747'>[Open Doors]</t>";
  265. textToolTip = "<t color='#F64747'>[Open Doors]</t>";
  266. position = "pilotview";
  267. radius = 20;
  268. priority = 9999;
  269. onlyForPlayer = 1;
  270. condition = "this doorPhase ""Doors"" < 0.5 AND (alive this) AND (player in [gunner this, driver this])";
  271. statement = "this animateDoor ['Doors', 1];this animate ['DoorsHandler',1]";
  272. animPeriod = 5;
  273. };
  274. class CloseCargoDoor: OpenCargoDoor
  275. {
  276. displayName = "<t color='#009FD4'>[Close Doors]</t>";
  277. displayNameDefault = "<t color='#009FD4'>[Close Doors]</t>";
  278. textToolTip = "<t color='#009FD4'>[Close Doors]</t>";
  279. priority = 9999;
  280. condition = "this doorPhase ""Doors"" > 0.5 AND (alive this) AND (player in [gunner this, driver this])";
  281. statement = "this animateDoor ['Doors', 0];this animate ['DoorsHandler',0];";
  282. animPeriod = 5;
  283. };
  284. };
  285. class ACE_SelfActions:ACE_SelfActions
  286. {
  287. #include "../../common/universal_hud_color_changer.hpp"
  288. };
  289. #include "../../common/universal_mfd.hpp"
  290. class Turrets: Turrets
  291. {
  292. class CopilotTurret: CopilotTurret
  293. {
  294. #include "common_copilot.hpp"
  295. };
  296. class GunnerTurret1:GunnerTurret1
  297. {
  298. #include "ball_turret_weapons.hpp"
  299. };
  300. class GunnerTurret2:GunnerTurret2
  301. {
  302. #include "ball_turret_weapons.hpp"
  303. };
  304. };
  305. };
  306. #include "_mk4_reskin.hpp"
  307. class macro_new_vehicle(laat,cargo_Mk2):swop_LAAT_cargo
  308. {
  309. scope=2;
  310. displayName="LAAT/C MK.II";
  311. author="RD501"
  312. side=1;
  313. crew="SWOP_Clonetrooper_P1";
  314. //transportSoldier=24;
  315. smokeLauncherGrenadeCount = 48;
  316. smokeLauncherAngle = 360;
  317. forceInGarage = 1;
  318. faction = macro_republic_faction
  319. editorSubcategory = macro_editor_cat_air(Republic_heli)
  320. vehicleClass = macro_editor_vehicle_type_air(Republic)
  321. maximumLoad = 5000000000;
  322. slingLoadMaxCargoMass = 5000000000;
  323. //#include "flight_model.hpp"
  324. // cyclicAsideForceCoef = 1*1;
  325. // cyclicForwardForceCoef = 1*4;
  326. // backRotorForceCoef =1*1;
  327. // maxSpeed=200;
  328. // bodyFrictionCoef = 0.9*40;
  329. #include "ace_stuff.hpp"
  330. RD501_magclamp_small_1[] = {-7.0,-2.0,-2.5};
  331. RD501_magclamp_large[] = {0.0,-2.0,-2.0};
  332. RD501_magclamp_small_2[] = {7.0,-2.0,-2.5};
  333. class ACE_SelfActions
  334. {
  335. #include "../../common/universal_hud_color_changer.hpp"
  336. };
  337. #include "../../common/universal_mfd.hpp"
  338. //#include "flight_model.hpp"
  339. #include "sounds.hpp"
  340. class UserActions
  341. {
  342. #include "user_action.hpp"
  343. };
  344. class EventHandlers : DefaultEventhandlers {
  345. fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
  346. //init = "[_this select 0] call RD501_Main_fnc_laatc_lift";
  347. }
  348. weapons[]=
  349. {
  350. macro_new_weapon(cannon,laat),
  351. macro_new_weapon(wynd,a2a),
  352. "CMFlareLauncher",
  353. "SmokeLauncher",
  354. "Laserdesignator_pilotCamera"
  355. };
  356. magazines[]=
  357. {
  358. "300Rnd_CMFlare_Chaff_Magazine",
  359. "300Rnd_CMFlare_Chaff_Magazine",
  360. "300Rnd_CMFlare_Chaff_Magazine",
  361. macro_new_mag(a2a,4),
  362. macro_new_mag(a2a,4),
  363. "SmokeLauncherMag",
  364. macro_new_mag(laat_cannon,100),
  365. macro_new_mag(laat_cannon,100),
  366. macro_new_mag(laat_cannon,100),
  367. macro_new_mag(laat_cannon,100),
  368. macro_new_mag(laat_cannon,100),
  369. "SmokeLauncherMag",
  370. "SmokeLauncherMag",
  371. "SmokeLauncherMag",
  372. "SmokeLauncherMag",
  373. "SmokeLauncherMag",
  374. "SmokeLauncherMag",
  375. "Laserbatteries"
  376. };
  377. //#include "flight_model.hpp"
  378. };
  379. //mk4 reskins (with swop skins)
  380. reskined_laat_mk4_full_path(spec_ops,Spec Op,LAAT\textures\gunship_2_d.paa,LAAT\textures\gunship_1_spec.paa)
  381. reskined_laat_mk4_full_path(muunilinst,Muunilinst,LAAT\textures\gunship_2_arc_d.paa,LAAT\textures\gunship_1_arc_d.paa)
  382. reskined_laat_mk4_full_path(blue,Blue,LAAT\textures\gunship_2_blue.paa,LAAT\textures\gunship_1_blue.paa)
  383. };