config.cpp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  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_m1G;
  167. class 3as_saber_super_base:3as_saber_01_Base
  168. {
  169. class Turrets:Turrets
  170. {
  171. class Mainturret_super: MainTurret_bottom{};
  172. };
  173. };
  174. class 3as_saber_super:3as_saber_super_base
  175. {
  176. class Turrets: Turrets
  177. {
  178. class Mainturret_super: Mainturret_super{};
  179. };
  180. };
  181. class 3as_saber_03_Base:3as_saber_01_Base
  182. {
  183. class Turrets:Turrets
  184. {
  185. class MainTurret_top: Mainturret_top{};
  186. class MainTurret_bottom: MainTurret_bottom{};
  187. };
  188. };
  189. class 3as_saber_m1Recon:3as_saber_03_Base
  190. {
  191. class Turrets: Turrets
  192. {
  193. class MainTurret_top: Mainturret_top{};
  194. class MainTurret_bottom: MainTurret_bottom{};
  195. };
  196. };
  197. class macro_new_vehicle(saber,republic_tx130_MkII):3as_saber_m1
  198. {
  199. scope=2;
  200. forceInGarage = 1;
  201. scopeCurator=2;
  202. displayName = "Saber TX-130 Mk.II"
  203. faction = macro_republic_faction
  204. editorSubcategory = macro_editor_cat(tank)
  205. vehicleClass = macro_editor_vehicle_type(tank)
  206. #include "../../common/smallvehiclekit.hpp"
  207. class Turrets: Turrets
  208. {
  209. class MainTurret_bottom : MainTurret_bottom{
  210. weapons[]=
  211. {
  212. macro_new_weapon(saber_main,cannon),
  213. "SmokeLauncher",
  214. "missiles_DAGR"
  215. };
  216. magazines[]=
  217. {
  218. macro_new_mag(saber_main,10),
  219. macro_new_mag(saber_main,10),
  220. macro_new_mag(saber_main,10),
  221. macro_new_mag(saber_main,10),
  222. macro_new_mag(saber_main,10),
  223. macro_new_mag(saber_main,10),
  224. macro_new_mag(saber_main,10),
  225. "SmokeLauncherMag",
  226. "12Rnd_PG_missiles"
  227. };
  228. };
  229. class Mainturret_top : Mainturret_top
  230. {
  231. weapons[]=
  232. {
  233. macro_new_weapon(saber_mg,50cal),
  234. "SmokeLauncher"
  235. };
  236. magazines[]=
  237. {
  238. macro_new_mag(saber_mg,300),
  239. macro_new_mag(saber_mg,300),
  240. macro_new_mag(saber_mg,300),
  241. macro_new_mag(saber_mg,300),
  242. macro_new_mag(saber_mg,300),
  243. macro_new_mag(saber_mg,300),
  244. macro_new_mag(saber_mg,300),
  245. "SmokeLauncherMag"
  246. };
  247. };
  248. };
  249. };
  250. class macro_new_vehicle(saber,republic_tx130_gl_MkII):3as_saber_m1G
  251. {
  252. scope=2;
  253. forceInGarage = 1;
  254. scopeCurator=2;
  255. displayName = "Saber TX-130 GL Mk.II"
  256. faction = macro_republic_faction
  257. editorSubcategory = macro_editor_cat(tank)
  258. vehicleClass = macro_editor_vehicle_type(tank)
  259. #include "../../common/smallvehiclekit.hpp"
  260. };
  261. class macro_new_vehicle(saber,republic_tx130_super_MkII):3as_saber_super
  262. {
  263. scope=2;
  264. forceInGarage = 1;
  265. scopeCurator=2;
  266. displayName = "Saber TX-130 Super Mk.II"
  267. faction = macro_republic_faction
  268. editorSubcategory = macro_editor_cat(tank)
  269. vehicleClass = macro_editor_vehicle_type(tank)
  270. #include "../../common/smallvehiclekit.hpp"
  271. class Turrets: Turrets
  272. {
  273. class Mainturret_super: Mainturret_super
  274. {
  275. weapons[]=
  276. {
  277. macro_new_weapon(saber_cannon,supermkii),
  278. macro_new_weapon(saber_mg,50cal),
  279. "SmokeLauncher"
  280. };
  281. magazines[]=
  282. {
  283. macro_new_mag(saber_super_3as,25),
  284. macro_new_mag(saber_super_3as,25),
  285. macro_new_mag(saber_super_3as,25),
  286. macro_new_mag(saber_super_3as,25),
  287. macro_new_mag(saber_super_3as,25),
  288. macro_new_mag(saber_super_3as,25),
  289. macro_new_mag(saber_super_3as,25),
  290. macro_new_mag(saber_mg,300),
  291. macro_new_mag(saber_mg,300),
  292. macro_new_mag(saber_mg,300),
  293. macro_new_mag(saber_mg,300),
  294. macro_new_mag(saber_mg,300),
  295. "SmokeLauncherMag"
  296. };
  297. };
  298. };
  299. };
  300. class macro_new_vehicle(saber,republic_tx130_recon_MkII):3as_saber_m1Recon
  301. {
  302. scope=2;
  303. forceInGarage = 1;
  304. scopeCurator=2;
  305. displayName = "Saber TX-130 Recon Mk.II"
  306. faction = macro_republic_faction
  307. editorSubcategory = macro_editor_cat(tank)
  308. vehicleClass = macro_editor_vehicle_type(tank)
  309. #include "../../common/smallvehiclekit.hpp"
  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_cannon,recon),
  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. };
  342. class CfgWeapons
  343. {
  344. class 3AS_Sabre_MG;
  345. class 3AS_Sabre_Cannons_Super;
  346. class LMG_M200;
  347. class 3as_saber_autocannon_30mm:LMG_M200
  348. {
  349. class HE;
  350. };
  351. class 3AS_Sabre_Cannons;
  352. class macro_new_weapon(saber_main,cannon): 3AS_Sabre_Cannons
  353. {
  354. magazines[]=
  355. {
  356. macro_new_mag(saber_main,10)
  357. };
  358. };
  359. class macro_new_weapon(saber_mg,50cal):3AS_Sabre_MG
  360. {
  361. magazineReloadTime=3;
  362. magazines[]=
  363. {
  364. macro_new_mag(saber_mg,300)
  365. };
  366. };
  367. class macro_new_weapon(saber_cannon,supermkii):3AS_Sabre_Cannons_Super
  368. {
  369. magazineReloadTime=6;
  370. magazines[]=
  371. {
  372. macro_new_mag(saber_super_3as,25)
  373. };
  374. };
  375. class macro_new_weapon(saber_cannon,recon):3as_saber_autocannon_30mm
  376. {
  377. class HE: HE
  378. {
  379. magazines[]=
  380. {
  381. macro_new_mag(saber_recon,100)
  382. };
  383. magazineReloadTime=3;
  384. };
  385. };
  386. };
  387. class CfgMagazines
  388. {
  389. class 3AS_300Rnd_SabreMG_Mag;
  390. class 3AS_10Rnd_Sabre_mag;
  391. class 3as_saber_80Rnd_autocannon_30mm_mag;
  392. class 3as_25rnd_Sabre_Super_Mag;
  393. class macro_new_mag(saber_mg,300):3AS_300Rnd_SabreMG_Mag
  394. {
  395. displayName="300 Rnd Heavy MG Ammo";
  396. displayNameShort="Heavy MG";
  397. ammo=macro_new_ammo(saber_mg)
  398. };
  399. class macro_new_mag(saber_recon,100):3as_saber_80Rnd_autocannon_30mm_mag
  400. {
  401. count=100;
  402. ammo=macro_new_ammo(saber_auto)
  403. };
  404. class macro_new_mag(saber_main,10): 3AS_10Rnd_Sabre_mag
  405. {
  406. displayNameShort="HEAT";
  407. ammo=macro_new_ammo(saber_main)
  408. };
  409. class macro_new_mag(saber_super_3as,25): 3as_25rnd_Sabre_Super_Mag
  410. {
  411. ammo=macro_new_ammo(saber_super_3as)
  412. };
  413. };
  414. class CfgAmmo
  415. {
  416. class 3AS_EC60_BluePlasma;
  417. class 3AS_Sabre_HE;
  418. class 3as_saber_autocannon_ammo;
  419. class 3AS_Sabre_AT;
  420. class macro_new_ammo(saber_mg):3AS_EC60_BluePlasma
  421. {
  422. hit=30;
  423. indirectHit=0;
  424. indirectHitRange=0;
  425. cartridge="FxCartridge_127";
  426. visibleFire=8;
  427. audibleFire=120;
  428. dangerRadiusBulletClose=12;
  429. dangerRadiusHit=16;
  430. suppressionRadiusBulletClose=8;
  431. suppressionRadiusHit=12;
  432. cost=5;
  433. airLock=1;
  434. caliber=2.5999999;
  435. typicalSpeed=880;
  436. timeToLive=10;
  437. model = "\RD501_Vehicle_Weapons\_ammo\data\laser_small_green.p3d";
  438. tracerScale=1;
  439. tracerStartTime=0;
  440. tracerEndTime=10;
  441. };
  442. class macro_new_ammo(saber_auto): 3as_saber_autocannon_ammo
  443. {
  444. model = "\RD501_Vehicle_Weapons\_ammo\data\laser_medium_green.p3d";
  445. tracerScale=1;
  446. tracerStartTime=0;
  447. tracerEndTime=10;
  448. };
  449. class macro_new_ammo(saber_main): 3AS_Sabre_HE
  450. {
  451. model = "\RD501_Vehicle_Weapons\_ammo\data\laser_big_green.p3d";
  452. tracerScale=1;
  453. tracerStartTime=0;
  454. tracerEndTime=10;
  455. };
  456. class macro_new_ammo(saber_super_3as): 3AS_Sabre_AT
  457. {
  458. model = "\RD501_Vehicle_Weapons\_ammo\data\laser_big_green.p3d";
  459. tracerScale=1;
  460. tracerStartTime=0;
  461. tracerEndTime=10;
  462. };
  463. };