Jump to content
7Y-Loki

Custom Grenade and Explosive not showing up in arsenal

Recommended Posts

Good day,
I have been searching this forum for a solution but either I can't find it or it is not yet here.
 
I belong to a small group of modders and we have done our own smoke grenade and dinamite models and added them succesfuly into an also custom cratebox. We can then lay down the cratebox in the editor and access these items from there, or by putting them directly into a custom faction soldier's inventory.
However, we cannot see them in the virtual arsenal, and would really appreciate it if someone could point us in the right direction.
 
Here are the configs:

 

(DINAMITE):


class CfgPatches
{
	class go9_dinamita
	{
		units[] = {};
		weapons[] = {};
		requiredVersion = 1.0.0;
		requiredAddons[] = {"A3_Weapons_F","A3_Modules_F_Misc"};
	};
};

class cfgAmmo
{
	class SatchelCharge_Remote_Ammo;
	
	class Dinamita: SatchelCharge_Remote_Ammo
	{
		author = "RealityTeamMod";
		scope = 2;
		displayName="Carga de Dinamita";
		picture = "\go9_dinamita\data\ico\dinamita.paa";
		hit=8000;
		indirectHit=8000;
		indirectHitRange=15;
		deflecting = 25;
		model = "\go9_dinamita\go9_dinamita.p3d";
		mineModelDisabled = "\go9_dinamita\go9_dinamita.p3d";
		soundHit[] = {"A3\Sounds_F\arsenal\explosives\mines\Explosive_Charge_01",3.1622777,1,1500};
		defaultMagazine = "DinamitaM";
		ExplosionEffects = "MineNondirectionalExplosion";
		CraterEffects = "MineNondirectionalCrater";
		whistleDist = 32;
		mineInconspicuousness = 5;
		mineTrigger = "RemoteTrigger";
		triggerWhenDestroyed = 0;
	};
	class Dinamita_Scripted: SatchelCharge_Remote_Ammo
	{
		triggerWhenDestroyed = 1;
	};
};

class cfgMagazines
{
	class SatchelCharge_Remote_Mag;
	
	class DinamitaM: SatchelCharge_Remote_Mag
	{
		author = "Reality Team Mod";
		scope = 2;
		mass = 12;
		displayName="Carga de dinamita";
		picture = "\go9_dinamita\data\ico\dinamita.paa";
		model = "\go9_dinamita\go9_dinamita.p3d";
		ammo = "Dinamita";
		descriptionShort = "¡Cuidado con los dedos!";
		class Library
		{
			libTextDesc = "Carga de dinamita";
		};
	};
};

(SMOKE GRENADE):

class CfgPatches
{
	class go9_granada_s_v
	{
		units[] = {};
		weapons[] = {"granada_humo_throw"};
		requiredAddons[] = {"A3_weapons_F"};
	};
};
	
class cfgAmmo	
{
	class Default;	// External class reference
	class Grenade : Default {};
	class GrenadeHand : Grenade {};
	class SmokeShell: GrenadeHand {};
	
	class go9_granada_Sammo_b: SmokeShell
	{
		model = "\go9_granada_s_v\go9_granada_s_v.p3d";
		timeToLive = 80;
		smokeColor[] = {1,1,1,1};
		effectsSmoke = "SmokeShellWhiteEffect";	
	};
	class go9_granada_Sammo_v: SmokeShell
	{
		model = "\go9_granada_s_v\go9_granada_s_v.p3d";
		timeToLive = 80;
		smokeColor[] = {0.2125,0.6258,0.48909998,1};
		effectsSmoke = "SmokeShellGreenEffect";	
	};
	class go9_granada_Sammo_r: SmokeShell
	{
		model = "\go9_granada_s_v\go9_granada_s_v.p3d";
		timeToLive = 80;
		smokeColor[] = {0.8438,0.1383,0.1353,1};
		effectsSmoke = "SmokeShellRedEffect";	
	};
};

class cfgMagazines
{
	class Default;	// External class reference
	class CA_Magazine : Default {};
	class HandGrenade : CA_Magazine {};
	class SmokeShell :  HandGrenade {};
	
