Jump to content
Sign in to follow this  
Evilcallum1991

Attachments Not Working & No Full Auto, Any Advice?

Recommended Posts

Hi,

 

Currently I am trying to finalize a weapon pack of about 16 new weapons for a Mod I am developing. 

All the weapons are working almost as intended, except two issues which I cannot find any understandable info on.

 

1. I cannot figure out how to add the full auto firing mode to my weapon.

2. I cannot seem to get the attachments to work as intended.

Here is my Config:

class CfgWeapons {
	class myGUN_base {
		
		access = 3;
		afmax = 0;
		aidispersioncoefx = 4;
		aidispersioncoefy = 5;
		airateoffire = 0.5;
		airateoffiredistance = 500;
		ammo = "";
		autofire = 1;
		autoreload = 0;
		backgroundreload = 0;
		ballisticscomputer = 0;
		bullet1[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_01.wav", 0.1, 1, 15};
		bullet10[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_02.wav", 0.01, 1, 15};
		bullet11[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_03.wav", 0.01, 1, 15};
		bullet12[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_04.wav", 0.01, 1, 15};
		bullet2[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_02.wav", 0.1, 1, 15};
		bullet3[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_03.wav", 0.177828, 1, 15};
		bullet4[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_04.wav", 0.177828, 1, 15};
		bullet5[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_01.wav", 0.1, 1, 15};
		bullet6[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_02.wav", 0.1, 1, 15};
		bullet7[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_03.wav", 0.1, 1, 15};
		bullet8[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_04.wav", 0.1, 1, 15};
		bullet9[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_01.wav", 0.01, 1, 15};
		candrop = 1;
		canlock = 0;
		canshootinwater = 0;
		cartridgepos = "nabojnicestart";
		cartridgevel = "nabojniceend";
		count = 0;
		cursor = "arifle";
		cursoraim = "CursorAim";
		cursoraimon = "";
		cursorsize = 1;
		cmimmunity = 1;
		descriptionshort = "Assault Rifle <br />Caliber: 5.56mm";
		detectrange = 0;
		dexterity = 1.64;
		discretedistance[] = {100, 300, 400, 600, 800};
		discretedistanceinitindex = 1;
		dispersion = 0.0001;
		displayname = "myGUN";
		disposableweapon = 0;
		distancezoommax = 300;
		distancezoommin = 300;
		drysound[] = {"A3\sounds_f\weapons\other\dry7.wav", 0.01, 1};
		emptysound[] = {"", 1, 1};
		enableattack = 1;
		ffcount = 3;
		fffrequency = 11;
		ffmagnitude = 0.5;
		fireanims[] = {};
		firelightduration = 0.05;
		firelightintensity = 0.012;
		firespreadangle = "3.0f";
		flash = "gunfire";
		flashsize = 0.5;
		forceoptics = 0;
		handanim[] = {"OFP2_ManSkeleton","\A3\Weapons_F\Rifles\MX\data\Anim\mx_cqc.rtm"};	//hand animation lcation
		hiddenselections[] = {};
		hiddenselectionstextures[] = {};
		hiddenunderwaterselections[] = {};
		hiddenunderwaterselectionstextures[] = {};
		htmax = 600;
		htmin = 1;
		initspeed = 0;
		irdistance = 0;
		irdotintensity = 0.001;
		irlaserend = "laser dir";
		irlaserpos = "laser pos";
		laser = 0;
		lockacquire = 1;
		lockedtargetsound[] = {"\A3\sounds_f\dummysound", 0.000316228, 6};
		lockingtargetsound[] = {"\A3\sounds_f\dummysound", 0.000316228, 2};
		magazinereloadtime = 0;
		magazines[] = {"myGUN_30Rnd_556x45_B_Stanag", "myGUN_30Rnd_556x45_T_Stanag"};							//magazines used
		maxleadspeed = 23;
		maxrange = 500;
		maxrangeprobab = 0.04;
		maxrecoilsway = 0.008;
		memorypointcamera = "eye";
		mfact = 1;
		mfmax = 0;
		midrange = 150;
		midrangeprobab = 0.58;
		minrange = 1;
		minrangeprobab = 0.3;
		model = "EC_Weapons\myGUN";					
		modelmagazine = "";
		modeloptics = "-";
		modelspecial = "";
		modes[] = {"Single", "Burst"};
		multiplier = 1;
		muzzleend = "konec hlavne";
		muzzlepos = "usti hlavne";
		muzzles[] = {"this"};
		namesound = "rifle";
		optics = 0;
		opticsdisableperipherialvision = 0.67;
		opticsflare = 0;
		opticsid = 0;
		opticsppeffects[] = {};
		opticszoominit = 0.75;
		opticszoommax = 1.1;
		opticszoommin = 0.375;
		picture = "\EC_Weapons\UI\gear_myGUN_x_ca";
		primary = 10;
		recoil = "assaultRifleBase";
		recoilprone = "assaultRifleBase";
		reloadaction = "GestureReloadMX";							//reload gesture
		reloadmagazinesound[] = {"A3\sounds_f\weapons\reloads\new_trg.wav", 0.1, 1, 30};
		reloadsound[] = {"", 1, 1};
		reloadtime = 0.15;
		scope = 0;
		selectionfireanim = "zasleh";
		showaimcursorinternal = 1;
		showempty = 1;
		shownunderwaterselections[] = {};
		showswitchaction = 0;
		showtoplayer = 1;
		simulation = "Weapon";
		sound[] = {"\EC_Weapons\sound\myGUN", 4,4};
		soundbegin[] = {"sound", 1};
		soundbeginwater[] = {"sound", 1};
		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};
		soundburst = 1;
		soundclosure[] = {"sound", 1};
		soundcontinuous = 0;
		soundend[] = {"sound", 1};
		soundloop[] = {"sound", 1};
		swaydecayspeed = 2;
		tbody = 100;
		texturetype = "default";
		type = 1;
		uipicture = "\A3\weapons_f\data\UI\icon_regular_CA.paa";
		useaction = 0;
		useactiontitle = "";
		useasbinocular = 0;
		usemodeloptics = 1;
		value = 4;
		weaponinfotype = "RscWeaponZeroing";
		weaponlockdelay = 0;
		weaponlocksystem = 0;
		weaponpoolavailable = 1;
		weaponsoundeffect = "";
		weight = 0;
		class Library {
			libtextdesc = "myGUN";
		};
		class GunClouds {
			access = 0;
			cloudletaccy = 0;
			cloudletalpha = 0.3;
			cloudletanimperiod = 1;
			cloudletcolor[] = {1, 1, 1, 0};
			cloudletduration = 0.05;
			cloudletfadein = 0;
			cloudletfadeout = 0.1;
			cloudletgrowup = 0.05;
			cloudletmaxyspeed = 100;
			cloudletminyspeed = -100;
			cloudletshape = "cloudletClouds";
			cloudletsize = 1;
			deltat = 0;
			initt = 0;
			interval = -0.02;
			size = 0.3;
			sourcesize = 0.02;
			timetolive = 0;
			class Table {
				class T0 {
					color[] = {1, 1, 1, 0};
					maxt = 0;
				};
			};
		};
		class WeaponSlotsInfo {
			allowedslots[] = {901};
			mass = 4;
			class MuzzleSlot {
				access = 1;  
 				compatibleitems[] = {"muzzle_snds_M"}; 
  				displayname = "Muzzle Slot"; 
  				linkproxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";  
 				scope = 0;
						};

			class CowsSlot {
				access = 1; 
  				compatibleitems[] = {"optic_Arco", "optic_aco", "optic_ACO_grn", "optic_hamr", "optic_Holosight"}; 
 				displayname = "Optics Slot";
  				linkproxy = "\A3\data_f\proxies\weapon_slots\TOP"; 
  				scope = 2;  
					};

			class PointerSlot {
				access = 1;
				compatibleitems[] = {"acc_pointer_IR", "acc_flashlight"};
				displayname = "Side Slot";
				linkproxy = "\A3\data_f\proxies\weapon_slots\SIDE";
				scope = 0;
					};
		};	
		
		class ItemInfo
                {
                        priority = 1;
                        RMBhint = "XMX";
                        onHoverText = "TODO XMX DSS";
                };
		
		class GunParticles {
			class FirstEffect {
				directionname = "Konec hlavne";
				effectname = "RifleAssaultCloud";
				positionname = "Usti hlavne";
			};
		};
		class Single: Mode_SemiAuto {

				sounds[] = {StandardSound, SilencedSound};

			class BaseSoundModeType 	
 			{
 				weaponSoundEffect  = "DefaultRifle";
 
 				closure1[]={"A3\sounds_f\weapons\closure\closure_rifle_2", db-12, 1,10};
 				closure2[]={"A3\sounds_f\weapons\closure\closure_rifle_3", db-12, 1,10};
 				soundClosure[]={closure1,0.5, closure2,0.5};
 			};

			class StandardSound: BaseSoundModeType /// Sounds inside this class are used when soundTypeIndex = 0, according to sounds[]
 			{
 				begin1[]={"EC_Weapons\sound\myGUN.wav", db0, 1,500};
 				begin2[]={"EC_Weapons\sound\myGUN.wav", db0, 1,500};
 				begin3[]={"EC_Weapons\sound\myGUN.wav", db0, 1,500};
 				soundBegin[]={begin1,0.33, begin2,0.33, begin3,0.34};
 			};

			class SilencedSound: BaseSoundModeType /// Sounds inside this class are used when soundTypeIndex = 1, according to sounds[]
 			{
 				begin1[]={"EC_Weapons\sound\myGUN.wav", db-1, 1,200};
 				begin2[]={"EC_Weapons\sound\myGUN.wav", db-1, 1,200};
 				soundBegin[]={begin1,0.5, begin2,0.5};
 			};

			aidispersioncoefx = 1.4;
			aidispersioncoefy = 1.7;
			airateoffire = 2;
			airateoffiredistance = 500;
			artillerycharge = 1;
			artillerydispersion = 1;
			autofire = 0;
			burst = 1;
			canshootinwater = 0;
			dispersion = 0.00093;
			displayname = "Semi";
			ffcount = 1;
			fffrequency = 11;
			ffmagnitude = 0.5;
			flash = "gunfire";
			flashsize = 0.1;
			maxrange = 500;
			maxrangeprobab = 0.2;
			midrange = 250;
			midrangeprobab = 0.7;
			minrange = 2;
			minrangeprobab = 0.3;
			multiplier = 1;
			recoil = "recoil_single_mk20";
			recoilProne = "recoil_single_prone_mk20";
			reloadtime = 0.065;
			requiredoptictype = -1;
			showtoplayer = 1;
			soundbeginwater[] = {"sound", 1};
			soundburst = 0;
			soundcontinuous = 0;
			soundend[] = {};
			soundloop[] = {};
			texturetype = "semi";
			useaction = 0;
			useactiontitle = "";
			
		};
		class Burst: Mode_Burst {									
			
				sounds[] = {StandardSound, SilencedSound};

			class BaseSoundModeType 	
 			{
 				weaponSoundEffect  = "DefaultRifle";
 
 				closure1[]={"A3\sounds_f\weapons\closure\closure_rifle_2", db-12, 1,10};
 				closure2[]={"A3\sounds_f\weapons\closure\closure_rifle_3", db-12, 1,10};
 				soundClosure[]={closure1,0.5, closure2,0.5};
 			};

			class StandardSound: BaseSoundModeType /// Sounds inside this class are used when soundTypeIndex = 0, according to sounds[]
 			{
 				begin1[]={"EC_Weapons\sound\myGUN.wav", db0, 1,500};
 				begin2[]={"EC_Weapons\sound\myGUN.wav", db0, 1,500};
 				begin3[]={"EC_Weapons\sound\myGUN.wav", db0, 1,500};
 				soundBegin[]={begin1,0.33, begin2,0.33, begin3,0.34};
 			};

			class SilencedSound: BaseSoundModeType /// Sounds inside this class are used when soundTypeIndex = 1, according to sounds[]
 			{
 				begin1[]={"EC_Weapons\sound\myGUN.wav", db-1, 1,200};
 				begin2[]={"EC_Weapons\sound\myGUN.wav", db-1, 1,200};
 				soundBegin[]={begin1,0.5, begin2,0.5};
 			};


			aidispersioncoefx = 2;
			aidispersioncoefy = 3;
			airateoffire = "1e-006";
			airateoffiredistance = 500;
			artillerycharge = 1;
			artillerydispersion = 1;
			autofire = 0;
			burst = 3;										
			canshootinwater = 0;
			dispersion = 0.00093;
			displayname = "Burst";
			ffcount = 1;
			fffrequency = 11;
			ffmagnitude = 0.5;
			flash = "gunfire";
			flashsize = 0.1;
			maxrange = 30;
			maxrangeprobab = 0.05;
			midrange = 15;
			midrangeprobab = 0.7;
			minrange = 0;
			minrangeprobab = 0.9;
			multiplier = 1;
			recoil = "recoil_auto_trg";
			recoilprone = "recoil_auto_prone_trg";
			reloadtime = 0.07;
			requiredoptictype = -1;
			showtoplayer = 1;
			soundbeginwater[] = {"sound", 1};
			soundburst = 0;
			soundcontinuous = 0;
			soundend[] = {"sound", 1};
			soundloop[] = {};
			texturetype = "burst";
			useaction = 0;
			useactiontitle = "";
			
		};
		
	};
	class myGUN : myGUN_base {
		scope = 2;
	};
};

Here a some screenshots for the attachment proxies on my model:

 

Proxie Placements   http://imgur.com/a/yFFKT

 

Proxie Selections      http://imgur.com/a/hriwx

 

Any Help would be greatly appreciated!

Share this post


Link to post
Share on other sites

Best guess is you're missing several classes that should be named above class CfgWeapons

I use Toadie2K's configs since I released the KSK addon that used his G36's

I have this above class CfgWeapons

 

 

class Mode_SemiAuto;
class Mode_Burst;
class Mode_FullAuto;
class MuzzleSlot;
class SlotInfo;
class CowsSlot;
class PointerSlot;
class asdg_SlotInfo;
class asdg_MuzzleSlot;
class asdg_MuzzleSlot_556;
class asdg_FrontSideRail;
class asdg_UnderSlot;
class asdg_OpticRail;
class asdg_OpticRail1913;
class asdg_OpticRail1913_short;
class CfgWeapons
{
    class Rifle;
    class UGL_F;
    //class WeaponSlotsInfo;
    class Rifle_Base_F: Rifle
    {
        class WeaponSlotsInfo;
    };
    class ItemCore;
    //class ItemInfo;
    class InventoryItem_Base_F;
    class InventoryMuzzleItem_Base_F;
    class InventoryOpticsItem_Base_F;
    class InventoryFlashLightItem_Base_F;
    class Zasleh2;
    class arifle_TRG20_F;

 

 

 

 

 

 

and for my attachments I have this

        class WeaponSlotsInfo: WeaponSlotsInfo
        {
        mass = 85;
        class MuzzleSlot: asdg_MuzzleSlot_556{};
        class PointerSlot: asdg_FrontSideRail{};
        class CowsSlot: asdg_OpticRail1913_short{};
        class UnderBarrelSlot
         {   access=0;
                         };
        };

Works for me no probs.

Share this post


Link to post
Share on other sites

I have placed all the classes you provided into my config, had to change your WeaponSlotInfo: WeaponSlotInfo to this to make the attachments available to this:

 

class WeaponSlotsInfo: WeaponSlotsInfo {
            allowedslots[] = {901};
            mass = 4;
            class MuzzleSlot {
                access = 1;  
                 compatibleitems[] = {"muzzle_snds_M"}; 
                  displayname = "Muzzle Slot"; 
                  linkproxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";  
                 scope = 0;
                        };

            class CowsSlot {
                access = 1; 
                  compatibleitems[] = {"optic_Arco", "optic_aco", "optic_ACO_grn", "optic_hamr", "optic_Holosight"}; 
                 displayname = "Optics Slot";
                  linkproxy = "\A3\data_f\proxies\weapon_slots\TOP"; 
                  scope = 2;  
                    };

            class PointerSlot {
                access = 1;
                compatibleitems[] = {"acc_pointer_IR", "acc_flashlight"};
                displayname = "Side Slot";
                linkproxy = "\A3\data_f\proxies\weapon_slots\SIDE";
                scope = 0;
                    };
        };

 

Although it still doesnt show the attachments :/

 

Thank you for the help!

Share this post


Link to post
Share on other sites

Fixed it.

 

It was an issue with the proxies defined on the model being incorrect.

 

The proxy did not contain the correct path for the link proxy as detailed above.

 

Thank you for your help.

  • Like 1

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  

×