config.cpp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  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. class CargoTurret;
  139. };
  140. class 3as_saber_01_Base: Tank_F
  141. {
  142. RD501_magclamp_small_offset[] = {0.0,0.0,-3.0};
  143. RD501_magclamp_large_offset[] = {0.0,0.0,-3.0};
  144. class Turrets:Turrets
  145. {
  146. class MainTurret_bottom: NewTurret{};
  147. class Mainturret_top:MainTurret_bottom{};
  148. class CargoTurret_01: CargoTurret{};
  149. class CargoTurret_02: CargoTurret_01{};
  150. class CargoTurret_03: CargoTurret_02{};
  151. class CargoTurret_04: CargoTurret_01{};
  152. };
  153. };
  154. //#include "inheritance.hpp"
  155. class 3as_saber_Base:3as_saber_01_Base
  156. {
  157. class Turrets:Turrets
  158. {
  159. class MainTurret_bottom:MainTurret_bottom{};
  160. class Mainturret_top:Mainturret_top{};
  161. class CargoTurret_01: CargoTurret_01{};
  162. class CargoTurret_02: CargoTurret_02{};
  163. class CargoTurret_03: CargoTurret_03{};
  164. class CargoTurret_04: CargoTurret_04{};
  165. };
  166. };
  167. class 3as_saber_m1:3as_saber_Base
  168. {
  169. class Turrets: Turrets
  170. {
  171. class MainTurret_bottom:MainTurret_bottom{};
  172. class Mainturret_top:Mainturret_top{};
  173. class CargoTurret_01: CargoTurret_01{};
  174. class CargoTurret_02: CargoTurret_02{};
  175. class CargoTurret_03: CargoTurret_03{};
  176. class CargoTurret_04: CargoTurret_04{};
  177. };
  178. };
  179. class 3as_saber_m1G;
  180. class 3as_saber_super_base:3as_saber_01_Base
  181. {
  182. class Turrets:Turrets
  183. {
  184. class Mainturret_super: MainTurret_bottom{};
  185. class CargoTurret_01: CargoTurret_01{};
  186. class CargoTurret_02: CargoTurret_02{};
  187. class CargoTurret_03: CargoTurret_03{};
  188. class CargoTurret_04: CargoTurret_04{};
  189. };
  190. };
  191. class 3as_saber_super:3as_saber_super_base
  192. {
  193. class Turrets: Turrets
  194. {
  195. class Mainturret_super: Mainturret_super{};
  196. class CargoTurret_01: CargoTurret_01{};
  197. class CargoTurret_02: CargoTurret_02{};
  198. class CargoTurret_03: CargoTurret_03{};
  199. class CargoTurret_04: CargoTurret_04{};
  200. };
  201. };
  202. class 3as_saber_03_Base:3as_saber_01_Base
  203. {
  204. class Turrets:Turrets
  205. {
  206. class MainTurret_top: Mainturret_top{};
  207. class MainTurret_bottom: MainTurret_bottom{};
  208. class CargoTurret_01: CargoTurret_01{};
  209. class CargoTurret_02: CargoTurret_02{};
  210. class CargoTurret_03: CargoTurret_03{};
  211. class CargoTurret_04: CargoTurret_04{};
  212. };
  213. };
  214. class 3as_saber_m1Recon:3as_saber_03_Base
  215. {
  216. class Turrets: Turrets
  217. {
  218. class MainTurret_top: Mainturret_top{};
  219. class MainTurret_bottom: MainTurret_bottom{};
  220. class CargoTurret_01: CargoTurret_01{};
  221. class CargoTurret_02: CargoTurret_02{};
  222. class CargoTurret_03: CargoTurret_03{};
  223. class CargoTurret_04: CargoTurret_04{};
  224. };
  225. };
  226. class macro_new_vehicle(saber,republic_tx130_MkII):3as_saber_m1
  227. {
  228. scope=2;
  229. forceInGarage = 1;
  230. scopeCurator=2;
  231. displayName = "Saber TX-130 Mk.II"
  232. faction = macro_republic_faction
  233. editorSubcategory = macro_editor_cat(tank)
  234. vehicleClass = macro_editor_vehicle_type(tank)
  235. #include "../../common/smallvehiclekit.hpp"
  236. class Turrets: Turrets
  237. {
  238. class MainTurret_bottom : MainTurret_bottom{
  239. weapons[]=
  240. {
  241. macro_new_weapon(saber_main,cannon),
  242. "SmokeLauncher",
  243. "missiles_DAGR"
  244. };
  245. magazines[]=
  246. {
  247. macro_new_mag(saber_main,10),
  248. macro_new_mag(saber_main,10),
  249. macro_new_mag(saber_main,10),
  250. macro_new_mag(saber_main,10),
  251. macro_new_mag(saber_main,10),
  252. macro_new_mag(saber_main,10),
  253. macro_new_mag(saber_main,10),
  254. "SmokeLauncherMag",
  255. "12Rnd_PG_missiles"
  256. };
  257. };
  258. class Mainturret_top : Mainturret_top
  259. {
  260. weapons[]=
  261. {
  262. macro_new_weapon(saber_mg,50cal),
  263. "SmokeLauncher"
  264. };
  265. magazines[]=
  266. {
  267. macro_new_mag(saber_mg,300),
  268. macro_new_mag(saber_mg,300),
  269. macro_new_mag(saber_mg,300),
  270. macro_new_mag(saber_mg,300),
  271. macro_new_mag(saber_mg,300),
  272. macro_new_mag(saber_mg,300),
  273. macro_new_mag(saber_mg,300),
  274. "SmokeLauncherMag"
  275. };
  276. };
  277. class CargoTurret_01: CargoTurret_01{};
  278. class CargoTurret_02: CargoTurret_02{};
  279. class CargoTurret_03: CargoTurret_03{};
  280. class CargoTurret_04: CargoTurret_04{};
  281. };
  282. };
  283. class macro_new_vehicle(saber,republic_tx130_gl_MkII):3as_saber_m1G
  284. {
  285. scope=2;
  286. forceInGarage = 1;
  287. scopeCurator=2;
  288. displayName = "Saber TX-130 GL Mk.II"
  289. faction = macro_republic_faction
  290. editorSubcategory = macro_editor_cat(tank)
  291. vehicleClass = macro_editor_vehicle_type(tank)
  292. #include "../../common/smallvehiclekit.hpp"
  293. };
  294. class macro_new_vehicle(saber,republic_tx130_super_MkII):3as_saber_super
  295. {
  296. scope=2;
  297. forceInGarage = 1;
  298. scopeCurator=2;
  299. displayName = "Saber TX-130 Super Mk.II"
  300. faction = macro_republic_faction
  301. editorSubcategory = macro_editor_cat(tank)
  302. vehicleClass = macro_editor_vehicle_type(tank)
  303. #include "../../common/smallvehiclekit.hpp"
  304. class Turrets: Turrets
  305. {
  306. class Mainturret_super: Mainturret_super
  307. {
  308. weapons[]=
  309. {
  310. macro_new_weapon(saber_cannon,supermkii),
  311. macro_new_weapon(saber_mg,50cal),
  312. "SmokeLauncher"
  313. };
  314. magazines[]=
  315. {
  316. macro_new_mag(saber_super_3as,25),
  317. macro_new_mag(saber_super_3as,25),
  318. macro_new_mag(saber_super_3as,25),
  319. macro_new_mag(saber_super_3as,25),
  320. macro_new_mag(saber_super_3as,25),
  321. macro_new_mag(saber_super_3as,25),
  322. macro_new_mag(saber_super_3as,25),
  323. macro_new_mag(saber_mg,300),
  324. macro_new_mag(saber_mg,300),
  325. macro_new_mag(saber_mg,300),
  326. macro_new_mag(saber_mg,300),
  327. macro_new_mag(saber_mg,300),
  328. "SmokeLauncherMag"
  329. };
  330. };
  331. class CargoTurret_01: CargoTurret_01{};
  332. class CargoTurret_02: CargoTurret_02{};
  333. class CargoTurret_03: CargoTurret_03{};
  334. class CargoTurret_04: CargoTurret_04{};
  335. };
  336. };
  337. class macro_new_vehicle(saber,republic_tx130_recon_MkII):3as_saber_m1Recon
  338. {
  339. scope=2;
  340. forceInGarage = 1;
  341. scopeCurator=2;
  342. displayName = "Saber TX-130 Recon Mk.II"
  343. faction = macro_republic_faction
  344. editorSubcategory = macro_editor_cat(tank)
  345. vehicleClass = macro_editor_vehicle_type(tank)
  346. #include "../../common/smallvehiclekit.hpp"
  347. class Turrets: Turrets
  348. {
  349. class MainTurret_top: Mainturret_top{};
  350. class MainTurret_bottom: MainTurret_bottom
  351. {
  352. weapons[]=
  353. {
  354. macro_new_weapon(saber_cannon,reconautocannon),
  355. macro_new_weapon(saber_cannon,recon),
  356. macro_new_weapon(saber_mg,50cal),
  357. "SmokeLauncher",
  358. "missiles_DAGR"
  359. };
  360. magazines[]=
  361. {
  362. macro_new_mag(saber_recon,100),
  363. macro_new_mag(saber_recon,100),
  364. macro_new_mag(saber_recon,100),
  365. macro_new_mag(saber_recon,100),
  366. macro_new_mag(saber_recon,100),
  367. macro_new_mag(saber_recon,100),
  368. macro_new_mag(saber_mg,300),
  369. macro_new_mag(saber_mg,300),
  370. macro_new_mag(saber_mg,300),
  371. macro_new_mag(saber_mg,300),
  372. macro_new_mag(saber_mg,300),
  373. macro_new_mag(saber_recon_missile_he,4),
  374. "4Rnd_120mm_LG_cannon_missiles",
  375. "SmokeLauncherMag",
  376. "12Rnd_PG_missiles"
  377. };
  378. };
  379. class CargoTurret_01: CargoTurret_01{};
  380. class CargoTurret_02: CargoTurret_02{};
  381. class CargoTurret_03: CargoTurret_03{};
  382. class CargoTurret_04: CargoTurret_04{};
  383. };
  384. };
  385. };
  386. class CfgWeapons
  387. {
  388. class 3AS_Sabre_MG;
  389. class 3AS_Sabre_Cannons_Super;
  390. class LMG_M200;
  391. class 3as_saber_autocannon_30mm:LMG_M200
  392. {
  393. class HE;
  394. };
  395. class ACE_cannon_120mm_GT12;
  396. class 3AS_Sabre_Cannons;
  397. class macro_new_weapon(saber_main,cannon): 3AS_Sabre_Cannons
  398. {
  399. magazines[]=
  400. {
  401. macro_new_mag(saber_main,10)
  402. };
  403. };
  404. class macro_new_weapon(saber_mg,50cal):3AS_Sabre_MG
  405. {
  406. magazineReloadTime=3;
  407. magazines[]=
  408. {
  409. macro_new_mag(saber_mg,300),
  410. macro_new_mag(opfor_mg,300)
  411. };
  412. };
  413. class macro_new_weapon(saber_cannon,supermkii):3AS_Sabre_Cannons_Super
  414. {
  415. magazineReloadTime=6;
  416. magazines[]=
  417. {
  418. macro_new_mag(saber_super_3as,25)
  419. };
  420. };
  421. class macro_new_weapon(saber_cannon,reconautocannon):3as_saber_autocannon_30mm
  422. {
  423. class HE: HE
  424. {
  425. magazines[]=
  426. {
  427. macro_new_mag(saber_recon,100)
  428. };
  429. magazineReloadTime=3;
  430. };
  431. };
  432. class macro_new_weapon(saber_cannon,recon):ACE_cannon_120mm_GT12
  433. {
  434. displayName = "Magic Missile Launcher";
  435. magazineReloadTime=6;
  436. magazines[]=
  437. {
  438. macro_new_mag(saber_recon_missile_he,4),
  439. "4Rnd_120mm_LG_cannon_missiles"
  440. };
  441. };
  442. };
  443. class CfgMagazines
  444. {
  445. class 3AS_300Rnd_SabreMG_Mag;
  446. class 3AS_10Rnd_Sabre_mag;
  447. class 3as_saber_80Rnd_autocannon_30mm_mag;
  448. class 3as_25rnd_Sabre_Super_Mag;
  449. class 4Rnd_120mm_LG_cannon_missiles;
  450. class macro_new_mag(saber_mg,300):3AS_300Rnd_SabreMG_Mag
  451. {
  452. displayName="300 Rnd Heavy MG Ammo";
  453. displayNameShort="Heavy MG";
  454. ammo=macro_new_ammo(saber_mg)
  455. };
  456. class macro_new_mag(opfor_mg,300):3AS_300Rnd_SabreMG_Mag
  457. {
  458. displayName="300 Rnd Heavy MG Ammo";
  459. displayNameShort="Heavy MG";
  460. ammo=macro_new_ammo(opfor_mg)
  461. };
  462. class macro_new_mag(saber_recon,100):3as_saber_80Rnd_autocannon_30mm_mag
  463. {
  464. count=100;
  465. ammo=macro_new_ammo(saber_auto)
  466. };
  467. class macro_new_mag(saber_main,10): 3AS_10Rnd_Sabre_mag
  468. {
  469. displayNameShort="HEAT";
  470. ammo=macro_new_ammo(saber_main)
  471. };
  472. class macro_new_mag(saber_super_3as,25): 3as_25rnd_Sabre_Super_Mag
  473. {
  474. ammo=macro_new_ammo(saber_super_3as)
  475. };
  476. class macro_new_mag(saber_recon_missile_he,4) :4Rnd_120mm_LG_cannon_missiles
  477. {
  478. displayName="ATGM HE";
  479. displayNameShort="HE";
  480. ammo=macro_new_ammo(saber_recon_missile_he)
  481. };
  482. };
  483. class CfgAmmo
  484. {
  485. class 3AS_EC60_BluePlasma;
  486. class 3AS_Sabre_HE;
  487. class 3as_saber_autocannon_ammo;
  488. class 3AS_Sabre_AT;
  489. class M_120mm_cannon_ATGM_LG;
  490. class macro_new_ammo(saber_mg):3AS_EC60_BluePlasma
  491. {
  492. hit=30;
  493. indirectHit=0;
  494. indirectHitRange=0;
  495. cartridge="FxCartridge_127";
  496. visibleFire=8;
  497. audibleFire=120;
  498. dangerRadiusBulletClose=12;
  499. dangerRadiusHit=16;
  500. suppressionRadiusBulletClose=8;
  501. suppressionRadiusHit=12;
  502. cost=5;
  503. airLock=1;
  504. caliber=2.5999999;
  505. typicalSpeed=880;
  506. timeToLive=10;
  507. model = "\RD501_Vehicle_Weapons\_ammo\data\laser_small_green.p3d";
  508. tracerScale=1;
  509. tracerStartTime=0;
  510. tracerEndTime=10;
  511. };
  512. class macro_new_ammo(opfor_mg):3AS_EC60_BluePlasma
  513. {
  514. hit=30;
  515. indirectHit=0;
  516. indirectHitRange=0;
  517. cartridge="FxCartridge_127";
  518. visibleFire=8;
  519. audibleFire=120;
  520. dangerRadiusBulletClose=12;
  521. dangerRadiusHit=16;
  522. suppressionRadiusBulletClose=8;
  523. suppressionRadiusHit=12;
  524. cost=5;
  525. airLock=1;
  526. caliber=2.5999999;
  527. typicalSpeed=880;
  528. timeToLive=10;
  529. model = "\RD501_Vehicle_Weapons\_ammo\data\laser_small_red.p3d";
  530. tracerScale=1;
  531. tracerStartTime=0;
  532. tracerEndTime=10;
  533. };
  534. class macro_new_ammo(saber_auto): 3as_saber_autocannon_ammo
  535. {
  536. model = "\RD501_Vehicle_Weapons\_ammo\data\laser_medium_green.p3d";
  537. tracerScale=1;
  538. tracerStartTime=0;
  539. tracerEndTime=10;
  540. };
  541. class macro_new_ammo(saber_main): 3AS_Sabre_HE
  542. {
  543. model = "\RD501_Vehicle_Weapons\_ammo\data\laser_big_green.p3d";
  544. tracerScale=1;
  545. tracerStartTime=0;
  546. tracerEndTime=10;
  547. };
  548. class macro_new_ammo(saber_super_3as): 3AS_Sabre_AT
  549. {
  550. model = "\RD501_Vehicle_Weapons\_ammo\data\laser_big_green.p3d";
  551. tracerScale=1;
  552. tracerStartTime=0;
  553. tracerEndTime=10;
  554. };
  555. class macro_new_ammo(saber_recon_missile_he):M_120mm_cannon_ATGM_LG
  556. {
  557. hit=100;
  558. inirectHit=150;
  559. indirectHitRange=30;
  560. submunitionAmmo = "";
  561. submunitionDirectionType = "";
  562. };
  563. };