	class go9_granada_Sshell_b: SmokeShell
	{
		author = "RealityTeamMod";
		scope = 2;        
		displayName = "Granada S Blanco";
		displayNameShort = "Humo Blanco";
		picture = "\go9_granada_s_v\data\ico\go9_granada_s_blanco.paa";
		model = "\go9_granada_s_v\go9_granada_s_v.p3d";
		ammo = "go9_granada_Sammo_b";
		descriptionShort = "Granada S de humo blanco RTM";
	};
	class go9_granada_Sshell_r: SmokeShell
	{
		author = "RealityTeamMod";
		scope = 2;         
		displayName = "Granada S Rojo";
		displayNameShort = "Humo Rojo";
		picture = "\go9_granada_s_v\data\ico\go9_granada_s_rojo.paa";
		model = "\go9_granada_s_v\go9_granada_s_v.p3d";
		ammo = "go9_granada_Sammo_r";
		descriptionShort = "Granada S de humo rojo RTM";
	};
	class go9_granada_Sshell_v: SmokeShell
	{
		author = "RealityTeamMod";
		scope = 2;        
		displayName = "Granada S Verde";
		displayNameShort = "Humo Verde";
		picture = "\go9_granada_s_v\data\ico\go9_granada_s_verde.paa";
		model = "\go9_granada_s_v\go9_granada_s_v.p3d";
		ammo = "go9_granada_Sammo_v";
		descriptionShort = "Granada S de humo verde RTM";
	};
	
	
};

class cfgWeapons 
{
	class Default;
	class GrenadeLauncher : Default {};
	class Throw : GrenadeLauncher {};
	
	class go9_granada_Sthrow : Throw 
	{
		displayname = "Throw";
		baseWeapon = "go9_granada_Sthrow"
		scope = 2;
		scopeCurator = 2;          
                scopeArsenal = 2;
		muzzles[] = {"go9_granada_S_Muzzle"};
		class  ThrowMuzzle: GrenadeLauncher
		{
			aidispersioncoefx = 6;
			aidispersioncoefy = 6;
			autoreload = 1;
			cursor = "EmptyCursor";
			cursoraim = "throw";
			enableattack = 0;
			keepininventory = 1;
			magazinereloadtime = 0;
			maxrange = 60;
			maxrangeprobab = 0.03;
			midrange = 45;
			midrangeprobab = 0.9;
			minrange = 10;
			minrangeprobab = 0.2;
			modeloptics = "";
			reloadsound[] = {"", 0.000316228, 1};
			reloadtime = 0;
			showempty = 0;
			sound[] = {"", 0.000316228, 1};
			
		};
		
		class go9_granada_S_Muzzle: ThrowMuzzle
		{
			magazines[] = {"go9_granada_Sshell_b","go9_granada_Sshell_r","go9_granada_Sshell_v"};
		};
	};
};

Thank you for your time in advance!

Peace out  B)

Share this post


Link to post
Share on other sites

Try this:

class cfgWeapons 
{
	class Default;

	class Put: Default
	{
		muzzles[] += {"go9_Dinamita_Muzzle"};
		class PutMuzzle: Default{};
		class go9_Dinamita_Muzzle: PutMuzzle
		{
			magazines[] = {"DinamitaM"};
		};
	};

	class GrenadeLauncher;
	class Throw : GrenadeLauncher 
	{
		muzzles[] += {"go9_granada_S_Muzzle"};
		class ThrowMuzzle: GrenadeLauncher{};
		class go9_granada_S_Muzzle: ThrowMuzzle
		{
			magazines[] = {"go9_granada_Sshell_b","go9_granada_Sshell_r","go9_granada_Sshell_v"};
		};
	};
};

Thats combined them, but you can seperate them out yourself (assuming they work :P)

Share this post


Link to post
Share on other sites

EDIT: Hang on, I spoke too soon. Now the appear in the arsenal, but when I try and load a soldier with the smoke grenades it shows an error:

"No entry cfgWeapons.go9_granada.Sthrow"

 

