Jump to content
Sign in to follow this  
Roanoke

Pistol has no recoil

Recommended Posts

Hello all,

Trying to figure out why a pistol mod I have has no recoil. When I get in game, the gun has no visible recoil. Can ya'll check my config to see whats wrong? I'd really appreciate it.

http://pastebin.com/JPH8hkpe

Share this post


Link to post
Share on other sites

check your code around line 136, it looks like redundant "};"

Share this post


Link to post
Share on other sites

Took it out, however I get an error that reads "File 007_weapons\ppk\config.cpp, line 123:/CfgWeapons.WeaponSlotsInfo:Undefined base class 'WeaponSlotsInfo'

It won't even launch my game :/

Share this post


Link to post
Share on other sites
Took it out, however I get an error that reads "File 007_weapons\ppk\config.cpp, line 123:/CfgWeapons.WeaponSlotsInfo:Undefined base class 'WeaponSlotsInfo'

It won't even launch my game :/

Underneath

class Pistol; // External class reference

add

class WeaponSlotsInfo;

Share this post


Link to post
Share on other sites

After adding that, it is telling me that at line 55: .Pistol_Base_F: Undefined base class 'Pistol'

Share this post


Link to post
Share on other sites

I took your config from the first post, deleted one bracket from line 126 and deleted the second recoil property from line 129. After these adjustments, the game loaded without any errors, and the pistol was available in Virtual Arsenal. (Of course, the game kinda minded I don't have your files, such as the pistol's model.) You can find the code below, please try it. Something just might have gotten terribly broken during various attempts to find and fix those error messages (don't worry, it happens :) ).

// config.bin - 01:47:28 07/02/15, generated in 0.01 seconds
// Generated by unRap v1.06 by Kegetys
// Separate rootclasses: Disabled, Automatic comments: Enabled

#define private         0
#define protected               1
#define public          2

class CfgPatches {
       class 007_Weapons_Pistols_W_PPK {
               units[] = {};
               weapons[] = {"hgun_007_W_PPK"};
               requiredVersion = 0.1;
               requiredAddons[] = {"A3_Weapons_F"};
       };
};

class CfgAmmo {
       class BulletBase;       // External class reference

       class B_765x17_Ball : BulletBase {
               hit = 20;
               indirectHit = 0;
               indirectHitRange = 0;
               cartridge = "FxCartridge_9mm";
               cost = 100;
               typicalSpeed = 290;
               airFriction = -0.0016;
               caliber = 1.4;
               deflecting = 45;
               model = "\A3\Weapons_f\Data\bullettracer\tracer_white";
               tracerScale = 0.5;
               tracerStartTime = 0.05;
               tracerEndTime = 1;
               nvgOnly = 1;
               visibleFire = 3;        // how much is visible when this weapon is fired
               audibleFire = 5;
       };
};

class CfgMagazines {
       class CA_Magazine;      // External class reference

       class 8Rnd_765x17_Mag : CA_Magazine {
               scope = public;
               displayName = "7.65mm 7Rnd Mag";
               picture = "\007_weapons\PPK\UI\m_ppk.paa";
               ammo = "B_765x17_Ball";
               count = 7;
               mass = 5;
               initSpeed = 280;
               tracersEvery = 0;
               descriptionShort = "Caliber: 7.65x17 mm<br />Rounds: 8<br />Used in: Walther PPK";
       };
};
class Mode_SemiAuto;    // External class reference
class SlotInfo; // External class reference

class CfgWeapons {
       class Pistol;   // External class reference

       class Pistol_Base_F : Pistol {
               class WeaponSlotsInfo;  // External class reference
       };

       class hgun_007_W_PPK : Pistol_Base_F {
               scope = public;
               model = "\007_weapons\PPK\W_PPK.p3d";
               picture = "\007_weapons\PPK\UI\gear_007_PPK_X_CA.paa";
               magazines[] = {"8Rnd_765x17_Mag"};
               displayname = "Walther PPK";
               author = "lyotchik-sniper";
               descriptionShort = "Handgun<br />Caliber: 7.65x17 mm";

               class Library {
                       libTextDesc = "007 James Bond's Walther PPK";
               };
               bullet1[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_01", 0.501187, 1, 15};
               bullet2[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_02", 0.501187, 1, 15};
               bullet3[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_03", 0.501187, 1, 15};
               bullet4[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_04", 0.501187, 1, 15};
               bullet5[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_01", 0.398107, 1, 15};
               bullet6[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_02", 0.398107, 1, 15};
               bullet7[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_03", 0.398107, 1, 15};
               bullet8[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_04", 0.398107, 1, 15};
               bullet9[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_01", 0.223872, 1, 15};
               bullet10[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_02", 0.223872, 1, 15};
               bullet11[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_03", 0.223872, 1, 15};
               bullet12[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_04", 0.223872, 1, 15};
               soundBullet[] = {"bullet1", 0.083, "bullet2", 0.083, "bullet3", 0.083, "bullet4", 0.083, "bullet5", 0.083, "bullet6", 0.083, "bullet7", 0.083, "bullet8", 0.083, "bullet9", 0.083, "bullet10", 0.083, "bullet11", 0.083, "bullet12", 0.083};
               sounds[] = {"StandardSound", "SilencedSound"};

               class BaseSoundModeType {
                       weaponSoundEffect = "DefaultRifle";
                       closure1[] = {"A3\sounds_f\weapons\closure\closure_handgun_3", 0.158489, 1, 10};
                       closure2[] = {"A3\sounds_f\weapons\closure\closure_handgun_3", 0.158489, 1.1, 10};
                       soundClosure[] = {"closure1", 0.5, "closure2", 0.5};
               };

               class StandardSound : BaseSoundModeType {
                       begin1[] = {"A3\sounds_f\weapons\pistols\pistol_st_1", 0.562341, 1, 700};
                       begin2[] = {"A3\sounds_f\weapons\pistols\pistol_st_2", 0.562341, 1, 700};
                       begin3[] = {"A3\sounds_f\weapons\pistols\pistol_st_3", 0.562341, 1, 700};
                       soundBegin[] = {"begin1", 0.33, "begin2", 0.33, "begin3", 0.34};
               };

               class SilencedSound : BaseSoundModeType {
                       begin1[] = {"A3\sounds_f\weapons\silenced\silent-07", 0.562341, 1, 200};
                       begin2[] = {"A3\sounds_f\weapons\silenced\silent-08", 0.562341, 1, 200};
                       soundBegin[] = {"begin1", 0.5, "begin2", 0.5};
               };
               recoil = "recoil_pistol_light";
               recoilProne = "recoil_prone_pistol_light";
               reloadTime = 0.1;
               dispersion = 0.00493;
               drySound[] = {"A3\sounds_f\weapons\other\dry1", 0.398107, 1, 20};
               reloadMagazineSound[] = {"A3\sounds_f\weapons\pistols\p07_reload", 1, 1, 10};
               minRange = 5;
               minRangeProbab = 0.3;
               midRange = 25;
               midRangeProbab = 0.6;
               maxRange = 50;
               maxRangeProbab = 0.1;
               aiRateOfFire = 2;       // delay between shots at given distance
               aiRateOfFireDistance = 25;
               inertia = 0.2;
               dexterity = 1.8;
               initSpeed = 450;

               class WeaponSlotsInfo : WeaponSlotsInfo {
                       mass = 20;

                       class CowsSlot {};

                       class MuzzleSlot : SlotInfo {
                               linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
                               compatibleItems[] = {"muzzle_snds_007_ppk"};
                               iconPosition[] = {0.3, 0.38};
                               iconScale = 0.2;
                       };
               };
       };

       class muzzle_snds_H {
               class ItemInfo; // External class reference
       };

       class muzzle_snds_007_ppk : muzzle_snds_H {
               author = "lyotchik-sniper";
               _generalMacro = "muzzle_snds_acp";
               displayName = "Sound Suppressor (Walther PPK)";
               picture = "\A3\weapons_F\Data\UI\gear_acca_snds_l_CA.paa";
               model = "\007_weapons\PPK\Silencer.p3d";

               class ItemInfo : ItemInfo {
                       mass = 6;

                       class MagazineCoef {
                               initSpeed = 1.1;
                       };

                       class AmmoCoef {
                               hit = 1;
                               typicalSpeed = 1;
                               airFriction = 1;
                               visibleFire = 0.5;      // how much is visible when this weapon is fired
                               audibleFire = 0.3;
                               visibleFireTime = 0.5;  // how long is it visible
                               audibleFireTime = 0.5;
                               cost = 1;
                       };
                       soundTypeIndex = 1;
                       muzzleEnd = "zaslehPoint";
                       alternativeFire = "Zasleh2";

                       class MuzzleCoef
                       {
                               dispersionCoef = 1.0f;
                               artilleryDispersionCoef = 1.0f;  

                               fireLightCoef = 0.1f;

                               recoilCoef = 1.0f;
                               recoilProneCoef = 1.0f;

                               minRangeCoef = 1.0f; minRangeProbabCoef = 1.0f;
                               midRangeCoef = 1.0f; midRangeProbabCoef = 1.0f;
                               maxRangeCoef = 1.0f; maxRangeProbabCoef = 1.0f;
                       };
               };
               inertia = 0.1;
       };

       class hgun_007_W_PPK_snds : hgun_007_W_PPK {
               class LinkedItems {
                       class LinkedItemsMuzzle {
                               slot = "MuzzleSlot";
                               item = "muzzle_snds_007_ppk";
                       };
               };
       };
};

class cfgMods {
       author = 76561198041815156;
       timepacked = 1419980748;
};

Share this post


Link to post
Share on other sites

Appreciate the support so far. Sadly, it is still a straight shooter and refuses to jump in my hand. What else can I do to get this resolved?

Share this post


Link to post
Share on other sites

Do you mean it has no visible recoil? Or do the bullets not raise up even with rapid fire? Try the armory, fire you pistol as fast as you can and see what happens with the red lines.

Share this post


Link to post
Share on other sites

There is no recoil at all. Bullets have drop to them, the gun just doesn't jerk upward.

Share this post


Link to post
Share on other sites

I'm not sure if I understand your last comment, but I presume the bullets do raise when shooting and the pistol doesn't move. If this is the case, I'd say there are some missing animations in the pistol's model config.

Share this post


Link to post
Share on other sites

the so called visual recoil is set in the model.cfg, as an animation for the weapon

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×