config.cpp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  1. //Get this addons macro
  2. //get the macro for the air macro_patch_name(vehicles)
  3. //get generlized macros
  4. #include "../../../RD501_main/config_macros.hpp"
  5. //General name of the vehicle
  6. #define vehicle_addon saber
  7. #define patch_name MODNAME##vehicle_addon##_Patches
  8. #define vehicle_classname MODNAME##_##vehicle_addon
  9. #define new_saber_class(name) vehicle_classname##_##name
  10. #define macro_republic_skin hiddenSelectionsTextures[] = {"tx130s\imp_tank_rep_a_c.paa"};
  11. //common mag-weap
  12. #define macro_common_weap\
  13. "Laserdesignator_pilotCamera"
  14. #define macro_common_mag\
  15. "Laserbatteries"
  16. //super saber mag-weap
  17. #define macro_super_saber_weap\
  18. macro_common_weap,\
  19. macro_new_weapon(saber_gun,mbt)
  20. #define macro_super_saber_mag\
  21. macro_common_mag,\
  22. macro_new_mag(saber_tx130,10),\
  23. macro_new_mag(saber_tx130,10),\
  24. macro_new_mag(saber_tx130,10),\
  25. macro_new_mag(saber_tx130,10),\
  26. macro_new_mag(saber_tx130,10),
  27. //normal saber mag-weap
  28. #define macro_saber_weap\
  29. macro_common_weap,\
  30. macro_new_weapon(super_mg,z6)
  31. #define macro_saber_mag\
  32. macro_common_mag,\
  33. macro_new_mag(supercharged_z6,400),\
  34. macro_new_mag(supercharged_z6,400),\
  35. macro_new_mag(supercharged_z6,400),\
  36. macro_new_mag(supercharged_z6,400),\
  37. macro_new_mag(supercharged_z6,400),\
  38. macro_new_mag(supercharged_z6,400),\
  39. macro_new_mag(supercharged_z6,400)
  40. #define macro_saber_weap_imperial\
  41. macro_common_weap,\
  42. macro_new_weapon(super_mg,dlt19)
  43. #define macro_saber_mag_imperial\
  44. macro_common_mag,\
  45. macro_new_mag(supercharged_dlt19,200),\
  46. macro_new_mag(supercharged_dlt19,200),\
  47. macro_new_mag(supercharged_dlt19,200),\
  48. macro_new_mag(supercharged_dlt19,200),\
  49. macro_new_mag(supercharged_dlt19,200),\
  50. macro_new_mag(supercharged_dlt19,200),\
  51. macro_new_mag(supercharged_dlt19,200)
  52. #define macro_saber_main_weap\
  53. macro_common_weap,\
  54. macro_new_weapon(saber_gun,td),\
  55. "SmokeLauncher"
  56. #define macro_saber_main_mag\
  57. macro_common_mag,\
  58. macro_new_mag(saber_tx130,10),\
  59. macro_new_mag(saber_tx130,10),\
  60. macro_new_mag(saber_tx130,10),\
  61. macro_new_mag(saber_tx130,10),\
  62. "smokelaunchermag",\
  63. "smokelaunchermag",\
  64. "smokelaunchermag",\
  65. "smokelaunchermag",\
  66. "smokelaunchermag",\
  67. "smokelaunchermag",\
  68. "smokelaunchermag",\
  69. "smokelaunchermag",\
  70. "smokelaunchermag"
  71. #define macro_saber_driver\
  72. weapons[] = {"SmokeLauncher","Laserdesignator_pilotCamera","CMFlareLauncher"};\
  73. magazines[] = {"300Rnd_CMFlare_Chaff_Magazine","Laserbatteries","smokelaunchermag","smokelaunchermag","smokelaunchermag","smokelaunchermag","smokelaunchermag","smokelaunchermag","smokelaunchermag","smokelaunchermag"};
  74. #define macro_command_saber_smoke\
  75. smokeLauncherGrenadeCount = 12;\
  76. smokeLauncherVelocity = 14;\
  77. smokeLauncherOnTurret = 1;\
  78. smokeLauncherAngle = 360;
  79. #define macro_saber_smoke\
  80. smokeLauncherGrenadeCount = 24;\
  81. smokeLauncherVelocity = 14;\
  82. smokeLauncherOnTurret = 0;\
  83. smokeLauncherAngle = 160;
  84. class CfgPatches
  85. {
  86. class macro_patch_name(saber)
  87. {
  88. addonRootClass=macro_patch_name(vehicles)
  89. requiredAddons[]=
  90. {
  91. macro_patch_name(vehicles)
  92. };
  93. requiredVersion=0.1;
  94. units[]=
  95. {
  96. macro_new_vehicle(saber,republic_tx130_MkII),
  97. macro_new_vehicle(saber,republic_tx130_gl_MkII),
  98. macro_new_vehicle(saber,republic_tx130_super_MkII),
  99. macro_new_vehicle(saber,republic_tx130_recon_MkII)
  100. /*macro_new_vehicle(saber,empire_super_saber_MkII),
  101. macro_new_vehicle(saber,empire_saber_MkII),
  102. macro_new_vehicle(saber,empire_command_saber_MkII),
  103. macro_new_vehicle(saber,republic_super_saber_MkII),
  104. macro_new_vehicle(saber,republic_saber_MkII),
  105. macro_new_vehicle(saber,republic_command_saber_MkII)*/
  106. };
  107. weapons[]=
  108. {
  109. };
  110. };
  111. };
  112. #include "../../common/sensor_templates.hpp"
  113. class DefaultEventhandlers;
  114. class CfgVehicles
  115. {
  116. //O_JM_TX130_1 empire command
  117. //O_JM_TX130m1_1 normal
  118. //O_JM_TX130m2_1 super
  119. class LandVehicle;
  120. class Tank: LandVehicle
  121. {
  122. class NewTurret;
  123. class Sounds;
  124. class HitPoints;
  125. };
  126. class Tank_F: Tank
  127. {
  128. class Turrets
  129. {
  130. class MainTurret: NewTurret
  131. {
  132. class Turrets
  133. {
  134. class CommanderOptics;
  135. };
  136. };
  137. };
  138. };
  139. class 3as_saber_01_Base: Tank_F
  140. {
  141. RD501_magclamp_small_offset[] = {0.0,0.0,-3.0};
  142. RD501_magclamp_large_offset[] = {0.0,0.0,-3.0};
  143. class Turrets:Turrets
  144. {
  145. class MainTurret_bottom: NewTurret{};
  146. class Mainturret_top:MainTurret_bottom{};
  147. };
  148. };
  149. #include "inheritance.hpp"
  150. class 3as_saber_Base:3as_saber_01_Base
  151. {
  152. class Turrets:Turrets
  153. {
  154. class MainTurret_bottom:MainTurret_bottom{};
  155. class Mainturret_top:Mainturret_top{};
  156. };
  157. };
  158. class 3as_saber_m1:3as_saber_Base
  159. {
  160. class Turrets: Turrets
  161. {
  162. class MainTurret_bottom:MainTurret_bottom{};
  163. class Mainturret_top:Mainturret_top{};
  164. };
  165. };
  166. class 3as_saber_02_Base:3as_saber_01_Base
  167. {
  168. class Turrets:Turrets
  169. {
  170. class MainTurret_bottom:MainTurret_bottom{};
  171. class MainTurret_top: Mainturret_top{};
  172. };
  173. };
  174. class 3as_saber_m1G:3as_saber_02_Base
  175. {
  176. class Turrets: Turrets
  177. {
  178. class MainTurret_bottom:MainTurret_bottom{};
  179. class MainTurret_top: Mainturret_top{};
  180. }
  181. };
  182. class 3as_saber_super_base:3as_saber_01_Base
  183. {
  184. class Turrets:Turrets
  185. {
  186. class Mainturret_super: MainTurret_bottom{};
  187. };
  188. };
  189. class 3as_saber_super:3as_saber_super_base
  190. {
  191. class Turrets: Turrets
  192. {
  193. class Mainturret_super: Mainturret_super{};
  194. };
  195. };
  196. class 3as_saber_03_Base:3as_saber_01_Base
  197. {
  198. class Turrets:Turrets
  199. {
  200. class MainTurret_top: Mainturret_top{};
  201. class MainTurret_bottom: MainTurret_bottom{};
  202. };
  203. };
  204. class 3as_saber_m1Recon:3as_saber_03_Base
  205. {
  206. class Turrets: Turrets
  207. {
  208. class MainTurret_top: Mainturret_top{};
  209. class MainTurret_bottom: MainTurret_bottom{};
  210. };
  211. };
  212. class macro_new_vehicle(saber,republic_tx130_MkII):3as_saber_m1
  213. {
  214. scope=2;
  215. scopeCurator=2;
  216. displayName = "Saber TX-130 Mk.II"
  217. faction = macro_republic_faction
  218. editorSubcategory = macro_editor_cat(tank)
  219. vehicleClass = macro_editor_vehicle_type(tank)
  220. class Turrets: Turrets
  221. {
  222. class MainTurret_bottom : MainTurret_bottom{};
  223. class Mainturret_top : Mainturret_top
  224. {
  225. weapons[]=
  226. {
  227. macro_new_weapon(saber_mg,50cal),
  228. "SmokeLauncher"
  229. };
  230. magazines[]=
  231. {
  232. macro_new_mag(saber_mg,300),
  233. macro_new_mag(saber_mg,300),
  234. macro_new_mag(saber_mg,300),
  235. macro_new_mag(saber_mg,300),
  236. macro_new_mag(saber_mg,300),
  237. macro_new_mag(saber_mg,300),
  238. macro_new_mag(saber_mg,300),
  239. "SmokeLauncherMag"
  240. };
  241. };
  242. };
  243. };
  244. class macro_new_vehicle(saber,republic_tx130_gl_MkII):3as_saber_m1G
  245. {
  246. scope=2;
  247. scopeCurator=2;
  248. displayName = "Saber TX-130 GL Mk.II"
  249. faction = macro_republic_faction
  250. editorSubcategory = macro_editor_cat(tank)
  251. vehicleClass = macro_editor_vehicle_type(tank)
  252. class Turrets: Turrets
  253. {
  254. class MainTurret_bottom:MainTurret_bottom{};
  255. class MainTurret_top: Mainturret_top
  256. {
  257. weapons[]=
  258. {
  259. macro_new_weapon(saber_gl,40mm),
  260. "SmokeLauncher"
  261. };
  262. };
  263. };
  264. };
  265. class macro_new_vehicle(saber,republic_tx130_super_MkII):3as_saber_super
  266. {
  267. scope=2;
  268. scopeCurator=2;
  269. displayName = "Saber TX-130 Super Mk.II"
  270. faction = macro_republic_faction
  271. editorSubcategory = macro_editor_cat(tank)
  272. vehicleClass = macro_editor_vehicle_type(tank)
  273. class Turrets: Turrets
  274. {
  275. class Mainturret_super: Mainturret_super
  276. {
  277. weapons[]=
  278. {
  279. macro_new_weapon(saber_cannon,supermkii),
  280. macro_new_weapon(saber_mg,50cal),
  281. "SmokeLauncher"
  282. };
  283. magazines[]=
  284. {
  285. "3as_25rnd_Sabre_Super_Mag",
  286. "3as_25rnd_Sabre_Super_Mag",
  287. "3as_25rnd_Sabre_Super_Mag",
  288. "3as_25rnd_Sabre_Super_Mag",
  289. "3as_25rnd_Sabre_Super_Mag",
  290. "3as_25rnd_Sabre_Super_Mag",
  291. "3as_25rnd_Sabre_Super_Mag",
  292. macro_new_mag(saber_mg,300),
  293. macro_new_mag(saber_mg,300),
  294. macro_new_mag(saber_mg,300),
  295. macro_new_mag(saber_mg,300),
  296. macro_new_mag(saber_mg,300),
  297. "SmokeLauncherMag"
  298. };
  299. };
  300. };
  301. };
  302. class macro_new_vehicle(saber,republic_tx130_recon_MkII):3as_saber_m1Recon
  303. {
  304. scope=2;
  305. scopeCurator=2;
  306. displayName = "Saber TX-130 Recon Mk.II"
  307. faction = macro_republic_faction
  308. editorSubcategory = macro_editor_cat(tank)
  309. vehicleClass = macro_editor_vehicle_type(tank)
  310. class Turrets: Turrets
  311. {
  312. class MainTurret_top: Mainturret_top{};
  313. class MainTurret_bottom: MainTurret_bottom
  314. {
  315. weapons[]=
  316. {
  317. macro_new_weapon(saber_gl,40mm),
  318. macro_new_weapon(saber_mg,50cal),
  319. "SmokeLauncher",
  320. "missiles_DAGR"
  321. };
  322. magazines[]=
  323. {
  324. macro_new_mag(saber_recon,100),
  325. macro_new_mag(saber_recon,100),
  326. macro_new_mag(saber_recon,100),
  327. macro_new_mag(saber_recon,100),
  328. macro_new_mag(saber_recon,100),
  329. macro_new_mag(saber_recon,100),
  330. macro_new_mag(saber_mg,300),
  331. macro_new_mag(saber_mg,300),
  332. macro_new_mag(saber_mg,300),
  333. macro_new_mag(saber_mg,300),
  334. macro_new_mag(saber_mg,300),
  335. "SmokeLauncherMag",
  336. "12Rnd_PG_missiles"
  337. };
  338. };
  339. };
  340. };
  341. //empire
  342. /*class macro_new_vehicle(saber,empire_super_saber_MkII):O_JM_TX130m2_1
  343. {
  344. scope=2
  345. forceInGarage = 1;
  346. displayName = "Super Saber Mk.II (Empire)";
  347. macro_saber_smoke
  348. macro_saber_driver
  349. RD501_magclamp_small_offset[] = {0.0,2.0,-3.0};
  350. RD501_magclamp_large_offset[] = {0.0,2.0,-3.0};
  351. side=0;
  352. faction = macro_empire_faction
  353. editorSubcategory = macro_editor_cat(tank)
  354. vehicleClass = macro_editor_vehicle_type(tank)
  355. class Turrets:Turrets
  356. {
  357. class MainTurret:MainTurret
  358. {
  359. weapons[] = {
  360. macro_super_saber_weap
  361. };
  362. magazines[] = {
  363. macro_super_saber_mag
  364. };
  365. };
  366. };
  367. class EventHandlers :DefaultEventhandlers {};
  368. };
  369. class macro_new_vehicle(saber,empire_saber_MkII):O_JM_TX130m1_1
  370. {
  371. scope=2
  372. scopeCurator=2;
  373. forceInGarage = 1;
  374. displayName = "Saber Mk.II (Empire)";
  375. macro_saber_smoke
  376. armor =1100;
  377. RD501_magclamp_small_offset[] = {0.0,2.0,-3.0};
  378. RD501_magclamp_large_offset[] = {0.0,2.0,-3.0};
  379. faction = macro_empire_faction
  380. editorSubcategory = macro_editor_cat(tank)
  381. vehicleClass = macro_editor_vehicle_type(tank)
  382. side=0;
  383. weapons[] = {
  384. macro_saber_main_weap
  385. };
  386. magazines[] = {
  387. macro_saber_main_mag
  388. };
  389. side=0;
  390. class Turrets:Turrets
  391. {
  392. class MainTurret:MainTurret
  393. {
  394. weapons[] = {
  395. macro_saber_weap_imperial
  396. };
  397. magazines[] = {
  398. macro_saber_mag_imperial
  399. };
  400. };
  401. };
  402. class EventHandlers :DefaultEventhandlers {};
  403. };
  404. class macro_new_vehicle(saber,empire_command_saber_MkII):O_JM_TX130_1//O_JM_TX130r_1
  405. {
  406. scope=2
  407. scopeCurator=2;
  408. forceInGarage = 1;
  409. displayName = "Saber (Command) Mk.II (Empire)";
  410. RD501_magclamp_small_offset[] = {0.0,2.0,-3.0};
  411. RD501_magclamp_large_offset[] = {0.0,2.0,-3.0};
  412. armor = 750;
  413. macro_command_saber_smoke
  414. macro_saber_driver
  415. side=0;
  416. faction = macro_empire_faction
  417. editorSubcategory = macro_editor_cat(tank)
  418. vehicleClass = macro_editor_vehicle_type(tank)
  419. class Turrets:Turrets
  420. {
  421. class MainTurret:MainTurret
  422. {
  423. weapons[] = {
  424. macro_saber_weap_imperial
  425. };
  426. magazines[] = {
  427. macro_saber_mag_imperial
  428. };
  429. };
  430. };
  431. class EventHandlers :DefaultEventhandlers {};
  432. };
  433. //republic
  434. class macro_new_vehicle(saber,republic_super_saber_MkII):O_JM_TX130m2_1
  435. {
  436. scope=2
  437. side=1;
  438. forceInGarage = 1;
  439. displayName = "Super Saber Mk.II (Republic)";
  440. macro_republic_skin
  441. crew = "SWOP_Clonetrooper_P1";
  442. RD501_magclamp_small_offset[] = {0.0,2.0,-3.0};
  443. RD501_magclamp_large_offset[] = {0.0,2.0,-3.0};
  444. faction = macro_republic_faction
  445. editorSubcategory = macro_editor_cat(tank)
  446. vehicleClass = macro_editor_vehicle_type(tank)
  447. macro_saber_driver
  448. macro_saber_smoke
  449. armor = 600;
  450. class Turrets:Turrets
  451. {
  452. class MainTurret:MainTurret
  453. {
  454. weapons[] = {
  455. macro_super_saber_weap
  456. };
  457. magazines[] = {
  458. macro_super_saber_mag
  459. };
  460. };
  461. };
  462. class EventHandlers :DefaultEventhandlers {};
  463. };
  464. class macro_new_vehicle(saber,republic_saber_MkII):O_JM_TX130m1_1
  465. {
  466. scope=2
  467. forceInGarage = 1;
  468. displayName = "Saber Mk.II (Republic)";
  469. macro_republic_skin
  470. RD501_magclamp_small_offset[] = {0.0,2.0,-3.0};
  471. RD501_magclamp_large_offset[] = {0.0,2.0,-3.0};
  472. faction = macro_republic_faction
  473. editorSubcategory = macro_editor_cat(tank)
  474. vehicleClass = macro_editor_vehicle_type(tank)
  475. crew = "SWOP_Clonetrooper_P1";
  476. armor =1100;
  477. macro_saber_smoke
  478. weapons[] = {
  479. macro_saber_main_weap
  480. };
  481. magazines[] = {
  482. macro_saber_main_mag
  483. };
  484. side=1;
  485. class Turrets:Turrets
  486. {
  487. class MainTurret:MainTurret
  488. {
  489. weapons[] = {
  490. macro_saber_weap
  491. };
  492. magazines[] = {
  493. macro_saber_mag
  494. };
  495. };
  496. };
  497. class EventHandlers :DefaultEventhandlers {};
  498. };
  499. class macro_new_vehicle(saber,republic_command_saber_MkII):O_JM_TX130_1
  500. {
  501. scope=2
  502. forceInGarage = 1;
  503. displayName = "Saber (Command) Mk.II (Republic)";
  504. macro_republic_skin
  505. macro_saber_driver
  506. macro_command_saber_smoke
  507. armor = 750;
  508. RD501_magclamp_small_offset[] = {0.0,2.0,-3.0};
  509. RD501_magclamp_large_offset[] = {0.0,2.0,-3.0};
  510. crew = "SWOP_Clonetrooper_P1";
  511. faction = macro_republic_faction
  512. editorSubcategory = macro_editor_cat(tank)
  513. vehicleClass = macro_editor_vehicle_type(tank)
  514. side=1;
  515. class Turrets:Turrets
  516. {
  517. class MainTurret:MainTurret
  518. {
  519. weapons[] = {
  520. macro_saber_weap
  521. };
  522. magazines[] = {
  523. macro_saber_mag
  524. };
  525. };
  526. };
  527. class EventHandlers :DefaultEventhandlers {};
  528. };*/
  529. };
  530. class CfgWeapons
  531. {
  532. class 3AS_Sabre_MG;
  533. class 3as_saber_gmg_40mm;
  534. class 3AS_Sabre_Cannons_Super;
  535. class LMG_M200;
  536. class autocannon_Base_F
  537. {
  538. class player;
  539. };
  540. class 3as_saber_autocannon_30mm:LMG_M200
  541. {
  542. class HE: autocannon_Base_F
  543. {
  544. class player:player{};
  545. };
  546. };
  547. class macro_new_weapon(saber_mg,50cal):3AS_Sabre_MG
  548. {
  549. magazineReloadTime=3;
  550. magazines[]=
  551. {
  552. macro_new_mag(saber_mg,300)
  553. };
  554. };
  555. class macro_new_weapon(saber_gl,40mm):3as_saber_gmg_40mm
  556. {
  557. magazineReloadTime=3;
  558. };
  559. class macro_new_weapon(saber_cannon,supermkii):3AS_Sabre_Cannons_Super
  560. {
  561. magazineReloadTime=6;
  562. };
  563. class macro_new_weapon(saber_cannon,super):3as_saber_autocannon_30mm
  564. {
  565. class HE: autocannon_Base_F
  566. {
  567. magazines[]=
  568. {
  569. macro_new_mag(saber_recon,100)
  570. };
  571. magazineReloadTime=3;
  572. };
  573. };
  574. };
  575. class CfgMagazines
  576. {
  577. class 3AS_300Rnd_SabreMG_Mag;
  578. class 3as_saber_200Rnd_autocannon_30mm_mag;
  579. class macro_new_mag(saber_mg,300):3AS_300Rnd_SabreMG_Mag
  580. {
  581. displayName="300 Rnd Heavy MG Ammo";
  582. displayNameShort="Heavy MG";
  583. ammo=macro_new_ammo(saber_mg)
  584. };
  585. class macro_new_mag(saber_recon,100):3as_saber_200Rnd_autocannon_30mm_mag
  586. {
  587. count=100;
  588. ammo=macro_new_ammo(saber_mg);
  589. };
  590. };
  591. class CfgAmmo
  592. {
  593. class 3AS_EC60_BluePlasma;
  594. class macro_new_ammo(saber_mg):3AS_EC60_BluePlasma
  595. {
  596. hit=30;
  597. indirectHit=0;
  598. indirectHitRange=0;
  599. cartridge="FxCartridge_127";
  600. visibleFire=8;
  601. audibleFire=120;
  602. dangerRadiusBulletClose=12;
  603. dangerRadiusHit=16;
  604. suppressionRadiusBulletClose=8;
  605. suppressionRadiusHit=12;
  606. cost=5;
  607. airLock=1;
  608. caliber=2.5999999;
  609. typicalSpeed=880;
  610. timeToLive=10;
  611. };
  612. };