OLD POST:

That totally did it!!  :o

I don't understand the reasoning, but for the moment, the fact that it worked has made my day. Thank you kind sir!

  • Like 1

Share this post


Link to post
Share on other sites

Are you adding 'go9_granada.Sthrow' to the units, either by unit line or at config level? Adding the new magazines to the magazines array of the default 'Throw' weapon eliminates the need for the new throw weapon. As such I removed it in my example (it was present in your original). I can only assume another config of yours (or init line within the mission.sqm) still references the now missing class-name.

Share this post


Link to post
Share on other sites

 I can only assume another config of yours (or init line within the mission.sqm) still references the now missing class-name.

 

This exactly! I will try it out now and let you know thanks!

 

EDIT: I have removed the weapon that no longer existed from the units that had it, and the smoke grenades now appear in the arsenal under the "grenades" tab and I can equip them, However, it does not give me the option to throw them, as if they were not grenades, they are just there in the inventory.

 

The Dinamite charge works perfectly well though.

Thanks

Share this post


Link to post
Share on other sites

I have redone the config to include both the dinamite and the smoke grenades.

They both appear now in the Arsenal, and dinamite is functional. However, the smoke grenades go into the inventory but don't act as weapons, they can't be thrown or anything. Any leads?

class CfgPatches
{
	class rtm_armas
	{
		units[] = {};
		weapons[] = {};
		requiredAddons[] = {"A3_weapons_F","A3_Modules_F_Misc"};
	};
};
	
class cfgAmmo	
{
	class Default;	// External class reference
	class Grenade : Default {};
	class GrenadeHand : Grenade {};
	class SmokeShell: GrenadeHand {};
	class SatchelCharge_Remote_Ammo;
	
	class Dinamita: SatchelCharge_Remote_Ammo
	{
		author = "RealityTeamMod";
		scope = 2;
		scopeCurator = 2;          
        scopeArsenal = 2;
		displayName="Carga de Dinamita";
		picture = "\rtm_armas\data\ico\dinamita.paa";
		hit=8000;
		indirectHit=8000;
		indirectHitRange=15;
		deflecting = 25;
		model = "\rtm_armas\rtm_dinamita.p3d";
		mineModelDisabled = "\rtm_armas\rtm_dinamita.p3d";
		soundHit[] = {"A3\Sounds_F\arsenal\explosives\mines\Explosive_Charge_01",3.1622777,1,1500};
		defaultMagazine = "DinamitaM";
		ExplosionEffects = "MineNondirectionalExplosion";
		CraterEffects = "MineNondirectionalCrater";
		whistleDist = 32;
		mineInconspicuousness = 5;
		mineTrigger = "RemoteTrigger";
		triggerWhenDestroyed = 0;
	};
	class Dinamita_Scripted: SatchelCharge_Remote_Ammo
	{
		triggerWhenDestroyed = 1;
	};

	class rtm_granada_Sammo_b: SmokeShell
	{
		model = "\rtm_armas\rtm_granada_s_v.p3d";
		timeToLive = 80;
		smokeColor[] = {1,1,1,1};
		effectsSmoke = "SmokeShellWhiteEffect";	
	};
	class rtm_granada_Sammo_v: SmokeShell
	{
		model = "\rtm_armas\rtm_granada_s_v.p3d";
		timeToLive = 80;
		smokeColor[] = {0.2125,0.6258,0.48909998,1};
		effectsSmoke = "SmokeShellGreenEffect";	
	};
	class rtm_granada_Sammo_r: SmokeShell
	{
		model = "\rtm_armas\rtm_granada_s_v.p3d";
		timeToLive = 80;
		smokeColor[] = {0.8438,0.1383,0.1353,1};
		effectsSmoke = "SmokeShellRedEffect";	
	};
};

class cfgMagazines
{
	class Default;	// External class reference
	class CA_Magazine : Default {};
	class HandGrenade : CA_Magazine {};
	class SmokeShell :  HandGrenade {};
	class SatchelCharge_Remote_Mag;
	
