Jump to content
Sign in to follow this  
nzdfcrash

Replacement config for M14/M1A issue/s

Recommended Posts

Hi all yet again. I'm 'trying' to replace the default m14 in oa with a customised one i've worked on with a nicer model as the default is shockingly bad ie animations, ammo and recoil as well as not having full auto.

I've had a look at some replacement configs which my variation is based off roughly and the issue is well its not doing its job as in replacing the default M14.

Here's my config of which i don't spot any foreseeable issues with it, doesn't crash Binpbo and the log doesn't provide any clue/s.

class CfgPatches {

class ncs_m14_fix {
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.100000;
	requiredAddons[] = {"CAWeapons", "CAAir", "CATracked"};
};
};


class cfgMagazines {
/*extern*/ class CA_Magazine;

class 20Rnd_762x51_DMR: CA_Magazine {
	scope = 2;
	displayName = "$STR_MN_DMR";
	picture = "\ca\weapons\data\equip\M_US_DMR_CA.paa";
	count = 20;
	ammo = "B_762x51_Ball";
	initSpeed = 900;
	reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\M21_reload_v4", 0.010000, 1, 20};
	descriptionShort = "$STR_DSS_20RND_DMR";
};
};


/*extern*/ class Mode_SemiAuto;
/*extern*/ class Mode_FullAuto;

class cfgWeapons {
/*extern*/ class Rifle;

class M14_EP1: Rifle {
	scope = 2;
	model = "\ncs_m14_fix\ncs_m14";
	picture = "\ca\weapons_e\data\icons\M14_CA.paa";
	UiPicture = "\CA\weapons\data\Ico\i_regular_CA.paa";
	dexterity = 1.530000;
	displayName = "$STR_EP1_DN_M14_EP1";
	magazines[] = {"20Rnd_762x51_DMR"};
	reloadTime = 2;
	backgroundReload = 1;
	drySound[] = {"\ncs_m14_fix\sound\Dry", 0.000316, 1, 10};
	reloadMagazineSound[] = {"\ncs_m14_fix\sound\Reload", 0.056234, 1, 10};
	modes[] = {"Single", "FullAuto"};

	class Single: Mode_SemiAuto {
		begin1[] = {"\ncs_m14_fix\sound\m14_fire", 1.0, 0.99, 1200};
		begin2[] = {"\ncs_m14_fix\sound\m14_fire", 1.0, 1, 1200};
		begin3[] = {"\ncs_m14_fix\sound\m14_fire", 1.0, 1.01, 1200};
		soundBegin[] = {"begin1", 0.333, "begin2", 0.333, "begin3", 0.333};
		dispersion = 0.000450;
		recoil = "recoil_single_primary_5outof10";
		recoilProne = "recoil_single_primary_prone_4outof10";
		minRange = 2;
		minRangeProbab = 0.300000;
		midRange = 350;
		midRangeProbab = 0.700000;
		maxRange = 1000;
		maxRangeProbab = 0.050000;
		displayName = "";
	};

	class FullAuto: Mode_FullAuto {
		begin1[] = {"\ncs_m14_fix\sound\m14_fire", 1.0, 0.99, 1200};
		begin2[] = {"\ncs_m14_fix\sound\m14_fire", 1.0, 1, 1200};
		begin3[] = {"\ncs_m14_fix\sound\m14_fire", 1.0, 1.01, 1200};
		soundBegin[] = {"begin1", 0.333, "begin2", 0.333, "begin3", 0.333};
		soundBurst = 0;
		reloadTime = 0.100000;
		recoil = "recoil_auto_machinegun_8outof10";
		recoilProne = "recoil_auto_machinegun_prone_5outof10";
		dispersion = 0.001800;
		minRange = 0;
		minRangeProbab = 0.030000;
		midRange = 100;
		midRangeProbab = 0.070000;
		maxRange = 200;
		maxRangeProbab = 0.005000;
	};
	handAnim[] = {"OFP2_ManSkeleton", "\Ca\weapons\data\Anim\M24.rtm"};

	class Library {
		libTextDesc = "$STR_EP1_LIB_M14_EP1";
	};
	descriptionShort = "$STR_EP1_DN_M14_EP1";
};
};

Fingers crossed someone can spot the issue :D

Share this post


Link to post
Share on other sites

Some kind of a blind shot: are you sure the original weapon is defined in CAWeapons and not in CAWeapons_E? Also try to add the classname into the weapons array in cfgPatches section.

Share this post


Link to post
Share on other sites

Myke spotted the problem. When changing something you always have to put the addon you change under required addons.

This should do the trick:

 requiredAddons[] = {"CAWeapons_E","CAweapons","CAWeapons_E_M14","youraddon"};

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  

×