config.cpp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  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 TIE
  7. #define patch_name MODNAME##vehicle_addon##_Patches
  8. #define vehicle_classname MODNAME##_##vehicle_addon
  9. #define macro_new_tie_class(name) vehicle_classname##_##name
  10. #define macro_inherit_ace_selfactions(classname,base)\
  11. class classname:base\
  12. {\
  13. class ACE_SelfActions;\
  14. };
  15. class CfgPatches
  16. {
  17. class macro_patch_name(TIE)
  18. {
  19. addonRootClass=macro_patch_name(vehicles)
  20. requiredAddons[]=
  21. {
  22. macro_patch_name(vehicles)
  23. };
  24. requiredVersion=0.1;
  25. units[]=
  26. {
  27. macro_new_vehicle(TIE,stryker_MkII),
  28. macro_new_vehicle(TIE,interceptor_MkII),
  29. macro_new_vehicle(TIE,fighter_MkII),
  30. macro_new_vehicle(TIE,defender_MkII),
  31. macro_new_vehicle(TIE,bomber_MkII),
  32. macro_new_vehicle(TIE,x1_MkII),
  33. macro_new_vehicle(TIE,fo),
  34. macro_new_vehicle(TIE,sf),
  35. macro_new_vehicle(TIE,silencer)
  36. };
  37. weapons[]=
  38. {
  39. };
  40. };
  41. };
  42. #include "../../common/sensor_templates.hpp"
  43. class CfgVehicles
  44. {
  45. class Plane_Base_F;
  46. class Xtiestkr;
  47. macro_inherit_ace_selfactions(swop_tie_stryker,Xtiestkr)
  48. macro_inherit_ace_selfactions(swop_tie_int,Plane_Base_F)
  49. macro_inherit_ace_selfactions(swop_tie,Plane_Base_F)
  50. macro_inherit_ace_selfactions(swop_tiedef,Plane_Base_F)
  51. macro_inherit_ace_selfactions(swop_tieb,Plane_Base_F)
  52. macro_inherit_ace_selfactions(swop_tiex1,Plane_Base_F)
  53. class macro_new_vehicle(TIE,stryker_MkII) : swop_tie_stryker
  54. {
  55. scope = 2;
  56. forceInGarage=1;
  57. displayName="TIE Stryker Class Mk.II";
  58. altFullForce = 6000;
  59. altNoForce = 9000;
  60. airBrakeFrictionCoef = 80.4;
  61. armor = 100;
  62. faction = macro_empire_faction
  63. editorSubcategory = macro_editor_cat_air(Empire_vtol)
  64. vehicleClass = macro_editor_vehicle_type_air(Empire)
  65. class UserActions
  66. {
  67. class AfterburnerOn
  68. {
  69. displayName = "<t color='#4C9900'>[Afterburner On]</t>";
  70. shortcut = "";
  71. condition = "speed this >50 and (!(this getVariable 'AfterBurnerTIE'))";
  72. statement = "this setVariable ['AfterBurnerTIE',true];this spawn nes4day_afterburnerTIE";
  73. priority = 1e+011;
  74. displayNameDefault = "";
  75. position = "pilotview";
  76. radius = 15;
  77. onlyforplayer = 1;
  78. };
  79. class AfterburnerOff
  80. {
  81. displayName = "<t color='#FF9933'>[Afterburner Off]</t>";
  82. shortcut = "";
  83. condition = "(this getVariable 'AfterBurnerTIE')";
  84. statement = "this setVariable ['AfterBurnerTIE',false]";
  85. priority = 1e+011;
  86. displayNameDefault = "";
  87. position = "pilotview";
  88. radius = 15;
  89. onlyforplayer = 1;
  90. };
  91. };
  92. weapons[] = {
  93. macro_basic_air_weapons,
  94. macro_new_weapon(generic,imperial_aircraft_cannon)
  95. };
  96. magazines[] = {
  97. macro_basic_air_mags,
  98. macro_new_mag(generic_aircraft_cannon_green,1000),
  99. macro_new_mag(generic_aircraft_cannon_green,1000)
  100. };
  101. class ACE_SelfActions:ACE_SelfActions
  102. {
  103. #include "../../common/universal_hud_color_changer.hpp"
  104. };
  105. #include "../../common/universal_mfd.hpp"
  106. };
  107. class macro_new_vehicle(TIE,interceptor_MkII) : swop_tie_int
  108. {
  109. forceInGarage=1;
  110. displayName="TIE Interceptor Class Mk.II";
  111. scope = 2;
  112. altFullForce = 6000;
  113. airBrakeFrictionCoef = 80.4;
  114. altNoForce = 9000;
  115. armor = 100;
  116. faction = macro_empire_faction
  117. editorSubcategory = macro_editor_cat_air(Empire_vtol)
  118. vehicleClass = macro_editor_vehicle_type_air(Empire)
  119. class UserActions
  120. {
  121. class AfterburnerOn
  122. {
  123. displayName = "<t color='#4C9900'>[Afterburner On]</t>";
  124. shortcut = "";
  125. condition = "speed this >50 and (!(this getVariable 'AfterBurnerTIE'))";
  126. statement = "this setVariable ['AfterBurnerTIE',true];this spawn nes4day_afterburnerTIE";
  127. priority = 1e+011;
  128. displayNameDefault = "";
  129. position = "pilotview";
  130. radius = 15;
  131. onlyforplayer = 1;
  132. };
  133. class AfterburnerOff
  134. {
  135. displayName = "<t color='#FF9933'>[Afterburner Off]</t>";
  136. shortcut = "";
  137. condition = "(this getVariable 'AfterBurnerTIE')";
  138. statement = "this setVariable ['AfterBurnerTIE',false]";
  139. priority = 1e+011;
  140. displayNameDefault = "";
  141. position = "pilotview";
  142. radius = 15;
  143. onlyforplayer = 1;
  144. };
  145. };
  146. weapons[] = {
  147. macro_basic_air_weapons,
  148. macro_new_weapon(generic,imperial_aircraft_cannon)
  149. };
  150. magazines[] = {
  151. macro_basic_air_mags,
  152. macro_new_mag(generic_aircraft_cannon_green,1000),
  153. macro_new_mag(generic_aircraft_cannon_green,1000)
  154. };
  155. class ACE_SelfActions:ACE_SelfActions
  156. {
  157. #include "../../common/universal_hud_color_changer.hpp"
  158. };
  159. #include "../../common/universal_mfd.hpp"
  160. };
  161. class macro_new_vehicle(TIE,fighter_MkII) : swop_tie
  162. {
  163. forceInGarage=1;
  164. displayName="TIE Fighter Class Mk.II";
  165. scope = 2;
  166. altFullForce = 6000;
  167. altNoForce = 9000;
  168. armor = 200;
  169. airBrakeFrictionCoef = 80.4;
  170. faction = macro_empire_faction
  171. editorSubcategory = macro_editor_cat_air(Empire_vtol)
  172. vehicleClass = macro_editor_vehicle_type_air(Empire)
  173. class UserActions
  174. {
  175. class AfterburnerOn
  176. {
  177. displayName = "<t color='#4C9900'>[Afterburner On]</t>";
  178. shortcut = "";
  179. condition = "speed this >50 and (!(this getVariable 'AfterBurnerTIE'))";
  180. statement = "this setVariable ['AfterBurnerTIE',true];this spawn nes4day_afterburnerTIE";
  181. priority = 1e+011;
  182. displayNameDefault = "";
  183. position = "pilotview";
  184. radius = 15;
  185. onlyforplayer = 1;
  186. };
  187. class AfterburnerOff
  188. {
  189. displayName = "<t color='#FF9933'>[Afterburner Off]</t>";
  190. shortcut = "";
  191. condition = "(this getVariable 'AfterBurnerTIE')";
  192. statement = "this setVariable ['AfterBurnerTIE',false]";
  193. priority = 1e+011;
  194. displayNameDefault = "";
  195. position = "pilotview";
  196. radius = 15;
  197. onlyforplayer = 1;
  198. };
  199. };
  200. weapons[] = {
  201. macro_basic_air_weapons,
  202. macro_new_weapon(generic,imperial_aircraft_cannon)
  203. };
  204. magazines[] = {
  205. macro_basic_air_mags,
  206. macro_new_mag(generic_aircraft_cannon_green,1000),
  207. macro_new_mag(generic_aircraft_cannon_green,1000)
  208. };
  209. class ACE_SelfActions:ACE_SelfActions
  210. {
  211. #include "../../common/universal_hud_color_changer.hpp"
  212. };
  213. #include "../../common/universal_mfd.hpp"
  214. };
  215. class macro_new_vehicle(TIE,defender_MkII) : swop_tiedef
  216. {
  217. forceInGarage=1;
  218. displayName="TIE Defender Class Mk.II";
  219. scope = 2;
  220. altFullForce = 6000;
  221. altNoForce = 9000;
  222. armor = 200;
  223. airBrakeFrictionCoef = 80.4;
  224. faction = macro_empire_faction
  225. editorSubcategory = macro_editor_cat_air(Empire_vtol)
  226. vehicleClass = macro_editor_vehicle_type_air(Empire)
  227. class UserActions
  228. {
  229. class AfterburnerOn
  230. {
  231. displayName = "<t color='#4C9900'>[Afterburner On]</t>";
  232. shortcut = "";
  233. condition = "speed this >50 and (!(this getVariable 'AfterBurnerTIEdef'))";
  234. statement = "this setVariable ['AfterBurnerTIEdef',true];this spawn nes4day_afterburnerTIEdef";
  235. priority = 1e+011;
  236. displayNameDefault = "";
  237. position = "pilotview";
  238. radius = 15;
  239. onlyforplayer = 1;
  240. };
  241. class AfterburnerOff
  242. {
  243. displayName = "<t color='#FF9933'>[Afterburner Off]</t>";
  244. shortcut = "";
  245. condition = "(this getVariable 'AfterBurnerTIEdef')";
  246. statement = "this setVariable ['AfterBurnerTIEdef',false]";
  247. priority = 1e+011;
  248. displayNameDefault = "";
  249. position = "pilotview";
  250. radius = 15;
  251. onlyforplayer = 1;
  252. };
  253. };
  254. weapons[] = {
  255. macro_basic_air_weapons,
  256. macro_new_weapon(generic,ion_aircraft_cannon)
  257. };
  258. magazines[] = {
  259. macro_basic_air_mags,
  260. macro_new_mag(generic_aircraft_cannon_blue,1000),
  261. macro_new_mag(generic_aircraft_cannon_blue,1000)
  262. };
  263. class ACE_SelfActions:ACE_SelfActions
  264. {
  265. #include "../../common/universal_hud_color_changer.hpp"
  266. };
  267. #include "../../common/universal_mfd.hpp"
  268. };
  269. class macro_new_vehicle(TIE,bomber_MkII) : swop_tieb
  270. {
  271. forceInGarage=1;
  272. displayName="TIE Bomber Class Mk.II";
  273. scope = 2;
  274. altFullForce = 6000;
  275. altNoForce = 9000;
  276. armor = 400;
  277. airBrakeFrictionCoef = 80.4;
  278. faction = macro_empire_faction
  279. editorSubcategory = macro_editor_cat_air(Empire_vtol)
  280. vehicleClass = macro_editor_vehicle_type_air(Empire)
  281. class UserActions
  282. {
  283. };
  284. weapons[] = {
  285. macro_basic_air_weapons,
  286. macro_new_weapon(generic,imperial_aircraft_cannon),
  287. macro_new_weapon(bomb,cluster),
  288. macro_new_weapon(bomb,SDB),
  289. macro_new_weapon(bomb,LGB)
  290. };
  291. magazines[] = {
  292. macro_basic_air_mags,
  293. macro_new_mag(generic_aircraft_cannon_green,1000),
  294. macro_new_mag(generic_aircraft_cannon_green,1000),
  295. macro_new_mag(cluster_bomb,4),
  296. macro_new_mag(cluster_bomb,4),
  297. macro_new_mag(cluster_bomb,4),
  298. macro_new_mag(sdb_bomb,4),
  299. macro_new_mag(sdb_bomb,4),
  300. macro_new_mag(sdb_bomb,4),
  301. macro_new_mag(lgb_bomb,4),
  302. macro_new_mag(lgb_bomb,4),
  303. macro_new_mag(lgb_bomb,4)
  304. };
  305. class ACE_SelfActions:ACE_SelfActions
  306. {
  307. #include "../../common/universal_hud_color_changer.hpp"
  308. };
  309. #include "../../common/universal_mfd.hpp"
  310. };
  311. class macro_new_vehicle(TIE,x1_MkII) : swop_tiex1
  312. {
  313. forceInGarage=1;
  314. displayName="TIE X1 Class Mk.II";
  315. scope = 2;
  316. altFullForce = 6000;
  317. altNoForce = 9000;
  318. armor = 600;
  319. airBrakeFrictionCoef = 80.4;
  320. faction = macro_empire_faction
  321. editorSubcategory = macro_editor_cat_air(Empire_vtol)
  322. vehicleClass = macro_editor_vehicle_type_air(Empire)
  323. class UserActions
  324. {
  325. class AfterburnerOn
  326. {
  327. displayName = "<t color='#4C9900'>[Afterburner On]</t>";
  328. shortcut = "";
  329. condition = "speed this >50 and (!(this getVariable 'AfterBurnerTIE'))";
  330. statement = "this setVariable ['AfterBurnerTIE',true];this spawn nes4day_afterburnerTIE";
  331. priority = 1e+011;
  332. displayNameDefault = "";
  333. position = "pilotview";
  334. radius = 15;
  335. onlyforplayer = 1;
  336. };
  337. class AfterburnerOff
  338. {
  339. displayName = "<t color='#FF9933'>[Afterburner Off]</t>";
  340. shortcut = "";
  341. condition = "(this getVariable 'AfterBurnerTIE')";
  342. statement = "this setVariable ['AfterBurnerTIE',false]";
  343. priority = 1e+011;
  344. displayNameDefault = "";
  345. position = "pilotview";
  346. radius = 15;
  347. onlyforplayer = 1;
  348. };
  349. };
  350. weapons[] = {
  351. macro_basic_air_weapons,
  352. macro_new_weapon(generic,imperial_aircraft_cannon)
  353. };
  354. magazines[] = {
  355. macro_basic_air_mags,
  356. macro_new_mag(generic_aircraft_cannon_green,1000),
  357. macro_new_mag(generic_aircraft_cannon_green,1000)
  358. };
  359. class ACE_SelfActions:ACE_SelfActions
  360. {
  361. #include "../../common/universal_hud_color_changer.hpp"
  362. };
  363. #include "../../common/universal_mfd.hpp"
  364. };
  365. class Xtiefo;
  366. macro_inherit_ace_selfactions(swop_tie_silencer,Plane_Base_F)
  367. macro_inherit_ace_selfactions(swop_tiefo,Xtiefo)
  368. macro_inherit_ace_selfactions(swop_tiefosf,Xtiefo)
  369. class macro_new_vehicle(TIE,fo) : swop_tiefo
  370. {
  371. forceInGarage=1;
  372. displayName="TIE First Order Class Mk.II";
  373. class ACE_SelfActions:ACE_SelfActions
  374. {
  375. #include "../../common/universal_hud_color_changer.hpp"
  376. };
  377. #include "../../common/universal_mfd.hpp"
  378. scope = 2;
  379. altFullForce = 6000;
  380. altNoForce = 9000;
  381. armor = 100;
  382. airBrakeFrictionCoef = 80.4;
  383. faction = macro_first_order_faction
  384. editorSubcategory = macro_editor_cat_air(First_Order)
  385. vehicleClass = macro_editor_vehicle_type_air(First_Order)
  386. class UserActions
  387. {
  388. class AfterburnerOn
  389. {
  390. displayName = "<t color='#4C9900'>[Afterburner On]</t>";
  391. shortcut = "";
  392. condition = "speed this >50 and (!(this getVariable 'AfterBurnerTIE'))";
  393. statement = "this setVariable ['AfterBurnerTIE',true];this spawn nes4day_afterburnerTIE";
  394. priority = 1e+011;
  395. displayNameDefault = "";
  396. position = "pilotview";
  397. radius = 15;
  398. onlyforplayer = 1;
  399. };
  400. class AfterburnerOff
  401. {
  402. displayName = "<t color='#FF9933'>[Afterburner Off]</t>";
  403. shortcut = "";
  404. condition = "(this getVariable 'AfterBurnerTIE')";
  405. statement = "this setVariable ['AfterBurnerTIE',false]";
  406. priority = 1e+011;
  407. displayNameDefault = "";
  408. position = "pilotview";
  409. radius = 15;
  410. onlyforplayer = 1;
  411. };
  412. };
  413. weapons[] = {
  414. macro_basic_air_weapons,
  415. macro_new_weapon(generic,imperial_aircraft_cannon)
  416. };
  417. magazines[] = {
  418. macro_basic_air_mags,
  419. macro_new_mag(generic_aircraft_cannon_green,1000),
  420. macro_new_mag(generic_aircraft_cannon_green,1000)
  421. };
  422. };
  423. class macro_new_vehicle(TIE,sf) : swop_tiefosf
  424. {
  425. forceInGarage=1;
  426. displayName="TIE Special Forces Class Mk.II";
  427. class ACE_SelfActions:ACE_SelfActions
  428. {
  429. #include "../../common/universal_hud_color_changer.hpp"
  430. };
  431. #include "../../common/universal_mfd.hpp"
  432. scope = 2;
  433. scopecurator = 2;
  434. altFullForce = 6000;
  435. altNoForce = 9000;
  436. airBrakeFrictionCoef = 80.4;
  437. armor = 200;
  438. faction = macro_empire_faction
  439. editorSubcategory = macro_editor_cat_air(Empire_vtol)
  440. vehicleClass = macro_editor_vehicle_type_air(Empire)
  441. class UserActions
  442. {
  443. class AfterburnerOn
  444. {
  445. displayName = "<t color='#4C9900'>[Afterburner On]</t>";
  446. shortcut = "";
  447. condition = "speed this >50 and (!(this getVariable 'AfterBurnerTIE'))";
  448. statement = "this setVariable ['AfterBurnerTIE',true];this spawn nes4day_afterburnerTIE";
  449. priority = 1e+011;
  450. displayNameDefault = "";
  451. position = "pilotview";
  452. radius = 15;
  453. onlyforplayer = 1;
  454. };
  455. class AfterburnerOff
  456. {
  457. displayName = "<t color='#FF9933'>[Afterburner Off]</t>";
  458. shortcut = "";
  459. condition = "(this getVariable 'AfterBurnerTIE')";
  460. statement = "this setVariable ['AfterBurnerTIE',false]";
  461. priority = 1e+011;
  462. displayNameDefault = "";
  463. position = "pilotview";
  464. radius = 15;
  465. onlyforplayer = 1;
  466. };
  467. };
  468. weapons[] = {
  469. macro_basic_air_weapons,
  470. macro_new_weapon(generic,imperial_aircraft_cannon)
  471. };
  472. magazines[] = {
  473. macro_basic_air_mags,
  474. macro_new_mag(generic_aircraft_cannon_green,1000),
  475. macro_new_mag(generic_aircraft_cannon_green,1000)
  476. };
  477. };
  478. class macro_new_vehicle(TIE,silencer) : swop_tie_silencer
  479. {
  480. forceInGarage=1;
  481. displayName="TIE Silencer Class Mk.II";
  482. scope = 2;
  483. altFullForce = 6000;
  484. altNoForce = 9000;
  485. armor = 600;
  486. airBrakeFrictionCoef = 80.4;
  487. faction = macro_first_order_faction
  488. editorSubcategory = macro_editor_cat_air(First_Order)
  489. vehicleClass = macro_editor_vehicle_type_air(First_Order)
  490. class ACE_SelfActions:ACE_SelfActions
  491. {
  492. #include "../../common/universal_hud_color_changer.hpp"
  493. };
  494. #include "../../common/universal_mfd.hpp"
  495. class UserActions
  496. {
  497. class AfterburnerOn
  498. {
  499. displayName = "<t color='#4C9900'>[Afterburner On]</t>";
  500. shortcut = "";
  501. condition = "speed this >50 and (!(this getVariable 'AfterBurnerTIEsil'))";
  502. statement = "this setVariable ['AfterBurnerTIEsil',true];this spawn nes4day_afterburnerTIEsil";
  503. priority = 1e+011;
  504. displayNameDefault = "";
  505. position = "pilotview";
  506. radius = 15;
  507. onlyforplayer = 1;
  508. };
  509. class AfterburnerOff
  510. {
  511. displayName = "<t color='#FF9933'>[Afterburner Off]</t>";
  512. shortcut = "";
  513. condition = "(this getVariable 'AfterBurnerTIEsil')";
  514. statement = "this setVariable ['AfterBurnerTIEsil',false]";
  515. priority = 1e+011;
  516. displayNameDefault = "";
  517. position = "pilotview";
  518. radius = 15;
  519. onlyforplayer = 1;
  520. };
  521. };
  522. weapons[] = {
  523. macro_basic_air_weapons,
  524. macro_new_weapon(generic,imperial_aircraft_cannon)
  525. };
  526. magazines[] = {
  527. macro_basic_air_mags,
  528. macro_new_mag(generic_aircraft_cannon_green,1000),
  529. macro_new_mag(generic_aircraft_cannon_green,1000)
  530. };
  531. };
  532. };