Advertisement
Guest User

Untitled

a guest
May 25th, 2015
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.30 KB | None | 0 0
  1. #include "basicdefines_A3.hpp"
  2.  
  3. class CfgPatches {
  4. class BLOT_Weapons_Berthier {
  5. units[] = {};
  6. weapons[] = {"BLOT_Berthier"};
  7. requiredVersion=0.1;
  8. requiredAddons[]={"A3_Weapons_F"};
  9. };
  10. };
  11.  
  12. /// All firemodes, to be sure
  13. class Mode_Single;
  14.  
  15. class CfgWeapons
  16. {
  17. class Rifle;
  18. class Rifle_Base_F: Rifle
  19. {
  20. class WeaponSlotsInfo;
  21. class GunParticles;
  22. };
  23.  
  24. class BLOT_Weapons_Berthier /// Just basic values common for all testing rifle variants
  25. {
  26. magazines[] = {ML_30Rnd_M1928_Mag}; /// original custom made magazines
  27. reloadAction = "GestureReloadMX"; /// MX hand animation actually fits this rifle well
  28. discreteDistanceInitIndex = 0; /// Ironsight zeroing is the lowest value by default
  29. maxZeroing = 100;
  30. // Size of recoil sway of the cursor
  31. maxRecoilSway=0.0125;
  32. // Speed at which the recoil sway goes back to zero (from maxRecoilSway to 0 in 1/swayDecaySpeed seconds)
  33. swayDecaySpeed=1.25;
  34. /// inertia coefficient of the weapon
  35. inertia = 0.5;
  36.  
  37. /*class GunParticles : GunParticles
  38. {
  39. class SecondEffect
  40. {
  41. positionName = "Nabojnicestart";
  42. directionName = "Nabojniceend";
  43. effectName = "CaselessAmmoCloud";
  44. };
  45. };
  46.  
  47. class WeaponSlotsInfo: WeaponSlotsInfo{};
  48. */
  49. ///////////////////////////////////////////////////// I R O N S I G H T S /////////////////////////////////////////////////////
  50. opticsZoomMin=0.375;
  51. opticsZoomMax=1.1;
  52. opticsZoomInit=0.75;
  53.  
  54. distanceZoomMin = 300;
  55. distanceZoomMax = 300;
  56. ///////////////////////////////////////////////////// I R O N S I G H T S /////////////////////////////////////////////////////
  57.  
  58. descriptionShort = "Berthier"; /// displayed on mouseOver in Inventory
  59. handAnim[] = {"OFP2_ManSkeleton", ""}; /// MX hand animation actually fits this rifle well
  60. dexterity = 1.8;
  61. selectionFireAnim = "zasleh"; /// are we able to get rid of all the zaslehs?
  62.  
  63. modes[] = {Single, FullAuto, fullauto_medium, single_medium_optics1, single_far_optics2}; /// Includes fire modes for AI
  64.  
  65. ////////////////////////////////////////////////////// NO OPTICS ///////////////////////////////////////////////////////////
  66.  
  67. class Single: Mode_SemiAuto /// Pew
  68. {
  69. sounds[] = { /// the new parameter to distinguish muzzle accessories type
  70. StandardSound // default zvuk
  71. };
  72.  
  73. class BaseSoundModeType
  74. {
  75.  
  76. weaponSoundEffect = "DefaultRifle"; /// custom made sounds
  77.  
  78. closure1[] = {"A3\sounds_f\weapons\closure\closure_rifle_2", 0.501187, 1, 10};
  79. closure2[] = {"A3\sounds_f\weapons\closure\closure_rifle_3", 0.501187, 1, 10};
  80. soundClosure[]={closure1,0.5, closure2,0.5}; /// custom made sounds
  81. };
  82.  
  83. class StandardSound: BaseSoundModeType
  84. {
  85. begin1[] = {"\Rifle\sound\p90-1.ogg", db-5, 1,800}; /// custom made sounds
  86. begin2[] = {"\Rifle\sound\p90-2.ogg", db-5, 1,800}; /// custom made sounds
  87. soundBegin[] = {begin1,0.5, begin2,0.5}; /// custom made sounds
  88. };
  89.  
  90. reloadTime = 0.083; /// means some 625 rounds per minute
  91. dispersion = 0.00087; /// A bit less than 3 MOA
  92.  
  93. recoil = "recoil_single_Test_rifle_01"; /// defined in cfgRecoils
  94. recoilProne = "recoil_single_prone_Test_rifle_01"; /// defined in cfgRecoils
  95.  
  96. minRange = 2; minRangeProbab = 0.5; /// Task Force Balance black magic - this is the probability which AI thinks it would hit target at set range with
  97. midRange = 200; midRangeProbab = 0.7; /// it is no real probability of hit, just used for AI to compute if the shot is worth to take - AI chooses highest
  98. maxRange = 400; maxRangeProbab = 0.3; /// probability of the weapon, does some calculation and compares it with calculated probability of other weapons
  99. };
  100.  
  101. class FullAuto: Mode_FullAuto /// Pew-pew-pew-pew-pew
  102. {
  103. sounds[] = { /// the new parameter to distinguish muzzle accessories type
  104. StandardSound // default zvuk
  105. };
  106.  
  107. class BaseSoundModeType
  108. {
  109.  
  110. weaponSoundEffect = "DefaultRifle"; /// custom made sounds
  111.  
  112. closure1[] = {"A3\sounds_f\weapons\closure\closure_rifle_2", 0.501187, 1, 10};
  113. closure2[] = {"A3\sounds_f\weapons\closure\closure_rifle_3", 0.501187, 1, 10};
  114. soundClosure[]={closure1,0.5, closure2,0.5}; /// custom made sounds
  115. };
  116.  
  117. class StandardSound: BaseSoundModeType
  118. {
  119. begin1[] = {"Rifle\sound\p90-1.ogg", db-5, 1,800}; /// custom made sounds
  120. begin2[] = {"Rifle\sound\p90-2.ogg", db-5, 1,800}; /// custom made sounds
  121. soundBegin[] = {begin1,0.5, begin2,0.5}; /// custom made sounds
  122. };
  123.  
  124.  
  125. reloadTime = 0.083;
  126. dispersion = 0.00087;
  127.  
  128. recoil = "recoil_auto_Test_rifle_01"; /// defined in cfgRecoils
  129. recoilProne = "recoil_auto_prone_Test_rifle_01"; /// defined in cfgRecoils
  130.  
  131. minRange = 0; minRangeProbab = 0.9;
  132. midRange = 15; midRangeProbab = 0.7;
  133. maxRange = 30; maxRangeProbab = 0.1;
  134.  
  135. aiRateOfFire = 0.000001;
  136. };
  137.  
  138. class fullauto_medium: FullAuto /// Pew, pew, pew only for AI
  139. {
  140. showToPlayer = 0;
  141. burst = 3;
  142.  
  143. minRange = 2; minRangeProbab = 0.5;
  144. midRange = 75; midRangeProbab = 0.7;
  145. maxRange = 150; maxRangeProbab = 0.05;
  146.  
  147. aiRateOfFire = 2.0;
  148. aiRateOfFireDistance = 200;
  149. };
  150.  
  151. //////////////////////////////////////////////////// OPTICS //////////////////////////////////////////////////
  152.  
  153. class single_medium_optics1: Single /// Pew for AI with collimator sights
  154. {
  155. requiredOpticType = 1;
  156. showToPlayer = 0;
  157.  
  158. minRange = 2; minRangeProbab = 0.2;
  159. midRange = 450; midRangeProbab = 0.7;
  160. maxRange = 600; maxRangeProbab = 0.2;
  161.  
  162. aiRateOfFire = 6;
  163. aiRateOfFireDistance = 600;
  164. };
  165.  
  166. class single_far_optics2: single_medium_optics1 /// Pew for AI with better sights
  167. {
  168. requiredOpticType = 2;
  169. showToPlayer = 0;
  170.  
  171. minRange = 100; minRangeProbab = 0.1;
  172. midRange = 500; midRangeProbab = 0.6;
  173. maxRange = 700; maxRangeProbab = 0.05;
  174.  
  175. aiRateOfFire = 8;
  176. aiRateOfFireDistance = 700;
  177. };
  178.  
  179. aiDispersionCoefY=6.0; /// AI should have some degree of greater dispersion for initial shoots
  180. aiDispersionCoefX=4.0; /// AI should have some degree of greater dispersion for initial shoots
  181. drySound[]={"A3\sounds_f\weapons\Other\dry_1", db-5, 1, 10}; /// custom made sounds
  182. reloadMagazineSound[]={"Rifle\sound\p90_boltpull.ogg",db-8,1, 30}; /// custom made sounds
  183. };
  184.  
  185. class BLOT_Weapon_berthier:BLOT_Weapon_berthier_Base
  186. {
  187. scope = 2; /// should be visible and useable in game
  188. displayName = "AdrianGun"; /// some name
  189. model = "\Rifle\AdrianGun.p3d"; /// path to model
  190.  
  191. picture = "\Rifle\Data\M1928.paa"; /// different accessories have M, S, T instead of X
  192. UiPicture = "\A3\Weapons_F\Data\UI\icon_gl_CA.paa"; /// weapon with grenade launcher should be marked such way
  193.  
  194. //weaponInfoType = "RscWeaponZeroing"; /// display with zeroing is good for iron sights
  195.  
  196. class WeaponSlotsInfo: WeaponSlotsInfo
  197. {
  198. mass = 100; /// some rough estimate
  199. };
  200. };
  201. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement