Advertisement
Guest User

Weaponshpp

a guest
Apr 20th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 17.14 KB | None | 0 0
  1.     class Lasgun_Base: Rifle_Base_F /// Just basic values common for all testing rifle variants
  2.     {
  3.         magazines[] = {"Lasgun_Mags"}; /// original custom made magazines and a group of several standardized mags
  4.         reloadAction = "GestureReloadMX"; /// MX hand animation actually fits this rifle well
  5.         magazineReloadSwitchPhase = 0.4; /// part of reload animation when new magazine ammo count should affect "revolving" animation source
  6.         discreteDistanceInitIndex = 0; /// Ironsight zeroing is the lowest value by default
  7.  
  8.         // Size of recoil sway of the cursor
  9.         maxRecoilSway=0.0115;
  10.         // Speed at which the recoil sway goes back to zero (from maxRecoilSway to 0 in 1/swayDecaySpeed seconds)
  11.         swayDecaySpeed=1.0;
  12.         /// inertia coefficient of the weapon
  13.         inertia = 0.5;
  14.        
  15.         /// positive value defines speed of the muzzle independent on the magazine setting, negative value is a coefficient of magazine initSpeed
  16.         initSpeed = -1; /// this means that initSpeed of magazine is used
  17.  
  18.         class GunParticles : GunParticles
  19.         {
  20.             class SecondEffect
  21.             {
  22.                 positionName = "Nabojnicestart";
  23.                 directionName = "Nabojniceend";
  24.                 effectName = "CaselessAmmoCloud";
  25.             };
  26.         };
  27.        
  28.         class WeaponSlotsInfo: WeaponSlotsInfo
  29.         {          
  30.         };     
  31.        
  32.  
  33.         opticsZoomMin=0.375;
  34.         opticsZoomMax=1.1;
  35.         opticsZoomInit=0.75;
  36.  
  37.         distanceZoomMin = 300;
  38.         distanceZoomMax = 300;
  39.  
  40.  
  41.         descriptionShort = "MK4 Imperial Lasgun"; /// displayed on mouseOver in Inventory
  42.         handAnim[] = {"OFP2_ManSkeleton", "\A3\Weapons_F\Rifles\Khaybar\data\anim\katiba.rtm"};
  43.         dexterity = 1.8;
  44.  
  45. //caseless ammo//
  46.         caseless[] = {"",1,1,1};  /// no sound of ejected brass
  47.         soundBullet[] = {caseless,1};
  48.        
  49.         selectionFireAnim = "muzzleFlash"; /// are we able to get rid of all the zaslehs?
  50.        
  51.         modes[] = {Single, FullAuto, fullauto_medium, single_medium_optics1, single_far_optics2}; /// Includes fire modes for AI
  52.        
  53.        
  54.         class Single: Mode_SemiAuto /// Pew
  55.         {
  56.             sounds[] = {        /// the new parameter to distinguish muzzle accessories type
  57.                 StandardSound, // default zvuk
  58.                 SilencedSound // silenced zvuk
  59.             };
  60.  
  61.             class BaseSoundModeType
  62.             {
  63.  
  64.                 weaponSoundEffect  = "DefaultRifle"; /// custom made sounds
  65.  
  66.                 closure1[]={"\WHweapons\Sounds\lgSemi.wss", db3, 1,10}; /// custom made sounds
  67.                 closure2[]={"\WHweapons\Sounds\lgSemib.wss", db3, 1,10}; /// custom made sounds
  68.                 soundClosure[]={closure1,0.5, closure2,0.5}; /// custom made sounds
  69.             };
  70.  
  71.             class StandardSound: BaseSoundModeType
  72.             {
  73.                 begin1[] = {"\WHweapons\Sounds\lgSemi.wss", db3, 1,1200}; /// custom made sounds
  74.                 begin2[] = {"\WHweapons\Sounds\lgSemib.wss", db3, 1,1200}; /// custom made sounds
  75.                 soundBegin[] = {begin1,0.5, begin2,0.5}; /// custom made sounds
  76.             };
  77.  
  78.             class SilencedSound: BaseSoundModeType
  79.             {
  80.                 begin1[]={"\WHweapons\Sounds\lgSemib.wss", db-2, 1,100};
  81.                 begin2[]={"\WHweapons\Sounds\lgSemi.wss", db-2, 1,100};
  82.                 begin3[]={"\WHweapons\Sounds\lgSemib.wss", db-2, 1,100};
  83.                 soundBegin[]={begin1,0.333, begin2,0.333, begin3,0.333};
  84.             };
  85.            
  86.             reloadTime = 0.27; /// means some 625 rounds per minute
  87.             dispersion = 0.0; /// A bit less than 3 MOA
  88.            
  89.             recoil = "recoil_single_Test_rifle_01"; /// defined in cfgRecoils
  90.             recoilProne = "recoil_single_prone_Test_rifle_01"; /// defined in cfgRecoils
  91.            
  92.             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
  93.             midRange = 400; 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
  94.             maxRange = 1500; maxRangeProbab = 0.3;  /// probability of the weapon, does some calculation and compares it with calculated probability of other weapons
  95.         };
  96.        
  97.         class FullAuto: Mode_FullAuto /// Pew-pew-pew-pew-pew
  98.         {
  99.             sounds[] = {        /// the new parameter to distinguish muzzle accessories type
  100.                 StandardSound, // default zvuk
  101.                 SilencedSound // silenced zvuk
  102.             };
  103.  
  104.             class BaseSoundModeType
  105.             {
  106.  
  107.                 weaponSoundEffect  = "DefaultRifle"; /// custom made sounds
  108.  
  109.                 closure1[]={"\WHweapons\Sounds\lgSemi.wss", db3, 1,10}; /// custom made sounds
  110.                 closure2[]={"\WHweapons\Sounds\lgSemib.wss", db3, 1,10}; /// custom made sounds
  111.                 soundClosure[]={closure1,0.5, closure2,0.5}; /// custom made sounds
  112.             };
  113.  
  114.             class StandardSound: BaseSoundModeType
  115.             {
  116.                 begin1[] = {"\WHweapons\Sounds\lgSemi.wss", db3, 1,1200}; /// custom made sounds
  117.                 begin2[] = {"\WHweapons\Sounds\lgSemi.wss", db3, 1,1200}; /// custom made sounds
  118.                 soundBegin[] = {begin1,0.5, begin2,0.5}; /// custom made sounds
  119.             };
  120.  
  121.             class SilencedSound: BaseSoundModeType
  122.             {
  123.                 begin1[]={"\WHweapons\Sounds\lgSemi.wss", db-2, 1,100};
  124.                 begin2[]={"\WHweapons\Sounds\lgSemib.wss", db-2, 1,100};
  125.                 begin3[]={"\WHweapons\Sounds\lgSemi.wss", db-2, 1,100};
  126.                 soundBegin[]={begin1,0.333, begin2,0.333, begin3,0.333};
  127.             };
  128.  
  129.             reloadTime = 0.27;
  130.             dispersion = 0.0;
  131.            
  132.             recoil = "recoil_auto_Test_rifle_01"; /// defined in cfgRecoils
  133.             recoilProne = "recoil_auto_prone_Test_rifle_01"; /// defined in cfgRecoils
  134.            
  135.             minRange = 0; minRangeProbab = 0.9;
  136.             midRange = 15; midRangeProbab = 0.7;
  137.             maxRange = 30; maxRangeProbab = 0.1;
  138.            
  139.             aiRateOfFire = 3.5;
  140.         };
  141.        
  142.         class fullauto_medium: FullAuto /// Pew, pew, pew only for AI
  143.         {
  144.             showToPlayer = 0;
  145.             burst = 3;
  146.            
  147.             minRange = 2; minRangeProbab = 0.5;
  148.             midRange = 75; midRangeProbab = 0.7;
  149.             maxRange = 100; maxRangeProbab = 0.05;
  150.            
  151.             aiRateOfFire = 3.5;
  152.             aiRateOfFireDistance = 100;
  153.         };
  154.  
  155.  
  156.         class single_medium_optics1: Single /// Pew for AI with collimator sights
  157.         {
  158.             requiredOpticType = 1;
  159.             showToPlayer = 0;
  160.            
  161.             minRange = 2; minRangeProbab = 0.2;
  162.             midRange = 450; midRangeProbab = 0.7;
  163.             maxRange = 1500; maxRangeProbab = 0.2;
  164.    
  165.             aiRateOfFire = 8;
  166.             aiRateOfFireDistance = 250;
  167.         };
  168.        
  169.         class single_far_optics2: single_medium_optics1 /// Pew for AI with better sights
  170.         {
  171.             requiredOpticType = 2;
  172.             showToPlayer = 0;
  173.            
  174.             minRange = 100; minRangeProbab = 0.1;
  175.             midRange = 250; midRangeProbab = 0.6;
  176.             maxRange = 1500; maxRangeProbab = 0.05;
  177.            
  178.             aiRateOfFire = 10;
  179.             aiRateOfFireDistance = 500;
  180.         };
  181.     };
  182.    
  183.     class LasCarbine_Base: Rifle_Base_F /// Just basic values common for all testing rifle variants
  184.     {
  185.         magazines[] = {"Lasgun_Mags", "LasCarbine_Mags"}; /// original custom made magazines and a group of several standardized mags
  186.         reloadAction = "GestureReloadMX"; /// MX hand animation actually fits this rifle well
  187.         magazineReloadSwitchPhase = 0.4; /// part of reload animation when new magazine ammo count should affect "revolving" animation source
  188.         discreteDistanceInitIndex = 0; /// Ironsight zeroing is the lowest value by default
  189.  
  190.         // Size of recoil sway of the cursor
  191.         maxRecoilSway=0.00825;
  192.         // Speed at which the recoil sway goes back to zero (from maxRecoilSway to 0 in 1/swayDecaySpeed seconds)
  193.         swayDecaySpeed=0.6;
  194.         /// inertia coefficient of the weapon
  195.         inertia = 0.3;
  196.        
  197.         /// positive value defines speed of the muzzle independent on the magazine setting, negative value is a coefficient of magazine initSpeed
  198.         initSpeed = -1; /// this means that initSpeed of magazine is used
  199.  
  200.         class GunParticles : GunParticles
  201.         {
  202.             class SecondEffect
  203.             {
  204.                 positionName = "Nabojnicestart";
  205.                 directionName = "Nabojniceend";
  206.                 effectName = "CaselessAmmoCloud";
  207.             };
  208.         };
  209.        
  210.         class WeaponSlotsInfo: WeaponSlotsInfo
  211.         {          
  212.         };     
  213.        
  214.  
  215.         opticsZoomMin=0.375;
  216.         opticsZoomMax=1.1;
  217.         opticsZoomInit=0.75;
  218.  
  219.         distanceZoomMin = 300;
  220.         distanceZoomMax = 300;
  221.  
  222.  
  223.         descriptionShort = "MK4 Imperial Lasgun"; /// displayed on mouseOver in Inventory
  224.         handAnim[] = {"OFP2_ManSkeleton", "\A3\Weapons_F\Rifles\Khaybar\data\anim\katiba.rtm"};
  225.         dexterity = 1.8;
  226.  
  227. //caseless ammo//
  228.         caseless[] = {"",1,1,1};  /// no sound of ejected brass
  229.         soundBullet[] = {caseless,1};
  230.        
  231.         selectionFireAnim = "muzzleFlash"; /// are we able to get rid of all the zaslehs?
  232.        
  233.         modes[] = {Single, FullAuto, fullauto_medium, single_medium_optics1, single_far_optics2}; /// Includes fire modes for AI
  234.                
  235.        
  236.         class Single: Mode_SemiAuto /// Pew
  237.         {
  238.             sounds[] = {        /// the new parameter to distinguish muzzle accessories type
  239.                 StandardSound, // default zvuk
  240.                 SilencedSound // silenced zvuk
  241.             };
  242.  
  243.             class BaseSoundModeType
  244.             {
  245.  
  246.                 weaponSoundEffect  = "DefaultRifle"; /// custom made sounds
  247.  
  248.                 closure1[]={"\WHweapons\Sounds\lgSemi.wss", db3, 1,10}; /// custom made sounds
  249.                 closure2[]={"\WHweapons\Sounds\lgSemib.wss", db3, 1,10}; /// custom made sounds
  250.                 soundClosure[]={closure1,0.5, closure2,0.5}; /// custom made sounds
  251.             };
  252.  
  253.             class StandardSound: BaseSoundModeType
  254.             {
  255.                 begin1[] = {"\WHweapons\Sounds\lgSemi.wss", db3, 1,1200}; /// custom made sounds
  256.                 begin2[] = {"\WHweapons\Sounds\lgSemib.wss", db3, 1,1200}; /// custom made sounds
  257.                 soundBegin[] = {begin1,0.5, begin2,0.5}; /// custom made sounds
  258.             };
  259.  
  260.             class SilencedSound: BaseSoundModeType
  261.             {
  262.                 begin1[]={"\WHweapons\Sounds\lgSemib.wss", db-2, 1,100};
  263.                 begin2[]={"\WHweapons\Sounds\lgSemi.wss", db-2, 1,100};
  264.                 begin3[]={"\WHweapons\Sounds\lgSemib.wss", db-2, 1,100};
  265.                 soundBegin[]={begin1,0.333, begin2,0.333, begin3,0.333};
  266.             };
  267.            
  268.             reloadTime = 0.27; /// means some 625 rounds per minute
  269.             dispersion = 0.0; /// A bit less than 3 MOA
  270.            
  271.             recoil = "recoil_single_Test_rifle_01"; /// defined in cfgRecoils
  272.             recoilProne = "recoil_single_prone_Test_rifle_01"; /// defined in cfgRecoils
  273.            
  274.             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
  275.             midRange = 400; 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
  276.             maxRange = 1500; maxRangeProbab = 0.3;  /// probability of the weapon, does some calculation and compares it with calculated probability of other weapons
  277.         };
  278.        
  279.         class FullAuto: Mode_FullAuto /// Pew-pew-pew-pew-pew
  280.         {
  281.             sounds[] = {        /// the new parameter to distinguish muzzle accessories type
  282.                 StandardSound, // default zvuk
  283.                 SilencedSound // silenced zvuk
  284.             };
  285.  
  286.             class BaseSoundModeType
  287.             {
  288.  
  289.                 weaponSoundEffect  = "DefaultRifle"; /// custom made sounds
  290.  
  291.                 closure1[]={"\WHweapons\Sounds\lgSemi.wss", db3, 1,10}; /// custom made sounds
  292.                 closure2[]={"\WHweapons\Sounds\lgSemib.wss", db3, 1,10}; /// custom made sounds
  293.                 soundClosure[]={closure1,0.5, closure2,0.5}; /// custom made sounds
  294.             };
  295.  
  296.             class StandardSound: BaseSoundModeType
  297.             {
  298.                 begin1[] = {"\WHweapons\Sounds\lgSemi.wss", db3, 1,1200}; /// custom made sounds
  299.                 begin2[] = {"\WHweapons\Sounds\lgSemi.wss", db3, 1,1200}; /// custom made sounds
  300.                 soundBegin[] = {begin1,0.5, begin2,0.5}; /// custom made sounds
  301.             };
  302.  
  303.             class SilencedSound: BaseSoundModeType
  304.             {
  305.                 begin1[]={"\WHweapons\Sounds\lgSemi.wss", db-2, 1,100};
  306.                 begin2[]={"\WHweapons\Sounds\lgSemib.wss", db-2, 1,100};
  307.                 begin3[]={"\WHweapons\Sounds\lgSemi.wss", db-2, 1,100};
  308.                 soundBegin[]={begin1,0.333, begin2,0.333, begin3,0.333};
  309.             };
  310.  
  311.             reloadTime = 0.27;
  312.             dispersion = 0.0;
  313.            
  314.             recoil = "recoil_auto_Test_rifle_01"; /// defined in cfgRecoils
  315.             recoilProne = "recoil_auto_prone_Test_rifle_01"; /// defined in cfgRecoils
  316.            
  317.             minRange = 0; minRangeProbab = 0.9;
  318.             midRange = 15; midRangeProbab = 0.7;
  319.             maxRange = 30; maxRangeProbab = 0.1;
  320.            
  321.             aiRateOfFire = 3.5;
  322.         };
  323.        
  324.         class fullauto_medium: FullAuto /// Pew, pew, pew only for AI
  325.         {
  326.             showToPlayer = 0;
  327.             burst = 3;
  328.            
  329.             minRange = 2; minRangeProbab = 0.5;
  330.             midRange = 75; midRangeProbab = 0.7;
  331.             maxRange = 100; maxRangeProbab = 0.05;
  332.            
  333.             aiRateOfFire = 3.5;
  334.             aiRateOfFireDistance = 100;
  335.         };
  336.  
  337.         class single_medium_optics1: Single /// Pew for AI with collimator sights
  338.         {
  339.             requiredOpticType = 1;
  340.             showToPlayer = 0;
  341.            
  342.             minRange = 2; minRangeProbab = 0.2;
  343.             midRange = 450; midRangeProbab = 0.7;
  344.             maxRange = 1500; maxRangeProbab = 0.2;
  345.    
  346.             aiRateOfFire = 8;
  347.             aiRateOfFireDistance = 250;
  348.         };
  349.        
  350.         class single_far_optics2: single_medium_optics1 /// Pew for AI with better sights
  351.         {
  352.             requiredOpticType = 2;
  353.             showToPlayer = 0;
  354.            
  355.             minRange = 100; minRangeProbab = 0.1;
  356.             midRange = 250; midRangeProbab = 0.6;
  357.             maxRange = 1500; maxRangeProbab = 0.05;
  358.            
  359.             aiRateOfFire = 10;
  360.             aiRateOfFireDistance = 500;
  361.         };
  362.     }; 
  363.  
  364.     class M39LasgunBlack: Lasgun_Base
  365.     {  
  366.         scope = 2; /// should be visible and useable in game
  367.         displayName = "M39 Lasgun"; /// some name
  368.         model = "\WHweapons\M39lc_blk\model\m39lc_blk.p3d"; /// path to model
  369.  
  370.         picture = "\Samples_f\Test_weapon_01\Data\UI\gear_test_weapon_01_X_CA.paa"; /// different accessories have M, S, T instead of X
  371.         UiPicture = "\A3\Weapons_F\Data\UI\icon_gl_CA.paa"; /// weapon with grenade launcher should be marked such way
  372.  
  373.         weaponInfoType = "RscWeaponZeroing"; /// display with zeroing is good for iron sights
  374.  
  375.         class WeaponSlotsInfo: WeaponSlotsInfo
  376.         {
  377.             mass = 1; /// some rough estimate
  378.         };
  379.     };
  380.    
  381.     class M39LasgunG: Lasgun_Base
  382.     {  
  383.         scope = 2; /// should be visible and useable in game
  384.         displayName = "M39 Lasgun"; /// some name
  385.         model = "\WHweapons\M39lc_G\model\m39lc_G.p3d"; /// path to model
  386.  
  387.         picture = "\Samples_f\Test_weapon_01\Data\UI\gear_test_weapon_01_X_CA.paa"; /// different accessories have M, S, T instead of X
  388.         UiPicture = "\A3\Weapons_F\Data\UI\icon_gl_CA.paa"; /// weapon with grenade launcher should be marked such way
  389.  
  390.         weaponInfoType = "RscWeaponZeroing"; /// display with zeroing is good for iron sights
  391.  
  392.         class WeaponSlotsInfo: WeaponSlotsInfo
  393.         {
  394.             mass = 1; /// some rough estimate
  395.         };
  396.     }; 
  397.    
  398.     class M39LasgunBP: Lasgun_Base
  399.     {  
  400.         scope = 2; /// should be visible and useable in game
  401.         displayName = "M39 Lasgun"; /// some name
  402.         model = "\WHweapons\M39lc_bp\model\m39lc_bp.p3d"; /// path to model
  403.  
  404.         picture = "\Samples_f\Test_weapon_01\Data\UI\gear_test_weapon_01_X_CA.paa"; /// different accessories have M, S, T instead of X
  405.         UiPicture = "\A3\Weapons_F\Data\UI\icon_gl_CA.paa"; /// weapon with grenade launcher should be marked such way
  406.  
  407.         weaponInfoType = "RscWeaponZeroing"; /// display with zeroing is good for iron sights
  408.  
  409.         class WeaponSlotsInfo: WeaponSlotsInfo
  410.         {
  411.             mass = 1; /// some rough estimate
  412.         };
  413.     }; 
  414.    
  415.     class M36LasCarbineBlk: LasCarbine_Base
  416.     {  
  417.         scope = 2; /// should be visible and useable in game
  418.         displayName = "M36 LasCarbine"; /// some name
  419.         model = "\WHweapons\m36lc_blk\model\m36lc_blk.p3d"; /// path to model
  420.  
  421.         picture = "\Samples_f\Test_weapon_01\Data\UI\gear_test_weapon_01_X_CA.paa"; /// different accessories have M, S, T instead of X
  422.         UiPicture = "\A3\Weapons_F\Data\UI\icon_gl_CA.paa"; /// weapon with grenade launcher should be marked such way
  423.  
  424.         weaponInfoType = "RscWeaponZeroing"; /// display with zeroing is good for iron sights
  425.  
  426.         class WeaponSlotsInfo: WeaponSlotsInfo
  427.         {
  428.             mass = 1; /// some rough estimate
  429.         };
  430.     }; 
  431.    
  432.     class M36LasCarbineBP: LasCarbine_Base
  433.     {  
  434.         scope = 2; /// should be visible and useable in game
  435.         displayName = "M36 LasCarbine"; /// some name
  436.         model = "\WHweapons\m36lc_bp\model\m36lc_bp.p3d"; /// path to model
  437.  
  438.         picture = "\Samples_f\Test_weapon_01\Data\UI\gear_test_weapon_01_X_CA.paa"; /// different accessories have M, S, T instead of X
  439.         UiPicture = "\A3\Weapons_F\Data\UI\icon_gl_CA.paa"; /// weapon with grenade launcher should be marked such way
  440.  
  441.         weaponInfoType = "RscWeaponZeroing"; /// display with zeroing is good for iron sights
  442.  
  443.         class WeaponSlotsInfo: WeaponSlotsInfo
  444.         {
  445.             mass = 1; /// some rough estimate
  446.         };
  447.     }; 
  448.  
  449.     class M36LasCarbineG: LasCarbine_Base
  450.     {  
  451.         scope = 2; /// should be visible and useable in game
  452.         displayName = "M36 LasCarbine"; /// some name
  453.         model = "\WHweapons\m36lc_G\model\m36lc_G.p3d"; /// path to model
  454.  
  455.         picture = "\Samples_f\Test_weapon_01\Data\UI\gear_test_weapon_01_X_CA.paa"; /// different accessories have M, S, T instead of X
  456.         UiPicture = "\A3\Weapons_F\Data\UI\icon_gl_CA.paa"; /// weapon with grenade launcher should be marked such way
  457.  
  458.         weaponInfoType = "RscWeaponZeroing"; /// display with zeroing is good for iron sights
  459.  
  460.         class WeaponSlotsInfo: WeaponSlotsInfo
  461.         {
  462.             mass = 1; /// some rough estimate
  463.         };
  464.     };     
  465.    
  466.     class Longlas: Lasgun_Base
  467.     {  
  468.         magazines[] = {"hotshot_mag", "Hotshot_Mags"}; /// original custom made magazines and a group of several standardized mags     
  469.         scope = 2; /// should be visible and useable in game
  470.         displayName = "Long-las Sniper"; /// some name
  471.         modes[] = {Single, fullauto_medium, single_medium_optics1, single_far_optics2};        
  472.         model = ""; /// path to model
  473.  
  474.         picture = "\Samples_f\Test_weapon_01\Data\UI\gear_test_weapon_01_X_CA.paa"; /// different accessories have M, S, T instead of X
  475.         UiPicture = "\A3\Weapons_F\Data\UI\icon_gl_CA.paa"; /// weapon with grenade launcher should be marked such way
  476.  
  477.         weaponInfoType = "RscWeaponZeroing"; /// display with zeroing is good for iron sights
  478.  
  479.         class WeaponSlotsInfo: WeaponSlotsInfo
  480.         {
  481.             mass = 3; /// some rough estimate
  482.         };
  483.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement