config.cpp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  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. "3AS_LAAT"
  33. };
  34. requiredVersion=0.1;
  35. units[]=
  36. {
  37. macro_new_vehicle(laat,Mk1),
  38. macro_new_vehicle(laat,Mk1_lights),
  39. macro_new_vehicle(laat,Mk2),
  40. macro_new_vehicle(laat,Mk2_lights),
  41. macro_new_vehicle(laat,Mk3),
  42. macro_new_vehicle(laat,Mk4),
  43. macro_new_vehicle(laat,mk4_skin),
  44. macro_new_vehicle(laat,mk4_501st_cxc),
  45. macro_new_vehicle(laat,mk4_501st_cxx),
  46. macro_new_vehicle(laat,mk4_501st_cxp),
  47. macro_new_vehicle(laat,mk4_501st_cxs),
  48. macro_new_vehicle(laat,mk4_501st_cx),
  49. macro_new_vehicle(laat,cargo_Mk2),
  50. macro_new_vehicle(laat,spec_ops),
  51. macro_new_vehicle(laat,muunilinst),
  52. macro_new_vehicle(laat,blue)
  53. };
  54. weapons[]=
  55. {
  56. };
  57. };
  58. };
  59. #include "../../common/sensor_templates.hpp"
  60. class DefaultEventhandlers;
  61. class CfgVehicles
  62. {
  63. #include "inheritance.hpp"
  64. class macro_new_vehicle(laat,Mk1):3as_LAAT_Mk1
  65. {
  66. displayName="LAAT/I MK.I";
  67. #include "common_stuff_tcw.hpp"
  68. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  69. class UserActions: UserActions
  70. {
  71. #include "user_action.hpp"
  72. };
  73. hiddenSelectionsTextures[]=
  74. {
  75. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  76. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa"
  77. };
  78. class Turrets: Turrets
  79. {
  80. class Gunner: Copilot
  81. {
  82. minelev=-60;
  83. minturn=-240;
  84. maxelev=40;
  85. maxturn=-120;
  86. #include "../../common/common_optics.hpp"
  87. };
  88. class LeftDoorgun: LeftDoorgun
  89. {
  90. weapons[]=
  91. {
  92. macro_new_weapon(turret,laat_ball_beam_l),
  93. "Laserdesignator_pilotCamera"
  94. };
  95. magazines[]=
  96. {
  97. "Laserbatteries",
  98. macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),
  99. macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),
  100. macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300)
  101. };
  102. #include "../../common/common_optics.hpp"
  103. memorypointgunneroptics="FIXME";
  104. };
  105. class RightDoorGun: RightDoorGun
  106. {
  107. weapons[]=
  108. {
  109. macro_new_weapon(turret,laat_ball_beam_r),
  110. "Laserdesignator_pilotCamera"
  111. };
  112. magazines[]=
  113. {
  114. "Laserbatteries",
  115. macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),
  116. macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),
  117. macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300)
  118. };
  119. #include "../../common/common_optics.hpp"
  120. memorypointgunneroptics="FIXME";
  121. };
  122. class CargoTurret_01: CargoTurret_01{};
  123. class CargoTurret_02: CargoTurret_02{};
  124. class CargoTurret_03: CargoTurret_03{};
  125. class CargoTurret_04: CargoTurret_04{};
  126. class CargoTurret_05: CargoTurret_05{};
  127. class CargoTurret_06: CargoTurret_06{};
  128. };
  129. class ACE_SelfActions
  130. {
  131. class ACE_Passengers
  132. {
  133. condition = "alive _target";
  134. displayName = "Passengers";
  135. insertChildren = "_this call ace_interaction_fnc_addPassengersActions";
  136. statement = "";
  137. };
  138. };
  139. };
  140. class macro_new_vehicle(laat,Mk1_lights):3as_LAAT_Mk1Lights
  141. {
  142. displayName="LAAT/I MK.I (Lights)";
  143. #include "common_stuff_tcw.hpp"
  144. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  145. class UserActions: UserActions
  146. {
  147. #include "user_action.hpp"
  148. };
  149. hiddenSelectionsTextures[]=
  150. {
  151. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  152. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa"
  153. };
  154. class Turrets: Turrets
  155. {
  156. class Gunner: Copilot
  157. {
  158. minelev=-60;
  159. minturn=-240;
  160. maxelev=40;
  161. maxturn=-120;
  162. #include "../../common/common_optics.hpp"
  163. };
  164. class CargoTurret_01: CargoTurret_01{};
  165. class CargoTurret_02: CargoTurret_02{};
  166. class CargoTurret_03: CargoTurret_03{};
  167. class CargoTurret_04: CargoTurret_04{};
  168. class CargoTurret_05: CargoTurret_05{};
  169. class CargoTurret_06: CargoTurret_06{};
  170. };
  171. class ACE_SelfActions
  172. {
  173. class ACE_Passengers
  174. {
  175. condition = "alive _target";
  176. displayName = "Passengers";
  177. insertChildren = "_this call ace_interaction_fnc_addPassengersActions";
  178. statement = "";
  179. };
  180. };
  181. };
  182. class macro_new_vehicle(laat,Mk2):3as_LAAT_Mk2
  183. {
  184. displayName="LAAT/I MK.II";
  185. #include "common_stuff_tcw.hpp"
  186. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  187. class UserActions: UserActions
  188. {
  189. #include "user_action.hpp"
  190. };
  191. hiddenSelectionsTextures[]=
  192. {
  193. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  194. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa"
  195. };
  196. class Turrets: Turrets
  197. {
  198. class Gunner: Copilot
  199. {
  200. minelev=-60;
  201. minturn=-240;
  202. maxelev=40;
  203. maxturn=-120;
  204. #include "../../common/common_optics.hpp"
  205. };
  206. class CargoTurret_01: CargoTurret_01{};
  207. class CargoTurret_02: CargoTurret_02{};
  208. };
  209. class ACE_SelfActions
  210. {
  211. class ACE_Passengers
  212. {
  213. condition = "alive _target";
  214. displayName = "Passengers";
  215. insertChildren = "_this call ace_interaction_fnc_addPassengersActions";
  216. statement = "";
  217. };
  218. };
  219. };
  220. class macro_new_vehicle(laat,Mk2_lights):3as_LAAT_Mk2Lights
  221. {
  222. displayName="LAAT/I MK.II (Lights)";
  223. #include "common_stuff_tcw.hpp"
  224. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  225. class UserActions: UserActions
  226. {
  227. #include "user_action.hpp"
  228. };
  229. hiddenSelectionsTextures[]=
  230. {
  231. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  232. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa"
  233. };
  234. class Turrets: Turrets
  235. {
  236. class Gunner: Copilot
  237. {
  238. minelev=-60;
  239. minturn=-240;
  240. maxelev=40;
  241. maxturn=-120;
  242. #include "../../common/common_optics.hpp"
  243. };
  244. class CargoTurret_01: CargoTurret_01{};
  245. class CargoTurret_02: CargoTurret_02{};
  246. };
  247. class ACE_SelfActions
  248. {
  249. class ACE_Passengers
  250. {
  251. condition = "alive _target";
  252. displayName = "Passengers";
  253. insertChildren = "_this call ace_interaction_fnc_addPassengersActions";
  254. statement = "";
  255. };
  256. };
  257. };
  258. // SWOP START HERE
  259. class macro_new_vehicle(laat,Mk3):swop_LAAT
  260. {
  261. scope=2;
  262. displayName="LAAT/I MK.III";
  263. author="RD501"
  264. side=1;
  265. crew="SWOP_Clonetrooper_P1";
  266. transportSoldier=24;
  267. forceInGarage = 1;
  268. crewExplosionProtection = 0;
  269. crewCrashProtection = 0;
  270. slingLoadMemoryPoint = "slingload0";
  271. //typing hard
  272. #include "ace_stuff.hpp"
  273. #include "flight_model.hpp"
  274. #include "common_stuff_swop.hpp"
  275. RD501_magclamp_small_1[] = {0.0,1.0,-4.5};
  276. class UserActions
  277. {
  278. #include "user_action.hpp"
  279. };
  280. class ACE_SelfActions:ACE_SelfActions
  281. {
  282. #include "../../common/universal_hud_color_changer.hpp"
  283. };
  284. #include "../../common/universal_mfd.hpp"
  285. class Turrets: Turrets
  286. {
  287. class CopilotTurret: CopilotTurret
  288. {
  289. #include "common_copilot.hpp"
  290. };
  291. class GunnerTurret1:GunnerTurret1
  292. {
  293. weapons[]=
  294. {
  295. macro_new_weapon(turret,laat_ball_turret),
  296. "Laserdesignator_pilotCamera"
  297. };
  298. magazines[]=
  299. {
  300. "Laserbatteries",
  301. macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),
  302. macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),
  303. macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200)
  304. };
  305. };
  306. class GunnerTurret2:GunnerTurret2
  307. {
  308. weapons[]=
  309. {
  310. macro_new_weapon(turret,laat_ball_turret),
  311. "Laserdesignator_pilotCamera"
  312. };
  313. magazines[]=
  314. {
  315. "Laserbatteries",
  316. macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),
  317. macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),
  318. macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200)
  319. };
  320. };
  321. class CargoTurret_01:CargoTurret_01{};
  322. class CargoTurret_02:CargoTurret_02{};
  323. class CargoTurret_03:CargoTurret_03{};
  324. class CargoTurret_04:CargoTurret_04{};
  325. class CargoTurret_05:CargoTurret_05{};
  326. class CargoTurret_06:CargoTurret_06{};
  327. };
  328. };
  329. class macro_new_vehicle(laat,Mk4):swop_LAATmk2
  330. {
  331. scope=2;
  332. displayName="LAAT/I MK.IV";
  333. author="RD501"
  334. side=1;
  335. crew="SWOP_Clonetrooper_P1";
  336. transportSoldier=24;
  337. forceInGarage = 1;
  338. crewExplosionProtection = 0;
  339. crewCrashProtection = 0;
  340. slingLoadMemoryPoint = "slingLoad0";
  341. angleRangeHorizontal = 360;
  342. angleRangeVertical = 360;
  343. //typing hard
  344. #include "ace_stuff.hpp"
  345. #include "flight_model.hpp"
  346. #include "common_stuff_swop.hpp"
  347. RD501_magclamp_small_1[] = {0.0,-2.0,-2.5};
  348. class UserActions
  349. {
  350. #include "user_action.hpp"
  351. class OpenCargoDoor
  352. {
  353. displayName = "<t color='#F64747'>[Open Doors]</t>";
  354. displayNameDefault = "<t color='#F64747'>[Open Doors]</t>";
  355. textToolTip = "<t color='#F64747'>[Open Doors]</t>";
  356. position = "pilotview";
  357. radius = 20;
  358. priority = 9999;
  359. onlyForPlayer = 1;
  360. condition = "this doorPhase ""Doors"" < 0.5 AND (alive this) AND (player in [gunner this, driver this])";
  361. statement = "this animateDoor ['Doors', 1];this animate ['DoorsHandler',1]";
  362. animPeriod = 5;
  363. };
  364. class CloseCargoDoor: OpenCargoDoor
  365. {
  366. displayName = "<t color='#009FD4'>[Close Doors]</t>";
  367. displayNameDefault = "<t color='#009FD4'>[Close Doors]</t>";
  368. textToolTip = "<t color='#009FD4'>[Close Doors]</t>";
  369. priority = 9999;
  370. condition = "this doorPhase ""Doors"" > 0.5 AND (alive this) AND (player in [gunner this, driver this])";
  371. statement = "this animateDoor ['Doors', 0];this animate ['DoorsHandler',0];";
  372. animPeriod = 5;
  373. };
  374. };
  375. class ACE_SelfActions:ACE_SelfActions
  376. {
  377. #include "../../common/universal_hud_color_changer.hpp"
  378. };
  379. #include "../../common/universal_mfd.hpp"
  380. class Turrets: Turrets
  381. {
  382. class CopilotTurret: CopilotTurret
  383. {
  384. #include "common_copilot.hpp"
  385. };
  386. class GunnerTurret1:GunnerTurret1
  387. {
  388. weapons[]=
  389. {
  390. macro_new_weapon(turret,laat_ball_turret),
  391. "Laserdesignator_pilotCamera"
  392. };
  393. magazines[]=
  394. {
  395. "Laserbatteries",
  396. macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),
  397. macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),
  398. macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200)
  399. };
  400. };
  401. class GunnerTurret2:GunnerTurret2
  402. {
  403. weapons[]=
  404. {
  405. macro_new_weapon(turret,laat_ball_turret),
  406. "Laserdesignator_pilotCamera"
  407. };
  408. magazines[]=
  409. {
  410. "Laserbatteries",
  411. macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),
  412. macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),
  413. macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200),macro_new_mag(laat_ball_turret,200)
  414. };
  415. };
  416. };
  417. };
  418. #include "_mk4_reskin.hpp"
  419. class macro_new_vehicle(laat,cargo_Mk2):swop_LAAT_cargo
  420. {
  421. scope=2;
  422. displayName="LAAT/C MK.II";
  423. author="RD501"
  424. side=1;
  425. crew="SWOP_Clonetrooper_P1";
  426. //transportSoldier=24;
  427. smokeLauncherGrenadeCount = 48;
  428. smokeLauncherAngle = 360;
  429. forceInGarage = 1;
  430. faction = macro_republic_faction
  431. editorSubcategory = macro_editor_cat_air(Republic_heli)
  432. vehicleClass = macro_editor_vehicle_type_air(Republic)
  433. maximumLoad = 5000000000;
  434. slingLoadMaxCargoMass = 5000000000;
  435. //#include "flight_model.hpp"
  436. // cyclicAsideForceCoef = 1*1;
  437. // cyclicForwardForceCoef = 1*4;
  438. // backRotorForceCoef =1*1;
  439. // maxSpeed=200;
  440. // bodyFrictionCoef = 0.9*40;
  441. #include "ace_stuff.hpp"
  442. RD501_magclamp_small_1[] = {-7.0,-2.0,-2.5};
  443. RD501_magclamp_large[] = {0.0,-2.0,-2.0};
  444. RD501_magclamp_small_2[] = {7.0,-2.0,-2.5};
  445. RD501_magclamp_small_forbidden=1;
  446. RD501_magclamp_large_offset[]={0.0,1.0,-4.5};
  447. class ACE_SelfActions
  448. {
  449. #include "../../common/universal_hud_color_changer.hpp"
  450. };
  451. #include "../../common/universal_mfd.hpp"
  452. //#include "flight_model.hpp"
  453. #include "sounds.hpp"
  454. class UserActions
  455. {
  456. #include "user_action.hpp"
  457. class StartRefuel
  458. {
  459. displayName = "<t color='#07CC0C'>[Start Refueling]</t>";
  460. displayNameDefault = "<t color='#07CC0C'>[Start Refueling]</t>";
  461. textToolTip = "<t color='#07CC0C'>[Start Refueling]</t>";
  462. position = "pilotview";
  463. radius = 20;
  464. priority = 21;
  465. onlyForPlayer = 1;
  466. condition = "this call RD501_fnc_mc_canRefuel";
  467. statement = "this call RD501_fnc_mc_startRefuel;";
  468. };
  469. class StopRefuel
  470. {
  471. displayName = "<t color='#BC0404'>[Stop Refueling]</t>";
  472. displayNameDefault = "<t color='#BC0404'>[Stop Refueling]</t>";
  473. textToolTip = "<t color='#BC0404'>[Stop Refueling]</t>";
  474. position = "pilotview";
  475. radius = 20;
  476. priority = 21;
  477. onlyForPlayer = 1;
  478. condition = "this call RD501_fnc_mc_canStopRefuel";
  479. statement = "_vehicle setVariable['RD501_mc_stop_refuel',true,true];";
  480. };
  481. };
  482. class EventHandlers : DefaultEventhandlers {
  483. fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
  484. //init = "[_this select 0] call RD501_Main_fnc_laatc_lift";
  485. }
  486. weapons[]=
  487. {
  488. macro_new_weapon(cannon,laat),
  489. macro_new_weapon(wynd,a2a),
  490. "CMFlareLauncher",
  491. "SmokeLauncher",
  492. "Laserdesignator_pilotCamera"
  493. };
  494. magazines[]=
  495. {
  496. "300Rnd_CMFlare_Chaff_Magazine",
  497. "300Rnd_CMFlare_Chaff_Magazine",
  498. "300Rnd_CMFlare_Chaff_Magazine",
  499. macro_new_mag(a2a,4),
  500. macro_new_mag(a2a,4),
  501. "SmokeLauncherMag",
  502. macro_new_mag(laat_cannon,100),
  503. macro_new_mag(laat_cannon,100),
  504. macro_new_mag(laat_cannon,100),
  505. macro_new_mag(laat_cannon,100),
  506. macro_new_mag(laat_cannon,100),
  507. "SmokeLauncherMag",
  508. "SmokeLauncherMag",
  509. "SmokeLauncherMag",
  510. "SmokeLauncherMag",
  511. "SmokeLauncherMag",
  512. "SmokeLauncherMag",
  513. "Laserbatteries"
  514. };
  515. //#include "flight_model.hpp"
  516. };
  517. //mk4 reskins (with swop skins)
  518. reskined_laat_mk4_full_path(spec_ops,Spec Op,LAAT\textures\gunship_2_d.paa,LAAT\textures\gunship_1_spec.paa)
  519. reskined_laat_mk4_full_path(muunilinst,Muunilinst,LAAT\textures\gunship_2_arc_d.paa,LAAT\textures\gunship_1_arc_d.paa)
  520. reskined_laat_mk4_full_path(blue,Blue,LAAT\textures\gunship_2_blue.paa,LAAT\textures\gunship_1_blue.paa)
  521. };