Jump to content
Ian Bones

Config Addon: Scope not showing up in arsenal

Recommended Posts

Hey guys,

i'm new with configs so please go easy on me. Im trying to add a new LRPS to the game by taking the old one and adding a new display-name, the NVG vision mode and some mass via config addon.

I do not get any Errors, Messages nor rtp-entries, not even script errors. Everything is fine until I'm looking for my scope in the Virtual Arsenal and can't find it.

 

Here is the config.cpp

Spoiler

class CfgPatches
{
	class ECOM
	{
		name = "Modpack";
		author = "Ian Bones";
		url = "";
		units[]=
		{};
		weapons[]=
		{
			"optic_LRPS_NV"
		};
	};
};

class CfgWeapons
{
	class ItemCore;
	class InventoryItem_Base_F;
	class InventoryOpticsItem_Base_F;
	class optic_LRPS: ItemCore
	{
		class ItemInfo
		{
			class OpticsModes
			{
				class Snip;
			};
		};
	};
	
	class optic_LRPS_NV: optic_LRPS
	{
		scope = 2;
		scopeArsenal = 2;
		displayname="LRPS (NV)";
		weaponInfoType="RscWeaponZeroing";
		class ItemInfo: ItemInfo
		{
			mass=35;
			class OpticsModes: OpticsModes
			{
				class Snip: Snip
				{
					visionMode[]=
					{
						"Normal",
						"NVG"
					};
				};
			};
		};
	};
};

 

 

The mods I use are CBA_A3, ACE3, ACEX, and ACRE2

 

It would be awesome if someone could help me and also explain it.

Share this post


Link to post
Share on other sites

Needs declaring as compatible with the weapons.

 

Since you're using CBA_A3, the easy way to do this is to add it to the ASDG Joint Rails class list e.g.

 

class CfgPatches
{
	class ECOM
	{
		name = "Modpack";
		author = "Ian Bones";
		url = "";
		units[]=
		{};
		weapons[]=
		{
			"optic_LRPS_NV"
		};
		requiredAddons[] = {"A3_Weapons_F","A3_Weapons_F_Acc","cba_jr"};
	};
};

class asdg_OpticRail;	// External class reference

class asdg_OpticRail1913: asdg_OpticRail 
{
	class compatibleItems 
	{
		optic_LRPS_NV = 1;
	};
};

class CfgWeapons
{
	class ItemCore;
	class InventoryItem_Base_F;
	class InventoryOpticsItem_Base_F;
	class optic_LRPS: ItemCore
	{
		class ItemInfo
		{
			class OpticsModes
			{
				class Snip;
			};
		};
	};
	
	class optic_LRPS_NV: optic_LRPS
	{
		scope = 2;
		scopeArsenal = 2;
		displayname="LRPS (NV)";
		weaponInfoType="RscWeaponZeroing";
		class ItemInfo: ItemInfo
		{
			mass=35;
			class OpticsModes: OpticsModes
			{
				class Snip: Snip
				{
					visionMode[]=
					{
						"Normal",
						"NVG"
					};
				};
			};
		};
	};
};

 

  • Like 1

Share this post


Link to post
Share on other sites

Sure, the Arsenal only shows attachments compatible with the weapon. I did not think of that and even if I did, I wouldn't have known how to do that. Thank you very much, kind Sir, you helped me a lot. (no kidding)

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

×