	class DinamitaM: SatchelCharge_Remote_Mag
	{
		author = "Reality Team Mod";
		scope = 2;
		scopeCurator = 2;          
        scopeArsenal = 2;
		mass = 12;
		displayName="Carga de dinamita";
		picture = "\rtm_armas\data\ico\dinamita.paa";
		model = "\rtm_armas\rtm_dinamita.p3d";
		ammo = "Dinamita";
		descriptionShort = "¡Cuidado con los dedos!";
		class Library
		{
			libTextDesc = "Carga de dinamita";
		};
	};
	
	class rtm_granada_Sshell_b: SmokeShell
	{
		author = "RealityTeamMod";
		scope = 2;        
        scopeArsenal = 2;
		displayName = "Granada S Blanco";
		displayNameShort = "Humo Blanco";
		picture = "\rtm_armas\data\ico\rtm_granada_s_blanco.paa";
		model = "\rtm_armas\rtm_granada_s_v.p3d";
		ammo = "rtm_granada_Sammo_b";
		descriptionShort = "Granada S de humo blanco RTM";
	};
	class rtm_granada_Sshell_r: SmokeShell
	{
		author = "RealityTeamMod";
		scope = 2;         
        scopeArsenal = 2;
		displayName = "Granada S Rojo";
		displayNameShort = "Humo Rojo";
		picture = "\rtm_armas\data\ico\rtm_granada_s_rojo.paa";
		model = "\rtm_armas\rtm_granada_s_v.p3d";
		ammo = "rtm_granada_Sammo_r";
		descriptionShort = "Granada S de humo rojo RTM";
	};
	class rtm_granada_Sshell_v: SmokeShell
	{
		author = "RealityTeamMod";
		scope = 2;        
        scopeArsenal = 2;
		displayName = "Granada S Verde";
		displayNameShort = "Humo Verde";
		picture = "\rtm_armas\data\ico\rtm_granada_s_verde.paa";
		model = "\rtm_armas\rtm_granada_s_v.p3d";
		ammo = "rtm_granada_Sammo_v";
		descriptionShort = "Granada S de humo verde RTM";
	};
};

class cfgWeapons 
{
	class Default;

	class Put: Default
	{
		muzzles[] += {"rtm_Dinamita_Muzzle"};
		class PutMuzzle: Default{};
		class rtm_Dinamita_Muzzle: PutMuzzle
		{
			magazines[] = {"DinamitaM"};
		};
	};

	class GrenadeLauncher;
	class Throw : GrenadeLauncher 
	{
		muzzles[] += {"rtm_granada_S_Muzzle"};
		class ThrowMuzzle: GrenadeLauncher{};
		class rtm_granada_S_Muzzle: ThrowMuzzle
		{
			magazines[] = {"rtm_granada_Sshell_b","rtm_granada_Sshell_r","rtm_granada_Sshell_v"};
		};
	};
};

Share this post


Link to post
Share on other sites

EDIT: SOLVED!

I would like to thank Jackal326 for your help, wouldn't have been possible without your guidance. Thanks again!

 

 

Solution: It seems each smoke grenade color has its own muzzle, so I inherited directly from there

class cfgWeapons 
{
	class Default;
	class GrenadeLauncher;
	
	class Put: Default
	{
		muzzles[] += {"rtm_Dinamita_Muzzle"};
		class PutMuzzle: Default{};
		class rtm_Dinamita_Muzzle: PutMuzzle
		{
			magazines[] = {"DinamitaM"};
		};
	};
	class Throw : GrenadeLauncher 
	{
		muzzles[] += {"rtm_granada_S_Muzzle"};
		class ThrowMuzzle: GrenadeLauncher{};
		
		class SmokeShellMuzzle: ThrowMuzzle
		{
			magazines[] += {"rtm_granada_Sshell_b"};
		};
		class SmokeShellRedMuzzle: ThrowMuzzle
		{
			magazines[] += {"rtm_granada_Sshell_r"};
		};
		class SmokeShellGreenMuzzle: ThrowMuzzle
		{
			magazines[] += {"rtm_granada_Sshell_v"};
		};
	};
};
  • 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

×