1
0

config_macros.hpp 7.4 KB

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