config.cpp 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. //Get this addons macro
  2. //get the macro for the air subaddon
  3. //get generlized macros
  4. #include "../../../RD501_main/config_macros.hpp"
  5. //General name of the vehicle
  6. #define vehicle_addon V_Wing
  7. #define patch_name MODNAME##vehicle_addon##_Patches
  8. #define vehicle_classname MODNAME##_##vehicle_addon
  9. #define new_v_wing_class(name) vehicle_classname##_##name
  10. class CfgPatches
  11. {
  12. class macro_patch_name(V_Wing)
  13. {
  14. addonRootClass=macro_patch_name(vehicles)
  15. requiredAddons[]=
  16. {
  17. macro_patch_name(vehicles)
  18. };
  19. requiredVersion=0.1;
  20. units[]=
  21. {
  22. macro_new_vehicle(v_wing,MKII)
  23. };
  24. weapons[]=
  25. {
  26. };
  27. };
  28. };
  29. #include "../../common/sensor_templates.hpp"
  30. class CBA_Extended_EventHandlers_base;
  31. class CfgVehicles
  32. {
  33. class Plane;
  34. class Plane_Base_F:Plane
  35. {
  36. class EventHandlers;
  37. };
  38. class swop_Vwing:Plane_Base_F
  39. {
  40. class Components;
  41. class Eventhandlers: EventHandlers
  42. {
  43. fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
  44. killed = "_this call (uinamespace getvariable 'BIS_fnc_effectKilled');";
  45. class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers_base {};
  46. };
  47. class ACE_SelfActions;
  48. };
  49. class macro_new_vehicle(v_wing,MKII):swop_Vwing
  50. {
  51. scope=2;
  52. scopeCurator=2;
  53. displayName = "V-Wing Mk.II";
  54. forceInGarage = 1;
  55. //dmg stuff
  56. armor=200;
  57. vtol = 4;
  58. faction = macro_republic_faction
  59. editorSubcategory = macro_editor_cat_air(Republic_vtol)
  60. vehicleClass = macro_editor_vehicle_type_air(Republic)
  61. class Eventhandlers
  62. {
  63. fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
  64. init = "[_this select 0] execVM '\Vwing\init.sqf';[_this select 0] execVM '\Vwing\initturbine.sqf';";
  65. killed = "_this call (uinamespace getvariable 'BIS_fnc_effectKilled');";
  66. class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers_base {};
  67. };
  68. //flight model
  69. maxSpeed = 4000;
  70. aileronSensitivity = 1.2;//1.7;
  71. elevatorSensitivity = 1.2//1.5;
  72. airBrakeFrictionCoef = 80.4;
  73. draconicForceXCoef = 300;
  74. draconicForceYCoef = 1;
  75. draconicForceZCoef = 1;
  76. altFullForce = 6000;
  77. altNoForce = 9000;
  78. draconicTorqueXCoef[] = {4, 5.1, 6.1, 7, 7.7, 8.3, 9, 9.1, 9.2, 9.2, 9.2};
  79. draconicTorqueYCoef[] = {0.5, 1, 2, 2.3, 3, 2.6, 2.4, 2.2, 2, 1.9, 1.8};
  80. VTOLYawInfluence = 6/3;
  81. VTOLPitchInfluence = 6/4;
  82. VTOLRollInfluence = 6/4;
  83. rudderInfluence = 0.766;
  84. rudderCoef[] = {0.2, 0.7, 1.5, 2, 2, 2.1, 2.4, 2.5, 2.6, 2.7, 2.7, 2.7, 2.7};
  85. rudderControlsSensitivityCoef = 4;
  86. gearsUpFrictionCoef = 25;
  87. class UserActions
  88. {
  89. class AfterburnerOn
  90. {
  91. displayName = "<t color='#4C9900'>[Afterburner On]</t>";
  92. shortcut = "";
  93. condition = "speed this >50 and (!(this getVariable 'AfterBurnervwing'))";
  94. statement = "this setVariable ['AfterBurnervwing',true,true];this spawn nes4day_afterburnervwing";
  95. priority = 1e+011;
  96. displayNameDefault = "";
  97. position = "pilotview";
  98. radius = 10;
  99. onlyforplayer = 1;
  100. shortcut="User19"
  101. };
  102. class AfterburnerOff
  103. {
  104. displayName = "<t color='#FF9933'>[Afterburner Off]</t>";
  105. shortcut = "";
  106. condition = "(this getVariable ['AfterBurnervwing',true])";
  107. statement = "this setVariable ['AfterBurnervwing',false,true]";
  108. priority = 1e+011;
  109. displayNameDefault = "";
  110. position = "pilotview";
  111. radius = 10;
  112. onlyforplayer = 1;
  113. shortcut="User20"
  114. };
  115. #include "../../common/universal_dmg_report.hpp"
  116. }
  117. class ACE_SelfActions:ACE_SelfActions
  118. {
  119. #include "../../common/universal_hud_color_changer.hpp"
  120. };
  121. #include "../../common/universal_mfd.hpp"
  122. weapons[] = {
  123. macro_new_weapon(wynd,a2a),
  124. macro_new_weapon(wynd,agm),
  125. macro_new_weapon(wynd,ugm),
  126. macro_basic_air_weapons,
  127. macro_new_weapon(generic,republic_aircraft_cannon)
  128. };
  129. magazines[] = {
  130. macro_basic_air_mags,
  131. macro_new_mag(generic_aircraft_cannon_green,1000),
  132. macro_new_mag(generic_aircraft_cannon_green,1000),
  133. macro_new_mag(a2a,4),
  134. macro_new_mag(a2a,4),
  135. macro_new_mag(agm,6),
  136. macro_new_mag(ugm,10)
  137. };
  138. class Components: Components
  139. {
  140. class SensorsManagerComponent
  141. {
  142. class Components
  143. {
  144. class IRSensorComponent:SensorTemplateIR
  145. {
  146. class AirTarget
  147. {
  148. //minRange = 500;
  149. //maxRange = 3000;
  150. minRange = 5;
  151. maxRange = 8000;
  152. objectDistanceLimitCoef = -1;
  153. viewDistanceLimitCoef = 1;
  154. };
  155. class GroundTarget
  156. {
  157. //minRange = 500;
  158. //maxRange = 2000;
  159. minRange = 5;
  160. maxRange = 8000;
  161. objectDistanceLimitCoef = 1;
  162. viewDistanceLimitCoef = 1;
  163. };
  164. maxTrackableSpeed = 700;
  165. //maxTrackableSpeed = 70;
  166. animDirection = "mainGun";
  167. //angleRangeHorizontal = 46;
  168. //angleRangeVertical = 34;
  169. angleRangeHorizontal = 170;
  170. angleRangeVertical = 170;
  171. aimdown = -0.25;
  172. };
  173. class VisualSensorComponent:SensorTemplateVisual
  174. {
  175. class AirTarget
  176. {
  177. //minRange = 500;
  178. //maxRange = 2000;
  179. minRange = 5;
  180. maxRange = 8000;
  181. objectDistanceLimitCoef = -1;
  182. viewDistanceLimitCoef = 1;
  183. };
  184. class GroundTarget
  185. {
  186. //minRange = 500;
  187. maxRange = 1500;
  188. minRange = 5;
  189. //maxRange = 7000;
  190. objectDistanceLimitCoef = 1;
  191. viewDistanceLimitCoef = 1;
  192. };
  193. //maxTrackableSpeed = 70;
  194. maxTrackableSpeed = 700;
  195. animDirection = "mainGun";
  196. //angleRangeHorizontal = 46;
  197. //angleRangeVertical = 34;
  198. angleRangeHorizontal = 170;
  199. angleRangeVertical = 170;
  200. aimdown = -0.25;
  201. };
  202. class ActiveRadarSensorComponent:SensorTemplateActiveRadar
  203. {
  204. class AirTarget
  205. {
  206. //minRange = 5000;
  207. //maxRange = 5000;
  208. minRange = 5;
  209. maxRange = 7000;
  210. objectDistanceLimitCoef = -1;
  211. viewDistanceLimitCoef = -1;
  212. };
  213. class GroundTarget
  214. {
  215. //minRange = 4000;
  216. //maxRange = 4000;
  217. minRange = 4;
  218. maxRange = 4000;
  219. objectDistanceLimitCoef = -1;
  220. viewDistanceLimitCoef = -1;
  221. };
  222. maxTrackableSpeed = 1250;
  223. //maxTrackableSpeed = 125;
  224. angleRangeHorizontal = 180;
  225. //angleRangeVertical = 90;
  226. angleRangeVertical = 180;
  227. groundNoiseDistanceCoef = -1;
  228. maxGroundNoiseDistance = -1;
  229. minSpeedThreshold = 0;
  230. maxSpeedThreshold = 0;
  231. aimDown = 30;
  232. };
  233. class PassiveRadarSensorComponent:SensorTemplatePassiveRadar
  234. {
  235. };
  236. class LaserSensorComponent:SensorTemplateLaser
  237. {
  238. };
  239. class NVSensorComponent:SensorTemplateNV
  240. {
  241. };
  242. };
  243. };
  244. class VehicleSystemsDisplayManagerComponentLeft: DefaultVehicleSystemsDisplayManagerLeft
  245. {
  246. class Components: Components
  247. {
  248. class VehiclePrimaryGunnerDisplay
  249. {
  250. componentType = "TransportFeedDisplayComponent";
  251. source = "PrimaryGunner";
  252. };
  253. class VehicleMissileDisplay
  254. {
  255. componentType = "TransportFeedDisplayComponent";
  256. source = "Missile";
  257. };
  258. class SensorDisplay
  259. {
  260. componentType = "SensorsDisplayComponent";
  261. range[] = {4000, 2000, 16000, 8000};
  262. resource = "RscCustomInfoSensors";
  263. };
  264. };
  265. };
  266. class VehicleSystemsDisplayManagerComponentRight: DefaultVehicleSystemsDisplayManagerRight
  267. {
  268. defaultDisplay = "SensorDisplay";
  269. class Components: Components
  270. {
  271. class VehiclePrimaryGunnerDisplay
  272. {
  273. componentType = "TransportFeedDisplayComponent";
  274. source = "PrimaryGunner";
  275. };
  276. class VehicleMissileDisplay
  277. {
  278. componentType = "TransportFeedDisplayComponent";
  279. source = "Missile";
  280. };
  281. class SensorDisplay
  282. {
  283. componentType = "SensorsDisplayComponent";
  284. range[] = {4000, 2000, 16000, 8000};
  285. resource = "RscCustomInfoSensors";
  286. };
  287. };
  288. };
  289. };
  290. };
  291. };