config_macros.hpp 7.2 KB

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