config_macros.hpp 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. //---Basic Definitions---
  2. #define StabilizedInAxesNone 0
  3. #define StabilizedInAxisX 1
  4. #define StabilizedInAxisY 2
  5. #define StabilizedInAxesBoth 3
  6. #define MACRO_AUTHOR "RD501"
  7. #define MACRO_AUTHOR_PPL "Namenai"
  8. #define MODNAME RD501
  9. //---Basic Functions---
  10. #define UNDERSCORE_CONCAT(var1,var2) ##var1##_##var2
  11. #define ADDON UNDERSCORE_CONCAT(MODNAME,COMPONENT)
  12. #define ADDON_NICE Research & Development 501
  13. #define DANKAUTHORS QUOTE(RD501)
  14. //Adds the mod prefix to watever, used for classnames and such
  15. #define ADD_PREFIX(NAME) UNDERSCORE_CONCAT(MODNAME, NAME)
  16. #define concat_function(var) UNDERSCORE_CONCAT(ADDON, var)
  17. #define macro_single_quote(thing) '##thing##'
  18. #define macro_quote(thing) #thing
  19. #define macro_new_config_prop(name) MODNAME##_##name
  20. //Faction names,classes,and catagories
  21. #define macro_republic_faction MODNAME##_Republic_Faction
  22. #define macro_rebel_faction MODNAME##_Rebel_Faction
  23. #define macro_resistance_faction MODNAME##_Resistance_Faction
  24. #define macro_cis_faction MODNAME##_CIS_Faction
  25. #define macro_empire_faction MODNAME##_Empire_Faction
  26. #define macro_faction(name) MODNAME_##name##_Faction
  27. #define macro_first_order_faction MODNAME##_First_Order
  28. #define macro_ind_faction MODNAME##_Independent_Faction
  29. #define macro_civ_faction MODNAME##_Civ_Faction
  30. #define macro_editor_cat(name) MODNAME##_Editor_Category_##name
  31. #define macro_editor_cat_air(name) MODNAME##_Editor_Category_Air_##name
  32. #define macro_editor_vehicle_type(name) MODNAME##_Vehicle_Class_##name
  33. #define macro_editor_vehicle_type_air(name) MODNAME##_Air_Vehicle_Class_##name
  34. //---Functions---
  35. #define macro_mod_script_path RD501_Main\functions
  36. #define function_path(scriptname) quote_this(ADDON\scripts\scriptname.sqf)
  37. #define post_init_fnc(name)\
  38. class name\
  39. {\
  40. postInit = 1;\
  41. file = function_path(name) \
  42. };
  43. #define normal_fnc(name)\
  44. class name\
  45. {\
  46. file = function_path(name) \
  47. };
  48. #define macro_hud_changer_interaction_icons RD501_Main\textures\interaction_Icons
  49. #define macro_fnc_name(title) MODNAME##_fnc_##title
  50. #define macro_grp_fnc_name(grp,title) MODNAME##_##grp##_fnc_##title
  51. #define macro_preprocess_fnc(file)\
  52. call compileFinal preprocessFileLineNumbers 'COMPONENT##\##file'
  53. //---Patches---
  54. #define macro_patch_name(component) MODNAME##_patch_##component
  55. #define macro_A3_patch QUOTE(A3_Data_F_Tank_Loadorder)
  56. #define macro_root_req QUOTE(RD501_patch_main)
  57. #define macro_lvl1_req QUOTE(RD501_patch_particle_effects), QUOTE(RD501_patch_VenatorMK2), QUOTE(RD501_patch_emp)
  58. #define macro_lvl2_req QUOTE(RD501_patch_weapons), QUOTE(RD501_patch_jumppack), QUOTE(RD501_patch_helmets), QUOTE(RD501_patch_vehicle_weapons)
  59. #define macro_lvl3_req QUOTE(RD501_patch_units), QUOTE(RD501_patch_vehicles), QUOTE(RD501_patch_zeus)
  60. #define macro_lvl4_req QUOTE(RD501_patch_droids_config), QUOTE(macro_patch_name(laat_variants))
  61. #define macro_lvl5_req QUOTE(macro_patch_name(legacy_classnames))
  62. #define macro_end_patches macro_lvl5_req
  63. //---Weapons, Mags, and Ammo
  64. #define macro_scope_magnification(zoom) 0.25/zoom
  65. #define macro_new_scope(scopename) macro_modname##_weapon_scope_##scopename
  66. #define macro_new_weapon(family,name) MODNAME##_##family##_##name
  67. #define macro_new_weapon_nofam(name) MODNAME##_##name
  68. #define macro_new_ammo(name) MODNAME##_##name##_ammo
  69. #define macro_new_mag(name,count) MODNAME##_##name##_x##count##_mag
  70. #define macro_new_magwell(name) MODNAME##_##name##_magwell
  71. #define macro_new_magwell_array(name) MODNAME##_##name##_magwell[]
  72. #define macro_no_muzzle_impulse muzzleImpulseFactor[] = {0.00, 0.00};
  73. #define macro_new_recoil(name) MODNAME##_##name##_recoil
  74. //---Vehicles---
  75. #define macro_basic_air_weapons "Laserdesignator_pilotCamera","CMFlareLauncher"
  76. #define macro_basic_air_mags "Laserbatteries","300Rnd_CMFlare_Chaff_Magazine","300Rnd_CMFlare_Chaff_Magazine"
  77. #define macro_new_vehicle(group,name) MODNAME##_##group##_##name
  78. //----uniforms,units,vests
  79. //wat we see in arsenal,weapon
  80. #define macro_new_uniform_class(side,name) MODNAME##_##side##_uniform_##name
  81. //vests
  82. #define macro_new_vest_class(side,name) MODNAME##_##side##_vest_##name
  83. //actualyt skin of uniforms,vehicle
  84. #define macro_new_uniform_skin_class(side,name) MODNAME##_##side##_uniform_skin_##name
  85. //wat we see in zeus,vehicle
  86. #define macro_new_unit_class(side,name) MODNAME##_##side##_unit_##name
  87. //backpak
  88. #define macro_new_backpack_class(side,name) MODNAME##_##side##_##name##_backpack
  89. //compositions
  90. #define macro_new_composition(side,name) MODNAME##_##side##_composition_##name
  91. //backpack presets
  92. #define macro_b1_at_backpack_inv \
  93. class _xx_MAAWS_HE \
  94. {\
  95. magazine = "MRAWS_HE_F";\
  96. count = 3;\
  97. };\
  98. class _xx_MAAWS_HEAT\
  99. {\
  100. magazine = "MRAWS_HEAT_F";\
  101. count = 2;\
  102. };
  103. #define macro_b1_aa_backpack_inv \
  104. class _xx_Titan_AA\
  105. {\
  106. magazine = "Titan_AA";\
  107. count = 6;\
  108. };
  109. //---Ordanance---
  110. #define macro_new_ordnance(name) MODNAME##_Ordnance_##name
  111. #define macro_new_ordnance_ammo(name) MODNAME##_Ordnance_Ammo_##name
  112. //---helmets
  113. #define macro_custom_helmet_textures PATHTOEF(helmets,_textures)
  114. #define macro_new_helmet(group,name) MODNAME##_##group##_helmet_##name
  115. #define macro_new_helmet_jlts(group,name) MODNAME##_##group##_helmet_##name
  116. #define macro_clone_helmet_hitpoints\
  117. class HitpointsProtectionInfo\
  118. {\
  119. class Head\
  120. {\
  121. hitpointName = "HitHead";\
  122. armor = 50;\
  123. passThrough = 0.6;\
  124. };\
  125. };
  126. #define macro_clone_other_armor_values\
  127. explosionShielding = 2.2;\
  128. minimalHit = 0.01;\
  129. passThrough = 0.01;
  130. #define macro_ace_hearing_helmet_setting\
  131. ace_hearing_protection = 0.85;\
  132. ace_hearing_lowerVolume = 0.6;
  133. #define macro_rebreather_armor_stuff\
  134. containerClass = "Supply100";\
  135. mass = 20;\
  136. vestType = "Rebreather";
  137. #define macro_clone_armor_hitpoints \
  138. class HitpointsProtectionInfo\
  139. {\
  140. class Neck\
  141. {\
  142. hitpointName = "HitNeck";\
  143. armor = 8;\
  144. passThrough = 0.6;\
  145. };\
  146. class Arms\
  147. {\
  148. hitpointName = "HitArms";\
  149. armor = 16;\
  150. passThrough = 0.6;\
  151. };\
  152. class Chest\
  153. {\
  154. hitpointName = "HitChest";\
  155. armor = 32;\
  156. passThrough = 0.6;\
  157. };\
  158. class Diaphragm\
  159. {\
  160. hitpointName = "HitDiaphragm";\
  161. armor = 32;\
  162. passThrough = 0.6;\
  163. };\
  164. class Abdomen\
  165. {\
  166. hitpointName = "HitAbdomen";\
  167. armor = 16;\
  168. passThrough = 0.6;\
  169. };\
  170. class Pelvis\
  171. {\
  172. hitpointName = "HitPelvis";\
  173. armor = 16;\
  174. passThrough = 0.6;\
  175. };\
  176. class Body\
  177. {\
  178. hitpointName = "HitBody";\
  179. passThrough = 0.6;\
  180. };\
  181. };
  182. //---textures
  183. #define macro_unit_skin_textures RD501_Units\textures
  184. #define macro_vehicle_textures RD501_Vehicles\textures
  185. #define macro_b1_textures MRC\JLTS\characters\DroidArmor\data
  186. //---XEH prep---
  187. #define macro_prep_xeh(SCRIPT,name)\
  188. [QUOTE(macro_mod_script_path\SCRIPT),QUOTE(macro_fnc_name(name))] call CBA_fnc_compileFunction;
  189. //---particle efffects---
  190. #define macro_new_cloudlet(name) MODNAME##_cloudlet_##name
  191. #define macro_new_complex_effect(name) MODNAME##_particle_effect_##name
  192. #define macro_new_light(name) MODNAME##_light_##name
  193. //---NVG----
  194. #define macro_thermal_nvg_default \
  195. thermalMode[] = {8};