Jump to content
Sign in to follow this  
LoOni3r

Custom Magazine not compatible

Recommended Posts

Hello,

I am currently playing around with configs. Different vehicles, different markers, different structures, etc.

class CfgPatches
{ 
    class test_config
    {
		author="LoOni3r";
		requiredAddons[]={};
		requiredVersion=0.1;
		units[]={};
		weapons[]={};
    };
};
class CfgAmmo
{
    class B_65x39_Caseless;
    class B_65x39_Caseless_new : B_65x39_Caseless
	{
		hit=240;
//		initSpeed = 3000;
    };
};

class CfgMagazines
{
	class 30Rnd_65x39_caseless_msbs_mag_Tracer;
	class 30Rnd_65x39_caseless_msbs_mag_Tracer_new: 30Rnd_65x39_caseless_msbs_mag_Tracer
	{
		ammo = "B_65x39_Caseless_new";
		displayName="100 6.5 mm 30Rnd Promet Tracer Mag2";
//		initSpeed=3000;
	};
};

 

 

Everything seems to be working.
The ammunition is displayed correctly.
The ammunition is weapon-compatible with a weapon.

 

does anyone have an idea what i may have forgotten?

 

many thanks for your help

Share this post


Link to post
Share on other sites

Need more information. What exactly are you having problems with?

 

You say it's "weapon-compatible" so that means it shows up when you select the Promet in the Arsenal? But how did you even accomplish that without modifying the CfgMagazineWells entry for the Promet (MX_65x39_MSBS)?

 

Also, the requiredAddons field is empty in your CfgPatches. You need to reference the vanilla configs first in order for your changes to properly override them (use A3_Data_F_Enoch_Loadorder).

Share this post


Link to post
Share on other sites

Hello drebin052,

 

Thank you for your answer.

 

 

Yes, the new magazine is displayed in the arsenal and inventory. The magazine is similar to that of the MX.

 

But also do not fit in the MX

 

Default Magazines:

image.png

 

New Magazine:

image.png

 

if I drag it over you can see that the new magazine is not compatible:

 

image.png

 

I looked at some examples from other addons and they all have the same structure as me.

 

 

other add-on creators have not entered anything under CfgPatches requiredAddons and weapons either.

Share this post


Link to post
Share on other sites

Your config is still incomplete. Even though it shows up in the Arsenal, the magazine can't be loaded into the Promet because it's not included in the Promet's magazineWell. Take a good look at this section on the official wiki to read up more about it.

 

Going back to the config, the following classes still need to be included for the custom magazine to be loadable:

 

CfgMagazineWells

class CfgMagazineWells
{
	class Test_Custom_Promet_Magwell	// Replace this classname with your own
	{
		Test_Custom_Promet_Magazines[] = 
		{
			"30Rnd_65x39_caseless_msbs_mag_Tracer_new"	// This is your custom magazine
		};
	};
};

 

CfgWeapons

class CfgWeapons
{
	class Rifle_Base_F;
	class arifle_MSBS65_base_F: Rifle_Base_F
	{
		magazineWell[] += 
		{
			"Test_Custom_Promet_Magwell"
		};
	};
};

Pay careful attention to the += operator used in the array. This will add your custom magazineWell to the Promet's magazine pool without overriding existing magwells from other mods.

 

55 minutes ago, LoOni3r said:

other add-on creators have not entered anything under CfgPatches requiredAddons and weapons either.

 

I'd er...suggest reading the official wiki page on how replacement addons work, and taking a look at how established mod teams write their configs like RHS/CUP. Many addon creators do not follow BI's standards and write their configs incorrectly.

Share this post


Link to post
Share on other sites

Thank you for your answer.
it doesn't want to work.
I have now switched to the AK-12 ammunition.
Mouse over the new ammunition shows that it is compatible with the AK-12.
The new ammunition cannot be loaded.

 

class CfgAmmo
{
    class B_762x39_Ball_F;
    class B_762x39_Ball_F_new : B_762x39_Ball_F
	{
		hit=240;
		initSpeed = 3000;
    };
};

class CfgMagazines
{
	class 30Rnd_762x39_Mag_Tracer_F;
	class 30Rnd_762x39_Mag_Tracer_F_new: 30Rnd_762x39_Mag_Tracer_F
	{
		ammo = "B_762x39_Ball_F_new";
		displayName="100 7.62 AK";
		initSpeed=3000;
	};
};
class CfgMagazineWells
{
	class Test_Custom_AK_Magwell	// Replace this classname with your own
	{
		Test_Custom_AK_Magazines[] = 
		{
			"30Rnd_762x39_Mag_Tracer_F_new"	// This is your custom magazine
		};
	};
};
class CfgWeapons
{
	class Rifle_Base_F;
	class arifle_MSBS65_base_F: Rifle_Base_F
	{
		magazineWell[] += 
		{
			"Test_Custom_AK_Magwell"
		};
	};
};

 

Share this post


Link to post
Share on other sites

Instead of doing weird mambo jambo with magazineWell extending in weapon config, you should rather extend content of original magazineWell. That on hover hint about compatibility is just a  static text - it doesn't indicate true compatibility.

 

 

class CfgAmmo
{
    class B_762x39_Ball_F;
    class B_762x39_Ball_F_new : B_762x39_Ball_F
	{
		hit=240;
		initSpeed = 3000;
    };
};

class CfgMagazines
{
	class 30Rnd_762x39_Mag_Tracer_F;
	class 30Rnd_762x39_Mag_Tracer_F_new: 30Rnd_762x39_Mag_Tracer_F
	{
		ammo = "B_762x39_Ball_F_new";
		displayName="100 7.62 AK";
		initSpeed=3000;
	};
};
class CfgMagazineWells
{
	class AK_762x39	// Common magazine well for all AKs chambered with 762x39 - works with mods too
	{
		Test_Custom_AK_Magazines[] = 
		{
			"30Rnd_762x39_Mag_Tracer_F_new"	// This is your custom magazine
		};
	};
};

 

  • 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  

×